report.js.plotly-latest.min.js Maven / Gradle / Ivy
Show all versions of rainfall-core Show documentation
/**
* plotly.js v1.33.1
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=t()}}(function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){var r=e[o][1][t];return i(r||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;oMath.abs(e))c.rotate(o,0,0,-t*i*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-c.lastT())/100;c.pan(o,0,0,f*(Math.exp(s)-1))}},!0),p};var n=t("right-now"),i=t("3d-view"),a=t("mouse-change"),o=t("mouse-wheel"),s=t("mouse-event-offset")},{"3d-view":40,"mouse-change":443,"mouse-event-offset":444,"mouse-wheel":446,"right-now":509}],40:[function(t,e,r){"use strict";function n(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=i(),f=a(),h=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new n({turntable:u,orbit:f,matrix:h},c)};var i=t("turntable-camera-controller"),a=t("orbit-camera-controller"),o=t("matrix-camera-controller"),s=n.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach(function(t){for(var e=t[0],r=[],n=0;n0&&(e.y+=r),a=e.y+e.dy+u;if((r=a-u-f[1])>0)for(a=e.y-=r,n=o-2;n>=0;--n)(r=(e=t[n]).y+e.dy+u-a)>0&&(e.y-=r),a=e.y})}function i(t,e){return t.y-e.y}var a=r.nest().key(function(t){return t.x}).sortKeys(e.ascending).entries(h).map(function(t){return t.values});!function(){var t=e.min(a,function(t){return(f[1]-(t.length-1)*u)/e.sum(t,s)});a.forEach(function(e){e.forEach(function(e,r){e.y=r,e.dy=e.value*t})}),d.forEach(function(e){e.dy=e.value*t})}(),n();for(var l=1;t>0;--t)!function(t){function r(t){return o(t.target)*t.value}a.slice().reverse().forEach(function(n){n.forEach(function(n){if(n.sourceLinks.length){var i=e.sum(n.sourceLinks,r)/e.sum(n.sourceLinks,s);n.y+=(i-o(n))*t}})})}(l*=.99),n(),function(t){function r(t){return o(t.source)*t.value}a.forEach(function(n){n.forEach(function(n){if(n.targetLinks.length){var i=e.sum(n.targetLinks,r)/e.sum(n.targetLinks,s);n.y+=(i-o(n))*t}})})}(l),n()}function a(){function t(t,e){return t.source.y-e.source.y||t.originalIndex-e.originalIndex}function e(t,e){return t.target.y-e.target.y||t.originalIndex-e.originalIndex}h.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),h.forEach(function(t){var e=0,r=0;t.sourceLinks.forEach(function(t){t.sy=e,e+=t.dy}),t.targetLinks.forEach(function(t){t.ty=r,r+=t.dy})})}function o(t){return t.y+t.dy/2}function s(t){return t.value}var l={},c=24,u=8,f=[1,1],h=[],d=[];return l.nodeWidth=function(t){return arguments.length?(c=+t,l):c},l.nodePadding=function(t){return arguments.length?(u=+t,l):u},l.nodes=function(t){return arguments.length?(h=t,l):h},l.links=function(t){return arguments.length?(d=t,l):d},l.size=function(t){return arguments.length?(f=t,l):f},l.layout=function(r){return h.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),d.forEach(function(t,e){var r=t.source,n=t.target;"number"==typeof r&&(r=t.source=h[t.source]),"number"==typeof n&&(n=t.target=h[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),h.forEach(function(t){t.value=Math.max(e.sum(t.sourceLinks,s),e.sum(t.targetLinks,s))}),t(),i(r),a(),l},l.relayout=function(){return a(),l},l.link=function(){function t(t){var r=t.source.x+t.source.dx,i=t.target.x,a=n.interpolateNumber(r,i),o=a(e),s=a(1-e),l=t.source.y+t.sy,c=l+t.dy,u=t.target.y+t.ty,f=u+t.dy;return"M"+r+","+l+"C"+o+","+l+" "+s+","+u+" "+i+","+u+"L"+i+","+f+"C"+s+","+f+" "+o+","+c+" "+r+","+c+"Z"}var e=.5;return t.curvature=function(r){return arguments.length?(e=+r,t):e},t},l},Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-array":120,"d3-collection":121,"d3-interpolate":125}],42:[function(t,e,r){"use strict";var n="undefined"==typeof WeakMap?t("weak-map"):WeakMap,i=t("gl-buffer"),a=t("gl-vao"),o=new n;e.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{"gl-buffer":165,"gl-vao":259,"weak-map":573}],43:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map(function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case"a":t[6]+=n,t[7]+=i;break;case"v":t[1]+=i;break;case"h":t[1]+=n;break;default:for(var s=1;si&&(i=t[o]),t[o]>16&255,i[1]=a>>8&255,i[2]=255&a):e.test(t)&&(a=t.match(r),i[0]=parseInt(a[1]),i[1]=parseInt(a[2]),i[2]=parseInt(a[3])),!n)for(var o=0;o<3;++o)i[o]=i[o]/255;return i},t.str2RgbaArray=function(t,n){var i,a;if("string"!=typeof t)return t;if(i=[],"#"===t[0]?(3===(t=t.substr(1)).length&&(t+=t),a=parseInt(t,16),i[0]=a>>16&255,i[1]=a>>8&255,i[2]=255&a):e.test(t)&&(a=t.match(r),i[0]=parseInt(a[1]),i[1]=parseInt(a[2]),i[2]=parseInt(a[3]),a[4]?i[3]=parseFloat(a[4]):i[3]=1),!n)for(var o=0;o<3;++o)i[o]=i[o]/255;return i},t}()},{}],51:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;s--)if(l[s]!==c[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!h(t[o],e[o],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function p(t,e,r){h(t,e,!0)&&u(t,e,r,"notDeepStrictEqual",p)}function m(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function g(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&u(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!t&&v.isError(i),s=!t&&i&&!r;if((o&&a&&m(i,r)||s)&&u(i,r,"Got unwanted exception"+n),t&&i&&r&&!m(i,r)||!t&&i)throw i}var v=t("util/"),y=Object.prototype.hasOwnProperty,x=Array.prototype.slice,b="foo"===function(){}.name,_=e.exports=f,w=/\s*function\s+([^\(\s]*)\s*/;_.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return l(c(t.actual),128)+" "+t.operator+" "+l(c(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||u;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},v.inherits(_.AssertionError,Error),_.fail=u,_.ok=f,_.equal=function(t,e,r){t!=e&&u(t,e,r,"==",_.equal)},_.notEqual=function(t,e,r){t==e&&u(t,e,r,"!=",_.notEqual)},_.deepEqual=function(t,e,r){h(t,e,!1)||u(t,e,r,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(t,e,r){h(t,e,!0)||u(t,e,r,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(t,e,r){h(t,e,!1)&&u(t,e,r,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=p,_.strictEqual=function(t,e,r){t!==e&&u(t,e,r,"===",_.strictEqual)},_.notStrictEqual=function(t,e,r){t===e&&u(t,e,r,"!==",_.notStrictEqual)},_.throws=function(t,e,r){g(!0,t,e,r)},_.doesNotThrow=function(t,e,r){g(!1,t,e,r)},_.ifError=function(t){if(t)throw t};var M=Object.keys||function(t){var e=[];for(var r in t)y.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":563}],52:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],53:[function(t,e,r){"use strict";function n(t){for(var e=0,r=0;r0?r=r.ushln(f):f<0&&(u=u.ushln(-f)),l(r,u)}var i=t("./is-rat"),a=t("./lib/is-bn"),o=t("./lib/num-to-bn"),s=t("./lib/str-to-bn"),l=t("./lib/rationalize"),c=t("./div");e.exports=n},{"./div":56,"./is-rat":58,"./lib/is-bn":62,"./lib/num-to-bn":63,"./lib/rationalize":64,"./lib/str-to-bn":65}],58:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":62}],59:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":73}],60:[function(t,e,r){"use strict";var n=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}},{"bit-twiddle":71,"double-bits":131}],62:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":73}],63:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("double-bits");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":73,"double-bits":131}],64:[function(t,e,r){"use strict";var n=t("./num-to-bn"),i=t("./bn-sign");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}},{"./bn-sign":59,"./num-to-bn":63}],65:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":73}],66:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":64}],67:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":59}],68:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":64}],69:[function(t,e,r){"use strict";var n=t("./lib/bn-to-num"),i=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(h=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?c*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),c*h*Math.pow(2,1023-f))}},{"./lib/bn-to-num":60,"./lib/ctz":61}],70:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],71:[function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,16843009*((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),(t=65535&(t|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),(t=1023&(t|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],72:[function(t,e,r){"use strict";function n(t,e,r,n,a,o,s){for(var l=0;l=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&l,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[d])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}function c(t,e,r){return(new u).mulp(t,e,r)}function u(t,e){this.x=t,this.y=e}function f(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function d(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function v(t){g.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var y;try{y=t("buffer").Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,l=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],b=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?x[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=b[t],u=_[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var h=f.modn(u).toString(t);r=(f=f.idivn(u)).isZero()?h+r:x[c-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==y),this.toArrayLike(y,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],M=8191&w,k=w>>>13,A=0|o[5],T=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,z=0|o[7],D=8191&z,I=z>>>13,P=0|o[8],O=8191&P,F=P>>>13,R=0|o[9],N=8191&R,j=R>>>13,B=0|s[0],U=8191&B,V=B>>>13,q=0|s[1],H=8191&q,G=q>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ft=8191&ut,ht=ut>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;c=((a=Math.imul(h,V))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var vt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0;var yt=(c+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,W)|0))<<13)|0;c=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0;var xt=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,J)|0))<<13)|0;c=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,H)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;c=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,H)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var Mt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(F,U)|0,a=Math.imul(F,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,V))+Math.imul(j,U)|0,a=Math.imul(j,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(F,H)|0,a=a+Math.imul(F,G)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,a=a+Math.imul(m,ht)|0;var At=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((a=a+Math.imul(h,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,G))+Math.imul(j,H)|0,a=Math.imul(j,G),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,X)|0,n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,X))+Math.imul(j,W)|0,a=Math.imul(j,X),n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(F,J)|0,a=a+Math.imul(F,K)|0,n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((a=a+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,J),i=(i=Math.imul(N,K))+Math.imul(j,J)|0,a=Math.imul(j,K),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,ft)|0,a=a+Math.imul(k,ht)|0;var Et=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((a=a+Math.imul(_,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(F,rt)|0,a=a+Math.imul(F,nt)|0,n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(C,lt)|0,a=a+Math.imul(C,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Lt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(j,rt)|0,a=Math.imul(j,nt),n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(F,at)|0,a=a+Math.imul(F,ot)|0,n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(I,lt)|0,a=a+Math.imul(I,ct)|0,n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(C,ft)|0,a=a+Math.imul(C,ht)|0;var Ct=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((a=a+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,at),i=(i=Math.imul(N,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(F,lt)|0,a=a+Math.imul(F,ct)|0,n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(I,ft)|0,a=a+Math.imul(I,ht)|0;var zt=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((a=a+Math.imul(C,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(N,lt),i=(i=Math.imul(N,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(F,ft)|0,a=a+Math.imul(F,ht)|0;var Dt=(c+(n=n+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((a=a+Math.imul(I,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(j,ft)|0,a=Math.imul(j,ht);var It=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(F,pt)|0))<<13)|0;c=((a=a+Math.imul(F,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(c+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=kt,l[9]=At,l[10]=Tt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=zt,l[16]=Dt,l[17]=It,l[18]=Pt,0!==c&&(l[19]=c,r.length++),r};Math.imul||(w=l),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?w(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):c(this,t,e)},u.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},u.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var u=0,f=1;0==(r.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(r.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var h;return(h=0===e.cmpn(1)?i:o).cmpn(0)<0&&h.iadd(t),h},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new g(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var M={k256:null,p224:null,p192:null,p25519:null};f.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},f.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},f.prototype.split=function(t,e){t.iushrn(this.n,0,e)},f.prototype.imulK=function(t){return t.imul(this.k)},i(h,f),h.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},h.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(M[t])return M[t];var e;if("k256"===t)e=new h;else if("p224"===t)e=new d;else if("p192"===t)e=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new m}return M[t]=e,e},g.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},g.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},g.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},g.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},g.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},g.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},g.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},g.prototype.isqr=function(t){return this.imul(t,t.clone())},g.prototype.sqr=function(t){return this.mul(t,t)},g.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},g.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},g.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new v(t)},i(v,g),v.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},v.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},v.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],74:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(s<=0)){var f,h=l.mallocDouble(2*s*a),d=l.mallocInt32(a);if((a=i(t,s,h,d))>0){if(1===s&&n)c.init(a),f=c.sweepComplete(s,r,0,a,h,d,0,a,h,d);else{var p=l.mallocDouble(2*s*o),m=l.mallocInt32(o);(o=i(e,s,p,m))>0&&(c.init(a+o),f=1===s?c.sweepBipartite(s,r,0,a,h,d,0,o,p,m):u(s,r,n,a,h,d,o,p,m),l.free(p),l.free(m))}l.free(h),l.free(d)}return f}}}function o(t,e){s.push([t,e])}e.exports=function(t,e,r){switch(arguments.length){case 1:return function(t){return s=[],a(t,t,o,!0),s}(t);case 2:return"function"==typeof e?a(t,t,e,!0):function(t,e){return s=[],a(t,e,o,!1),s}(t,e);case 3:return a(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}};var s,l=t("typedarray-pool"),c=t("./lib/sweep"),u=t("./lib/intersect")},{"./lib/intersect":77,"./lib/sweep":81,"typedarray-pool":554}],76:[function(t,e,r){"use strict";function n(t){function e(e,r){var s=function(t,e,r){var n="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),s=["function ",n,"(",_.join(),"){","var ",l,"=2*",i,";"],w="for(var i="+c+","+d+"="+l+"*"+c+";i<"+u+";++i,"+d+"+="+l+"){var x0="+f+"["+a+"+"+d+"],x1="+f+"["+a+"+"+d+"+"+i+"],xi="+h+"[i];",M="for(var j="+p+","+y+"="+l+"*"+p+";j<"+m+";++j,"+y+"+="+l+"){var y0="+g+"["+a+"+"+y+"],"+(r?"y1="+g+"["+a+"+"+y+"+"+i+"],":"")+"yi="+v+"[j];";return t?s.push(w,b,":",M):s.push(M,b,":",w),r?s.push("if(y1"+m+"-"+p+"){"),t?(e(!0,!1),M.push("}else{"),e(!1,!1)):(M.push("if("+s+"){"),e(!0,!0),M.push("}else{"),e(!0,!1),M.push("}}else{if("+s+"){"),e(!1,!0),M.push("}else{"),e(!1,!1),M.push("}")),M.push("}}return "+r);var k=n.join("")+M.join("");return new Function(k)()}var i="d",a="ax",o="vv",s="fp",l="es",c="rs",u="re",f="rb",h="ri",d="rp",p="bs",m="be",g="bb",v="bi",y="bp",x="rv",b="Q",_=[i,a,o,c,u,f,h,p,m,g,v];r.partial=n(!1),r.full=n(!0)},{}],77:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o,s,l){var c=M*t;A[c]=e,A[c+1]=r,A[c+2]=n,A[c+3]=i,A[c+4]=a,A[c+5]=o;var u=k*t;T[u]=s,T[u+1]=l}function i(t,e,r,n,i,a,o,s,l,c,u){var f=2*t,h=l*f,d=c[h+e];t:for(var p=i,m=i*f;p0;){var P=(D-=1)*M,O=A[P],F=A[P+1],R=A[P+2],N=A[P+3],j=A[P+4],B=A[P+5],U=D*k,V=T[U],q=T[U+1],H=1&B,G=!!(16&B),Y=d,W=S,X=L,Z=C;if(H&&(Y=L,W=C,X=d,Z=S),!(2&B&&(R=x(t,O,F,R,Y,W,q),F>=R)||4&B&&(F=b(t,O,F,R,Y,W,V))>=R)){var J=R-F,K=j-N;if(G){if(t*J*(J+K)=p0)&&!(p1>=hi)",["p0","p1"]),y=d("lo===p0",["p0"]),x=d("lor&&i[f+e]>c;--u,f-=o){for(var h=f,d=f+o,p=0;p>>1,h=2*t,d=f,p=s[h*f+e];c=x?(d=y,p=x):v>=_?(d=g,p=v):(d=b,p=_):x>=_?(d=y,p=x):_>=v?(d=g,p=v):(d=b,p=_);for(var w=h*(u-1),M=h*d,k=0;k=0&&i.push("lo=e[k+n]"),t.indexOf("hi")>=0&&i.push("hi=e[k+o]"),r.push(n.replace("_",i.join()).replace("$",t)),Function.apply(void 0,r)};var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],80:[function(t,e,r){"use strict";function n(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function c(t,e,r,n){var i=n[t*=2];return i>1,g=m-h,v=m+h,y=d,x=g,b=m,_=v,w=p,M=t+1,k=e-1,A=0;l(y,x,r)&&(A=y,y=x,x=A),l(_,w,r)&&(A=_,_=w,w=A),l(y,b,r)&&(A=y,y=b,b=A),l(x,b,r)&&(A=x,x=b,b=A),l(y,_,r)&&(A=y,y=_,_=A),l(b,_,r)&&(A=b,b=_,_=A),l(x,w,r)&&(A=x,x=w,w=A),l(x,b,r)&&(A=x,x=b,b=A),l(_,w,r)&&(A=_,_=w,w=A);for(var T=r[2*x],S=r[2*x+1],E=r[2*_],L=r[2*_+1],C=2*y,z=2*b,D=2*w,I=2*d,P=2*m,O=2*p,F=0;F<2;++F){var R=r[C+F],N=r[z+F],j=r[D+F];r[I+F]=R,r[P+F]=N,r[O+F]=j}a(g,t,r),a(v,e,r);for(var B=M;B<=k;++B)if(c(B,T,S,r))B!==M&&i(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(k,E,L,r)){c(k,T,S,r)?(o(B,M,k,r),++M,--k):(i(B,k,r),--k);break}if(--k>>1;s(m,S);var E=0,L=0;for(M=0;M=l)n(f,h,L--,C=C-l|0);else if(C>=0)n(c,u,E--,C);else if(C<=-l){C=-C-l|0;for(var z=0;z>>1;s(m,E);var L=0,C=0,z=0;for(k=0;k>1==m[2*k+3]>>1&&(I=2,k+=1),D<0){for(var P=-(D>>1)-1,O=0;O>1)-1,0===I?n(c,u,L--,P):1===I?n(f,h,C--,P):2===I&&n(d,p,z--,P)}},scanBipartite:function(t,e,r,a,o,f,h,d,p,g,v,y){var x=0,b=2*t,_=e,w=e+t,M=1,k=1;a?k=l:M=l;for(var A=o;A>>1;s(m,L);var C=0;for(A=0;A=l?(D=!a,T-=l):(D=!!a,T-=1),D)i(c,u,C++,T);else{var I=y[T],P=b*T,O=v[P+e+1],F=v[P+e+1+t];t:for(var R=0;R>>1;s(m,M);var k=0;for(x=0;x=l)c[k++]=b-l;else{var T=d[b-=1],S=g*b,E=h[S+e+1],L=h[S+e+1+t];t:for(var C=0;C=0;--C)if(c[C]===b){for(P=C+1;PP)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=i.prototype,e}function i(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return s(t)}return a(t,e,r)}function a(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return t instanceof ArrayBuffer?function(t,e,r){if(e<0||t.byteLength=P)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P.toString(16)+" bytes");return 0|t}function u(t,e){if(i.isBuffer(t))return t.length;if(C(t)||t instanceof ArrayBuffer)return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return S(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E(t).length;default:if(n)return S(t).length;e=(""+e).toLowerCase(),n=!0}}function f(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0);(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,z(r)&&(r=a?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(a)return-1;r=t.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:p(t,e,r,n,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):p(t,[e],r,n,a);throw new TypeError("val must be string, number or Buffer")}function p(t,e,r,n,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}var c;if(i){var u=-1;for(c=r;cs&&(r=s-l),c=r;c>=0;c--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function _(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,c,u,f;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=t[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],c=t[i+2],128==(192&l)&&128==(192&c)&&(f=(15&a)<<12|(63&l)<<6|63&c)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],c=t[i+2],u=t[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(f=(15&a)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nr)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function k(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function A(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,4),I.write(t,e,r,n,23,4),r+4}function T(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,8),I.write(t,e,r,n,52,8),r+8}function S(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function E(t){return D.toByteArray(function(t){if((t=t.trim().replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function L(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function C(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function z(t){return t!=t}var D=t("base64-js"),I=t("ieee754");r.Buffer=i,r.SlowBuffer=function(t){return+t!=t&&(t=0),i.alloc(+t)},r.INSPECT_MAX_BYTES=50;var P=2147483647;r.kMaxLength=P,(i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,e,r){return a(t,e,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(t,e,r){return function(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}(t,e,r)},i.allocUnsafe=function(t){return s(t)},i.allocUnsafeSlow=function(t){return s(t)},i.isBuffer=function(t){return null!=t&&!0===t._isBuffer},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,a=0,o=Math.min(r,n);a0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,a){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),e<0||r>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&e>=r)return 0;if(n>=a)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=r-e,l=Math.min(o,s),c=this.slice(n,a),u=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return g(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return y(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},i.prototype.readUInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,a=0;++a=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},i.prototype.readInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||w(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){t>>>=0,e||w(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return t>>>=0,e||w(t,4,this.length),I.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),I.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),I.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),I.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){M(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){M(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,255,0),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},i.prototype.writeFloatLE=function(t,e,r){return A(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return T(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return T(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return o[t>>18&63]+o[t>>12&63]+o[t>>6&63]+o[63&t]}function a(t,e,r){for(var n,a=[],o=e;o0?u-4:u;var f=0;for(e=0,r=0;e>16&255,c[f++]=a>>8&255,c[f++]=255&a;return 2===o?(a=s[t.charCodeAt(e)]<<2|s[t.charCodeAt(e+1)]>>4,c[f++]=255&a):1===o&&(a=s[t.charCodeAt(e)]<<10|s[t.charCodeAt(e+1)]<<4|s[t.charCodeAt(e+2)]>>2,c[f++]=a>>8&255,c[f++]=255&a),c},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,i="",s=[],l=0,c=r-n;lc?c:l+16383));return 1===n?(e=t[r-1],i+=o[e>>2],i+=o[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=o[e>>10],i+=o[e>>4&63],i+=o[e<<2&63],i+="="),s.push(i),s.join("")};for(var o=[],s=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,f=c.length;u0;){for(var d=r.pop(),p=(u=-1,f=-1,l=o[s=r.pop()],1);p=0||(e.flip(s,d),n(t,e,r,u,s,f),n(t,e,r,s,f,u),n(t,e,r,f,d,u),n(t,e,r,d,u,f))}}},{"binary-search-bounds":89,"robust-in-sphere":513}],86:[function(t,e,r){"use strict";function n(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function i(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}var a=t("binary-search-bounds");e.exports=function(t,e,r){var a=function(t,e){for(var r=t.cells(),a=r.length,o=0;o0||l.length>0;){for(;s.length>0;){var d=s.pop();if(c[d]!==-o){c[d]=o,u[d];for(var p=0;p<3;++p){var m=h[3*d+p];m>=0&&0===c[m]&&(f[3*d+p]?l.push(m):(s.push(m),c[m]=o))}}}var g=l;l=s,s=g,l.length=0,o=-o}var v=function(t,e,r){for(var n=0,i=0;i1&&h(r[u[d-2]],r[u[d-1]],n)>0;)t.push([u[d-1],u[d-2],i]),d-=1;u.length=d,u.push(i);var p=c.upperIds;for(d=p.length;d>1&&h(r[p[d-2]],r[p[d-1]],n)<0;)t.push([p[d-2],p[d-1],i]),d-=1;p.length=d,p.push(i)}}function l(t,e){var r;return(r=t.a[0]v[0]&&l.push(new i(v,g,m,f),new i(g,v,p,f))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),x=[new n([y,1],[y,0],-1,[],[],[],[])],b=[],_=(f=0,l.length);f<_;++f){var w=l[f],M=w.type;M===d?s(b,x,t,w.a,w.idx):M===m?c(x,0,w):u(x,0,w)}return b}},{"binary-search-bounds":89,"robust-orientation":515}],88:[function(t,e,r){"use strict";function n(t,e){this.stars=t,this.edges=e}function i(t,e,r){for(var n=1,i=t.length;n=0}}(),o.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},o.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},o.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],90:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1,r=1;rr?r:t:te?e:t}},{}],94:[function(t,e,r){"use strict";function n(t){var e=m(t);return[v(e,-1/0),v(e,1/0)]}function i(t){for(var e=new Array(t.length),r=0;re[2]?1:0)}function l(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--a){var x=e[o=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],M=t[_];if((w[0]-M[0]||w[1]-M[1])<0){var k=b;b=_,_=k}x[0]=b;var A,T=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===o;){var S,E=(S=n[--a])[1];i?e.push([T,E,A]):e.push([T,E]),T=E}i?e.push([T,_,A]):e.push([T,_])}return s}(t,e,o,c,r));return l(e,u,r),!!u||(o.length>0||c.length>0)}e.exports=function(t,e,r){var n;if(r){n=e;for(var o=new Array(e.length),s=0;s>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:93}],98:[function(t,e,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],99:[function(t,e,r){"use strict";var n=t("color-rgba"),i=t("clamp"),a=t("dtype");e.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=a(e),o=new r(4);if(t instanceof r)return Array.isArray(t)?t.slice():(o.set(t),o);var s="uint8"!==e&&"uint8_clamped"!==e;return t instanceof Uint8Array||t instanceof Uint8ClampedArray?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:255,s&&(o[0]/=255,o[1]/=255,o[2]/=255,o[3]/=255),o):(t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),s?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:1):(o[0]=i(Math.round(255*t[0]),0,255),o[1]=i(Math.round(255*t[1]),0,255),o[2]=i(Math.round(255*t[2]),0,255),o[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),o)}},{clamp:93,"color-rgba":101,dtype:133}],100:[function(t,e,r){(function(r){"use strict";var n=t("color-name"),i=t("is-plain-obj"),a=t("defined");e.exports=function(t){var e,s,l=[],c=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1);c=1,(h=u.length)<=4?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===h&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===h&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var f=e[1];s=u=f.replace(/a$/,"");var h="cmyk"===u?4:"gray"===u?1:3;l=e[2].trim().split(/\s*,\s*/).map(function(t,e){if(/%$/.test(t))return e===h?parseFloat(t)/100:"rgb"===u?255*parseFloat(t)/100:parseFloat(t);if("h"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),f===u&&l.push(1),c=void 0===l[h]?1:l[h],l=l.slice(0,h)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),s=t.match(/([a-z])/gi).join("").toLowerCase());else if("number"==typeof t)s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];else if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s="rgb",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s="hsl",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",c=4===t.length?t[3]:1);return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":98,defined:129,"is-plain-obj":286}],101:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t){var e;if("string"!=typeof t)throw Error("Argument should be a string");var r=n(t);return r.space?(e=Array(3),e[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:93,"color-parse":100,"color-space/hsl":102}],102:[function(t,e,r){"use strict";var n=t("./rgb");e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return a=255*l,[a,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*a;return i}},n.hsl=function(t){var e,r,n,i=t[0]/255,a=t[1]/255,o=t[2]/255,s=Math.min(i,a,o),l=Math.max(i,a,o),c=l-s;return l===s?e=0:i===l?e=(a-o)/c:a===l?e=2+(o-i)/c:o===l&&(e=4+(i-a)/c),(e=Math.min(60*e,360))<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?c/(l+s):c/(2-l-s),[e,100*r,100*n]}},{"./rgb":103}],103:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],104:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:0,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],105:[function(t,e,r){"use strict";function n(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function i(t){return"rgba("+t.join(",")+")"}var a=t("arraytools"),o=t("clone"),s=t("./colorScales");e.exports=function(t){var e,r,l,c,u,f,h,d,p,m,g,v,y,x=[],b=[],_=[],w=[];if(a.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||"hex",(h=t.colormap)||(h="jet"),"string"==typeof h){if(h=h.toLowerCase(),!s[h])throw Error(h+" not a supported colorscale");f=o(s[h])}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);f=o(h)}if(f.length>p)throw new Error(h+" map requires nshades to be at least size "+f.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:o(t.alpha):"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=f.map(function(t){return Math.round(t.index*p)}),g[0]<0&&(g[0]=0),g[1]<0&&(g[0]=0),g[0]>1&&(g[0]=1),g[1]>1&&(g[0]=1),y=0;y=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y=0}e.exports=function(t,e,r,o){var s=i(e,r,o);if(0===s){var l=a(i(t,e,r)),c=a(i(t,e,o));if(l===c){if(0===l){var u=n(t,e,r);return u===n(t,e,o)?0:u?1:-1}return 0}return 0===c?l>0?-1:n(t,e,o)?-1:1:0===l?c>0?1:n(t,e,r)?1:-1:a(c-l)}var f=i(t,e,r);return f>0?s>0&&i(t,e,o)>0?1:-1:f<0?s>0||i(t,e,o)>0?1:-1:i(t,e,o)>0?1:n(t,e,r)?1:-1};var i=t("robust-orientation"),a=t("signum"),o=t("two-sum"),s=t("robust-product"),l=t("robust-sum")},{"robust-orientation":515,"robust-product":516,"robust-sum":520,signum:522,"two-sum":553}],107:[function(t,e,r){function n(t,e){return t-e}e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=i(t[0],t[1]),c=i(e[0],e[1]);return i(l,t[2])-i(c,e[2])||i(l+t[2],o)-i(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return u+f+h+d-(p+m+g+v)||i(u,f,h,d)-i(p,m,g,v,p)||i(u+f,u+h,u+d,f+h,f+d,h+d)-i(p+m,p+g,p+v,m+g,m+v,g+v)||i(u+f+h,u+f+d,u+h+d,f+h+d)-i(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),x=e.slice().sort(n),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},{}],111:[function(t,e,r){"use strict";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=t("incremental-convex-hull"),i=t("affine-hull")},{"affine-hull":45,"incremental-convex-hull":278}],113:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],114:[function(t,e,r){function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return i("%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function l(t){var e=t.replace(/ /g,"").toLowerCase();if(e in c)return c[e].slice();if("#"===e[0]){if(4===e.length){return(r=parseInt(e.substr(1),16))>=0&&r<=4095?[(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1]:null}if(7===e.length){var r;return(r=parseInt(e.substr(1),16))>=0&&r<=16777215?[(16711680&r)>>16,(65280&r)>>8,255&r,1]:null}return null}var i=e.indexOf("("),l=e.indexOf(")");if(-1!==i&&l+1===e.length){var u=e.substr(0,i),f=e.substr(i+1,l-(i+1)).split(","),h=1;switch(u){case"rgba":if(4!==f.length)return null;h=o(f.pop());case"rgb":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case"hsla":if(4!==f.length)return null;h=o(f.pop());case"hsl":if(3!==f.length)return null;var d=(parseFloat(f[0])%360+360)%360/360,p=o(f[1]),m=o(f[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,d+1/3)),n(255*s(v,g,d)),n(255*s(v,g,d-1/3)),h];default:return null}}return null}var c={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{r.parseCSSColor=l}catch(t){}},{}],115:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=c*t[d]+u*e[d]+f*r[d]+h*n[d];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],116:[function(t,e,r){"use strict";var n=t("./lib/thunk.js");e.exports=function(t){var e=new function(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1};e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===a){if(e.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(e.shapeArgs.push(i),ir.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,n(e)}},{"./lib/thunk.js":118}],117:[function(t,e,r){"use strict";function n(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,f=0;for(n=0;n=0;--n)u=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",f,"]-=s",f].join("")),l.push(["++index[",u,"]"].join(""))),l.push("}")}return l.join("\n")}function i(t,e,r){for(var n=t.body,i=[],a=[],o=0;o0&&y.push("shape=SS.slice(0)"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l3&&v.push(i(t.pre,t,s));var M=i(t.body,t,s),k=function(t){for(var e=0,r=t[0].length;e0,c=[],u=0;u0;){"].join("")),c.push(["if(j",u,"<",s,"){"].join("")),c.push(["s",e[u],"=j",u].join("")),c.push(["j",u,"=0"].join("")),c.push(["}else{s",e[u],"=",s].join("")),c.push(["j",u,"-=",s,"}"].join("")),l&&c.push(["index[",e[u],"]=j",u].join(""));for(u=0;u3&&v.push(i(t.post,t,s)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+v.join("\n")+"\n----------");var A=[t.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",k,function(t){for(var e=new Array(t.length),r=!0,n=0;n0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}(s)].join("");return new Function(["function ",A,"(",g.join(","),"){",v.join("\n"),"} return ",A].join(""))()}},{uniq:556}],118:[function(t,e,r){"use strict";var n=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],r=[],i=t.funcName+"_cwise_thunk";e.push(["return function ",i,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],u=0;u0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+f+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+f+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),u=0;u=0?(a>=b?10:a>=_?5:a>=w?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=b?10:a>=_?5:a>=w?2:1)}function n(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=b?i*=10:a>=_?i*=5:a>=w&&(i*=2),ee?1:t>=e?0:NaN},o=function(t){return 1===t.length&&(t=function(t){return function(e,r){return a(t(e),r)}}(t)),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}},s=o(a),l=s.right,c=s.left,u=function(t){return null===t?NaN:+t},f=function(t,e){var r,n,i=t.length,a=0,o=-1,s=0,l=0;if(null==e)for(;++o1)return l/(a-1)},h=function(t,e){var r=f(t,e);return r?Math.sqrt(r):r},d=function(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}},A=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n},T=function(t){if(!(a=t.length))return[];for(var e=-1,r=A(t,i),n=new Array(r);++et?1:e>=t?0:NaN},t.deviation=h,t.extent=d,t.histogram=function(){function t(t){var a,o,s=t.length,c=new Array(s);for(a=0;ah;)d.pop(),--p;var m,g=new Array(p+1);for(a=0;a<=p;++a)(m=g[a]=[]).x0=a>0?d[a-1]:f,m.x1=a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=A,t.pairs=function(t,r){null==r&&(r=e);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);n0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l=u.length)return null!=l?l(e):null!=s?e.sort(s):e;for(var o,c,f,h=-1,d=e.length,p=u[n++],m=r(),g=i();++hu.length)return t;var n,i=f[r-1];return null!=l&&r>=u.length?n=t.entries():(n=[],t.each(function(t,i){n.push({key:i,values:e(t,r)})})),null!=i?n.sort(function(t,e){return i(t.key,e.key)}):n}var s,l,c,u=[],f=[];return c={object:function(e){return t(e,0,n,i)},map:function(e){return t(e,0,a,o)},entries:function(r){return e(t(r,0,a,o),0)},key:function(t){return u.push(t),c},sortKeys:function(t){return f[u.length-1]=t,c},sortValues:function(t){return s=t,c},rollup:function(t){return l=t,c}}},t.set=l,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})})},{}],122:[function(t,e,r){!function(t,n){n("object"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){"use strict";function e(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function r(){}function n(t){var e;return t=(t+"").trim().toLowerCase(),(e=E.exec(t))?(e=parseInt(e[1],16),new l(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=L.exec(t))?i(parseInt(e[1],16)):(e=C.exec(t))?new l(e[1],e[2],e[3],1):(e=z.exec(t))?new l(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=D.exec(t))?a(e[1],e[2],e[3],e[4]):(e=I.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=P.exec(t))?c(e[1],e[2]/100,e[3]/100,1):(e=O.exec(t))?c(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?i(F[t]):"transparent"===t?new l(NaN,NaN,NaN,0):null}function i(t){return new l(t>>16&255,t>>8&255,255&t,1)}function a(t,e,r,n){return n<=0&&(t=e=r=NaN),new l(t,e,r,n)}function o(t){return t instanceof r||(t=n(t)),t?(t=t.rgb(),new l(t.r,t.g,t.b,t.opacity)):new l}function s(t,e,r,n){return 1===arguments.length?o(t):new l(t,e,r,null==n?1:n)}function l(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function c(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new f(t,e,r,n)}function u(t,e,i,a){return 1===arguments.length?function(t){if(t instanceof f)return new f(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=n(t)),!t)return new f;if(t instanceof f)return t;var e=(t=t.rgb()).r/255,i=t.g/255,a=t.b/255,o=Math.min(e,i,a),s=Math.max(e,i,a),l=NaN,c=s-o,u=(s+o)/2;return c?(l=e===s?(i-a)/c+6*(i0&&u<1?0:l,new f(l,c,u,t.opacity)}(t):new f(t,e,i,null==a?1:a)}function f(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function h(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function d(t){if(t instanceof m)return new m(t.l,t.a,t.b,t.opacity);if(t instanceof _){var e=t.h*R;return new m(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof l||(t=o(t));var r=x(t.r),n=x(t.g),i=x(t.b),a=g((.4124564*r+.3575761*n+.1804375*i)/j),s=g((.2126729*r+.7151522*n+.072175*i)/B);return new m(116*s-16,500*(a-s),200*(s-g((.0193339*r+.119192*n+.9503041*i)/U)),t.opacity)}function p(t,e,r,n){return 1===arguments.length?d(t):new m(t,e,r,null==n?1:n)}function m(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function g(t){return t>G?Math.pow(t,1/3):t/H+V}function v(t){return t>q?t*t*t:H*(t-V)}function y(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function x(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function b(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof _)return new _(t.h,t.c,t.l,t.opacity);t instanceof m||(t=d(t));var e=Math.atan2(t.b,t.a)*N;return new _(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function w(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof M)return new M(t.h,t.s,t.l,t.opacity);t instanceof l||(t=o(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(K*n+Z*e-J*r)/(K+Z-J),a=n-i,s=(X*(r-i)-Y*a)/W,c=Math.sqrt(s*s+a*a)/(X*i*(1-i)),u=c?Math.atan2(s,a)*N-120:NaN;return new M(u<0?u+360:u,c,i,t.opacity)}(t):new M(t,e,r,null==n?1:n)}function M(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}var k=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t},A="\\s*([+-]?\\d+)\\s*",T="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",S="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",E=/^#([0-9a-f]{3})$/,L=/^#([0-9a-f]{6})$/,C=new RegExp("^rgb\\("+[A,A,A]+"\\)$"),z=new RegExp("^rgb\\("+[S,S,S]+"\\)$"),D=new RegExp("^rgba\\("+[A,A,A,T]+"\\)$"),I=new RegExp("^rgba\\("+[S,S,S,T]+"\\)$"),P=new RegExp("^hsl\\("+[T,S,S]+"\\)$"),O=new RegExp("^hsla\\("+[T,S,S,T]+"\\)$"),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};k(r,n,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),k(l,s,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new l(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new l(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),k(f,u,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new f(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new f(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new l(h(t>=240?t-240:t+120,i,n),h(t,i,n),h(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var R=Math.PI/180,N=180/Math.PI,j=.95047,B=1,U=1.08883,V=4/29,q=6/29,H=3*q*q,G=q*q*q;k(m,p,e(r,{brighter:function(t){return new m(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new m(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return t=B*v(t),e=j*v(e),r=U*v(r),new l(y(3.2404542*e-1.5371385*t-.4985314*r),y(-.969266*e+1.8760108*t+.041556*r),y(.0556434*e-.2040259*t+1.0572252*r),this.opacity)}})),k(_,b,e(r,{brighter:function(t){return new _(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new _(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return d(this).rgb()}}));var Y=-.29227,W=-.90649,X=1.97294,Z=X*W,J=1.78277*X,K=1.78277*Y- -.14861*W;k(M,w,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new M(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new M(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*R,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new l(255*(e+r*(-.14861*n+1.78277*i)),255*(e+r*(Y*n+W*i)),255*(e+r*(X*n)),this.opacity)}})),t.color=n,t.rgb=s,t.hsl=u,t.lab=p,t.hcl=b,t.cubehelix=w,Object.defineProperty(t,"__esModule",{value:!0})})},{}],123:[function(t,e,r){!function(t,n){n("object"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){"use strict";function e(){for(var t,e=0,n=arguments.length,i={};e=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}(t+"",i),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var r,n,i=new Array(r),a=0;ad+s||np+s||if.index){var l=d-a.x-a.vx,u=p-a.y-a.vy,v=l*l+u*u;vt.r&&(t.r=t[e].r)}function i(){if(s){var e,r,n=s.length;for(l=new Array(n),e=0;e=m)){(t.data!==o||t.next)&&(0===i&&(i=h(),u+=i*i),0===a&&(a=h(),u+=a*a),u1?(null==e?g.remove(t):g.set(t,s(e)),l):g.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c1?(y.on(t,e),l):y.on(t)}}},t.forceX=function(t){function e(t){for(var e,r=0,o=n.length;r180||r<-180?r-360*Math.round(r/360):r):x(isNaN(t)?e:t)}function a(t){return 1==(t=+t)?o:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):x(isNaN(e)?r:e)}}function o(t,e){var r=e-t;return r?n(t,r):x(isNaN(t)?e:t)}function s(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:A(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:A(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:A(t,r)},{i:s-2,x:A(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=ia&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:A(r,n)})),a=E.lastIndex;return a=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o,i=d,!(d=d[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&r===l)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=d,i[f]=p,t}function r(t,e,r){var i=new n(null==e?function(t){return t[0]}:e,null==r?function(t){return t[1]}:r,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function n(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function i(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var a=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i},o=r.prototype=n.prototype;o.copy=function(){var t,e,r=new n(this._x,this._y,this._x0,this._y0,this._x1,this._y1),a=this._root;if(!a)return r;if(!a.length)return r._root=i(a),r;for(t=[{source:a,target:r._root=new Array(4)}];a=t.pop();)for(var o=0;o<4;++o)(e=a.source[o])&&(e.length?t.push({source:e,target:a.target[o]=new Array(4)}):a.target[o]=i(e));return r},o.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},o.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;nf&&(f=i),ah&&(h=a));for(ft||t>i||n>e||e>a))return this;var o,s,l=i-r,c=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{o=new Array(4),o[s]=c,c=o}while(l*=2,i=r+l,a=n+l,t>i||e>a);break;case 1:do{o=new Array(4),o[s]=c,c=o}while(l*=2,r=i-l,a=n+l,r>t||e>a);break;case 2:do{o=new Array(4),o[s]=c,c=o}while(l*=2,i=r+l,n=a-l,t>i||n>e);break;case 3:do{o=new Array(4),o[s]=c,c=o}while(l*=2,r=i-l,n=a-l,r>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},o.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},o.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},o.find=function(t,e,r){var n,i,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new a(g,f,h,d,p)),null==r?r=1/0:(f=t-r,h=e-r,d=t+r,p=e+r,r*=r);c=m.pop();)if(!(!(g=c.node)||(i=c.x0)>d||(o=c.y0)>p||(s=c.x1)=y)<<1|t>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+v)/2))?m=l:v=l,e=d,!(d=d[f=u<<1|c]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;d.data!==t;)if(n=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(r?r[h]=d:this._root=d),this):(this._root=i,this)},o.removeAll=function(t){for(var e=0,r=t.length;e=0&&r._call.call(null,t),r=r._next;--f}function o(){g=(m=y.now())+v,f=h=0;try{a()}finally{f=0,function(){var t,e,r=c,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:c=e);u=t,l(n)}(),g=0}}function s(){var t=y.now(),e=t-m;e>p&&(v-=e,m=t)}function l(t){if(!f){h&&(h=clearTimeout(h));var e=t-g;e>24?(t<1/0&&(h=setTimeout(o,e)),d&&(d=clearInterval(d))):(d||(m=g,d=setInterval(s,p)),f=1,x(o))}}var c,u,f=0,h=0,d=0,p=1e3,m=0,g=0,v=0,y="object"==typeof performance&&performance.now?performance:Date,x="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};n.prototype=i.prototype={constructor:n,restart:function(t,r,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?e():+n)+(null==r?0:+r),this._next||u===this||(u?u._next=this:c=this,u=this),this._call=t,this._time=n,l()},stop:function(){this._call&&(this._call=null,this._time=1/0,l())}};t.now=e,t.timer=i,t.timerFlush=a,t.timeout=function(t,e,r){var i=new n;return e=null==e?0:+e,i.restart(function(r){i.stop(),t(r+e)},e,r),i},t.interval=function(t,r,i){var a=new n,o=r;return null==r?(a.restart(t,r,i),a):(r=+r,i=null==i?e():+i,a.restart(function e(n){n+=o,a.restart(e,o+=r,i),t(n)},r,i),a)},Object.defineProperty(t,"__esModule",{value:!0})})},{}],128:[function(t,e,r){!function(){function t(t){return t&&(t.ownerDocument||t.document||t).documentElement}function r(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function n(t,e){return te?1:t>=e?0:NaN}function i(t){return null===t?NaN:+t}function a(t){return!isNaN(t)}function o(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function s(t){return t.length}function l(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function c(){this._=Object.create(null)}function u(t){return(t+="")===oa||t[0]===sa?sa+t:t}function f(t){return(t+="")[0]===sa?t.slice(1):t}function h(t){return u(t)in this._}function d(t){return(t=u(t))in this._&&delete this._[t]}function p(){var t=[];for(var e in this._)t.push(f(e));return t}function m(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function v(){this._=Object.create(null)}function y(t){return t}function x(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=la.length;r0&&(t=t.slice(0,a));var s=ya.get(t);return s&&(t=s,o=G),a?e?function(){var a=o(e,Ki(arguments));n.call(this),this.addEventListener(t,this[i]=a,a.$=r),a._=e}:n:e?b:function(){var e,r=new RegExp("^__on([^.]+)"+Zi.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}function H(t,e){return function(r){var n=Zi.event;Zi.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{Zi.event=n}}}function G(t,e){var r=H(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||r.call(this,t)}}function Y(e){var n=".dragsuppress-"+ ++ba,i="click"+n,a=Zi.select(r(e)).on("touchmove"+n,M).on("dragstart"+n,M).on("selectstart"+n,M);if(null==xa&&(xa=!("onselectstart"in e)&&x(e.style,"userSelect")),xa){var o=t(e).style,s=o[xa];o[xa]="none"}return function(t){if(a.on(n,null),xa&&(o[xa]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){M(),e()},!0),setTimeout(e,0)}}}function W(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(_a<0){var a=r(t);if(a.scrollX||a.scrollY){var o=(n=Zi.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();_a=!(o.f||o.e),n.remove()}}return _a?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function X(){return Zi.event.changedTouches[0].identifier}function Z(t){return t>0?1:t<0?-1:0}function J(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function K(t){return t>1?0:t<-1?ka:Math.acos(t)}function Q(t){return t>1?Sa:t<-1?-Sa:Math.asin(t)}function $(t){return((t=Math.exp(t))+1/t)/2}function tt(t){return(t=Math.sin(t/2))*t}function et(){}function rt(t,e,r){return this instanceof rt?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof rt?new rt(t.h,t.s,t.l):gt(""+t,vt,rt):new rt(t,e,r)}function nt(t,e,r){function n(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?i+(a-i)*t/60:t<180?a:t<240?i+(a-i)*(240-t)/60:i}(t))}var i,a;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=r<0?0:r>1?1:r,a=r<=.5?r*(1+e):r+e-r*e,i=2*r-a,new ht(n(t+120),n(t),n(t-120))}function it(t,e,r){return this instanceof it?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof it?new it(t.h,t.c,t.l):t instanceof ot?lt(t.l,t.a,t.b):lt((t=yt((t=Zi.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new it(t,e,r)}function at(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ot(r,Math.cos(t*=Ea)*e,Math.sin(t)*e)}function ot(t,e,r){return this instanceof ot?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof ot?new ot(t.l,t.a,t.b):t instanceof it?at(t.h,t.c,t.l):yt((t=ht(t)).r,t.g,t.b):new ot(t,e,r)}function st(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=ct(i)*Ra,n=ct(n)*Na,a=ct(a)*ja,new ht(ft(3.2404542*i-1.5371385*n-.4985314*a),ft(-.969266*i+1.8760108*n+.041556*a),ft(.0556434*i-.2040259*n+1.0572252*a))}function lt(t,e,r){return t>0?new it(Math.atan2(r,e)*La,Math.sqrt(e*e+r*r),t):new it(NaN,NaN,t)}function ct(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ut(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ft(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ht(t,e,r){return this instanceof ht?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ht?new ht(t.r,t.g,t.b):gt(""+t,ht,nt):new ht(t,e,r)}function dt(t){return new ht(t>>16,t>>8&255,255&t)}function pt(t){return dt(t)+""}function mt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function gt(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(bt(i[0]),bt(i[1]),bt(i[2]))}return(a=Va.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function vt(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new rt(n,i,l)}function yt(t,e,r){var n=ut((.4124564*(t=xt(t))+.3575761*(e=xt(e))+.1804375*(r=xt(r)))/Ra),i=ut((.2126729*t+.7151522*e+.072175*r)/Na);return ot(116*i-16,500*(n-i),200*(i-ut((.0193339*t+.119192*e+.9503041*r)/ja)))}function xt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function bt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function _t(t){return"function"==typeof t?t:function(){return t}}function wt(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),Mt(e,r,t,n)}}function Mt(t,e,r,n){function i(){var t,e=l.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(l)||e>=200&&e<300||304===e){try{t=r.call(a,l)}catch(t){return void o.error.call(a,t)}o.load.call(a,t)}else o.error.call(a,l)}var a={},o=Zi.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(t){var e=Zi.event;Zi.event=t;try{o.progress.call(a,l)}finally{Zi.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s[t]:(null==e?delete s[t]:s[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(c=t,a):c},a.response=function(t){return r=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(Ki(arguments)))}}),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),l.open(r,t,!0),null==e||"accept"in s||(s.accept=e+",*/*"),l.setRequestHeader)for(var u in s)l.setRequestHeader(u,s[u]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=c&&(l.responseType=c),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,l),l.send(null==n?null:n),a},a.abort=function(){return l.abort(),a},Zi.rebind(a,o,"on"),null==n?a:a.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}function kt(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return Ha?Ha.n=i:qa=i,Ha=i,Ga||(Ya=clearTimeout(Ya),Ga=1,Wa(At)),i}function At(){var t=Tt(),e=St()-t;e>24?(isFinite(e)&&(clearTimeout(Ya),Ya=setTimeout(At,e)),Ga=0):(Ga=1,Wa(At))}function Tt(){for(var t=Date.now(),e=qa;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function St(){for(var t,e=qa,r=1/0;e;)e.c?(e.t1?Date.UTC.apply(this,arguments):arguments[0])}function Ct(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o68?1900:2e3)}(+n[0]),r+n[0].length):-1}function Bt(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ut(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Vt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function qt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function Ht(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Gt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Yt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Wt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Xt(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=aa(e)/60|0,i=aa(e)%60;return r+Dt(n,"0",2)+Dt(i,"0",2)}function Zt(t,e,r){ro.lastIndex=0;var n=ro.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Jt(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*r,l=Math.cos(e),c=Math.sin(e),u=a*c,f=i*l+u*Math.cos(s),h=u*o*Math.sin(s);lo.add(Math.atan2(h,f)),n=t,i=l,a=c}var e,r,n,i,a;co.point=function(o,s){co.point=t,n=(e=o)*Ea,i=Math.cos(s=(r=s)*Ea/2+ka/4),a=Math.sin(s)},co.lineEnd=function(){t(e,r)}}function ne(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function ie(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ae(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function oe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function se(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function le(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ce(t){return[Math.atan2(t[1],t[0]),Q(t[2])]}function ue(t,e){return aa(t[0]-e[0])=0;--s)i.point((f=u[s])[0],f[1]);else n(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function xe(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(we))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:c,polygonStart:function(){y.point=u,y.lineStart=f,y.lineEnd=h,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=c,d=Zi.merge(d);var t=function(t,e){var r=t[0],n=t[1],i=[Math.sin(r),-Math.cos(r),0],a=0,o=0;lo.reset();for(var s=0,l=e.length;s=0?1:-1,M=w*_,k=M>ka,A=p*x;if(lo.add(Math.atan2(A*w*Math.sin(M),m*b+A*Math.cos(M))),a+=k?_+w*Aa:_,k^h>=r^v>=r){var T=ae(ne(f),ne(t));le(T);var S=ae(i,T);le(S);var E=(k^_>=0?-1:1)*Q(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=k^_>=0?1:-1)}if(!g++)break;h=v,p=x,m=b,f=t}}return(a<-wa||a1}function Me(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:b,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function ke(t,e){return((t=t.x)[0]<0?t[1]-Sa-wa:Sa-t[1])-((e=e.x)[0]<0?e[1]-Sa-wa:Sa-e[1])}function Ae(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,d=s.y-c;if(a=t-l,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>f)return;a>u&&(u=a)}if(a=r-l,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>u&&(u=a)}else if(h>0){if(a0)){if(a/=d,d<0){if(a0){if(a>f)return;a>u&&(u=a)}if(a=n-c,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>u&&(u=a)}else if(d>0){if(a0&&(i.a={x:l+u*h,y:c+u*d}),f<1&&(i.b={x:l+f*h,y:c+f*d}),i}}}}}}function Te(t,e,r,n){function i(n,i){return aa(n[0]-t)0?0:3:aa(n[0]-r)0?2:1:aa(n[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var r=i(t,1),n=i(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(s){function l(a,s,l,c){var u=0,f=0;if(null==a||(u=i(a,l))!==(f=i(s,l))||o(a,s)<0^l>0)do{c.point(0===u||3===u?t:r,u>1?n:e)}while((u=(u+l+4)%4)!==f);else c.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function u(t,e){c(t,e)&&s.point(t,e)}function f(t,e){var r=c(t=Math.max(-ko,Math.min(ko,t)),e=Math.max(-ko,Math.min(ko,e)));if(d&&p.push([t,e]),_)m=t,g=e,v=r,_=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&b)s.point(t,e);else{var n={a:{x:y,y:x},b:{x:t,y:e}};A(n)?(b||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),w=!1):r&&(s.lineStart(),s.point(t,e),w=!1)}y=t,x=e,b=r}var h,d,p,m,g,v,y,x,b,_,w,M=s,k=Me(),A=Ae(t,e,r,n),T={point:u,lineStart:function(){T.point=f,d&&d.push(p=[]),_=!0,b=!1,y=x=NaN},lineEnd:function(){h&&(f(m,g),v&&b&&k.rejoin(),h.push(k.buffer())),T.point=u,b&&s.lineEnd()},polygonStart:function(){s=k,h=[],d=[],w=!0},polygonEnd:function(){s=M,h=Zi.merge(h);var e=function(t){for(var e=0,r=d.length,n=t[1],i=0;in&&J(c,a,t)>0&&++e:a[1]<=n&&J(c,a,t)<0&&--e,c=a;return 0!==e}([t,n]),r=w&&e,i=h.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),l(null,null,1,s),s.lineEnd()),i&&ye(h,a,e,l,s),s.polygonEnd()),h=d=p=null}};return T}}function Se(t){var e=0,r=ka/3,n=je(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*ka/180,r=t[1]*ka/180):[e/ka*180,r/ka*180]},i}function Ee(t,e){function r(t,e){var r=Math.sqrt(a-2*i*Math.sin(e))/i;return[r*Math.sin(t*=i),o-r*Math.cos(t)]}var n=Math.sin(t),i=(n+Math.sin(e))/2,a=1+n*(2*i-n),o=Math.sqrt(a)/i;return r.invert=function(t,e){var r=o-e;return[Math.atan2(t,r)/i,Q((a-(t*t+r*r)*i*i)/(2*i))]},r}function Le(){function t(t,e){To+=i*t-n*e,n=t,i=e}var e,r,n,i;zo.point=function(a,o){zo.point=t,e=n=a,r=i=o},zo.lineEnd=function(){t(e,r)}}function Ce(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ze(t,e){ho+=t,po+=e,++mo}function De(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);go+=o*(e+t)/2,vo+=o*(r+n)/2,yo+=o,ze(e=t,r=n)}var e,r;Io.point=function(n,i){Io.point=t,ze(e=n,r=i)}}function Ie(){Io.point=ze}function Pe(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);go+=o*(n+t)/2,vo+=o*(i+e)/2,yo+=o,xo+=(o=i*t-n*e)*(n+t),bo+=o*(i+e),_o+=3*o,ze(n=t,i=e)}var e,r,n,i;Io.point=function(a,o){Io.point=t,ze(e=n=a,r=i=o)},Io.lineEnd=function(){t(e,r)}}function Oe(t){function e(e){return(a?function(e){function n(r,n){r=t(r,n),e.point(r[0],r[1])}function i(){x=NaN,k.point=o,e.lineStart()}function o(n,i){var o=ne([n,i]),s=t(n,i);r(x,b,y,_,w,M,x=s[0],b=s[1],y=n,_=o[0],w=o[1],M=o[2],a,e),e.point(x,b)}function s(){k.point=n,e.lineEnd()}function l(){i(),k.point=c,k.lineEnd=u}function c(t,e){o(f=t,h=e),d=x,p=b,m=_,g=w,v=M,k.point=o}function u(){r(x,b,y,_,w,M,d,p,f,m,g,v,a,e),k.lineEnd=s,s()}var f,h,d,p,m,g,v,y,x,b,_,w,M,k={point:n,lineStart:i,lineEnd:s,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=i}};return k}:function(e){return Re(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function r(e,a,o,s,l,c,u,f,h,d,p,m,g,v){var y=u-e,x=f-a,b=y*y+x*x;if(b>4*n&&g--){var _=s+d,w=l+p,M=c+m,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=aa(aa(M)-1)n||aa((y*C+x*z)/b-.5)>.3||s*d+l*p+c*m0&&16,e):Math.sqrt(n)},e}function Fe(t){this.stream=t}function Re(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Ne(t){return je(function(){return t})()}function je(t){function e(t){return t=o(t[0]*Ea,t[1]*Ea),[t[0]*f+s,l-t[1]*f]}function r(){o=ge(a=qe(g,v,x),i);var t=i(p,m);return s=h-t[0]*f,l=d+t[1]*f,n()}function n(){return c&&(c.valid=!1,c=null),e}var i,a,o,s,l,c,u=Oe(function(t,e){return t=i(t,e),[t[0]*f+s,l-t[1]*f]}),f=150,h=480,d=250,p=0,m=0,g=0,v=0,x=0,b=Mo,_=y,w=null,M=null;return e.stream=function(t){return c&&(c.valid=!1),c=Be(b(a,u(_(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(b=null==t?(w=t,Mo):function(t){function e(t,e){return Math.cos(t)*Math.cos(e)>i}function r(t,e,r){var n=[1,0,0],a=ae(ne(t),ne(e)),o=ie(a,a),s=a[0],l=o-s*s;if(!l)return!r&&t;var c=i*o/l,u=-i*s/l,f=ae(n,a),h=se(n,c);oe(h,se(a,u));var d=f,p=ie(h,d),m=ie(d,d),g=p*p-m*(ie(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=se(d,(-p-v)/m);if(oe(y,h),y=ce(y),!r)return y;var x,b=t[0],_=e[0],w=t[1],M=e[1];_0^y[1]<(aa(y[0]-b)ka^(b<=y[0]&&y[0]<=_)){var T=se(d,(-p+v)/m);return oe(T,h),[y,ce(T)]}}}function n(e,r){var n=a?t:ka-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var i=Math.cos(t),a=i>0,o=aa(i)>wa;return _e(e,function(t){var i,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var d,p=[f,h],m=e(f,h),g=a?m?0:n(f,h):m?n(f+(f<0?ka:-ka),h):0;if(!i&&(c=l=m)&&t.lineStart(),m!==l&&(d=r(i,p),(ue(i,d)||ue(p,d))&&(p[0]+=wa,p[1]+=wa,m=e(p[0],p[1]))),m!==l)u=0,m?(t.lineStart(),d=r(p,i),t.point(d[0],d[1])):(d=r(i,p),t.point(d[0],d[1]),t.lineEnd()),i=d;else if(o&&i&&a^m){var v;g&s||!(v=r(p,i,!0))||(u=0,a?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||i&&ue(i,p)||t.point(p[0],p[1]),i=p,l=m,s=g},lineEnd:function(){l&&t.lineEnd(),i=null},clean:function(){return u|(c&&l)<<1}}},We(t,6*Ea),a?[0,-t]:[-ka,t-ka])}((w=+t)*Ea),n()):w},e.clipExtent=function(t){return arguments.length?(M=t,_=t?Te(t[0][0],t[0][1],t[1][0],t[1][1]):y,n()):M},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],r()):[h,d]},e.center=function(t){return arguments.length?(p=t[0]%360*Ea,m=t[1]%360*Ea,r()):[p*La,m*La]},e.rotate=function(t){return arguments.length?(g=t[0]%360*Ea,v=t[1]%360*Ea,x=t.length>2?t[2]%360*Ea:0,r()):[g*La,v*La,x*La]},Zi.rebind(e,u,"precision"),function(){return i=t.apply(this,arguments),e.invert=i.invert&&function(t){return(t=o.invert((t[0]-s)/f,(l-t[1])/f))&&[t[0]*La,t[1]*La]},r()}}function Be(t){return Re(t,function(e,r){t.point(e*Ea,r*Ea)})}function Ue(t,e){return[t,e]}function Ve(t,e){return[t>ka?t-Aa:t<-ka?t+Aa:t,e]}function qe(t,e,r){return t?e||r?ge(Ge(t),Ye(e,r)):Ge(t):e||r?Ye(e,r):Ve}function He(t){return function(e,r){return e+=t,[e>ka?e-Aa:e<-ka?e+Aa:e,r]}}function Ge(t){var e=He(t);return e.invert=He(-t),e}function Ye(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,c=Math.sin(e),u=c*n+s*i;return[Math.atan2(l*a-u*o,s*n-c*i),Q(u*a+l*o)]}var n=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return r.invert=function(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,c=Math.sin(e),u=c*a-l*o;return[Math.atan2(l*a+c*o,s*n+u*i),Q(u*n-s*i)]},r}function We(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Xe(r,i),a=Xe(r,a),(o>0?ia)&&(i+=o*Aa)):(i=t+o*Aa,a=t-.5*l);for(var c,u=i;o>0?u>a:u0?e<-Sa+wa&&(e=-Sa+wa):e>Sa-wa&&(e=Sa-wa);var r=o/Math.pow(i(e),a);return[r*Math.sin(a*t),o-r*Math.cos(a*t)]}var n=Math.cos(t),i=function(t){return Math.tan(ka/4+t/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(i(e)/i(t)),o=n*Math.pow(i(t),a)/a;return a?(r.invert=function(t,e){var r=o-e,n=Z(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Sa]},r):rr}function er(t,e){function r(t,e){var r=a-e;return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}var n=Math.cos(t),i=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/i+t;return aa(i)1&&J(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function lr(t,e){return t[0]-e[0]||t[1]-e[1]}function cr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function ur(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],c=r[1],u=e[1]-l,f=n[1]-c,h=(s*(l-c)-f*(i-a))/(f*o-s*u);return[i+h*o,l+h*u]}function fr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function hr(t){var e=Wo.pop()||new function(){Sr(this),this.edge=this.site=this.circle=null};return e.site=t,e}function dr(t){_r(t),Ho.remove(t),Wo.push(t),Sr(t)}function pr(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];dr(t);for(var l=a;l.circle&&aa(r-l.circle.x)wa)s=s.L;else{if(!((i=a-function(t,e){var r=t.N;if(r)return gr(r,e);var n=t.site;return n.y===e?n.x:1/0}(s,o))>wa)){n>-wa?(e=s.P,r=s):i>-wa?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=hr(t);if(Ho.insert(e,l),e||r){if(e===r)return _r(e),r=hr(e.site),Ho.insert(l,r),l.edge=r.edge=Mr(e.site,l.site),br(e),void br(r);if(r){_r(e),_r(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,d=t.y-f,p=r.site,m=p.x-u,g=p.y-f,v=2*(h*g-d*m),y=h*h+d*d,x=m*m+g*g,b={x:(g*y-d*x)/v+u,y:(h*x-m*y)/v+f};kr(r.edge,c,p,b),l.edge=Mr(c,t,null,b),r.edge=Mr(t,p,null,b),br(e),br(r)}else l.edge=Mr(e.site,l.site)}}function gr(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function vr(t){this.site=t,this.edges=[]}function yr(t){for(var e,r,n,i,a,o,s,l,c,u,f=t[0][0],h=t[1][0],d=t[0][1],p=t[1][1],m=qo,g=m.length;g--;)if((a=m[g])&&a.prepare())for(l=(s=a.edges).length,o=0;owa||aa(i-r)>wa)&&(s.splice(o,0,new Ar(function(t,e,r){var n=new wr(t,null);return n.a=e,n.b=r,Vo.push(n),n}(a.site,u,aa(n-f)wa?{x:f,y:aa(e-f)wa?{x:aa(r-p)wa?{x:h,y:aa(e-h)wa?{x:aa(r-d)=-Ma)){var h=l*l+c*c,d=u*u+g*g,p=(g*h-c*d)/f,m=(l*d-u*h)/f,g=m+s,v=Xo.pop()||new function(){Sr(this),this.x=this.y=this.arc=this.site=this.cy=null};v.arc=t,v.site=i,v.x=p+o,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var y=null,x=Yo._;x;)if(v.y=s)return;if(h>p){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(h>p){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xa&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Nr(r,n)})),a=Ko.lastIndex;return a=0&&!(r=Zi.interpolators[n](t,e)););return r}function Ur(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(tn(r)+"rotate(",null,")")-2,x:Nr(t,e)})):e&&r.push(tn(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(tn(r)+"skewX(",null,")")-2,x:Nr(t,e)}):e&&r.push(tn(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(tn(r)+"scale(",null,",",null,")");n.push({i:i-4,x:Nr(t[0],e[0])},{i:i-2,x:Nr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(tn(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i=0;)r.push(i[n])}function hn(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++oi&&(n=r,i=e);return n}function Mn(t){return t.reduce(kn,0)}function kn(t,e){return t+e[1]}function An(t,e){return Tn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Tn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Sn(t){return[Zi.min(t),Zi.max(t)]}function En(t,e){return t.value-e.value}function Ln(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Cn(t,e){t._pack_next=e,e._pack_prev=t}function zn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Dn(t){function e(t){u=Math.min(t.x-t.r,u),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(c=r.length)){var r,n,i,a,o,s,l,c,u=1/0,f=-1/0,h=1/0,d=-1/0;if(r.forEach(In),n=r[0],n.x=-n.r,n.y=0,e(n),c>1&&(i=r[1],i.x=i.r,i.y=0,e(i),c>2))for(Fn(n,i,a=r[2]),e(a),Ln(n,a),n._pack_prev=a,Ln(a,i),i=n._pack_next,o=3;o2?function(t,e,r,n){var i=[],a=[],o=0,s=Math.min(t.length,e.length)-1;for(t[s]0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Yn(n.map(i),r?Math:fs);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Hn(n),o=[],s=t[0],l=t[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),f=e%1?2:e;if(isFinite(u-c)){if(r){for(;c0;h--)o.push(a(c)*h);for(c=0;o[c]l;u--);o=o.slice(c,u)}return o},o.tickFormat=function(t,r){if(!arguments.length)return us;arguments.length<2?r=us:"function"!=typeof r&&(r=Zi.format(r));var n=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/a(Math.round(i(t)));return o*e0?s[r-1]:t[0],r0?0:1}function gi(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,d=e[1]+c,p=(u+h)/2,m=(f+d)/2,g=h-u,v=d-f,y=g*g+v*v,x=r-n,b=u*d-h*f,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,M=(-b*g-v*_)/y,k=(b*v+g*_)/y,A=(-b*g+v*_)/y,T=w-p,S=M-m,E=k-p,L=A-m;return T*T+S*S>E*E+L*L&&(w=k,M=A),[[w-l,M-c],[w*r/x,M*r/x]]}function vi(t){function e(e){function o(){c.push("M",a(t(u),s))}for(var l,c=[],u=[],f=-1,h=e.length,d=_t(r),p=_t(n);++f1?t.join("L"):t+"Z"}function xi(t){return t.join("L")+"Z"}function bi(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;c9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}function Li(t){for(var e,r,n,i=-1,a=t.length;++i0;)d[--s].call(t,o);if(a>=1)return m.event&&m.event.end.call(t,t.__data__,e),--p.count?delete p[n]:delete t[r],1}var l,u,f,h,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=kt(a,0,l),m=p[n]={tween:new c,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function Vi(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"})}function qi(t,e,r){t.attr("transform",function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"})}function Hi(t){return t.toISOString()}function Gi(t,e,r){function n(e){return t(e)}function i(t,r){var n=(t[1]-t[0])/r,i=Zi.bisect(Fs,n);return i==Fs.length?[e.year,Kn(t.map(function(t){return t/31536e6}),r)[2]]:i?e[n/Fs[i-1]1?{floor:function(e){for(;r(e=t.floor(e));)e=Yi(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=Yi(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Hn(n.domain()),a=null==t?i(r,10):"number"==typeof t?i(r,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(r[0],Yi(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return Gi(t.copy(),e,r)},Zn(n,t)}function Yi(t){return new Date(t)}function Wi(t){return JSON.parse(t.responseText)}function Xi(t){var e=Qi.createRange();return e.selectNode(Qi.body),e.createContextualFragment(t.responseText)}var Zi={version:"3.5.17"},Ji=[].slice,Ki=function(t){return Ji.call(t)},Qi=this.document;if(Qi)try{Ki(Qi.documentElement.childNodes)[0].nodeType}catch(t){Ki=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),Qi)try{Qi.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var $i=this.Element.prototype,ta=$i.setAttribute,ea=$i.setAttributeNS,ra=this.CSSStyleDeclaration.prototype,na=ra.setProperty;$i.setAttribute=function(t,e){ta.call(this,t,e+"")},$i.setAttributeNS=function(t,e,r){ea.call(this,t,e,r+"")},ra.setProperty=function(t,e,r){na.call(this,t,e+"",r)}}Zi.ascending=n,Zi.descending=function(t,e){return et?1:e>=t?0:NaN},Zi.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},Zi.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},Zi.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return l/(u-1)},Zi.deviation=function(){var t=Zi.variance.apply(this,arguments);return t?Math.sqrt(t):t};var ia=o(n);Zi.bisectLeft=ia.left,Zi.bisect=Zi.bisectRight=ia.right,Zi.bisector=function(t){return o(1===t.length?function(e,r){return n(t(e),r)}:t)},Zi.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},Zi.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},Zi.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var aa=Math.abs;Zi.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=function(t){for(var e=1;t*e%1;)e*=10;return e}(aa(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,f,h,d=-1,p=o.length,m=a[s++],g=new c;++d=a.length)return t;var n=[],i=o[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),i?n.sort(function(t,e){return i(t.key,e.key)}):n}var r,n,i={},a=[],o=[];return i.map=function(e,r){return t(r,e,0)},i.entries=function(r){return e(t(Zi.map,r,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return r=t,i},i.rollup=function(t){return n=t,i},i},Zi.set=function(t){var e=new v;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},Zi.event=null,Zi.requote=function(t){return t.replace(ca,"\\$&")};var ca=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ua={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},fa=function(t,e){return e.querySelector(t)},ha=function(t,e){return e.querySelectorAll(t)},da=function(t,e){var r=t.matches||t[x(t,"matchesSelector")];return(da=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(fa=function(t,e){return Sizzle(t,e)[0]||null},ha=Sizzle,da=Sizzle.matchesSelector),Zi.selection=function(){return Zi.select(Qi.documentElement)};var pa=Zi.selection.prototype=[];pa.select=function(t){var e,r,n,i,a=[];t=S(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),ga.hasOwnProperty(r)?{space:ga[r],local:t}:t}},pa.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=Zi.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(L(e,t[e]));return this}return this.each(L(t,e))},pa.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=D(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},pa.sort=function(t){t=function(t){return arguments.length||(t=n),function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e=e&&(e=i+1);!(o=s[e])&&++e0&&(e=e.transition().duration(E)),e.call(t.event)}function o(){b&&b.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(t){return(t-k.y)/k.k}).map(_.invert))}function s(t){L++||t({type:"zoomstart"})}function l(t){o(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function c(t){--L||(t({type:"zoomend"}),m=null)}function u(){var t=this,n=P.of(t,arguments),a=0,o=Zi.select(r(t)).on(z,function(){a=1,i(Zi.mouse(t),u),l(n)}).on(D,function(){o.on(z,null).on(D,null),f(a),c(n)}),u=e(Zi.mouse(t)),f=Y(t);Ts.call(t),s(n)}function f(){function t(){var t=Zi.touches(p);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=Zi.event.target;Zi.select(e).on(b,o).on(_,h),w.push(e);for(var r=Zi.event.changedTouches,n=0,i=r.length;n1){c=s[0];var u=s[1],f=c[0]-u[0],d=c[1]-u[1];v=f*f+d*d}}function o(){var t,e,r,a,o=Zi.touches(p);Ts.call(p);for(var s=0,c=o.length;s=c)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++8?function(t){return t/r}:function(t){return t*r},symbol:t}});Zi.formatPrefix=function(t,e){var r=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=Zi.round(t,Et(t,e))),r=1+Math.floor(1e-12+Math.log(t)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3)))),Xa[8+r/3]};var Za=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ja=Zi.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Zi.round(t,Et(t,e))).toFixed(Math.max(0,Math.min(20,Et(t*(1+1e-15),e))))}}),Ka=Zi.time={},Qa=Date;Lt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){$a.setUTCDate.apply(this._,arguments)},setDay:function(){$a.setUTCDay.apply(this._,arguments)},setFullYear:function(){$a.setUTCFullYear.apply(this._,arguments)},setHours:function(){$a.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){$a.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){$a.setUTCMinutes.apply(this._,arguments)},setMonth:function(){$a.setUTCMonth.apply(this._,arguments)},setSeconds:function(){$a.setUTCSeconds.apply(this._,arguments)},setTime:function(){$a.setTime.apply(this._,arguments)}};var $a=Date.prototype;Ka.year=Ct(function(t){return(t=Ka.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ka.years=Ka.year.range,Ka.years.utc=Ka.year.utc.range,Ka.day=Ct(function(t){var e=new Qa(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),Ka.days=Ka.day.range,Ka.days.utc=Ka.day.utc.range,Ka.dayOfYear=function(t){var e=Ka.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var r=Ka[t]=Ct(function(t){return(t=Ka.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var r=Ka.year(t).getDay();return Math.floor((Ka.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});Ka[t+"s"]=r.range,Ka[t+"s"].utc=r.utc.range,Ka[t+"OfYear"]=function(t){var r=Ka.year(t).getDay();return Math.floor((Ka.dayOfYear(t)+(r+e)%7)/7)}}),Ka.week=Ka.sunday,Ka.weeks=Ka.sunday.range,Ka.weeks.utc=Ka.sunday.utc.range,Ka.weekOfYear=Ka.sundayOfYear;var to={"-":"",_:" ",0:"0"},eo=/^\s*\d+/,ro=/^%/;Zi.locale=function(t){return{numberFormat:function(t){var e=t.decimal,r=t.thousands,n=t.grouping,i=t.currency,a=n&&r?function(t,e){for(var i=t.length,a=[],o=0,s=n[0],l=0;i>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}:y;return function(t){var r=Za.exec(t),n=r[1]||" ",o=r[2]||">",s=r[3]||"-",l=r[4]||"",c=r[5],u=+r[6],f=r[7],h=r[8],d=r[9],p=1,m="",g="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===n&&"="===o)&&(c=n="0",o="="),d){case"n":f=!0,d="g";break;case"%":p=100,g="%",d="f";break;case"p":p=100,g="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(m="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":p=-1,d="r"}"$"===l&&(m=i[0],g=i[1]),"r"!=d||h||(d="g"),null!=h&&("g"==d?h=Math.max(1,Math.min(21,h)):"e"!=d&&"f"!=d||(h=Math.max(0,Math.min(20,h)))),d=Ja.get(d)||function(t){return t+""};var x=c&&f;return function(t){var r=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===s?"":s;if(p<0){var l=Zi.formatPrefix(t,h);t=l.scale(t),r=l.symbol+g}else t*=p;var b,_,w=(t=d(t,h)).lastIndexOf(".");if(w<0){var M=y?t.lastIndexOf("e"):-1;M<0?(b=t,_=""):(b=t.substring(0,M),_=t.substring(M))}else b=t.substring(0,w),_=e+t.substring(w+1);!c&&f&&(b=a(b,1/0));var k=m.length+b.length+_.length+(x?0:i.length),A=k"===o?A+i+t:"^"===o?A.substring(0,k>>=1)+i+t+A.substring(k):i+(x?t:A+t))+r}}}(t),timeFormat:function(t){function e(t){function e(e){for(var r,i,a,o=[],s=-1,l=0;++s