-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathclustergrammer-gl.0.11.10.packd.js
1 lines (1 loc) · 770 KB
/
clustergrammer-gl.0.11.10.packd.js
1
!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).clustergrammerGl=t()}}(function(){return function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){return i(e[a][1][t]||t)},f,f.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}}()({1:[function(t,e,n){(function(n){e.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/main.js")}({"./node_modules/axios/index.js":function(t,e,n){t.exports=n("./node_modules/axios/lib/axios.js")},"./node_modules/axios/lib/adapters/xhr.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),i=n("./node_modules/axios/lib/core/settle.js"),o=n("./node_modules/axios/lib/helpers/buildURL.js"),a=n("./node_modules/axios/lib/helpers/parseHeaders.js"),s=n("./node_modules/axios/lib/helpers/isURLSameOrigin.js"),u=n("./node_modules/axios/lib/core/createError.js");t.exports=function(t){return new Promise(function(e,c){var f=t.data,l=t.headers;r.isFormData(f)&&delete l["Content-Type"];var h=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",p=t.auth.password||"";l.Authorization="Basic "+btoa(d+":"+p)}if(h.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:t,request:h};i(e,c,r),h=null}},h.onabort=function(){h&&(c(u("Request aborted",t,"ECONNABORTED",h)),h=null)},h.onerror=function(){c(u("Network Error",t,null,h)),h=null},h.ontimeout=function(){c(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var m=n("./node_modules/axios/lib/helpers/cookies.js"),v=(t.withCredentials||s(t.url))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;v&&(l[t.xsrfHeaderName]=v)}if("setRequestHeader"in h&&r.forEach(l,function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete l[e]:h.setRequestHeader(e,t)}),t.withCredentials&&(h.withCredentials=!0),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),c(t),h=null)}),void 0===f&&(f=null),h.send(f)})}},"./node_modules/axios/lib/axios.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),i=n("./node_modules/axios/lib/helpers/bind.js"),o=n("./node_modules/axios/lib/core/Axios.js"),a=n("./node_modules/axios/lib/core/mergeConfig.js");function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=s(n("./node_modules/axios/lib/defaults.js"));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=n("./node_modules/axios/lib/cancel/Cancel.js"),u.CancelToken=n("./node_modules/axios/lib/cancel/CancelToken.js"),u.isCancel=n("./node_modules/axios/lib/cancel/isCancel.js"),u.all=function(t){return Promise.all(t)},u.spread=n("./node_modules/axios/lib/helpers/spread.js"),t.exports=u,t.exports.default=u},"./node_modules/axios/lib/cancel/Cancel.js":function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},"./node_modules/axios/lib/cancel/CancelToken.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/cancel/Cancel.js");function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},"./node_modules/axios/lib/cancel/isCancel.js":function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},"./node_modules/axios/lib/core/Axios.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),i=n("./node_modules/axios/lib/helpers/buildURL.js"),o=n("./node_modules/axios/lib/core/InterceptorManager.js"),a=n("./node_modules/axios/lib/core/dispatchRequest.js"),s=n("./node_modules/axios/lib/core/mergeConfig.js");function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method=t.method?t.method.toLowerCase():"get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],function(t){u.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}}),r.forEach(["post","put","patch"],function(t){u.prototype[t]=function(e,n,i){return this.request(r.merge(i||{},{method:t,url:e,data:n}))}}),t.exports=u},"./node_modules/axios/lib/core/InterceptorManager.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},"./node_modules/axios/lib/core/createError.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/core/enhanceError.js");t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},"./node_modules/axios/lib/core/dispatchRequest.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),i=n("./node_modules/axios/lib/core/transformData.js"),o=n("./node_modules/axios/lib/cancel/isCancel.js"),a=n("./node_modules/axios/lib/defaults.js"),s=n("./node_modules/axios/lib/helpers/isAbsoluteURL.js"),u=n("./node_modules/axios/lib/helpers/combineURLs.js");function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.baseURL&&!s(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return c(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(c(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},"./node_modules/axios/lib/core/enhanceError.js":function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},"./node_modules/axios/lib/core/mergeConfig.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");t.exports=function(t,e){e=e||{};var n={};return r.forEach(["url","method","params","data"],function(t){void 0!==e[t]&&(n[t]=e[t])}),r.forEach(["headers","auth","proxy"],function(i){r.isObject(e[i])?n[i]=r.deepMerge(t[i],e[i]):void 0!==e[i]?n[i]=e[i]:r.isObject(t[i])?n[i]=r.deepMerge(t[i]):void 0!==t[i]&&(n[i]=t[i])}),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])}),n}},"./node_modules/axios/lib/core/settle.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/core/createError.js");t.exports=function(t,e,n){var i=n.config.validateStatus;!i||i(n.status)?t(n):e(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},"./node_modules/axios/lib/core/transformData.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},"./node_modules/axios/lib/defaults.js":function(t,e,n){"use strict";(function(e){var r=n("./node_modules/axios/lib/utils.js"),i=n("./node_modules/axios/lib/helpers/normalizeHeaderName.js"),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,u={adapter:(void 0!==e&&"[object process]"===Object.prototype.toString.call(e)?s=n("./node_modules/axios/lib/adapters/xhr.js"):"undefined"!=typeof XMLHttpRequest&&(s=n("./node_modules/axios/lib/adapters/xhr.js")),s),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){u.headers[t]={}}),r.forEach(["post","put","patch"],function(t){u.headers[t]=r.merge(o)}),t.exports=u}).call(this,n("./node_modules/process/browser.js"))},"./node_modules/axios/lib/helpers/bind.js":function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},"./node_modules/axios/lib/helpers/buildURL.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))}))}),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},"./node_modules/axios/lib/helpers/combineURLs.js":function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},"./node_modules/axios/lib/helpers/cookies.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"./node_modules/axios/lib/helpers/isAbsoluteURL.js":function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},"./node_modules/axios/lib/helpers/isURLSameOrigin.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},"./node_modules/axios/lib/helpers/normalizeHeaderName.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},"./node_modules/axios/lib/helpers/parseHeaders.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},"./node_modules/axios/lib/helpers/spread.js":function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},"./node_modules/axios/lib/utils.js":function(t,e,n){"use strict";var r=n("./node_modules/axios/lib/helpers/bind.js"),i=n("./node_modules/axios/node_modules/is-buffer/index.js"),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:u,isStream:function(t){return s(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],n);return e},deepMerge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]="object"==typeof n?t({},n):n}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],n);return e},extend:function(t,e,n){return c(e,function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},"./node_modules/axios/node_modules/is-buffer/index.js":function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},"./node_modules/base64-js/index.js":function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){for(var e,n=c(t),r=n[0],a=n[1],s=new o(function(t,e,n){return 3*(e+n)/4-n}(0,r,a)),u=0,f=a>0?r-4:r,l=0;l<f;l+=4)e=i[t.charCodeAt(l)]<<18|i[t.charCodeAt(l+1)]<<12|i[t.charCodeAt(l+2)]<<6|i[t.charCodeAt(l+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===a&&(e=i[t.charCodeAt(l)]<<2|i[t.charCodeAt(l+1)]>>4,s[u++]=255&e);1===a&&(e=i[t.charCodeAt(l)]<<10|i[t.charCodeAt(l+1)]<<4|i[t.charCodeAt(l+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(f(t,a,a+16383>s?s:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"./node_modules/big-rat/add.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},"./node_modules/big-rat/cmp.js":function(t,e,n){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},"./node_modules/big-rat/div.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[1]),t[1].mul(e[0]))}},"./node_modules/big-rat/index.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/is-rat.js"),i=n("./node_modules/big-rat/lib/is-bn.js"),o=n("./node_modules/big-rat/lib/num-to-bn.js"),a=n("./node_modules/big-rat/lib/str-to-bn.js"),s=n("./node_modules/big-rat/lib/rationalize.js"),u=n("./node_modules/big-rat/div.js");t.exports=function t(e,n){if(r(e))return n?u(e,t(n)):[e[0].clone(),e[1].clone()];var c=0;var f,l;if(i(e))f=e.clone();else if("string"==typeof e)f=a(e);else{if(0===e)return[o(0),o(1)];if(e===Math.floor(e))f=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),c-=256;f=o(e)}}if(r(n))f.mul(n[1]),l=n[0].clone();else if(i(n))l=n.clone();else if("string"==typeof n)l=a(n);else if(n)if(n===Math.floor(n))l=o(n);else{for(;n!==Math.floor(n);)n*=Math.pow(2,256),c+=256;l=o(n)}else l=o(1);c>0?f=f.ushln(c):c<0&&(l=l.ushln(-c));return s(f,l)}},"./node_modules/big-rat/is-rat.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/is-bn.js");t.exports=function(t){return Array.isArray(t)&&2===t.length&&r(t[0])&&r(t[1])}},"./node_modules/big-rat/lib/bn-sign.js":function(t,e,n){"use strict";var r=n("./node_modules/bn.js/lib/bn.js");t.exports=function(t){return t.cmp(new r(0))}},"./node_modules/big-rat/lib/bn-to-num.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/bn-sign.js");t.exports=function(t){var e=t.length,n=t.words,i=0;if(1===e)i=n[0];else if(2===e)i=n[0]+67108864*n[1];else for(var o=0;o<e;o++){var a=n[o];i+=a*Math.pow(67108864,o)}return r(t)*i}},"./node_modules/big-rat/lib/ctz.js":function(t,e,n){"use strict";var r=n("./node_modules/double-bits/double.js"),i=n("./node_modules/bit-twiddle/twiddle.js").countTrailingZeros;t.exports=function(t){var e=i(r.lo(t));if(e<32)return e;var n=i(r.hi(t));if(n>20)return 52;return n+32}},"./node_modules/big-rat/lib/is-bn.js":function(t,e,n){"use strict";n("./node_modules/bn.js/lib/bn.js");t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},"./node_modules/big-rat/lib/num-to-bn.js":function(t,e,n){"use strict";var r=n("./node_modules/bn.js/lib/bn.js"),i=n("./node_modules/double-bits/double.js");t.exports=function(t){var e=i.exponent(t);return e<52?new r(t):new r(t*Math.pow(2,52-e)).ushln(e-52)}},"./node_modules/big-rat/lib/rationalize.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/num-to-bn.js"),i=n("./node_modules/big-rat/lib/bn-sign.js");t.exports=function(t,e){var n=i(t),o=i(e);if(0===n)return[r(0),r(1)];if(0===o)return[r(0),r(0)];o<0&&(t=t.neg(),e=e.neg());var a=t.gcd(e);if(a.cmpn(1))return[t.div(a),e.div(a)];return[t,e]}},"./node_modules/big-rat/lib/str-to-bn.js":function(t,e,n){"use strict";var r=n("./node_modules/bn.js/lib/bn.js");t.exports=function(t){return new r(t)}},"./node_modules/big-rat/mul.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[0]),t[1].mul(e[1]))}},"./node_modules/big-rat/sign.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/bn-sign.js");t.exports=function(t){return r(t[0])*r(t[1])}},"./node_modules/big-rat/sub.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},"./node_modules/big-rat/to-float.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/lib/bn-to-num.js"),i=n("./node_modules/big-rat/lib/ctz.js");t.exports=function(t){var e=t[0],n=t[1];if(0===e.cmpn(0))return 0;var o=e.abs().divmod(n.abs()),a=o.div,s=r(a),u=o.mod,c=e.negative!==n.negative?-1:1;if(0===u.cmpn(0))return c*s;if(s){var f=i(s)+4,l=r(u.ushln(f).divRound(n));return c*(s+l*Math.pow(2,-f))}var h=n.bitLength()-u.bitLength()+53,l=r(u.ushln(h).divRound(n));return h<1023?c*l*Math.pow(2,-h):(l*=Math.pow(2,-1023),c*l*Math.pow(2,1023-h))}},"./node_modules/binary-search-bounds/search-bounds.js":function(t,e,n){"use strict";function r(t,e,n,r,i){var o=["function ",t,"(a,l,h,",r.join(","),"){",i?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a[m]"];return i?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;"),n?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),i?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],i),r("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",n,"(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",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/bit-twiddle/twiddle.js":function(t,e,n){"use strict";function r(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}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,n;return e=(t>65535)<<4,e|=n=((t>>>=e)>255)<<3,e|=n=((t>>>=n)>15)<<2,(e|=n=((t>>>=n)>3)<<1)|(t>>>=n)>>1},e.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},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.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 n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<<i&255}}(i),e.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,n){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},"./node_modules/bn.js/lib/bn.js":function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(0).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o<i;o++){var a=t.charCodeAt(o)-48;r<<=4,r|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=t.length-6,r=0;n>=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f<s;f+=r)c=u(t,f,f+r,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var l=1;for(c=u(t,f,t.length,e),f=0;f<a;f++)l*=e;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],f=[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],l=[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];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);n=0!==(o=s>>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<n.length;a++)o=(e=(0|n.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,n){var r,i,o,a=t.words,s=e.words,u=n.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,_=v>>>13,y=0|a[3],b=8191&y,x=y>>>13,w=0|a[4],j=8191&w,M=w>>>13,A=0|a[5],k=8191&A,E=A>>>13,z=0|a[6],T=8191&z,S=z>>>13,N=0|a[7],O=8191&N,C=N>>>13,P=0|a[8],B=8191&P,R=P>>>13,I=0|a[9],D=8191&I,F=I>>>13,L=0|s[0],U=8191&L,q=L>>>13,Y=0|s[1],H=8191&Y,V=Y>>>13,W=0|s[2],X=8191&W,G=W>>>13,Z=0|s[3],$=8191&Z,Q=Z>>>13,K=0|s[4],J=8191&K,tt=K>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(c+(r=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,q))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(m,U)|0,o=Math.imul(m,q);var gt=(c+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,U),i=(i=Math.imul(g,q))+Math.imul(_,U)|0,o=Math.imul(_,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,V)|0;var _t=(c+(r=r+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,q))+Math.imul(x,U)|0,o=Math.imul(x,q),r=r+Math.imul(g,H)|0,i=(i=i+Math.imul(g,V)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,G)|0;var yt=(c+(r=r+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(j,U),i=(i=Math.imul(j,q))+Math.imul(M,U)|0,o=Math.imul(M,q),r=r+Math.imul(b,H)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(g,X)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Q)|0;var bt=(c+(r=r+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,J)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(k,U),i=(i=Math.imul(k,q))+Math.imul(E,U)|0,o=Math.imul(E,q),r=r+Math.imul(j,H)|0,i=(i=i+Math.imul(j,V)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var xt=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,q))+Math.imul(S,U)|0,o=Math.imul(S,q),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,V)|0,r=r+Math.imul(j,X)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var wt=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(O,U),i=(i=Math.imul(O,q))+Math.imul(C,U)|0,o=Math.imul(C,q),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,V)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var jt=(c+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(R,U)|0,o=Math.imul(R,q),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,V)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var Mt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,q))+Math.imul(F,U)|0,o=Math.imul(F,q),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,V)|0,r=r+Math.imul(O,X)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(M,nt)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var At=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,H),i=(i=Math.imul(D,V))+Math.imul(F,H)|0,o=Math.imul(F,V),r=r+Math.imul(B,X)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,Q)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,at)|0,r=r+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(g,lt)|0,i=(i=i+Math.imul(g,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var kt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,X),i=(i=Math.imul(D,G))+Math.imul(F,X)|0,o=Math.imul(F,G),r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ct)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ht)|0;var Et=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,$),i=(i=Math.imul(D,Q))+Math.imul(F,$)|0,o=Math.imul(F,Q),r=r+Math.imul(B,J)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(C,nt)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(j,lt)|0,i=(i=i+Math.imul(j,ht)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ht)|0;var zt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,r=Math.imul(D,J),i=(i=Math.imul(D,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ht)|0;var Tt=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(M,pt)|0))<<13)|0;c=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,nt),i=(i=Math.imul(D,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var St=(c+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(D,ot),i=(i=Math.imul(D,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var Nt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(D,ut),i=(i=Math.imul(D,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ht)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,lt),i=(i=Math.imul(D,ht))+Math.imul(F,lt)|0,o=Math.imul(F,ht);var Ct=(c+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Pt=(c+(r=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,mt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=vt,u[1]=gt,u[2]=_t,u[3]=yt,u[4]=bt,u[5]=xt,u[6]=wt,u[7]=jt,u[8]=Mt,u[9]=At,u[10]=kt,u[11]=Et,u[12]=zt,u[13]=Tt,u[14]=St,u[15]=Nt,u[16]=Ot,u[17]=Ct,u[18]=Pt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,l=(0|t.words[f])*(0|e.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},m.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a<o;a++)r[a]=e[t[a]],i[a]=n[t[a]]},m.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=n[f+d],m=r[f+d],v=n[f+d+a],g=r[f+d+a],_=l*v-h*g;g=l*g+h*v,v=_,n[f+d]=p+v,r[f+d]=m+g,n[f+d+a]=p-v,r[f+d+a]=m-g,d!==s&&(_=u*l-c*h,h=u*h+c*l,l=_)}},m.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},m.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,n,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},m.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),u=new Array(r),c=new Array(r),f=new Array(r),l=new Array(r),h=n.words;h.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,c,r),this.transform(a,o,s,u,r,i),this.transform(c,o,f,l,r,i);for(var d=0;d<r;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,r),this.transform(s,u,h,o,r,i),this.conjugate(h,o,r),this.normalize13b(h,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<n;this.words[e]=u|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=n;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=r.clone()._ishlnsubmul(i,1,u);0===f.negative&&(r=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):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&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=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()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new w(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function j(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(_,g),_.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(y,g),i(b,g),i(x,g),x.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new y;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return v[t]=e,e},w.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},w.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v<p);var g=this.pow(l,new o(1).iushln(p-v-1));h=h.redMul(g),l=g.redSqr(),d=d.redMul(l),p=v}return h},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var l=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new j(t)},i(j,w),j.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},j.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},j.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},j.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},j.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n("./node_modules/webpack/buildin/module.js")(t))},"./node_modules/box-intersect/index.js":function(t,e,n){"use strict";t.exports=function(t,e,n){switch(arguments.length){case 1:return r=[],c(i=t,i,f,!0),r;case 2:return"function"==typeof e?c(t,t,e,!0):function(t,e){return r=[],c(t,e,f,!1),r}(t,e);case 3:return c(t,e,n,!1);default:throw new Error("box-intersect: Invalid arguments")}var i};var r,i=n("./node_modules/typedarray-pool/pool.js"),o=n("./node_modules/box-intersect/lib/sweep.js"),a=n("./node_modules/box-intersect/lib/intersect.js");function s(t,e){for(var n=0;n<t;++n)if(!(e[n]<=e[n+t]))return!0;return!1}function u(t,e,n,r){for(var i=0,o=0,a=0,u=t.length;a<u;++a){var c=t[a];if(!s(e,c)){for(var f=0;f<2*e;++f)n[i++]=c[f];r[o++]=a}}return o}function c(t,e,n,r){var s=t.length,c=e.length;if(!(s<=0||c<=0)){var f=t[0].length>>>1;if(!(f<=0)){var l,h=i.mallocDouble(2*f*s),d=i.mallocInt32(s);if((s=u(t,f,h,d))>0){if(1===f&&r)o.init(s),l=o.sweepComplete(f,n,0,s,h,d,0,s,h,d);else{var p=i.mallocDouble(2*f*c),m=i.mallocInt32(c);(c=u(e,f,p,m))>0&&(o.init(s+c),l=1===f?o.sweepBipartite(f,n,0,s,h,d,0,c,p,m):a(f,n,r,s,h,d,c,p,m),i.free(p),i.free(m))}i.free(h),i.free(d)}return l}}}function f(t,e){r.push([t,e])}},"./node_modules/box-intersect/lib/brute.js":function(t,e,n){"use strict";var r="d",i="ax",o="vv",a="fp",s="es",u="rs",c="re",f="rb",l="ri",h="rp",d="bs",p="be",m="bb",v="bi",g="bp",_="rv",y="Q",b=[r,i,o,u,c,f,l,d,p,m,v];function x(t){var e="bruteForce"+(t?"Full":"Partial"),n=[],x=b.slice();t||x.splice(3,0,a);var w=["function "+e+"("+x.join()+"){"];function j(e,a){var x=function(t,e,n){var a="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(n?"Full":""),x=["function ",a,"(",b.join(),"){","var ",s,"=2*",r,";"],w="for(var i="+u+","+h+"="+s+"*"+u+";i<"+c+";++i,"+h+"+="+s+"){var x0="+f+"["+i+"+"+h+"],x1="+f+"["+i+"+"+h+"+"+r+"],xi="+l+"[i];",j="for(var j="+d+","+g+"="+s+"*"+d+";j<"+p+";++j,"+g+"+="+s+"){var y0="+m+"["+i+"+"+g+"],"+(n?"y1="+m+"["+i+"+"+g+"+"+r+"],":"")+"yi="+v+"[j];";return t?x.push(w,y,":",j):x.push(j,y,":",w),n?x.push("if(y1<x0||x1<y0)continue;"):e?x.push("if(y0<=x0||x1<y0)continue;"):x.push("if(y0<x0||x1<y0)continue;"),x.push("for(var k="+i+"+1;k<"+r+";++k){var r0="+f+"[k+"+h+"],r1="+f+"[k+"+r+"+"+h+"],b0="+m+"[k+"+g+"],b1="+m+"[k+"+r+"+"+g+"];if(r1<b0||b1<r0)continue "+y+";}var "+_+"="+o+"("),e?x.push("yi,xi"):x.push("xi,yi"),x.push(");if("+_+"!==void 0)return "+_+";}}}"),{name:a,code:x.join("")}}(e,a,t);n.push(x.code),w.push("return "+x.name+"("+b.join()+");")}w.push("if("+c+"-"+u+">"+p+"-"+d+"){"),t?(j(!0,!1),w.push("}else{"),j(!1,!1)):(w.push("if("+a+"){"),j(!0,!0),w.push("}else{"),j(!0,!1),w.push("}}else{if("+a+"){"),j(!1,!0),w.push("}else{"),j(!1,!1),w.push("}")),w.push("}}return "+e);var M=n.join("")+w.join("");return new Function(M)()}e.partial=x(!1),e.full=x(!0)},"./node_modules/box-intersect/lib/intersect.js":function(t,e,n){"use strict";t.exports=function(t,e,n,o,f,E,z,T,S){!function(t,e){var n=8*i.log2(e+1)*(t+1)|0,o=i.nextPow2(b*n);w.length<o&&(r.free(w),w=r.mallocInt32(o));var a=i.nextPow2(x*n);j.length<a&&(r.free(j),j=r.mallocDouble(a))}(t,o+z);var N,O=0,C=2*t;M(O++,0,0,o,0,z,n?16:0,-1/0,1/0),n||M(O++,0,0,z,0,o,1,-1/0,1/0);for(;O>0;){var P=(O-=1)*b,B=w[P],R=w[P+1],I=w[P+2],D=w[P+3],F=w[P+4],L=w[P+5],U=O*x,q=j[U],Y=j[U+1],H=1&L,V=!!(16&L),W=f,X=E,G=T,Z=S;if(H&&(W=T,X=S,G=f,Z=E),!(2&L&&(I=v(t,B,R,I,W,X,Y),R>=I)||4&L&&(R=g(t,B,R,I,W,X,q))>=I)){var $=I-R,Q=F-D;if(V){if(t*$*($+Q)<d){if(void 0!==(N=u.scanComplete(t,B,e,R,I,W,X,D,F,G,Z)))return N;continue}}else{if(t*Math.min($,Q)<l){if(void 0!==(N=a(t,B,e,H,R,I,W,X,D,F,G,Z)))return N;continue}if(t*$*Q<h){if(void 0!==(N=u.scanBipartite(t,B,e,H,R,I,W,X,D,F,G,Z)))return N;continue}}var K=p(t,B,R,I,W,X,q,Y);if(R<K)if(t*(K-R)<l){if(void 0!==(N=s(t,B+1,e,R,K,W,X,D,F,G,Z)))return N}else if(B===t-2){if(void 0!==(N=H?u.sweepBipartite(t,e,D,F,G,Z,R,K,W,X):u.sweepBipartite(t,e,R,K,W,X,D,F,G,Z)))return N}else M(O++,B+1,R,K,D,F,H,-1/0,1/0),M(O++,B+1,D,F,R,K,1^H,-1/0,1/0);if(K<I){var J=c(t,B,D,F,G,Z),tt=G[C*J+B],et=m(t,B,J,F,G,Z,tt);if(et<F&&M(O++,B,K,I,et,F,(4|H)+(V?16:0),tt,Y),D<J&&M(O++,B,K,I,D,J,(2|H)+(V?16:0),q,tt),J+1===et){if(void 0!==(N=V?k(t,B,e,K,I,W,X,J,G,Z[J]):A(t,B,e,H,K,I,W,X,J,G,Z[J])))return N}else if(J<et){var nt;if(V){if(nt=_(t,B,K,I,W,X,tt),K<nt){var rt=m(t,B,K,nt,W,X,tt);if(B===t-2){if(K<rt&&void 0!==(N=u.sweepComplete(t,e,K,rt,W,X,J,et,G,Z)))return N;if(rt<nt&&void 0!==(N=u.sweepBipartite(t,e,rt,nt,W,X,J,et,G,Z)))return N}else K<rt&&M(O++,B+1,K,rt,J,et,16,-1/0,1/0),rt<nt&&(M(O++,B+1,rt,nt,J,et,0,-1/0,1/0),M(O++,B+1,J,et,rt,nt,1,-1/0,1/0))}}else nt=H?y(t,B,K,I,W,X,tt):_(t,B,K,I,W,X,tt),K<nt&&(B===t-2?N=H?u.sweepBipartite(t,e,J,et,G,Z,K,nt,W,X):u.sweepBipartite(t,e,K,nt,W,X,J,et,G,Z):(M(O++,B+1,K,nt,J,et,H,-1/0,1/0),M(O++,B+1,J,et,K,nt,1^H,-1/0,1/0)))}}}}};var r=n("./node_modules/typedarray-pool/pool.js"),i=n("./node_modules/bit-twiddle/twiddle.js"),o=n("./node_modules/box-intersect/lib/brute.js"),a=o.partial,s=o.full,u=n("./node_modules/box-intersect/lib/sweep.js"),c=n("./node_modules/box-intersect/lib/median.js"),f=n("./node_modules/box-intersect/lib/partition.js"),l=128,h=1<<22,d=1<<22,p=f("!(lo>=p0)&&!(p1>=hi)",["p0","p1"]),m=f("lo===p0",["p0"]),v=f("lo<p0",["p0"]),g=f("hi<=p0",["p0"]),_=f("lo<=p0&&p0<=hi",["p0"]),y=f("lo<p0&&p0<=hi",["p0"]),b=6,x=2,w=r.mallocInt32(1024),j=r.mallocDouble(1024);function M(t,e,n,r,i,o,a,s,u){var c=b*t;w[c]=e,w[c+1]=n,w[c+2]=r,w[c+3]=i,w[c+4]=o,w[c+5]=a;var f=x*t;j[f]=s,j[f+1]=u}function A(t,e,n,r,i,o,a,s,u,c,f){var l=2*t,h=u*l,d=c[h+e];t:for(var p=i,m=i*l;p<o;++p,m+=l){var v=a[m+e],g=a[m+e+t];if(!(d<v||g<d)&&(!r||d!==v)){for(var _,y=s[p],b=e+1;b<t;++b){v=a[m+b],g=a[m+b+t];var x=c[h+b],w=c[h+b+t];if(g<x||w<v)continue t}if(void 0!==(_=r?n(f,y):n(y,f)))return _}}}function k(t,e,n,r,i,o,a,s,u,c){var f=2*t,l=s*f,h=u[l+e];t:for(var d=r,p=r*f;d<i;++d,p+=f){var m=a[d];if(m!==c){var v=o[p+e],g=o[p+e+t];if(!(h<v||g<h)){for(var _=e+1;_<t;++_){v=o[p+_],g=o[p+_+t];var y=u[l+_],b=u[l+_+t];if(g<y||b<v)continue t}var x=n(m,c);if(void 0!==x)return x}}}}},"./node_modules/box-intersect/lib/median.js":function(t,e,n){"use strict";t.exports=function(t,e,n,a,s,u){if(a<=n+1)return n;var c=n,f=a,l=a+n>>>1,h=2*t,d=l,p=s[h*l+e];for(;c<f;){if(f-c<i){o(t,e,c,f,s,u),p=s[h*l+e];break}var m=f-c,v=Math.random()*m+c|0,g=s[h*v+e],_=Math.random()*m+c|0,y=s[h*_+e],b=Math.random()*m+c|0,x=s[h*b+e];g<=y?x>=y?(d=_,p=y):g>=x?(d=v,p=g):(d=b,p=x):y>=x?(d=_,p=y):x>=g?(d=v,p=g):(d=b,p=x);for(var w=h*(f-1),j=h*d,M=0;M<h;++M,++w,++j){var A=s[w];s[w]=s[j],s[j]=A}var k=u[f-1];u[f-1]=u[d],u[d]=k,d=r(t,e,c,f-1,s,u,p);for(var w=h*(f-1),j=h*d,M=0;M<h;++M,++w,++j){var A=s[w];s[w]=s[j],s[j]=A}var k=u[f-1];if(u[f-1]=u[d],u[d]=k,l<d){for(f=d-1;c<f&&s[h*(f-1)+e]===p;)f-=1;f+=1}else{if(!(d<l))break;for(c=d+1;c<f&&s[h*c+e]===p;)c+=1}}return r(t,e,n,l,s,u,s[h*l+e])};var r=n("./node_modules/box-intersect/lib/partition.js")("lo<p0",["p0"]),i=8;function o(t,e,n,r,i,o){for(var a=2*t,s=a*(n+1)+e,u=n+1;u<r;++u,s+=a)for(var c=i[s],f=u,l=a*(u-1);f>n&&i[l+e]>c;--f,l-=a){for(var h=l,d=l+a,p=0;p<a;++p,++h,++d){var m=i[h];i[h]=i[d],i[d]=m}var v=o[f];o[f]=o[f-1],o[f-1]=v}}},"./node_modules/box-intersect/lib/partition.js":function(t,e,n){"use strict";t.exports=function(t,e){var n="abcdef".split("").concat(e),i=[];t.indexOf("lo")>=0&&i.push("lo=e[k+n]");t.indexOf("hi")>=0&&i.push("hi=e[k+o]");return n.push(r.replace("_",i.join()).replace("$",t)),Function.apply(void 0,n)};var r="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"},"./node_modules/box-intersect/lib/sort.js":function(t,e,n){"use strict";t.exports=function(t,e){e<=4*r?i(0,e-1,t):function t(e,n,l){var h=(n-e+1)/6|0,d=e+h,p=n-h,m=e+n>>1,v=m-h,g=m+h,_=d,y=v,b=m,x=g,w=p,j=e+1,M=n-1,A=0;c(_,y,l)&&(A=_,_=y,y=A);c(x,w,l)&&(A=x,x=w,w=A);c(_,b,l)&&(A=_,_=b,b=A);c(y,b,l)&&(A=y,y=b,b=A);c(_,x,l)&&(A=_,_=x,x=A);c(b,x,l)&&(A=b,b=x,x=A);c(y,w,l)&&(A=y,y=w,w=A);c(y,b,l)&&(A=y,y=b,b=A);c(x,w,l)&&(A=x,x=w,w=A);var k=l[2*y];var E=l[2*y+1];var z=l[2*x];var T=l[2*x+1];var S=2*_;var N=2*b;var O=2*w;var C=2*d;var P=2*m;var B=2*p;for(var R=0;R<2;++R){var I=l[S+R],D=l[N+R],F=l[O+R];l[C+R]=I,l[P+R]=D,l[B+R]=F}a(v,e,l);a(g,n,l);for(var L=j;L<=M;++L)if(f(L,k,E,l))L!==j&&o(L,j,l),++j;else if(!f(L,z,T,l))for(;;){if(f(M,z,T,l)){f(M,k,E,l)?(s(L,j,M,l),++j,--M):(o(L,M,l),--M);break}if(--M<L)break}u(e,j-1,k,E,l);u(n,M+1,z,T,l);j-2-e<=r?i(e,j-2,l):t(e,j-2,l);n-(M+2)<=r?i(M+2,n,l):t(M+2,n,l);M-j<=r?i(j,M,l):t(j,M,l)}(0,e-1,t)};var r=32;function i(t,e,n){for(var r=2*(t+1),i=t+1;i<=e;++i){for(var o=n[r++],a=n[r++],s=i,u=r-2;s-- >t;){var c=n[u-2],f=n[u-1];if(c<o)break;if(c===o&&f<a)break;n[u]=c,n[u+1]=f,u-=2}n[u]=o,n[u+1]=a}}function o(t,e,n){e*=2;var r=n[t*=2],i=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=r,n[e+1]=i}function a(t,e,n){e*=2,n[t*=2]=n[e],n[t+1]=n[e+1]}function s(t,e,n,r){e*=2,n*=2;var i=r[t*=2],o=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=r[n],r[e+1]=r[n+1],r[n]=i,r[n+1]=o}function u(t,e,n,r,i){e*=2,i[t*=2]=i[e],i[e]=n,i[t+1]=i[e+1],i[e+1]=r}function c(t,e,n){e*=2;var r=n[t*=2],i=n[e];return!(r<i)&&(r!==i||n[t+1]>n[e+1])}function f(t,e,n,r){var i=r[t*=2];return i<e||i===e&&r[t+1]<n}},"./node_modules/box-intersect/lib/sweep.js":function(t,e,n){"use strict";t.exports={init:function(t){var e=i.nextPow2(t);s.length<e&&(r.free(s),s=r.mallocInt32(e));u.length<e&&(r.free(u),u=r.mallocInt32(e));c.length<e&&(r.free(c),c=r.mallocInt32(e));f.length<e&&(r.free(f),f=r.mallocInt32(e));l.length<e&&(r.free(l),l=r.mallocInt32(e));h.length<e&&(r.free(h),h=r.mallocInt32(e));var n=8*e;d.length<n&&(r.free(d),d=r.mallocDouble(n))},sweepBipartite:function(t,e,n,r,i,l,h,v,g,_){for(var y=0,b=2*t,x=t-1,w=b-1,j=n;j<r;++j){var M=l[j],A=b*j;d[y++]=i[A+x],d[y++]=-(M+1),d[y++]=i[A+w],d[y++]=M}for(var j=h;j<v;++j){var M=_[j]+a,k=b*j;d[y++]=g[k+x],d[y++]=-M,d[y++]=g[k+w],d[y++]=M}var E=y>>>1;o(d,E);for(var z=0,T=0,j=0;j<E;++j){var S=0|d[2*j+1];if(S>=a)p(c,f,T--,S=S-a|0);else if(S>=0)p(s,u,z--,S);else if(S<=-a){S=-S-a|0;for(var N=0;N<z;++N){var O=e(s[N],S);if(void 0!==O)return O}m(c,f,T++,S)}else{S=-S-1|0;for(var N=0;N<T;++N){var O=e(S,c[N]);if(void 0!==O)return O}m(s,u,z++,S)}}},sweepComplete:function(t,e,n,r,i,a,v,g,_,y){for(var b=0,x=2*t,w=t-1,j=x-1,M=n;M<r;++M){var A=a[M]+1<<1,k=x*M;d[b++]=i[k+w],d[b++]=-A,d[b++]=i[k+j],d[b++]=A}for(var M=v;M<g;++M){var A=y[M]+1<<1,E=x*M;d[b++]=_[E+w],d[b++]=1|-A,d[b++]=_[E+j],d[b++]=1|A}var z=b>>>1;o(d,z);for(var T=0,S=0,N=0,M=0;M<z;++M){var O=0|d[2*M+1],C=1&O;if(M<z-1&&O>>1==d[2*M+3]>>1&&(C=2,M+=1),O<0){for(var P=-(O>>1)-1,B=0;B<N;++B){var R=e(l[B],P);if(void 0!==R)return R}if(0!==C)for(var B=0;B<T;++B){var R=e(s[B],P);if(void 0!==R)return R}if(1!==C)for(var B=0;B<S;++B){var R=e(c[B],P);if(void 0!==R)return R}0===C?m(s,u,T++,P):1===C?m(c,f,S++,P):2===C&&m(l,h,N++,P)}else{var P=(O>>1)-1;0===C?p(s,u,T--,P):1===C?p(c,f,S--,P):2===C&&p(l,h,N--,P)}}},scanBipartite:function(t,e,n,r,i,c,f,l,h,v,g,_){var y=0,b=2*t,x=e,w=e+t,j=1,M=1;r?M=a:j=a;for(var A=i;A<c;++A){var k=A+j,E=b*A;d[y++]=f[E+x],d[y++]=-k,d[y++]=f[E+w],d[y++]=k}for(var A=h;A<v;++A){var k=A+M,z=b*A;d[y++]=g[z+x],d[y++]=-k}var T=y>>>1;o(d,T);for(var S=0,A=0;A<T;++A){var N=0|d[2*A+1];if(N<0){var k=-N,O=!1;if(k>=a?(O=!r,k-=a):(O=!!r,k-=1),O)m(s,u,S++,k);else{var C=_[k],P=b*k,B=g[P+e+1],R=g[P+e+1+t];t:for(var I=0;I<S;++I){var D=s[I],F=b*D;if(!(R<f[F+e+1]||f[F+e+1+t]<B)){for(var L=e+2;L<t;++L)if(g[P+L+t]<f[F+L]||f[F+L+t]<g[P+L])continue t;var U,q=l[D];if(void 0!==(U=r?n(C,q):n(q,C)))return U}}}}else p(s,u,S--,N-j)}},scanComplete:function(t,e,n,r,i,u,c,f,l,h,p){for(var m=0,v=2*t,g=e,_=e+t,y=r;y<i;++y){var b=y+a,x=v*y;d[m++]=u[x+g],d[m++]=-b,d[m++]=u[x+_],d[m++]=b}for(var y=f;y<l;++y){var b=y+1,w=v*y;d[m++]=h[w+g],d[m++]=-b}var j=m>>>1;o(d,j);for(var M=0,y=0;y<j;++y){var A=0|d[2*y+1];if(A<0){var b=-A;if(b>=a)s[M++]=b-a;else{var k=p[b-=1],E=v*b,z=h[E+e+1],T=h[E+e+1+t];t:for(var S=0;S<M;++S){var N=s[S],O=c[N];if(O===k)break;var C=v*N;if(!(T<u[C+e+1]||u[C+e+1+t]<z)){for(var P=e+2;P<t;++P)if(h[E+P+t]<u[C+P]||u[C+P+t]<h[E+P])continue t;var B=n(O,k);if(void 0!==B)return B}}}}else{for(var b=A-a,S=M-1;S>=0;--S)if(s[S]===b){for(var P=S+1;P<M;++P)s[P-1]=s[P];break}--M}}}};var r=n("./node_modules/typedarray-pool/pool.js"),i=n("./node_modules/bit-twiddle/twiddle.js"),o=n("./node_modules/box-intersect/lib/sort.js"),a=1<<28,s=r.mallocInt32(1024),u=r.mallocInt32(1024),c=r.mallocInt32(1024),f=r.mallocInt32(1024),l=r.mallocInt32(1024),h=r.mallocInt32(1024),d=r.mallocDouble(8192);function p(t,e,n,r){var i=e[r],o=t[n-1];t[i]=o,e[o]=i}function m(t,e,n,r){t[n]=r,e[r]=n}},"./node_modules/buffer/index.js":function(t,e,n){"use strict";(function(t){var r=n("./node_modules/base64-js/index.js"),i=n("./node_modules/ieee754/index.js"),o=n("./node_modules/isarray/index.js");function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|d(e.length);return 0===(t=s(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|d(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return L(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function _(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function y(t,e,n,r){return q(L(e,t.length-n),t,n,r)}function b(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function x(t,e,n,r){return b(t,e,n,r)}function w(t,e,n,r){return q(U(e),t,n,r)}function j(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function M(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=k));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return f(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return z(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return y(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function E(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function z(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=F(t[o]);return i}function S(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function N(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function C(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function P(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(t,e,n,r,o){return o||B(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function I(t,e,n,r,o){return o||B(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||O(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||O(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);O(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);O(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return R(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return I(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return I(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=u.isBuffer(t)?t:L(new u(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/cdt2d/cdt2d.js":function(t,e,n){"use strict";var r=n("./node_modules/cdt2d/lib/monotone.js"),i=n("./node_modules/cdt2d/lib/triangulation.js"),o=n("./node_modules/cdt2d/lib/delaunay.js"),a=n("./node_modules/cdt2d/lib/filter.js");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function u(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,n){return e in t?t[e]:n}t.exports=function(t,e,n){Array.isArray(e)?(n=n||{},e=e||[]):(n=e||{},e=[]);var f=!!c(n,"delaunay",!0),l=!!c(n,"interior",!0),h=!!c(n,"exterior",!0),d=!!c(n,"infinity",!1);if(!l&&!h||0===t.length)return[];var p=r(t,e);if(f||l!==h||d){for(var m=i(t.length,function(t){return t.map(s).sort(u)}(e)),v=0;v<p.length;++v){var g=p[v];m.addTriangle(g[0],g[1],g[2])}return f&&o(t,m),h?l?d?a(m,0,d):m.cells():a(m,1,d):a(m,-1)}return p}},"./node_modules/cdt2d/lib/delaunay.js":function(t,e,n){"use strict";var r=n("./node_modules/robust-in-sphere/in-sphere.js")[4];n("./node_modules/binary-search-bounds/search-bounds.js");function i(t,e,n,i,o,a){var s=e.opposite(i,o);if(!(s<0)){if(o<i){var u=i;i=o,o=u,u=a,a=s,s=u}e.isConstraint(i,o)||r(t[i],t[o],t[a],t[s])<0&&n.push(i,o)}}t.exports=function(t,e){for(var n=[],o=t.length,a=e.stars,s=0;s<o;++s)for(var u=a[s],c=1;c<u.length;c+=2){var f=u[c];if(!(f<s)&&!e.isConstraint(s,f)){for(var l=u[c-1],h=-1,d=1;d<u.length;d+=2)if(u[d-1]===f){h=u[d];break}h<0||r(t[s],t[f],t[l],t[h])<0&&n.push(s,f)}}for(;n.length>0;){for(var f=n.pop(),s=n.pop(),l=-1,h=-1,u=a[s],p=1;p<u.length;p+=2){var m=u[p-1],v=u[p];m===f?h=v:v===f&&(l=m)}l<0||h<0||(r(t[s],t[f],t[l],t[h])>=0||(e.flip(s,f),i(t,e,n,l,s,h),i(t,e,n,s,h,l),i(t,e,n,h,f,l),i(t,e,n,f,l,h)))}}},"./node_modules/cdt2d/lib/filter.js":function(t,e,n){"use strict";var r,i=n("./node_modules/binary-search-bounds/search-bounds.js");function o(t,e,n,r,i,o,a){this.cells=t,this.neighbor=e,this.flags=r,this.constraint=n,this.active=i,this.next=o,this.boundary=a}function a(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,n){var r=function(t,e){for(var n=t.cells(),r=n.length,i=0;i<r;++i){var s=n[i],u=s[0],c=s[1],f=s[2];c<f?c<u&&(s[0]=c,s[1]=f,s[2]=u):f<u&&(s[0]=f,s[1]=u,s[2]=c)}n.sort(a);for(var l=new Array(r),i=0;i<l.length;++i)l[i]=0;var h=[],d=[],p=new Array(3*r),m=new Array(3*r),v=null;e&&(v=[]);for(var g=new o(n,p,m,l,h,d,v),i=0;i<r;++i)for(var s=n[i],_=0;_<3;++_){var u=s[_],c=s[(_+1)%3],y=p[3*i+_]=g.locate(c,u,t.opposite(c,u)),b=m[3*i+_]=t.isConstraint(u,c);y<0&&(b?d.push(i):(h.push(i),l[i]=1),e&&v.push([c,u,-1]))}return g}(t,n);if(0===e)return n?r.cells.concat(r.boundary):r.cells;var i=1,s=r.active,u=r.next,c=r.flags,f=r.cells,l=r.constraint,h=r.neighbor;for(;s.length>0||u.length>0;){for(;s.length>0;){var d=s.pop();if(c[d]!==-i){c[d]=i;f[d];for(var p=0;p<3;++p){var m=h[3*d+p];m>=0&&0===c[m]&&(l[3*d+p]?u.push(m):(s.push(m),c[m]=i))}}}var v=u;u=s,s=v,u.length=0,i=-i}var g=function(t,e,n){for(var r=0,i=0;i<t.length;++i)e[i]===n&&(t[r++]=t[i]);return t.length=r,t}(f,c,e);if(n)return g.concat(r.boundary);return g},o.prototype.locate=(r=[0,0,0],function(t,e,n){var o=t,s=e,u=n;return e<n?e<t&&(o=e,s=n,u=t):n<t&&(o=n,s=t,u=e),o<0?-1:(r[0]=o,r[1]=s,r[2]=u,i.eq(this.cells,r,a))})},"./node_modules/cdt2d/lib/monotone.js":function(t,e,n){"use strict";var r=n("./node_modules/binary-search-bounds/search-bounds.js"),i=n("./node_modules/robust-orientation/orientation.js")[3],o=0,a=1,s=2;function u(t,e,n,r,i){this.a=t,this.b=e,this.idx=n,this.lowerIds=r,this.upperIds=i}function c(t,e,n,r){this.a=t,this.b=e,this.type=n,this.idx=r}function f(t,e){var n=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return n||(t.type!==o&&(n=i(t.a,t.b,e.b))?n:t.idx-e.idx)}function l(t,e){return i(t.a,t.b,e)}function h(t,e,n,o,a){for(var s=r.lt(e,o,l),u=r.gt(e,o,l),c=s;c<u;++c){for(var f=e[c],h=f.lowerIds,d=h.length;d>1&&i(n[h[d-2]],n[h[d-1]],o)>0;)t.push([h[d-1],h[d-2],a]),d-=1;h.length=d,h.push(a);var p=f.upperIds;for(d=p.length;d>1&&i(n[p[d-2]],n[p[d-1]],o)<0;)t.push([p[d-2],p[d-1],a]),d-=1;p.length=d,p.push(a)}}function d(t,e){var n;return(n=t.a[0]<e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?n:(n=e.b[0]<t.b[0]?i(t.a,t.b,e.b):i(e.b,e.a,t.b))||t.idx-e.idx}function p(t,e,n){var i=r.le(t,n,d),o=t[i],a=o.upperIds,s=a[a.length-1];o.upperIds=[s],t.splice(i+1,0,new u(n.a,n.b,n.idx,[s],a))}function m(t,e,n){var i=n.a;n.a=n.b,n.b=i;var o=r.eq(t,n,d),a=t[o];t[o-1].upperIds=a.upperIds,t.splice(o,1)}t.exports=function(t,e){for(var n=t.length,r=e.length,i=[],l=0;l<n;++l)i.push(new c(t[l],null,o,l));for(var l=0;l<r;++l){var d=e[l],v=t[d[0]],g=t[d[1]];v[0]<g[0]?i.push(new c(v,g,s,l),new c(g,v,a,l)):v[0]>g[0]&&i.push(new c(g,v,s,l),new c(v,g,a,l))}i.sort(f);for(var _=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),y=[new u([_,1],[_,0],-1,[],[],[],[])],b=[],l=0,x=i.length;l<x;++l){var w=i[l],j=w.type;j===o?h(b,y,t,w.a,w.idx):j===s?p(y,t,w):m(y,t,w)}return b}},"./node_modules/cdt2d/lib/triangulation.js":function(t,e,n){"use strict";var r=n("./node_modules/binary-search-bounds/search-bounds.js");function i(t,e){this.stars=t,this.edges=e}t.exports=function(t,e){for(var n=new Array(t),r=0;r<t;++r)n[r]=[];return new i(n,e)};var o=i.prototype;function a(t,e,n){for(var r=1,i=t.length;r<i;r+=2)if(t[r-1]===e&&t[r]===n)return t[r-1]=t[i-2],t[r]=t[i-1],void(t.length=i-2)}o.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(n,i){return t[0]=Math.min(n,i),t[1]=Math.max(n,i),r.eq(this.edges,t,e)>=0}}(),o.removeTriangle=function(t,e,n){var r=this.stars;a(r[t],e,n),a(r[e],n,t),a(r[n],t,e)},o.addTriangle=function(t,e,n){var r=this.stars;r[t].push(e,n),r[e].push(n,t),r[n].push(t,e)},o.opposite=function(t,e){for(var n=this.stars[e],r=1,i=n.length;r<i;r+=2)if(n[r]===t)return n[r-1];return-1},o.flip=function(t,e){var n=this.opposite(t,e),r=this.opposite(e,t);this.removeTriangle(t,e,n),this.removeTriangle(e,t,r),this.addTriangle(t,r,n),this.addTriangle(e,n,r)},o.edges=function(){for(var t=this.stars,e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length;o<a;o+=2)e.push([i[o],i[o+1]]);return e},o.cells=function(){for(var t=this.stars,e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length;o<a;o+=2){var s=i[o],u=i[o+1];n<Math.min(s,u)&&e.push([n,s,u])}return e}},"./node_modules/clean-pslg/clean-pslg.js":function(t,e,n){"use strict";t.exports=function(t,e,n){var r;if(n){r=e;for(var i=new Array(e.length),o=0;o<e.length;++o){var a=e[o];i[o]=[a[0],a[1],n[o]]}e=i}var s=function(t,e,n){var r=p(t,[],d(t));return g(e,r,n),!!r}(t,e,!!n);for(;_(t,e,!!n);)s=!0;if(n&&s){r.length=0,n.length=0;for(var o=0;o<e.length;++o){var a=e[o];r.push([a[0],a[1]]),n.push(a[2])}}return s};var r=n("./node_modules/union-find/index.js"),i=n("./node_modules/box-intersect/index.js"),o=n("./node_modules/robust-segment-intersect/segseg.js"),a=n("./node_modules/big-rat/index.js"),s=n("./node_modules/big-rat/cmp.js"),u=n("./node_modules/big-rat/to-float.js"),c=n("./node_modules/rat-vec/index.js"),f=n("./node_modules/nextafter/nextafter.js"),l=n("./node_modules/clean-pslg/lib/rat-seg-intersect.js");function h(t){var e=u(t);return[f(e,-1/0),f(e,1/0)]}function d(t){for(var e=new Array(t.length),n=0;n<t.length;++n){var r=t[n];e[n]=[f(r[0],-1/0),f(r[1],-1/0),f(r[0],1/0),f(r[1],1/0)]}return e}function p(t,e,n){for(var o=e.length,a=new r(o),s=[],u=0;u<e.length;++u){var c=e[u],l=h(c[0]),d=h(c[1]);s.push([f(l[0],-1/0),f(d[0],-1/0),f(l[1],1/0),f(d[1],1/0)])}i(s,function(t,e){a.link(t,e)});var p=!0,m=new Array(o);for(u=0;u<o;++u){(g=a.find(u))!==u&&(p=!1,t[g]=[Math.min(t[u][0],t[g][0]),Math.min(t[u][1],t[g][1])])}if(p)return null;var v=0;for(u=0;u<o;++u){var g;(g=a.find(u))===u?(m[u]=v,t[v++]=t[u]):m[u]=-1}t.length=v;for(u=0;u<o;++u)m[u]<0&&(m[u]=m[a.find(u)]);return m}function m(t,e){return t[0]-e[0]||t[1]-e[1]}function v(t,e){var n=t[0]-e[0]||t[1]-e[1];return n||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function g(t,e,n){if(0!==t.length){if(e)for(var r=0;r<t.length;++r){var i=e[(a=t[r])[0]],o=e[a[1]];a[0]=Math.min(i,o),a[1]=Math.max(i,o)}else for(r=0;r<t.length;++r){var a;i=(a=t[r])[0],o=a[1];a[0]=Math.min(i,o),a[1]=Math.max(i,o)}n?t.sort(v):t.sort(m);var s=1;for(r=1;r<t.length;++r){var u=t[r-1],c=t[r];(c[0]!==u[0]||c[1]!==u[1]||n&&c[2]!==u[2])&&(t[s++]=c)}t.length=s}}function _(t,e,n){var r=function(t,e){for(var n=new Array(e.length),r=0;r<e.length;++r){var i=e[r],o=t[i[0]],a=t[i[1]];n[r]=[f(Math.min(o[0],a[0]),-1/0),f(Math.min(o[1],a[1]),-1/0),f(Math.max(o[0],a[0]),1/0),f(Math.max(o[1],a[1]),1/0)]}return n}(t,e),h=function(t,e,n){var r=[];return i(n,function(n,i){var a=e[n],s=e[i];if(a[0]!==s[0]&&a[0]!==s[1]&&a[1]!==s[0]&&a[1]!==s[1]){var u=t[a[0]],c=t[a[1]],f=t[s[0]],l=t[s[1]];o(u,c,f,l)&&r.push([n,i])}}),r}(t,e,r),m=d(t),v=function(t,e,n,r){var a=[];return i(n,r,function(n,r){var i=e[n];if(i[0]!==r&&i[1]!==r){var s=t[r],u=t[i[0]],c=t[i[1]];o(u,c,s,s)&&a.push([n,r])}}),a}(t,e,r,m),_=p(t,function(t,e,n,r,i){var o,f,h=t.map(function(t){return[a(t[0]),a(t[1])]});for(o=0;o<n.length;++o){var d=n[o];f=d[0];var p=d[1],m=e[f],v=e[p],g=l(c(t[m[0]]),c(t[m[1]]),c(t[v[0]]),c(t[v[1]]));if(g){var _=t.length;t.push([u(g[0]),u(g[1])]),h.push(g),r.push([f,_],[p,_])}}for(r.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var n=h[t[1]],r=h[e[1]];return s(n[0],r[0])||s(n[1],r[1])}),o=r.length-1;o>=0;--o){var y=e[f=(E=r[o])[0]],b=y[0],x=y[1],w=t[b],j=t[x];if((w[0]-j[0]||w[1]-j[1])<0){var M=b;b=x,x=M}y[0]=b;var A,k=y[1]=E[1];for(i&&(A=y[2]);o>0&&r[o-1][0]===f;){var E,z=(E=r[--o])[1];i?e.push([k,z,A]):e.push([k,z]),k=z}i?e.push([k,x,A]):e.push([k,x])}return h}(t,e,h,v,n));return g(e,_,n),!!_||(h.length>0||v.length>0)}},"./node_modules/clean-pslg/lib/rat-seg-intersect.js":function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o=s(e,t),l=s(r,n),h=f(o,l);if(0===a(h))return null;var d=s(t,n),p=f(l,d),m=i(p,h),v=c(o,m);return u(t,v)};var r=n("./node_modules/big-rat/mul.js"),i=n("./node_modules/big-rat/div.js"),o=n("./node_modules/big-rat/sub.js"),a=n("./node_modules/big-rat/sign.js"),s=n("./node_modules/rat-vec/sub.js"),u=n("./node_modules/rat-vec/add.js"),c=n("./node_modules/rat-vec/muls.js");function f(t,e){return o(r(t[0],e[1]),r(t[1],e[0]))}},"./node_modules/compare-angle/cmpangle.js":function(t,e,n){"use strict";t.exports=function(t,e,n,o){var a=r(e,n,o);if(0===a){var s=i(r(t,e,n)),c=i(r(t,e,o));if(s===c){if(0===s){var f=u(t,e,n),l=u(t,e,o);return f===l?0:f?1:-1}return 0}return 0===c?s>0?-1:u(t,e,o)?-1:1:0===s?c>0?1:u(t,e,n)?1:-1:i(c-s)}var h=r(t,e,n);if(h>0)return a>0&&r(t,e,o)>0?1:-1;if(h<0)return a>0||r(t,e,o)>0?1:-1;var d=r(t,e,o);return d>0?1:u(t,e,n)?1:-1};var r=n("./node_modules/robust-orientation/orientation.js"),i=n("./node_modules/signum/sgn.js"),o=n("./node_modules/two-sum/two-sum.js"),a=n("./node_modules/robust-product/product.js"),s=n("./node_modules/robust-sum/robust-sum.js");function u(t,e,n){var r=o(t[0],-e[0]),i=o(t[1],-e[1]),u=o(n[0],-e[0]),c=o(n[1],-e[1]),f=s(a(r,u),a(i,c));return f[f.length-1]>=0}},"./node_modules/cwise-compiler/compiler.js":function(t,e,n){"use strict";var r=n("./node_modules/cwise-compiler/lib/thunk.js");function i(){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}t.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var n=t.args.slice(0);e.argTypes=n;for(var o=0;o<n.length;++o){var a=n[o];if("array"===a||"object"==typeof a&&a.blockIndices){if(e.argTypes[o]="array",e.arrayArgs.push(o),e.arrayBlockIndices.push(a.blockIndices?a.blockIndices:0),e.shimArgs.push("array"+o),o<e.pre.args.length&&e.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array args");if(o<e.post.args.length&&e.post.args[o].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)e.scalarArgs.push(o),e.shimArgs.push("scalar"+o);else if("index"===a){if(e.indexArgs.push(o),o<e.pre.args.length&&e.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array index");if(o<e.body.args.length&&e.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array index");if(o<e.post.args.length&&e.post.args[o].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(e.shapeArgs.push(o),o<e.pre.args.length&&e.pre.args[o].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(o<e.body.args.length&&e.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array shape");if(o<e.post.args.length&&e.post.args[o].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof a||!a.offset)throw new Error("cwise: Unknown argument type "+n[o]);e.argTypes[o]="offset",e.offsetArgs.push({array:a.array,offset:a.offset}),e.offsetArgIndex.push(o)}}if(e.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(e.pre.args.length>n.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>n.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,r(e)}},"./node_modules/cwise-compiler/lib/compile.js":function(t,e,n){"use strict";var r=n("./node_modules/uniq/uniq.js");function i(t,e,n){var r,i,o=t.length,a=e.arrayArgs.length,s=e.indexArgs.length>0,u=[],c=[],f=0,l=0;for(r=0;r<o;++r)c.push(["i",r,"=0"].join(""));for(i=0;i<a;++i)for(r=0;r<o;++r)l=f,f=t[r],0===r?c.push(["d",i,"s",r,"=t",i,"p",f].join("")):c.push(["d",i,"s",r,"=(t",i,"p",f,"-s",l,"*t",i,"p",l,")"].join(""));for(c.length>0&&u.push("var "+c.join(",")),r=o-1;r>=0;--r)f=t[r],u.push(["for(i",r,"=0;i",r,"<s",f,";++i",r,"){"].join(""));for(u.push(n),r=0;r<o;++r){for(l=f,f=t[r],i=0;i<a;++i)u.push(["p",i,"+=d",i,"s",r].join(""));s&&(r>0&&u.push(["index[",l,"]-=s",l].join("")),u.push(["++index[",f,"]"].join(""))),u.push("}")}return u.join("\n")}function o(t,e,n){for(var r=t.body,i=[],o=[],a=0;a<t.args.length;++a){var s=t.args[a];if(!(s.count<=0)){var u=new RegExp(s.name,"g"),c="",f=e.arrayArgs.indexOf(a);switch(e.argTypes[a]){case"offset":var l=e.offsetArgIndex.indexOf(a);f=e.offsetArgs[l].array,c="+q"+l;case"array":c="p"+f+c;var h="l"+a,d="a"+f;if(0===e.arrayBlockIndices[f])1===s.count?"generic"===n[f]?s.lvalue?(i.push(["var ",h,"=",d,".get(",c,")"].join("")),r=r.replace(u,h),o.push([d,".set(",c,",",h,")"].join(""))):r=r.replace(u,[d,".get(",c,")"].join("")):r=r.replace(u,[d,"[",c,"]"].join("")):"generic"===n[f]?(i.push(["var ",h,"=",d,".get(",c,")"].join("")),r=r.replace(u,h),s.lvalue&&o.push([d,".set(",c,",",h,")"].join(""))):(i.push(["var ",h,"=",d,"[",c,"]"].join("")),r=r.replace(u,h),s.lvalue&&o.push([d,"[",c,"]=",h].join("")));else{for(var p=[s.name],m=[c],v=0;v<Math.abs(e.arrayBlockIndices[f]);v++)p.push("\\s*\\[([^\\]]+)\\]"),m.push("$"+(v+1)+"*t"+f+"b"+v);if(u=new RegExp(p.join(""),"g"),c=m.join("+"),"generic"===n[f])throw new Error("cwise: Generic arrays not supported in combination with blocks!");r=r.replace(u,[d,"[",c,"]"].join(""))}break;case"scalar":r=r.replace(u,"Y"+e.scalarArgs.indexOf(a));break;case"index":r=r.replace(u,"index");break;case"shape":r=r.replace(u,"shape")}}}return[i.join("\n"),r,o.join("\n")].join("\n").trim()}function a(t){for(var e=new Array(t.length),n=!0,r=0;r<t.length;++r){var i=t[r],o=i.match(/\d+/);o=o?o[0]:"",0===i.charAt(0)?e[r]="u"+i.charAt(1)+o:e[r]=i.charAt(0)+o,r>0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}t.exports=function(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,s=new Array(t.arrayArgs.length),u=new Array(t.arrayArgs.length),c=0;c<t.arrayArgs.length;++c)u[c]=e[2*c],s[c]=e[2*c+1];var f=[],l=[],h=[],d=[],p=[];for(c=0;c<t.arrayArgs.length;++c){t.arrayBlockIndices[c]<0?(h.push(0),d.push(n),f.push(n),l.push(n+t.arrayBlockIndices[c])):(h.push(t.arrayBlockIndices[c]),d.push(t.arrayBlockIndices[c]+n),f.push(0),l.push(t.arrayBlockIndices[c]));for(var m=[],v=0;v<s[c].length;v++)h[c]<=s[c][v]&&s[c][v]<d[c]&&m.push(s[c][v]-h[c]);p.push(m)}var g=["SS"],_=["'use strict'"],y=[];for(v=0;v<n;++v)y.push(["s",v,"=SS[",v,"]"].join(""));for(c=0;c<t.arrayArgs.length;++c){for(g.push("a"+c),g.push("t"+c),g.push("p"+c),v=0;v<n;++v)y.push(["t",c,"p",v,"=t",c,"[",h[c]+v,"]"].join(""));for(v=0;v<Math.abs(t.arrayBlockIndices[c]);++v)y.push(["t",c,"b",v,"=t",c,"[",f[c]+v,"]"].join(""))}for(c=0;c<t.scalarArgs.length;++c)g.push("Y"+c);if(t.shapeArgs.length>0&&y.push("shape=SS.slice(0)"),t.indexArgs.length>0){var b=new Array(n);for(c=0;c<n;++c)b[c]="0";y.push(["index=[",b.join(","),"]"].join(""))}for(c=0;c<t.offsetArgs.length;++c){var x=t.offsetArgs[c],w=[];for(v=0;v<x.offset.length;++v)0!==x.offset[v]&&(1===x.offset[v]?w.push(["t",x.array,"p",v].join("")):w.push([x.offset[v],"*t",x.array,"p",v].join("")));0===w.length?y.push("q"+c+"=0"):y.push(["q",c,"=",w.join("+")].join(""))}var j=r([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for((y=y.concat(j)).length>0&&_.push("var "+y.join(",")),c=0;c<t.arrayArgs.length;++c)_.push("p"+c+"|=0");t.pre.body.length>3&&_.push(o(t.pre,t,u));var M=o(t.body,t,u),A=function(t){for(var e=0,n=t[0].length;e<n;){for(var r=1;r<t.length;++r)if(t[r][e]!==t[0][e])return e;++e}return e}(p);A<n?_.push(function(t,e,n,r){for(var o=e.length,a=n.arrayArgs.length,s=n.blockSize,u=n.indexArgs.length>0,c=[],f=0;f<a;++f)c.push(["var offset",f,"=p",f].join(""));for(f=t;f<o;++f)c.push(["for(var j"+f+"=SS[",e[f],"]|0;j",f,">0;){"].join("")),c.push(["if(j",f,"<",s,"){"].join("")),c.push(["s",e[f],"=j",f].join("")),c.push(["j",f,"=0"].join("")),c.push(["}else{s",e[f],"=",s].join("")),c.push(["j",f,"-=",s,"}"].join("")),u&&c.push(["index[",e[f],"]=j",f].join(""));for(f=0;f<a;++f){for(var l=["offset"+f],h=t;h<o;++h)l.push(["j",h,"*t",f,"p",e[h]].join(""));c.push(["p",f,"=(",l.join("+"),")"].join(""))}for(c.push(i(e,n,r)),f=t;f<o;++f)c.push("}");return c.join("\n")}(A,p[0],t,M)):_.push(i(p[0],t,M)),t.post.body.length>3&&_.push(o(t.post,t,u)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+_.join("\n")+"\n----------");var k=[t.funcName||"unnamed","_cwise_loop_",s[0].join("s"),"m",A,a(u)].join("");return new Function(["function ",k,"(",g.join(","),"){",_.join("\n"),"} return ",k].join(""))()}},"./node_modules/cwise-compiler/lib/thunk.js":function(t,e,n){"use strict";var r=n("./node_modules/cwise-compiler/lib/compile.js");t.exports=function(t){var e=["'use strict'","var CACHED={}"],n=[],i=t.funcName+"_cwise_thunk";e.push(["return function ",i,"(",t.shimArgs.join(","),"){"].join(""));for(var o=[],a=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],u=[],c=[],f=0;f<t.arrayArgs.length;++f){var l=t.arrayArgs[f];n.push(["t",l,"=array",l,".dtype,","r",l,"=array",l,".order"].join("")),o.push("t"+l),o.push("r"+l),a.push("t"+l),a.push("r"+l+".join()"),s.push("array"+l+".data"),s.push("array"+l+".stride"),s.push("array"+l+".offset|0"),f>0&&(u.push("array"+t.arrayArgs[0]+".shape.length===array"+l+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[f]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+l+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[f])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+u.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("}")),f=0;f<t.scalarArgs.length;++f)s.push("scalar"+t.scalarArgs[f]);return n.push(["type=[",a.join(","),"].join()"].join("")),n.push("proc=CACHED[type]"),e.push("var "+n.join(",")),e.push(["if(!proc){","CACHED[type]=proc=compile([",o.join(","),"])}","return proc(",s.join(","),")}"].join("")),t.debug&&console.log("-----Generated thunk:\n"+e.join("\n")+"\n----------"),new Function("compile",e.join("\n"))(r.bind(void 0,t))}},"./node_modules/d/index.js":function(t,e,n){"use strict";var r=n("./node_modules/es5-ext/object/assign/index.js"),i=n("./node_modules/es5-ext/object/normalize-options.js"),o=n("./node_modules/es5-ext/object/is-callable.js"),a=n("./node_modules/es5-ext/string/#/contains/index.js");(t.exports=function(t,e){var n,o,s,u,c;return arguments.length<2||"string"!=typeof t?(u=e,e=t,t=null):u=arguments[2],null==t?(n=s=!0,o=!1):(n=a.call(t,"c"),o=a.call(t,"e"),s=a.call(t,"w")),c={value:e,configurable:n,enumerable:o,writable:s},u?r(i(u),c):c}).gs=function(t,e,n){var s,u,c,f;return"string"!=typeof t?(c=n,n=e,e=t,t=null):c=arguments[3],null==e?e=void 0:o(e)?null==n?n=void 0:o(n)||(c=n,n=void 0):(c=e,e=n=void 0),null==t?(s=!0,u=!1):(s=a.call(t,"c"),u=a.call(t,"e")),f={get:e,set:n,configurable:s,enumerable:u},c?r(i(c),f):f}},"./node_modules/d3-collection/src/entries.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e}},"./node_modules/d3-collection/src/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-collection/src/nest.js");n.d(e,"nest",function(){return r.default});var i=n("./node_modules/d3-collection/src/set.js");n.d(e,"set",function(){return i.default});var o=n("./node_modules/d3-collection/src/map.js");n.d(e,"map",function(){return o.default});var a=n("./node_modules/d3-collection/src/keys.js");n.d(e,"keys",function(){return a.default});var s=n("./node_modules/d3-collection/src/values.js");n.d(e,"values",function(){return s.default});var u=n("./node_modules/d3-collection/src/entries.js");n.d(e,"entries",function(){return u.default})},"./node_modules/d3-collection/src/keys.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){var e=[];for(var n in t)e.push(n);return e}},"./node_modules/d3-collection/src/map.js":function(t,e,n){"use strict";n.r(e),n.d(e,"prefix",function(){return r});var r="$";function i(){}function o(t,e){var n=new i;if(t instanceof i)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r,o=-1,a=t.length;if(null==e)for(;++o<a;)n.set(o,t[o]);else for(;++o<a;)n.set(e(r=t[o],o,t),r)}else if(t)for(var s in t)n.set(s,t[s]);return n}i.prototype=o.prototype={constructor:i,has:function(t){return r+t in this},get:function(t){return this[r+t]},set:function(t,e){return this[r+t]=e,this},remove:function(t){var e=r+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===r&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===r&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===r&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===r&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===r&&++t;return t},empty:function(){for(var t in this)if(t[0]===r)return!1;return!0},each:function(t){for(var e in this)e[0]===r&&t(this[e],e.slice(1),this)}},e.default=o},"./node_modules/d3-collection/src/nest.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-collection/src/map.js");function i(){return{}}function o(t,e,n){t[e]=n}function a(){return Object(r.default)()}function s(t,e,n){t.set(e,n)}e.default=function(){var t,e,n,u=[],c=[];function f(n,i,o,a){if(i>=u.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,c,l,h=-1,d=n.length,p=u[i++],m=Object(r.default)(),v=o();++h<d;)(l=m.get(s=p(c=n[h])+""))?l.push(c):m.set(s,[c]);return m.each(function(t,e){a(v,e,f(t,i,o,a))}),v}return n={object:function(t){return f(t,0,i,o)},map:function(t){return f(t,0,a,s)},entries:function(t){return function t(n,r){if(++r>u.length)return n;var i,o=c[r-1];return null!=e&&r>=u.length?i=n.entries():(i=[],n.each(function(e,n){i.push({key:n,values:t(e,r)})})),null!=o?i.sort(function(t,e){return o(t.key,e.key)}):i}(f(t,0,a,s),0)},key:function(t){return u.push(t),n},sortKeys:function(t){return c[u.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}},"./node_modules/d3-collection/src/set.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-collection/src/map.js");function i(){}var o=r.default.prototype;function a(t,e){var n=new i;if(t instanceof i)t.each(function(t){n.add(t)});else if(t){var r=-1,o=t.length;if(null==e)for(;++r<o;)n.add(t[r]);else for(;++r<o;)n.add(e(t[r],r,t))}return n}i.prototype=a.prototype={constructor:i,has:o.has,add:function(t){return t+="",this[r.prefix+t]=t,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each},e.default=a},"./node_modules/d3-collection/src/values.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){var e=[];for(var n in t)e.push(t[n]);return e}},"./node_modules/d3-selection/src/constant.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return function(){return t}}},"./node_modules/d3-selection/src/create.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/creator.js"),i=n("./node_modules/d3-selection/src/select.js");e.default=function(t){return Object(i.default)(Object(r.default)(t).call(document.documentElement))}},"./node_modules/d3-selection/src/creator.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/namespace.js"),i=n("./node_modules/d3-selection/src/namespaces.js");e.default=function(t){var e=Object(r.default)(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===i.xhtml&&e.documentElement.namespaceURI===i.xhtml?e.createElement(t):e.createElementNS(n,t)}})(e)}},"./node_modules/d3-selection/src/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/create.js");n.d(e,"create",function(){return r.default});var i=n("./node_modules/d3-selection/src/creator.js");n.d(e,"creator",function(){return i.default});var o=n("./node_modules/d3-selection/src/local.js");n.d(e,"local",function(){return o.default});var a=n("./node_modules/d3-selection/src/matcher.js");n.d(e,"matcher",function(){return a.default});var s=n("./node_modules/d3-selection/src/mouse.js");n.d(e,"mouse",function(){return s.default});var u=n("./node_modules/d3-selection/src/namespace.js");n.d(e,"namespace",function(){return u.default});var c=n("./node_modules/d3-selection/src/namespaces.js");n.d(e,"namespaces",function(){return c.default});var f=n("./node_modules/d3-selection/src/point.js");n.d(e,"clientPoint",function(){return f.default});var l=n("./node_modules/d3-selection/src/select.js");n.d(e,"select",function(){return l.default});var h=n("./node_modules/d3-selection/src/selectAll.js");n.d(e,"selectAll",function(){return h.default});var d=n("./node_modules/d3-selection/src/selection/index.js");n.d(e,"selection",function(){return d.default});var p=n("./node_modules/d3-selection/src/selector.js");n.d(e,"selector",function(){return p.default});var m=n("./node_modules/d3-selection/src/selectorAll.js");n.d(e,"selectorAll",function(){return m.default});var v=n("./node_modules/d3-selection/src/selection/style.js");n.d(e,"style",function(){return v.styleValue});var g=n("./node_modules/d3-selection/src/touch.js");n.d(e,"touch",function(){return g.default});var _=n("./node_modules/d3-selection/src/touches.js");n.d(e,"touches",function(){return _.default});var y=n("./node_modules/d3-selection/src/window.js");n.d(e,"window",function(){return y.default});var b=n("./node_modules/d3-selection/src/selection/on.js");n.d(e,"event",function(){return b.event}),n.d(e,"customEvent",function(){return b.customEvent})},"./node_modules/d3-selection/src/local.js":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return i});var r=0;function i(){return new o}function o(){this._="@"+(++r).toString(36)}o.prototype=i.prototype={constructor:o,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}}},"./node_modules/d3-selection/src/matcher.js":function(t,e,n){"use strict";n.r(e);var r=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var i=document.documentElement;if(!i.matches){var o=i.webkitMatchesSelector||i.msMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector;r=function(t){return function(){return o.call(this,t)}}}}e.default=r},"./node_modules/d3-selection/src/mouse.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/sourceEvent.js"),i=n("./node_modules/d3-selection/src/point.js");e.default=function(t){var e=Object(r.default)();return e.changedTouches&&(e=e.changedTouches[0]),Object(i.default)(t,e)}},"./node_modules/d3-selection/src/namespace.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/namespaces.js");e.default=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.default.hasOwnProperty(e)?{space:r.default[e],local:t}:t}},"./node_modules/d3-selection/src/namespaces.js":function(t,e,n){"use strict";n.r(e),n.d(e,"xhtml",function(){return r});var r="http://www.w3.org/1999/xhtml";e.default={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},"./node_modules/d3-selection/src/point.js":function(t,e,n){"use strict";n.r(e),e.default=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}},"./node_modules/d3-selection/src/select.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js");e.default=function(t){return"string"==typeof t?new r.Selection([[document.querySelector(t)]],[document.documentElement]):new r.Selection([[t]],r.root)}},"./node_modules/d3-selection/src/selectAll.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js");e.default=function(t){return"string"==typeof t?new r.Selection([document.querySelectorAll(t)],[document.documentElement]):new r.Selection([null==t?[]:t],r.root)}},"./node_modules/d3-selection/src/selection/append.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/creator.js");e.default=function(t){var e="function"==typeof t?t:Object(r.default)(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}},"./node_modules/d3-selection/src/selection/attr.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/namespace.js");e.default=function(t,e){var n=Object(r.default)(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))}},"./node_modules/d3-selection/src/selection/call.js":function(t,e,n){"use strict";n.r(e),e.default=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}},"./node_modules/d3-selection/src/selection/classed.js":function(t,e,n){"use strict";function r(t){return t.trim().split(/^|\s+/)}function i(t){return t.classList||new o(t)}function o(t){this._node=t,this._names=r(t.getAttribute("class")||"")}function a(t,e){for(var n=i(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function s(t,e){for(var n=i(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}n.r(e),o.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},e.default=function(t,e){var n=r(t+"");if(arguments.length<2){for(var o=i(this.node()),u=-1,c=n.length;++u<c;)if(!o.contains(n[u]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?a:s)(this,t)}}:e?function(t){return function(){a(this,t)}}:function(t){return function(){s(this,t)}})(n,e))}},"./node_modules/d3-selection/src/selection/clone.js":function(t,e,n){"use strict";function r(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function i(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}n.r(e),e.default=function(t){return this.select(t?i:r)}},"./node_modules/d3-selection/src/selection/data.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js"),i=n("./node_modules/d3-selection/src/selection/enter.js"),o=n("./node_modules/d3-selection/src/constant.js"),a="$";function s(t,e,n,r,o,a){for(var s,u=0,c=e.length,f=a.length;u<f;++u)(s=e[u])?(s.__data__=a[u],r[u]=s):n[u]=new i.EnterNode(t,a[u]);for(;u<c;++u)(s=e[u])&&(o[u]=s)}function u(t,e,n,r,o,s,u){var c,f,l,h={},d=e.length,p=s.length,m=new Array(d);for(c=0;c<d;++c)(f=e[c])&&(m[c]=l=a+u.call(f,f.__data__,c,e),l in h?o[c]=f:h[l]=f);for(c=0;c<p;++c)(f=h[l=a+u.call(t,s[c],c,s)])?(r[c]=f,f.__data__=s[c],h[l]=null):n[c]=new i.EnterNode(t,s[c]);for(c=0;c<d;++c)(f=e[c])&&h[m[c]]===f&&(o[c]=f)}e.default=function(t,e){if(!t)return g=new Array(this.size()),d=-1,this.each(function(t){g[++d]=t}),g;var n=e?u:s,i=this._parents,a=this._groups;"function"!=typeof t&&(t=Object(o.default)(t));for(var c=a.length,f=new Array(c),l=new Array(c),h=new Array(c),d=0;d<c;++d){var p=i[d],m=a[d],v=m.length,g=t.call(p,p&&p.__data__,d,i),_=g.length,y=l[d]=new Array(_),b=f[d]=new Array(_);n(p,m,y,b,h[d]=new Array(v),g,e);for(var x,w,j=0,M=0;j<_;++j)if(x=y[j]){for(j>=M&&(M=j+1);!(w=b[M])&&++M<_;);x._next=w||null}}return(f=new r.Selection(f,i))._enter=l,f._exit=h,f}},"./node_modules/d3-selection/src/selection/datum.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return arguments.length?this.property("__data__",t):this.node().__data__}},"./node_modules/d3-selection/src/selection/dispatch.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/window.js");function i(t,e,n){var i=Object(r.default)(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}e.default=function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return i(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return i(this,t,e)}})(t,e))}},"./node_modules/d3-selection/src/selection/each.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this}},"./node_modules/d3-selection/src/selection/empty.js":function(t,e,n){"use strict";n.r(e),e.default=function(){return!this.node()}},"./node_modules/d3-selection/src/selection/enter.js":function(t,e,n){"use strict";n.r(e),n.d(e,"EnterNode",function(){return o});var r=n("./node_modules/d3-selection/src/selection/sparse.js"),i=n("./node_modules/d3-selection/src/selection/index.js");function o(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}e.default=function(){return new i.Selection(this._enter||this._groups.map(r.default),this._parents)},o.prototype={constructor:o,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}}},"./node_modules/d3-selection/src/selection/exit.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/sparse.js"),i=n("./node_modules/d3-selection/src/selection/index.js");e.default=function(){return new i.Selection(this._exit||this._groups.map(r.default),this._parents)}},"./node_modules/d3-selection/src/selection/filter.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js"),i=n("./node_modules/d3-selection/src/matcher.js");e.default=function(t){"function"!=typeof t&&(t=Object(i.default)(t));for(var e=this._groups,n=e.length,o=new Array(n),a=0;a<n;++a)for(var s,u=e[a],c=u.length,f=o[a]=[],l=0;l<c;++l)(s=u[l])&&t.call(s,s.__data__,l,u)&&f.push(s);return new r.Selection(o,this._parents)}},"./node_modules/d3-selection/src/selection/html.js":function(t,e,n){"use strict";function r(){this.innerHTML=""}n.r(e),e.default=function(t){return arguments.length?this.each(null==t?r:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML}},"./node_modules/d3-selection/src/selection/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"root",function(){return C}),n.d(e,"Selection",function(){return P});var r=n("./node_modules/d3-selection/src/selection/select.js"),i=n("./node_modules/d3-selection/src/selection/selectAll.js"),o=n("./node_modules/d3-selection/src/selection/filter.js"),a=n("./node_modules/d3-selection/src/selection/data.js"),s=n("./node_modules/d3-selection/src/selection/enter.js"),u=n("./node_modules/d3-selection/src/selection/exit.js"),c=n("./node_modules/d3-selection/src/selection/merge.js"),f=n("./node_modules/d3-selection/src/selection/order.js"),l=n("./node_modules/d3-selection/src/selection/sort.js"),h=n("./node_modules/d3-selection/src/selection/call.js"),d=n("./node_modules/d3-selection/src/selection/nodes.js"),p=n("./node_modules/d3-selection/src/selection/node.js"),m=n("./node_modules/d3-selection/src/selection/size.js"),v=n("./node_modules/d3-selection/src/selection/empty.js"),g=n("./node_modules/d3-selection/src/selection/each.js"),_=n("./node_modules/d3-selection/src/selection/attr.js"),y=n("./node_modules/d3-selection/src/selection/style.js"),b=n("./node_modules/d3-selection/src/selection/property.js"),x=n("./node_modules/d3-selection/src/selection/classed.js"),w=n("./node_modules/d3-selection/src/selection/text.js"),j=n("./node_modules/d3-selection/src/selection/html.js"),M=n("./node_modules/d3-selection/src/selection/raise.js"),A=n("./node_modules/d3-selection/src/selection/lower.js"),k=n("./node_modules/d3-selection/src/selection/append.js"),E=n("./node_modules/d3-selection/src/selection/insert.js"),z=n("./node_modules/d3-selection/src/selection/remove.js"),T=n("./node_modules/d3-selection/src/selection/clone.js"),S=n("./node_modules/d3-selection/src/selection/datum.js"),N=n("./node_modules/d3-selection/src/selection/on.js"),O=n("./node_modules/d3-selection/src/selection/dispatch.js"),C=[null];function P(t,e){this._groups=t,this._parents=e}function B(){return new P([[document.documentElement]],C)}P.prototype=B.prototype={constructor:P,select:r.default,selectAll:i.default,filter:o.default,data:a.default,enter:s.default,exit:u.default,merge:c.default,order:f.default,sort:l.default,call:h.default,nodes:d.default,node:p.default,size:m.default,empty:v.default,each:g.default,attr:_.default,style:y.default,property:b.default,classed:x.default,text:w.default,html:j.default,raise:M.default,lower:A.default,append:k.default,insert:E.default,remove:z.default,clone:T.default,datum:S.default,on:N.default,dispatch:O.default},e.default=B},"./node_modules/d3-selection/src/selection/insert.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/creator.js"),i=n("./node_modules/d3-selection/src/selector.js");function o(){return null}e.default=function(t,e){var n="function"==typeof t?t:Object(r.default)(t),a=null==e?o:"function"==typeof e?e:Object(i.default)(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}},"./node_modules/d3-selection/src/selection/lower.js":function(t,e,n){"use strict";function r(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}n.r(e),e.default=function(){return this.each(r)}},"./node_modules/d3-selection/src/selection/merge.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js");e.default=function(t){for(var e=this._groups,n=t._groups,i=e.length,o=n.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c,f=e[u],l=n[u],h=f.length,d=s[u]=new Array(h),p=0;p<h;++p)(c=f[p]||l[p])&&(d[p]=c);for(;u<i;++u)s[u]=e[u];return new r.Selection(s,this._parents)}},"./node_modules/d3-selection/src/selection/node.js":function(t,e,n){"use strict";n.r(e),e.default=function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}},"./node_modules/d3-selection/src/selection/nodes.js":function(t,e,n){"use strict";n.r(e),e.default=function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}},"./node_modules/d3-selection/src/selection/on.js":function(t,e,n){"use strict";n.r(e),n.d(e,"event",function(){return i}),n.d(e,"customEvent",function(){return c});var r={},i=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(r={mouseenter:"mouseover",mouseleave:"mouseout"}));function o(t,e,n){return t=a(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function a(t,e,n){return function(r){var o=i;i=r;try{t.call(this,this.__data__,e,n)}finally{i=o}}}function s(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function u(t,e,n){var i=r.hasOwnProperty(t.type)?o:a;return function(r,o,a){var s,u=this.__on,c=i(e,o,a);if(u)for(var f=0,l=u.length;f<l;++f)if((s=u[f]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function c(t,e,n,r){var o=i;t.sourceEvent=i,i=t;try{return e.apply(n,r)}finally{i=o}}e.default=function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(c=e?u:s,null==n&&(n=!1),r=0;r<a;++r)this.each(c(o[r],e,n));return this}var c=this.node().__on;if(c)for(var f,l=0,h=c.length;l<h;++l)for(r=0,f=c[l];r<a;++r)if((i=o[r]).type===f.type&&i.name===f.name)return f.value}},"./node_modules/d3-selection/src/selection/order.js":function(t,e,n){"use strict";n.r(e),e.default=function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this}},"./node_modules/d3-selection/src/selection/property.js":function(t,e,n){"use strict";n.r(e),e.default=function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]}},"./node_modules/d3-selection/src/selection/raise.js":function(t,e,n){"use strict";function r(){this.nextSibling&&this.parentNode.appendChild(this)}n.r(e),e.default=function(){return this.each(r)}},"./node_modules/d3-selection/src/selection/remove.js":function(t,e,n){"use strict";function r(){var t=this.parentNode;t&&t.removeChild(this)}n.r(e),e.default=function(){return this.each(r)}},"./node_modules/d3-selection/src/selection/select.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js"),i=n("./node_modules/d3-selection/src/selector.js");e.default=function(t){"function"!=typeof t&&(t=Object(i.default)(t));for(var e=this._groups,n=e.length,o=new Array(n),a=0;a<n;++a)for(var s,u,c=e[a],f=c.length,l=o[a]=new Array(f),h=0;h<f;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),l[h]=u);return new r.Selection(o,this._parents)}},"./node_modules/d3-selection/src/selection/selectAll.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js"),i=n("./node_modules/d3-selection/src/selectorAll.js");e.default=function(t){"function"!=typeof t&&(t=Object(i.default)(t));for(var e=this._groups,n=e.length,o=[],a=[],s=0;s<n;++s)for(var u,c=e[s],f=c.length,l=0;l<f;++l)(u=c[l])&&(o.push(t.call(u,u.__data__,l,c)),a.push(u));return new r.Selection(o,a)}},"./node_modules/d3-selection/src/selection/size.js":function(t,e,n){"use strict";n.r(e),e.default=function(){var t=0;return this.each(function(){++t}),t}},"./node_modules/d3-selection/src/selection/sort.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/index.js");function i(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}e.default=function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=i);for(var n=this._groups,o=n.length,a=new Array(o),s=0;s<o;++s){for(var u,c=n[s],f=c.length,l=a[s]=new Array(f),h=0;h<f;++h)(u=c[h])&&(l[h]=u);l.sort(e)}return new r.Selection(a,this._parents).order()}},"./node_modules/d3-selection/src/selection/sparse.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return new Array(t.length)}},"./node_modules/d3-selection/src/selection/style.js":function(t,e,n){"use strict";n.r(e),n.d(e,"styleValue",function(){return i});var r=n("./node_modules/d3-selection/src/window.js");function i(t,e){return t.style.getPropertyValue(e)||Object(r.default)(t).getComputedStyle(t,null).getPropertyValue(e)}e.default=function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):i(this.node(),t)}},"./node_modules/d3-selection/src/selection/text.js":function(t,e,n){"use strict";function r(){this.textContent=""}n.r(e),e.default=function(t){return arguments.length?this.each(null==t?r:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent}},"./node_modules/d3-selection/src/selector.js":function(t,e,n){"use strict";function r(){}n.r(e),e.default=function(t){return null==t?r:function(){return this.querySelector(t)}}},"./node_modules/d3-selection/src/selectorAll.js":function(t,e,n){"use strict";function r(){return[]}n.r(e),e.default=function(t){return null==t?r:function(){return this.querySelectorAll(t)}}},"./node_modules/d3-selection/src/sourceEvent.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/selection/on.js");e.default=function(){for(var t,e=r.event;t=e.sourceEvent;)e=t;return e}},"./node_modules/d3-selection/src/touch.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/sourceEvent.js"),i=n("./node_modules/d3-selection/src/point.js");e.default=function(t,e,n){arguments.length<3&&(n=e,e=Object(r.default)().changedTouches);for(var o,a=0,s=e?e.length:0;a<s;++a)if((o=e[a]).identifier===n)return Object(i.default)(t,o);return null}},"./node_modules/d3-selection/src/touches.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-selection/src/sourceEvent.js"),i=n("./node_modules/d3-selection/src/point.js");e.default=function(t,e){null==e&&(e=Object(r.default)().touches);for(var n=0,o=e?e.length:0,a=new Array(o);n<o;++n)a[n]=Object(i.default)(t,e[n]);return a}},"./node_modules/d3-selection/src/window.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},"./node_modules/d3-tip/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./node_modules/d3-collection/src/index.js"),i=n("./node_modules/d3-selection/src/index.js");e.default=function(){var t=function(){return"n"},e=function(){return[0,0]},n=function(){return" "},o=document.body,a=d(),s=null,u=null,c=null;function f(t){var e;e=t.node(),(s=e?"svg"===e.tagName.toLowerCase()?e:e.ownerSVGElement:null)&&(u=s.createSVGPoint(),o.appendChild(a))}f.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(c=r.pop());var i,a=n.apply(this,r),s=e.apply(this,r),u=t.apply(this,r),d=p(),m=h.length,v=document.documentElement.scrollTop||o.scrollTop,g=document.documentElement.scrollLeft||o.scrollLeft;for(d.html(a).style("opacity",1).style("pointer-events","all");m--;)d.classed(h[m],!1);return i=l.get(u).apply(this),d.classed(u,!0).style("top",i.top+s[0]+v+"px").style("left",i.left+s[1]+g+"px"),f},f.hide=function(){return p().style("opacity",0).style("pointer-events","none"),f},f.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return p().attr(t);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.attr.apply(p(),n),f},f.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return p().style(t);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.style.apply(p(),n),f},f.direction=function(e){return arguments.length?(t=null==e?e:v(e),f):t},f.offset=function(t){return arguments.length?(e=null==t?t:v(t),f):e},f.html=function(t){return arguments.length?(n=null==t?t:v(t),f):n},f.rootElement=function(t){return arguments.length?(o=null==t?t:v(t),f):o},f.destroy=function(){return a&&(p().remove(),a=null),f};var l=Object(r.map)({n:function(){var t=m(this);return{top:t.n.y-a.offsetHeight,left:t.n.x-a.offsetWidth/2}},s:function(){var t=m(this);return{top:t.s.y,left:t.s.x-a.offsetWidth/2}},e:function(){var t=m(this);return{top:t.e.y-a.offsetHeight/2,left:t.e.x}},w:function(){var t=m(this);return{top:t.w.y-a.offsetHeight/2,left:t.w.x-a.offsetWidth}},nw:function(){var t=m(this);return{top:t.nw.y-a.offsetHeight,left:t.nw.x-a.offsetWidth}},ne:function(){var t=m(this);return{top:t.ne.y-a.offsetHeight,left:t.ne.x}},sw:function(){var t=m(this);return{top:t.sw.y,left:t.sw.x-a.offsetWidth}},se:function(){var t=m(this);return{top:t.se.y,left:t.se.x}}}),h=l.keys();function d(){var t=Object(i.select)(document.createElement("div"));return t.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function p(){return null==a&&(a=d(),o.appendChild(a)),Object(i.select)(a)}function m(t){for(var e=c||t;null==e.getScreenCTM&&null!=e.parentNode;)e=e.parentNode;var n={},r=e.getScreenCTM(),i=e.getBBox(),o=i.width,a=i.height,s=i.x,f=i.y;return u.x=s,u.y=f,n.nw=u.matrixTransform(r),u.x+=o,n.ne=u.matrixTransform(r),u.y+=a,n.se=u.matrixTransform(r),u.x-=o,n.sw=u.matrixTransform(r),u.y-=a/2,n.w=u.matrixTransform(r),u.x+=o,n.e=u.matrixTransform(r),u.x-=o/2,u.y-=a/2,n.n=u.matrixTransform(r),u.y+=a,n.s=u.matrixTransform(r),n}function v(t){return"function"==typeof t?t:function(){return t}}return f}},"./node_modules/double-bits/double.js":function(t,e,n){(function(e){var n=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),i=new Uint32Array(r.buffer);if(r[0]=1,n=!0,1072693248===i[1]){t.exports=function(t){return r[0]=t,[i[0],i[1]]},t.exports.pack=function(t,e){return i[0]=t,i[1]=e,r[0]},t.exports.lo=function(t){return r[0]=t,i[0]},t.exports.hi=function(t){return r[0]=t,i[1]}}else if(1072693248===i[0]){t.exports=function(t){return r[0]=t,[i[1],i[0]]},t.exports.pack=function(t,e){return i[1]=t,i[0]=e,r[0]},t.exports.lo=function(t){return r[0]=t,i[1]},t.exports.hi=function(t){return r[0]=t,i[0]}}else n=!1}if(!n){var o=new e(8);t.exports=function(t){return o.writeDoubleLE(t,0,!0),[o.readUInt32LE(0,!0),o.readUInt32LE(4,!0)]},t.exports.pack=function(t,e){return o.writeUInt32LE(t,0,!0),o.writeUInt32LE(e,4,!0),o.readDoubleLE(0,!0)},t.exports.lo=function(t){return o.writeDoubleLE(t,0,!0),o.readUInt32LE(0,!0)},t.exports.hi=function(t){return o.writeDoubleLE(t,0,!0),o.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var n=t.exports.lo(e),r=t.exports.hi(e),i=1048575&r;return 2146435072&r&&(i+=1<<20),[n,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}}).call(this,n("./node_modules/buffer/index.js").Buffer)},"./node_modules/dup/dup.js":function(t,e,n){"use strict";t.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var n,r;for(n=new Array(t),r=0;r<t;++r)n[r]=e;return n}(0|t,e);break;case"object":if("number"==typeof t.length)return function t(e,n,r){var i=0|e[r];if(i<=0)return[];var o,a=new Array(i);if(r===e.length-1)for(o=0;o<i;++o)a[o]=n;else for(o=0;o<i;++o)a[o]=t(e,n,r+1);return a}(t,e,0)}return[]}},"./node_modules/eases/cubic-in-out.js":function(t,e){t.exports=function(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}},"./node_modules/edges-to-adjacency-list/e2a.js":function(t,e,n){"use strict";t.exports=function(t,e){var n=t.length;if("number"!=typeof e){e=0;for(var i=0;i<n;++i){var o=t[i];e=Math.max(e,o[0],o[1])}e=1+(0|e)}e|=0;for(var a=new Array(e),i=0;i<e;++i)a[i]=[];for(var i=0;i<n;++i){var o=t[i];a[o[0]].push(o[1]),a[o[1]].push(o[0])}for(var s=0;s<e;++s)r(a[s],function(t,e){return t-e});return a};var r=n("./node_modules/uniq/uniq.js")},"./node_modules/es5-ext/function/noop.js":function(t,e,n){"use strict";t.exports=function(){}},"./node_modules/es5-ext/object/assign/index.js":function(t,e,n){"use strict";t.exports=n("./node_modules/es5-ext/object/assign/is-implemented.js")()?Object.assign:n("./node_modules/es5-ext/object/assign/shim.js")},"./node_modules/es5-ext/object/assign/is-implemented.js":function(t,e,n){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},"./node_modules/es5-ext/object/assign/shim.js":function(t,e,n){"use strict";var r=n("./node_modules/es5-ext/object/keys/index.js"),i=n("./node_modules/es5-ext/object/valid-value.js"),o=Math.max;t.exports=function(t,e){var n,a,s,u=o(arguments.length,2);for(t=Object(i(t)),s=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},a=1;a<u;++a)e=arguments[a],r(e).forEach(s);if(void 0!==n)throw n;return t}},"./node_modules/es5-ext/object/is-callable.js":function(t,e,n){"use strict";t.exports=function(t){return"function"==typeof t}},"./node_modules/es5-ext/object/is-value.js":function(t,e,n){"use strict";var r=n("./node_modules/es5-ext/function/noop.js")();t.exports=function(t){return t!==r&&null!==t}},"./node_modules/es5-ext/object/keys/index.js":function(t,e,n){"use strict";t.exports=n("./node_modules/es5-ext/object/keys/is-implemented.js")()?Object.keys:n("./node_modules/es5-ext/object/keys/shim.js")},"./node_modules/es5-ext/object/keys/is-implemented.js":function(t,e,n){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},"./node_modules/es5-ext/object/keys/shim.js":function(t,e,n){"use strict";var r=n("./node_modules/es5-ext/object/is-value.js"),i=Object.keys;t.exports=function(t){return i(r(t)?Object(t):t)}},"./node_modules/es5-ext/object/normalize-options.js":function(t,e,n){"use strict";var r=n("./node_modules/es5-ext/object/is-value.js"),i=Array.prototype.forEach,o=Object.create;t.exports=function(t){var e=o(null);return i.call(arguments,function(t){r(t)&&function(t,e){var n;for(n in t)e[n]=t[n]}(Object(t),e)}),e}},"./node_modules/es5-ext/object/valid-callable.js":function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},"./node_modules/es5-ext/object/valid-value.js":function(t,e,n){"use strict";var r=n("./node_modules/es5-ext/object/is-value.js");t.exports=function(t){if(!r(t))throw new TypeError("Cannot use null or undefined");return t}},"./node_modules/es5-ext/string/#/contains/index.js":function(t,e,n){"use strict";t.exports=n("./node_modules/es5-ext/string/#/contains/is-implemented.js")()?String.prototype.contains:n("./node_modules/es5-ext/string/#/contains/shim.js")},"./node_modules/es5-ext/string/#/contains/is-implemented.js":function(t,e,n){"use strict";var r="razdwatrzy";t.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},"./node_modules/es5-ext/string/#/contains/shim.js":function(t,e,n){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},"./node_modules/event-emitter/index.js":function(t,e,n){"use strict";var r,i,o,a,s,u,c,f=n("./node_modules/d/index.js"),l=n("./node_modules/es5-ext/object/valid-callable.js"),h=Function.prototype.apply,d=Function.prototype.call,p=Object.create,m=Object.defineProperty,v=Object.defineProperties,g=Object.prototype.hasOwnProperty,_={configurable:!0,enumerable:!1,writable:!0};i=function(t,e){var n,i;return l(e),i=this,r.call(this,t,n=function(){o.call(i,t,n),h.call(e,this,arguments)}),n.__eeOnceListener__=e,this},s={on:r=function(t,e){var n;return l(e),g.call(this,"__ee__")?n=this.__ee__:(n=_.value=p(null),m(this,"__ee__",_),_.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:i,off:o=function(t,e){var n,r,i,o;if(l(e),!g.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:a=function(t){var e,n,r,i,o;if(g.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;r=i[e];++e)h.call(r,this,o)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];h.call(i,this,o)}}},u={on:f(r),once:f(i),off:f(o),emit:f(a)},c=v({},u),t.exports=e=function(t){return null==t?p(c):v(Object(t),u)},e.methods=s},"./node_modules/functional-red-black-tree/rbtree.js":function(t,e,n){"use strict";t.exports=function(t){return new c(t||p,null)};var r=0,i=1;function o(t,e,n,r,i,o){this._color=t,this.key=e,this.value=n,this.left=r,this.right=i,this._count=o}function a(t){return new o(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new o(t,e.key,e.value,e.left,e.right,e._count)}function u(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function c(t,e){this._compare=t,this.root=e}var f=c.prototype;function l(t,e){this.tree=t,this._stack=e}Object.defineProperty(f,"keys",{get:function(){var t=[];return this.forEach(function(e,n){t.push(e)}),t}}),Object.defineProperty(f,"values",{get:function(){var t=[];return this.forEach(function(e,n){t.push(n)}),t}}),Object.defineProperty(f,"length",{get:function(){return this.root?this.root._count:0}}),f.insert=function(t,e){for(var n=this._compare,a=this.root,f=[],l=[];a;){var h=n(t,a.key);f.push(a),l.push(h),a=h<=0?a.left:a.right}f.push(new o(r,t,e,null,null,1));for(var d=f.length-2;d>=0;--d){a=f[d];l[d]<=0?f[d]=new o(a._color,a.key,a.value,f[d+1],a.right,a._count+1):f[d]=new o(a._color,a.key,a.value,a.left,f[d+1],a._count+1)}for(d=f.length-1;d>1;--d){var p=f[d-1];a=f[d];if(p._color===i||a._color===i)break;var m=f[d-2];if(m.left===p)if(p.left===a){if(!(v=m.right)||v._color!==r){if(m._color=r,m.left=p.right,p._color=i,p.right=m,f[d-2]=p,f[d-1]=a,u(m),u(p),d>=3)(g=f[d-3]).left===m?g.left=p:g.right=p;break}p._color=i,m.right=s(i,v),m._color=r,d-=1}else{if(!(v=m.right)||v._color!==r){if(p.right=a.left,m._color=r,m.left=a.right,a._color=i,a.left=p,a.right=m,f[d-2]=a,f[d-1]=p,u(m),u(p),u(a),d>=3)(g=f[d-3]).left===m?g.left=a:g.right=a;break}p._color=i,m.right=s(i,v),m._color=r,d-=1}else if(p.right===a){if(!(v=m.left)||v._color!==r){if(m._color=r,m.right=p.left,p._color=i,p.left=m,f[d-2]=p,f[d-1]=a,u(m),u(p),d>=3)(g=f[d-3]).right===m?g.right=p:g.left=p;break}p._color=i,m.left=s(i,v),m._color=r,d-=1}else{var v;if(!(v=m.left)||v._color!==r){var g;if(p.left=a.right,m._color=r,m.right=a.left,a._color=i,a.right=p,a.left=m,f[d-2]=a,f[d-1]=p,u(m),u(p),u(a),d>=3)(g=f[d-3]).right===m?g.right=a:g.left=a;break}p._color=i,m.left=s(i,v),m._color=r,d-=1}}return f[0]._color=i,new c(n,f[0])},f.forEach=function(t,e,n){if(this.root)switch(arguments.length){case 1:return function t(e,n){var r;if(n.left&&(r=t(e,n.left)))return r;return(r=e(n.key,n.value))||(n.right?t(e,n.right):void 0)}(t,this.root);case 2:return function t(e,n,r,i){if(n(e,i.key)<=0){var o;if(i.left&&(o=t(e,n,r,i.left)))return o;if(o=r(i.key,i.value))return o}if(i.right)return t(e,n,r,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,n)>=0)return;return function t(e,n,r,i,o){var a,s=r(e,o.key),u=r(n,o.key);if(s<=0){if(o.left&&(a=t(e,n,r,i,o.left)))return a;if(u>0&&(a=i(o.key,o.value)))return a}if(u>0&&o.right)return t(e,n,r,i,o.right)}(e,n,this._compare,t,this.root)}},Object.defineProperty(f,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new l(this,t)}}),Object.defineProperty(f,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new l(this,t)}}),f.at=function(t){if(t<0)return new l(this,[]);for(var e=this.root,n=[];;){if(n.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new l(this,n);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new l(this,[])},f.ge=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o<=0&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new l(this,r)},f.gt=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o<0&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new l(this,r)},f.lt=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o>0&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new l(this,r)},f.le=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o>=0&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new l(this,r)},f.find=function(t){for(var e=this._compare,n=this.root,r=[];n;){var i=e(t,n.key);if(r.push(n),0===i)return new l(this,r);n=i<=0?n.left:n.right}return new l(this,[])},f.remove=function(t){var e=this.find(t);return e?e.remove():this},f.get=function(t){for(var e=this._compare,n=this.root;n;){var r=e(t,n.key);if(0===r)return n.value;n=r<=0?n.left:n.right}};var h=l.prototype;function d(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function p(t,e){return t<e?-1:t>e?1:0}Object.defineProperty(h,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new l(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),n=t[t.length-1];e[e.length-1]=new o(n._color,n.key,n.value,n.left,n.right,n._count);for(var f=t.length-2;f>=0;--f){(n=t[f]).left===t[f+1]?e[f]=new o(n._color,n.key,n.value,e[f+1],n.right,n._count):e[f]=new o(n._color,n.key,n.value,n.left,e[f+1],n._count)}if((n=e[e.length-1]).left&&n.right){var l=e.length;for(n=n.left;n.right;)e.push(n),n=n.right;var h=e[l-1];e.push(new o(n._color,h.key,h.value,n.left,n.right,n._count)),e[l-1].key=n.key,e[l-1].value=n.value;for(f=e.length-2;f>=l;--f)n=e[f],e[f]=new o(n._color,n.key,n.value,n.left,e[f+1],n._count);e[l-1].left=e[l]}if((n=e[e.length-1])._color===r){var p=e[e.length-2];p.left===n?p.left=null:p.right===n&&(p.right=null),e.pop();for(f=0;f<e.length;++f)e[f]._count--;return new c(this.tree._compare,e[0])}if(n.left||n.right){n.left?d(n,n.left):n.right&&d(n,n.right),n._color=i;for(f=0;f<e.length-1;++f)e[f]._count--;return new c(this.tree._compare,e[0])}if(1===e.length)return new c(this.tree._compare,null);for(f=0;f<e.length;++f)e[f]._count--;var m=e[e.length-2];return function(t){for(var e,n,o,c,f=t.length-1;f>=0;--f){if(e=t[f],0===f)return void(e._color=i);if((n=t[f-1]).left===e){if((o=n.right).right&&o.right._color===r)return c=(o=n.right=a(o)).right=a(o.right),n.right=o.left,o.left=n,o.right=c,o._color=n._color,e._color=i,n._color=i,c._color=i,u(n),u(o),f>1&&((l=t[f-2]).left===n?l.left=o:l.right=o),void(t[f-1]=o);if(o.left&&o.left._color===r)return c=(o=n.right=a(o)).left=a(o.left),n.right=c.left,o.left=c.right,c.left=n,c.right=o,c._color=n._color,n._color=i,o._color=i,e._color=i,u(n),u(o),u(c),f>1&&((l=t[f-2]).left===n?l.left=c:l.right=c),void(t[f-1]=c);if(o._color===i){if(n._color===r)return n._color=i,void(n.right=s(r,o));n.right=s(r,o);continue}o=a(o),n.right=o.left,o.left=n,o._color=n._color,n._color=r,u(n),u(o),f>1&&((l=t[f-2]).left===n?l.left=o:l.right=o),t[f-1]=o,t[f]=n,f+1<t.length?t[f+1]=e:t.push(e),f+=2}else{if((o=n.left).left&&o.left._color===r)return c=(o=n.left=a(o)).left=a(o.left),n.left=o.right,o.right=n,o.left=c,o._color=n._color,e._color=i,n._color=i,c._color=i,u(n),u(o),f>1&&((l=t[f-2]).right===n?l.right=o:l.left=o),void(t[f-1]=o);if(o.right&&o.right._color===r)return c=(o=n.left=a(o)).right=a(o.right),n.left=c.right,o.right=c.left,c.right=n,c.left=o,c._color=n._color,n._color=i,o._color=i,e._color=i,u(n),u(o),u(c),f>1&&((l=t[f-2]).right===n?l.right=c:l.left=c),void(t[f-1]=c);if(o._color===i){if(n._color===r)return n._color=i,void(n.left=s(r,o));n.left=s(r,o);continue}var l;o=a(o),n.left=o.right,o.right=n,o._color=n._color,n._color=r,u(n),u(o),f>1&&((l=t[f-2]).right===n?l.right=o:l.left=o),t[f-1]=o,t[f]=n,f+1<t.length?t[f+1]=e:t.push(e),f+=2}}}(e),m.left===n?m.left=null:m.right=null,new c(this.tree._compare,e[0])},Object.defineProperty(h,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var n=this.tree.root;return n?n._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var r=e.length-2;r>=0;--r)e[r+1]===e[r].right&&(++t,e[r].left&&(t+=e[r].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var n=new Array(e.length),r=e[e.length-1];n[n.length-1]=new o(r._color,r.key,t,r.left,r.right,r._count);for(var i=e.length-2;i>=0;--i)(r=e[i]).left===e[i+1]?n[i]=new o(r._color,r.key,r.value,n[i+1],r.right,r._count):n[i]=new o(r._color,r.key,r.value,r.left,n[i+1],r._count);return new c(this.tree._compare,n[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},"./node_modules/gamma/index.js":function(t,e){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],r=607/128,i=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number("0/0");for(var e=i[0],n=i.length-1;n>0;--n)e+=i[n]/(t+n);var o=t+r+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(o)-o+Math.log(e)-Math.log(t)}t.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i<9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},t.exports.log=o},"./node_modules/gl-mat4/adjoint.js":function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],f=e[8],l=e[9],h=e[10],d=e[11],p=e[12],m=e[13],v=e[14],g=e[15];return t[0]=s*(h*g-d*v)-l*(u*g-c*v)+m*(u*d-c*h),t[1]=-(r*(h*g-d*v)-l*(i*g-o*v)+m*(i*d-o*h)),t[2]=r*(u*g-c*v)-s*(i*g-o*v)+m*(i*c-o*u),t[3]=-(r*(u*d-c*h)-s*(i*d-o*h)+l*(i*c-o*u)),t[4]=-(a*(h*g-d*v)-f*(u*g-c*v)+p*(u*d-c*h)),t[5]=n*(h*g-d*v)-f*(i*g-o*v)+p*(i*d-o*h),t[6]=-(n*(u*g-c*v)-a*(i*g-o*v)+p*(i*c-o*u)),t[7]=n*(u*d-c*h)-a*(i*d-o*h)+f*(i*c-o*u),t[8]=a*(l*g-d*m)-f*(s*g-c*m)+p*(s*d-c*l),t[9]=-(n*(l*g-d*m)-f*(r*g-o*m)+p*(r*d-o*l)),t[10]=n*(s*g-c*m)-a*(r*g-o*m)+p*(r*c-o*s),t[11]=-(n*(s*d-c*l)-a*(r*d-o*l)+f*(r*c-o*s)),t[12]=-(a*(l*v-h*m)-f*(s*v-u*m)+p*(s*h-u*l)),t[13]=n*(l*v-h*m)-f*(r*v-i*m)+p*(r*h-i*l),t[14]=-(n*(s*v-u*m)-a*(r*v-i*m)+p*(r*u-i*s)),t[15]=n*(s*h-u*l)-a*(r*h-i*l)+f*(r*u-i*s),t}},"./node_modules/gl-mat4/clone.js":function(t,e){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},"./node_modules/gl-mat4/copy.js":function(t,e){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},"./node_modules/gl-mat4/create.js":function(t,e){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},"./node_modules/gl-mat4/determinant.js":function(t,e){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8],f=t[9],l=t[10],h=t[11],d=t[12],p=t[13],m=t[14],v=t[15];return(e*a-n*o)*(l*v-h*m)-(e*s-r*o)*(f*v-h*p)+(e*u-i*o)*(f*m-l*p)+(n*s-r*a)*(c*v-h*d)-(n*u-i*a)*(c*m-l*d)+(r*u-i*s)*(c*p-f*d)}},"./node_modules/gl-mat4/fromQuat.js":function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,c=n*a,f=r*a,l=r*s,h=i*a,d=i*s,p=i*u,m=o*a,v=o*s,g=o*u;return t[0]=1-l-p,t[1]=f+g,t[2]=h-v,t[3]=0,t[4]=f-g,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=h+v,t[9]=d-m,t[10]=1-c-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},"./node_modules/gl-mat4/fromRotationTranslation.js":function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,c=o+o,f=r*s,l=r*u,h=r*c,d=i*u,p=i*c,m=o*c,v=a*s,g=a*u,_=a*c;return t[0]=1-(d+m),t[1]=l+_,t[2]=h-g,t[3]=0,t[4]=l-_,t[5]=1-(f+m),t[6]=p+v,t[7]=0,t[8]=h+g,t[9]=p-v,t[10]=1-(f+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}},"./node_modules/gl-mat4/frustum.js":function(t,e){t.exports=function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}},"./node_modules/gl-mat4/identity.js":function(t,e){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},"./node_modules/gl-mat4/index.js":function(t,e,n){t.exports={create:n("./node_modules/gl-mat4/create.js"),clone:n("./node_modules/gl-mat4/clone.js"),copy:n("./node_modules/gl-mat4/copy.js"),identity:n("./node_modules/gl-mat4/identity.js"),transpose:n("./node_modules/gl-mat4/transpose.js"),invert:n("./node_modules/gl-mat4/invert.js"),adjoint:n("./node_modules/gl-mat4/adjoint.js"),determinant:n("./node_modules/gl-mat4/determinant.js"),multiply:n("./node_modules/gl-mat4/multiply.js"),translate:n("./node_modules/gl-mat4/translate.js"),scale:n("./node_modules/gl-mat4/scale.js"),rotate:n("./node_modules/gl-mat4/rotate.js"),rotateX:n("./node_modules/gl-mat4/rotateX.js"),rotateY:n("./node_modules/gl-mat4/rotateY.js"),rotateZ:n("./node_modules/gl-mat4/rotateZ.js"),fromRotationTranslation:n("./node_modules/gl-mat4/fromRotationTranslation.js"),fromQuat:n("./node_modules/gl-mat4/fromQuat.js"),frustum:n("./node_modules/gl-mat4/frustum.js"),perspective:n("./node_modules/gl-mat4/perspective.js"),perspectiveFromFieldOfView:n("./node_modules/gl-mat4/perspectiveFromFieldOfView.js"),ortho:n("./node_modules/gl-mat4/ortho.js"),lookAt:n("./node_modules/gl-mat4/lookAt.js"),str:n("./node_modules/gl-mat4/str.js")}},"./node_modules/gl-mat4/invert.js":function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],c=e[7],f=e[8],l=e[9],h=e[10],d=e[11],p=e[12],m=e[13],v=e[14],g=e[15],_=n*s-r*a,y=n*u-i*a,b=n*c-o*a,x=r*u-i*s,w=r*c-o*s,j=i*c-o*u,M=f*m-l*p,A=f*v-h*p,k=f*g-d*p,E=l*v-h*m,z=l*g-d*m,T=h*g-d*v,S=_*T-y*z+b*E+x*k-w*A+j*M;if(!S)return null;return S=1/S,t[0]=(s*T-u*z+c*E)*S,t[1]=(i*z-r*T-o*E)*S,t[2]=(m*j-v*w+g*x)*S,t[3]=(h*w-l*j-d*x)*S,t[4]=(u*k-a*T-c*A)*S,t[5]=(n*T-i*k+o*A)*S,t[6]=(v*b-p*j-g*y)*S,t[7]=(f*j-h*b+d*y)*S,t[8]=(a*z-s*k+c*M)*S,t[9]=(r*k-n*z-o*M)*S,t[10]=(p*w-m*b+g*_)*S,t[11]=(l*b-f*w-d*_)*S,t[12]=(s*A-a*E-u*M)*S,t[13]=(n*E-r*A+i*M)*S,t[14]=(m*y-p*x-v*_)*S,t[15]=(f*x-l*y+h*_)*S,t}},"./node_modules/gl-mat4/lookAt.js":function(t,e,n){var r=n("./node_modules/gl-mat4/identity.js");t.exports=function(t,e,n,i){var o,a,s,u,c,f,l,h,d,p,m=e[0],v=e[1],g=e[2],_=i[0],y=i[1],b=i[2],x=n[0],w=n[1],j=n[2];if(Math.abs(m-x)<1e-6&&Math.abs(v-w)<1e-6&&Math.abs(g-j)<1e-6)return r(t);l=m-x,h=v-w,d=g-j,p=1/Math.sqrt(l*l+h*h+d*d),o=y*(d*=p)-b*(h*=p),a=b*(l*=p)-_*d,s=_*h-y*l,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0);u=h*s-d*a,c=d*o-l*s,f=l*a-h*o,(p=Math.sqrt(u*u+c*c+f*f))?(u*=p=1/p,c*=p,f*=p):(u=0,c=0,f=0);return t[0]=o,t[1]=u,t[2]=l,t[3]=0,t[4]=a,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=f,t[10]=d,t[11]=0,t[12]=-(o*m+a*v+s*g),t[13]=-(u*m+c*v+f*g),t[14]=-(l*m+h*v+d*g),t[15]=1,t}},"./node_modules/gl-mat4/multiply.js":function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],f=e[7],l=e[8],h=e[9],d=e[10],p=e[11],m=e[12],v=e[13],g=e[14],_=e[15],y=n[0],b=n[1],x=n[2],w=n[3];return t[0]=y*r+b*s+x*l+w*m,t[1]=y*i+b*u+x*h+w*v,t[2]=y*o+b*c+x*d+w*g,t[3]=y*a+b*f+x*p+w*_,y=n[4],b=n[5],x=n[6],w=n[7],t[4]=y*r+b*s+x*l+w*m,t[5]=y*i+b*u+x*h+w*v,t[6]=y*o+b*c+x*d+w*g,t[7]=y*a+b*f+x*p+w*_,y=n[8],b=n[9],x=n[10],w=n[11],t[8]=y*r+b*s+x*l+w*m,t[9]=y*i+b*u+x*h+w*v,t[10]=y*o+b*c+x*d+w*g,t[11]=y*a+b*f+x*p+w*_,y=n[12],b=n[13],x=n[14],w=n[15],t[12]=y*r+b*s+x*l+w*m,t[13]=y*i+b*u+x*h+w*v,t[14]=y*o+b*c+x*d+w*g,t[15]=y*a+b*f+x*p+w*_,t}},"./node_modules/gl-mat4/ortho.js":function(t,e){t.exports=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*c,t[15]=1,t}},"./node_modules/gl-mat4/perspective.js":function(t,e){t.exports=function(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t}},"./node_modules/gl-mat4/perspectiveFromFieldOfView.js":function(t,e){t.exports=function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}},"./node_modules/gl-mat4/rotate.js":function(t,e){t.exports=function(t,e,n,r){var i,o,a,s,u,c,f,l,h,d,p,m,v,g,_,y,b,x,w,j,M,A,k,E,z=r[0],T=r[1],S=r[2],N=Math.sqrt(z*z+T*T+S*S);if(Math.abs(N)<1e-6)return null;z*=N=1/N,T*=N,S*=N,i=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],u=e[1],c=e[2],f=e[3],l=e[4],h=e[5],d=e[6],p=e[7],m=e[8],v=e[9],g=e[10],_=e[11],y=z*z*a+o,b=T*z*a+S*i,x=S*z*a-T*i,w=z*T*a-S*i,j=T*T*a+o,M=S*T*a+z*i,A=z*S*a+T*i,k=T*S*a-z*i,E=S*S*a+o,t[0]=s*y+l*b+m*x,t[1]=u*y+h*b+v*x,t[2]=c*y+d*b+g*x,t[3]=f*y+p*b+_*x,t[4]=s*w+l*j+m*M,t[5]=u*w+h*j+v*M,t[6]=c*w+d*j+g*M,t[7]=f*w+p*j+_*M,t[8]=s*A+l*k+m*E,t[9]=u*A+h*k+v*E,t[10]=c*A+d*k+g*E,t[11]=f*A+p*k+_*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},"./node_modules/gl-mat4/rotateX.js":function(t,e){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],f=e[9],l=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=o*i+c*r,t[5]=a*i+f*r,t[6]=s*i+l*r,t[7]=u*i+h*r,t[8]=c*i-o*r,t[9]=f*i-a*r,t[10]=l*i-s*r,t[11]=h*i-u*r,t}},"./node_modules/gl-mat4/rotateY.js":function(t,e){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[8],f=e[9],l=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i-c*r,t[1]=a*i-f*r,t[2]=s*i-l*r,t[3]=u*i-h*r,t[8]=o*r+c*i,t[9]=a*r+f*i,t[10]=s*r+l*i,t[11]=u*r+h*i,t}},"./node_modules/gl-mat4/rotateZ.js":function(t,e){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],c=e[4],f=e[5],l=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i+c*r,t[1]=a*i+f*r,t[2]=s*i+l*r,t[3]=u*i+h*r,t[4]=c*i-o*r,t[5]=f*i-a*r,t[6]=l*i-s*r,t[7]=h*i-u*r,t}},"./node_modules/gl-mat4/scale.js":function(t,e){t.exports=function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},"./node_modules/gl-mat4/str.js":function(t,e){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},"./node_modules/gl-mat4/translate.js":function(t,e){t.exports=function(t,e,n){var r,i,o,a,s,u,c,f,l,h,d,p,m=n[0],v=n[1],g=n[2];e===t?(t[12]=e[0]*m+e[4]*v+e[8]*g+e[12],t[13]=e[1]*m+e[5]*v+e[9]*g+e[13],t[14]=e[2]*m+e[6]*v+e[10]*g+e[14],t[15]=e[3]*m+e[7]*v+e[11]*g+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=e[6],f=e[7],l=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=c,t[7]=f,t[8]=l,t[9]=h,t[10]=d,t[11]=p,t[12]=r*m+s*v+l*g+e[12],t[13]=i*m+u*v+h*g+e[13],t[14]=o*m+c*v+d*g+e[14],t[15]=a*m+f*v+p*g+e[15]);return t}},"./node_modules/gl-mat4/transpose.js":function(t,e){t.exports=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},"./node_modules/gl-vec4/add.js":function(t,e){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}},"./node_modules/gl-vec4/clone.js":function(t,e){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},"./node_modules/gl-vec4/copy.js":function(t,e){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},"./node_modules/gl-vec4/create.js":function(t,e){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},"./node_modules/gl-vec4/distance.js":function(t,e){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+o*o)}},"./node_modules/gl-vec4/divide.js":function(t,e){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}},"./node_modules/gl-vec4/dot.js":function(t,e){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},"./node_modules/gl-vec4/fromValues.js":function(t,e){t.exports=function(t,e,n,r){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}},"./node_modules/gl-vec4/index.js":function(t,e,n){t.exports={create:n("./node_modules/gl-vec4/create.js"),clone:n("./node_modules/gl-vec4/clone.js"),fromValues:n("./node_modules/gl-vec4/fromValues.js"),copy:n("./node_modules/gl-vec4/copy.js"),set:n("./node_modules/gl-vec4/set.js"),add:n("./node_modules/gl-vec4/add.js"),subtract:n("./node_modules/gl-vec4/subtract.js"),multiply:n("./node_modules/gl-vec4/multiply.js"),divide:n("./node_modules/gl-vec4/divide.js"),min:n("./node_modules/gl-vec4/min.js"),max:n("./node_modules/gl-vec4/max.js"),scale:n("./node_modules/gl-vec4/scale.js"),scaleAndAdd:n("./node_modules/gl-vec4/scaleAndAdd.js"),distance:n("./node_modules/gl-vec4/distance.js"),squaredDistance:n("./node_modules/gl-vec4/squaredDistance.js"),length:n("./node_modules/gl-vec4/length.js"),squaredLength:n("./node_modules/gl-vec4/squaredLength.js"),negate:n("./node_modules/gl-vec4/negate.js"),inverse:n("./node_modules/gl-vec4/inverse.js"),normalize:n("./node_modules/gl-vec4/normalize.js"),dot:n("./node_modules/gl-vec4/dot.js"),lerp:n("./node_modules/gl-vec4/lerp.js"),random:n("./node_modules/gl-vec4/random.js"),transformMat4:n("./node_modules/gl-vec4/transformMat4.js"),transformQuat:n("./node_modules/gl-vec4/transformQuat.js")}},"./node_modules/gl-vec4/inverse.js":function(t,e){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},"./node_modules/gl-vec4/length.js":function(t,e){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}},"./node_modules/gl-vec4/lerp.js":function(t,e){t.exports=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}},"./node_modules/gl-vec4/max.js":function(t,e){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}},"./node_modules/gl-vec4/min.js":function(t,e){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}},"./node_modules/gl-vec4/multiply.js":function(t,e){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}},"./node_modules/gl-vec4/negate.js":function(t,e){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},"./node_modules/gl-vec4/normalize.js":function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a);return t}},"./node_modules/gl-vec4/random.js":function(t,e,n){var r=n("./node_modules/gl-vec4/normalize.js"),i=n("./node_modules/gl-vec4/scale.js");t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),r(t,t),i(t,t,e),t}},"./node_modules/gl-vec4/scale.js":function(t,e){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}},"./node_modules/gl-vec4/scaleAndAdd.js":function(t,e){t.exports=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}},"./node_modules/gl-vec4/set.js":function(t,e){t.exports=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}},"./node_modules/gl-vec4/squaredDistance.js":function(t,e){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}},"./node_modules/gl-vec4/squaredLength.js":function(t,e){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}},"./node_modules/gl-vec4/subtract.js":function(t,e){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}},"./node_modules/gl-vec4/transformMat4.js":function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}},"./node_modules/gl-vec4/transformQuat.js":function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],c=n[3],f=c*r+s*o-u*i,l=c*i+u*r-a*o,h=c*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=f*c+d*-a+l*-u-h*-s,t[1]=l*c+d*-s+h*-a-f*-u,t[2]=h*c+d*-u+f*-s-l*-a,t[3]=e[3],t}},"./node_modules/ieee754/index.js":function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?i-1:0,h=n?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*m}},"./node_modules/interval-tree-1d/interval-tree.js":function(t,e,n){"use strict";var r=n("./node_modules/interval-tree-1d/node_modules/binary-search-bounds/search-bounds.js"),i=0,o=1;function a(t,e,n,r,i){this.mid=t,this.left=e,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(e?e.count:0)+(n?n.count:0)+r.length}t.exports=function(t){if(!t||0===t.length)return new y(null);return new y(_(t))};var s=a.prototype;function u(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function c(t,e){var n=_(e);t.mid=n.mid,t.left=n.left,t.right=n.right,t.leftPoints=n.leftPoints,t.rightPoints=n.rightPoints,t.count=n.count}function f(t,e){var n=t.intervals([]);n.push(e),c(t,n)}function l(t,e){var n=t.intervals([]),r=n.indexOf(e);return r<0?i:(n.splice(r,1),c(t,n),o)}function h(t,e,n){for(var r=0;r<t.length&&t[r][0]<=e;++r){var i=n(t[r]);if(i)return i}}function d(t,e,n){for(var r=t.length-1;r>=0&&t[r][1]>=e;--r){var i=n(t[r]);if(i)return i}}function p(t,e){for(var n=0;n<t.length;++n){var r=e(t[n]);if(r)return r}}function m(t,e){return t-e}function v(t,e){var n=t[0]-e[0];return n||t[1]-e[1]}function g(t,e){var n=t[1]-e[1];return n||t[0]-e[0]}function _(t){if(0===t.length)return null;for(var e=[],n=0;n<t.length;++n)e.push(t[n][0],t[n][1]);e.sort(m);var r=e[e.length>>1],i=[],o=[],s=[];for(n=0;n<t.length;++n){var u=t[n];u[1]<r?i.push(u):r<u[0]?o.push(u):s.push(u)}var c=s,f=s.slice();return c.sort(v),f.sort(g),new a(r,_(i),_(o),c,f)}function y(t){this.root=t}s.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},s.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?f(this,t):this.left.insert(t):this.left=_([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?f(this,t):this.right.insert(t):this.right=_([t]);else{var n=r.ge(this.leftPoints,t,v),i=r.ge(this.rightPoints,t,g);this.leftPoints.splice(n,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(e-1)?l(this,t):2===(c=this.left.remove(t))?(this.left=null,this.count-=1,o):(c===o&&(this.count-=1),c):i;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?l(this,t):2===(c=this.right.remove(t))?(this.right=null,this.count-=1,o):(c===o&&(this.count-=1),c):i;if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var s=this.left,c=this.right;n.count-=a.count,n.right=a.left,a.left=s,a.right=c}u(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?u(this,this.left):u(this,this.right);return o}for(s=r.ge(this.leftPoints,t,v);s<this.leftPoints.length&&this.leftPoints[s][0]===t[0];++s)if(this.leftPoints[s]===t){this.count-=1,this.leftPoints.splice(s,1);for(c=r.ge(this.rightPoints,t,g);c<this.rightPoints.length&&this.rightPoints[c][1]===t[1];++c)if(this.rightPoints[c]===t)return this.rightPoints.splice(c,1),o}return i},s.queryPoint=function(t,e){if(t<this.mid){if(this.left)if(n=this.left.queryPoint(t,e))return n;return h(this.leftPoints,t,e)}if(t>this.mid){var n;if(this.right)if(n=this.right.queryPoint(t,e))return n;return d(this.rightPoints,t,e)}return p(this.leftPoints,e)},s.queryInterval=function(t,e,n){var r;if(t<this.mid&&this.left&&(r=this.left.queryInterval(t,e,n)))return r;if(e>this.mid&&this.right&&(r=this.right.queryInterval(t,e,n)))return r;return e<this.mid?h(this.leftPoints,e,n):t>this.mid?d(this.rightPoints,t,n):p(this.leftPoints,n)};var b=y.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new a(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,n){if(t<=e&&this.root)return this.root.queryInterval(t,e,n)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},"./node_modules/interval-tree-1d/node_modules/binary-search-bounds/search-bounds.js":function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=["function ",t,"(a,l,h,",r.join(","),"){",o?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return o?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;"),n?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),o?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],!1,i),r("B","x"+t+"y",e,["y"],!0,i),r("P","c(x,y)"+t+"0",e,["y","c"],!1,i),r("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",n,"(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",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/invert-permutation/index.js":function(t,e,n){"use strict";t.exports=function(t,e){e=e||new Array(t.length);for(var n=0;n<t.length;++n)e[t[n]]=n;return e}},"./node_modules/iota-array/iota.js":function(t,e,n){"use strict";t.exports=function(t){for(var e=new Array(t),n=0;n<t;++n)e[n]=n;return e}},"./node_modules/is-buffer/index.js":function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},"./node_modules/isarray/index.js":function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},"./node_modules/mathjs/core.js":function(t,e,n){t.exports=n("./node_modules/mathjs/lib/core/core.js")},"./node_modules/mathjs/lib/core/core.js":function(t,e,n){var r=n("./node_modules/mathjs/lib/utils/object.js").isFactory,i=n("./node_modules/mathjs/lib/core/typed.js"),o=n("./node_modules/mathjs/lib/utils/emitter.js"),a=n("./node_modules/mathjs/lib/core/function/import.js"),s=n("./node_modules/mathjs/lib/core/function/config.js");e.create=function(t){if("function"!=typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var e=[],n=[],u=o.mixin({});u.type={},u.expression={transform:{},mathWithTransform:{}},u.typed=i.create(u.type);var c={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function f(t){if(!r(t))throw new Error("Factory object with properties `type`, `name`, and `factory` expected");var i,o=e.indexOf(t);return-1===o?(i=!0===t.math?t.factory(u.type,c,f,u.typed,u):t.factory(u.type,c,f,u.typed),e.push(t),n.push(i)):i=n[o],i}return u.import=f(a),u.config=f(s),u.expression.mathWithTransform.config=u.config,t&&u.config(t),u}},"./node_modules/mathjs/lib/core/function/config.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/object.js");function i(t,e,n){if(void 0!==t[e]&&(i=n,o=t[e],-1===i.indexOf(o))){var r=function(t,e){return t.map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase())}(n,t[e]);-1!==r?(console.warn('Warning: Wrong casing for configuration option "'+e+'", should be "'+n[r]+'" instead of "'+t[e]+'".'),t[e]=n[r]):console.warn('Warning: Unknown value "'+t[e]+'" for configuration option "'+e+'". Available options: '+n.map(JSON.stringify).join(", ")+".")}var i,o}e.name="config",e.math=!0,e.factory=function(t,e,n,o,a){var s=["Matrix","Array"],u=["number","BigNumber","Fraction"];function c(t){if(t){var n=r.map(e,r.clone);i(t,"matrix",s),i(t,"number",u),r.deepExtend(e,t);var o=r.map(e,r.clone),c=r.map(t,r.clone);return a.emit("config",o,n,c),o}return r.map(e,r.clone)}return c.MATRIX=s,c.NUMBER=u,c}},"./node_modules/mathjs/lib/core/function/import.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/object.js").lazy,i=n("./node_modules/mathjs/lib/utils/object.js").isFactory,o=n("./node_modules/mathjs/lib/utils/object.js").traverse,a=n("./node_modules/mathjs/lib/error/ArgumentsError.js");e.math=!0,e.name="import",e.factory=function(t,e,n,s,u){function c(t,e,n){if(n.wrap&&"function"==typeof e&&(i=function(){for(var t=[],e=0,n=arguments.length;e<n;e++){var i=arguments[e];t[e]=i&&i.valueOf()}return r.apply(u,t)},(r=e).transform&&(i.transform=r.transform),e=i),d(u[t])&&d(e))return e=n.override?s(t,e.signatures):s(u[t],e),u[t]=e,f(t,e),void u.emit("import",t,function(){return e});var r,i;if(void 0===u[t]||n.override)return u[t]=e,f(t,e),void u.emit("import",t,function(){return e});if(!n.silent)throw new Error('Cannot import "'+t+'": already exists')}function f(t,e){e&&"function"==typeof e.transform?(u.expression.transform[t]=e.transform,p(t)&&(u.expression.mathWithTransform[t]=e.transform)):(delete u.expression.transform[t],p(t)&&(u.expression.mathWithTransform[t]=e))}function l(t,e){if("string"==typeof t.name){var i=t.name,a=i in u.expression.transform,c=t.path?o(u,t.path):u,f=c.hasOwnProperty(i)?c[i]:void 0,l=function(){var r=n(t);if(r&&"function"==typeof r.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(d(f)&&d(r))return e.override||(r=s(f,r)),r;if(void 0===f||e.override)return r;if(!e.silent)throw new Error('Cannot import "'+i+'": already exists')};!1!==t.lazy?(r(c,i,l),a||("expression.transform"===t.path||m(t))&&r(u.expression.mathWithTransform,i,l)):(c[i]=l(),a||("expression.transform"===t.path||m(t))&&(u.expression.mathWithTransform[i]=l())),u.emit("import",i,l,t.path)}else n(t)}function h(e){return"function"==typeof e||"number"==typeof e||"string"==typeof e||"boolean"==typeof e||null===e||e&&t.isUnit(e)||e&&t.isComplex(e)||e&&t.isBigNumber(e)||e&&t.isFraction(e)||e&&t.isMatrix(e)||e&&Array.isArray(e)}function d(t){return"function"==typeof t&&"object"==typeof t.signatures}function p(t){return!v.hasOwnProperty(t)}function m(t){return void 0===t.path&&!v.hasOwnProperty(t.name)}var v={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function t(e,n){var r=arguments.length;if(1!==r&&2!==r)throw new a("import",r,1,2);if(n||(n={}),i(e))l(e,n);else if(Array.isArray(e))e.forEach(function(e){t(e,n)});else if("object"==typeof e){for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];h(s)?c(o,s,n):i(e)?l(e,n):t(s,n)}}else if(!n.silent)throw new TypeError("Factory, Object, or Array expected")}},e.lazy=!0},"./node_modules/mathjs/lib/core/typed.js":function(t,e,n){var r=n("./node_modules/typed-function/typed-function.js"),i=n("./node_modules/mathjs/lib/utils/number.js").digits,o=n("./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js"),a=n("./node_modules/mathjs/lib/utils/collection/isMatrix.js"),s=function(){return s=r.create,r};e.create=function(t){t.isNumber=function(t){return"number"==typeof t},t.isComplex=function(e){return t.Complex&&e instanceof t.Complex||!1},t.isBigNumber=o,t.isFraction=function(e){return t.Fraction&&e instanceof t.Fraction||!1},t.isUnit=function(t){return t&&t.constructor.prototype.isUnit||!1},t.isString=function(t){return"string"==typeof t},t.isArray=Array.isArray,t.isMatrix=a,t.isDenseMatrix=function(t){return t&&t.isDenseMatrix&&t.constructor.prototype.isMatrix||!1},t.isSparseMatrix=function(t){return t&&t.isSparseMatrix&&t.constructor.prototype.isMatrix||!1},t.isRange=function(t){return t&&t.constructor.prototype.isRange||!1},t.isIndex=function(t){return t&&t.constructor.prototype.isIndex||!1},t.isBoolean=function(t){return"boolean"==typeof t},t.isResultSet=function(t){return t&&t.constructor.prototype.isResultSet||!1},t.isHelp=function(t){return t&&t.constructor.prototype.isHelp||!1},t.isFunction=function(t){return"function"==typeof t},t.isDate=function(t){return t instanceof Date},t.isRegExp=function(t){return t instanceof RegExp},t.isObject=function(t){return"object"==typeof t},t.isNull=function(t){return null===t},t.isUndefined=function(t){return void 0===t},t.isAccessorNode=function(t){return t&&t.isAccessorNode&&t.constructor.prototype.isNode||!1},t.isArrayNode=function(t){return t&&t.isArrayNode&&t.constructor.prototype.isNode||!1},t.isAssignmentNode=function(t){return t&&t.isAssignmentNode&&t.constructor.prototype.isNode||!1},t.isBlockNode=function(t){return t&&t.isBlockNode&&t.constructor.prototype.isNode||!1},t.isConditionalNode=function(t){return t&&t.isConditionalNode&&t.constructor.prototype.isNode||!1},t.isConstantNode=function(t){return t&&t.isConstantNode&&t.constructor.prototype.isNode||!1},t.isFunctionAssignmentNode=function(t){return t&&t.isFunctionAssignmentNode&&t.constructor.prototype.isNode||!1},t.isFunctionNode=function(t){return t&&t.isFunctionNode&&t.constructor.prototype.isNode||!1},t.isIndexNode=function(t){return t&&t.isIndexNode&&t.constructor.prototype.isNode||!1},t.isNode=function(t){return t&&t.isNode&&t.constructor.prototype.isNode||!1},t.isObjectNode=function(t){return t&&t.isObjectNode&&t.constructor.prototype.isNode||!1},t.isOperatorNode=function(t){return t&&t.isOperatorNode&&t.constructor.prototype.isNode||!1},t.isParenthesisNode=function(t){return t&&t.isParenthesisNode&&t.constructor.prototype.isNode||!1},t.isRangeNode=function(t){return t&&t.isRangeNode&&t.constructor.prototype.isNode||!1},t.isSymbolNode=function(t){return t&&t.isSymbolNode&&t.constructor.prototype.isNode||!1},t.isChain=function(t){return t&&t.constructor.prototype.isChain||!1};var e=s();return e.types=[{name:"number",test:t.isNumber},{name:"Complex",test:t.isComplex},{name:"BigNumber",test:t.isBigNumber},{name:"Fraction",test:t.isFraction},{name:"Unit",test:t.isUnit},{name:"string",test:t.isString},{name:"Array",test:t.isArray},{name:"Matrix",test:t.isMatrix},{name:"DenseMatrix",test:t.isDenseMatrix},{name:"SparseMatrix",test:t.isSparseMatrix},{name:"Range",test:t.isRange},{name:"Index",test:t.isIndex},{name:"boolean",test:t.isBoolean},{name:"ResultSet",test:t.isResultSet},{name:"Help",test:t.isHelp},{name:"function",test:t.isFunction},{name:"Date",test:t.isDate},{name:"RegExp",test:t.isRegExp},{name:"Object",test:t.isObject},{name:"null",test:t.isNull},{name:"undefined",test:t.isUndefined},{name:"OperatorNode",test:t.isOperatorNode},{name:"ConstantNode",test:t.isConstantNode},{name:"SymbolNode",test:t.isSymbolNode},{name:"ParenthesisNode",test:t.isParenthesisNode},{name:"FunctionNode",test:t.isFunctionNode},{name:"FunctionAssignmentNode",test:t.isFunctionAssignmentNode},{name:"ArrayNode",test:t.isArrayNode},{name:"AssignmentNode",test:t.isAssignmentNode},{name:"BlockNode",test:t.isBlockNode},{name:"ConditionalNode",test:t.isConditionalNode},{name:"IndexNode",test:t.isIndexNode},{name:"RangeNode",test:t.isRangeNode},{name:"Node",test:t.isNode}],e.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(i(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t.BigNumber(e)}},{from:"number",to:"Complex",convert:function(e){return new t.Complex(e,0)}},{from:"number",to:"string",convert:function(t){return t+""}},{from:"BigNumber",to:"Complex",convert:function(e){return new t.Complex(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(t){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return new t.Complex(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){if(new t.Fraction(e).valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return new t.Fraction(e)}},{from:"string",to:"number",convert:function(t){var e=Number(t);if(isNaN(e))throw new Error('Cannot convert "'+t+'" to a number');return e}},{from:"string",to:"BigNumber",convert:function(e){try{return new t.BigNumber(e)}catch(t){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){try{return new t.Fraction(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){try{return new t.Complex(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(t){return+t}},{from:"boolean",to:"BigNumber",convert:function(e){return new t.BigNumber(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return new t.Fraction(+e)}},{from:"boolean",to:"string",convert:function(t){return+t}},{from:"null",to:"number",convert:function(){return 0}},{from:"null",to:"string",convert:function(){return"null"}},{from:"null",to:"BigNumber",convert:function(){return new t.BigNumber(0)}},{from:"null",to:"Fraction",convert:function(){return new t.Fraction(0)}},{from:"Array",to:"Matrix",convert:function(e){return new t.DenseMatrix(e)}},{from:"Matrix",to:"Array",convert:function(t){return t.valueOf()}}],e}},"./node_modules/mathjs/lib/error/ArgumentsError.js":function(t,e,n){"use strict";function r(t,e,n,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=n,this.max=i,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+n+(null!=i?"-"+i:"")+" expected)",this.stack=(new Error).stack}r.prototype=new Error,r.prototype.constructor=Error,r.prototype.name="ArgumentsError",r.prototype.isArgumentsError=!0,t.exports=r},"./node_modules/mathjs/lib/error/DimensionError.js":function(t,e,n){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="DimensionError",r.prototype.isDimensionError=!0,t.exports=r},"./node_modules/mathjs/lib/error/IndexError.js":function(t,e,n){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="IndexError",r.prototype.isIndexError=!0,t.exports=r},"./node_modules/mathjs/lib/function/arithmetic/addScalar.js":function(t,e,n){"use strict";e.factory=function(t,e,n,r){var i=r("add",{"number, number":function(t,e){return t+e},"Complex, Complex":function(t,e){return t.add(e)},"BigNumber, BigNumber":function(t,e){return t.plus(e)},"Fraction, Fraction":function(t,e){return t.add(e)},"Unit, Unit":function(t,e){if(null==t.value)throw new Error("Parameter x contains a unit with undefined value");if(null==e.value)throw new Error("Parameter y contains a unit with undefined value");if(!t.equalBase(e))throw new Error("Units do not match");var n=t.clone();return n.value=i(n.value,e.value),n.fixPrefix=!1,n}});return i}},"./node_modules/mathjs/lib/function/arithmetic/multiply.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/object.js").extend,i=n("./node_modules/mathjs/lib/utils/array.js");e.name="multiply",e.factory=function(t,e,o,a){var s=n("./node_modules/mathjs/lib/utils/latex.js"),u=o(n("./node_modules/mathjs/lib/type/matrix/function/matrix.js")),c=o(n("./node_modules/mathjs/lib/function/arithmetic/addScalar.js")),f=o(n("./node_modules/mathjs/lib/function/arithmetic/multiplyScalar.js")),l=o(n("./node_modules/mathjs/lib/function/relational/equalScalar.js")),h=o(n("./node_modules/mathjs/lib/type/matrix/utils/algorithm11.js")),d=o(n("./node_modules/mathjs/lib/type/matrix/utils/algorithm14.js")),p=t.DenseMatrix,m=t.SparseMatrix,v=a("multiply",r({"Array, Array":function(e,n){g(i.size(e),i.size(n));var r=v(u(e),u(n));return t.isMatrix(r)?r.valueOf():r},"Matrix, Matrix":function(t,e){var n=t.size(),r=e.size();return g(n,r),1===n.length?1===r.length?_(t,e,n[0]):y(t,e):1===r.length?x(t,e):w(t,e)},"Matrix, Array":function(t,e){return v(t,u(e))},"Array, Matrix":function(t,e){return v(u(t,e.storage()),e)},"Matrix, any":function(t,e){var n;switch(t.storage()){case"sparse":n=h(t,e,f,!1);break;case"dense":n=d(t,e,f,!1)}return n},"any, Matrix":function(t,e){var n;switch(e.storage()){case"sparse":n=h(e,t,f,!0);break;case"dense":n=d(e,t,f,!0)}return n},"Array, any":function(t,e){return d(u(t),e,f,!1).valueOf()},"any, Array":function(t,e){return d(u(e),t,f,!0).valueOf()},"any, any":f,"Array | Matrix | any, Array | Matrix | any, ...any":function(t,e,n){for(var r=v(t,e),i=0;i<n.length;i++)r=v(r,n[i]);return r}},f.signatures)),g=function(t,e){switch(t.length){case 1:switch(e.length){case 1:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+t[0]+") must match Matrix rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;case 2:switch(e.length){case 1:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+t[1]+") must match Vector length ("+e[0]+")");break;case 2:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+t[1]+") must match Matrix B rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+t.length+" dimensions)")}},_=function(t,e,n){if(0===n)throw new Error("Cannot multiply two empty vectors");var r,i=t._data,o=t._datatype,s=e._data,u=e._datatype,l=c,h=f;o&&u&&o===u&&"string"==typeof o&&(r=o,l=a.find(c,[r,r]),h=a.find(f,[r,r]));for(var d=h(i[0],s[0]),p=1;p<n;p++)d=l(d,h(i[p],s[p]));return d},y=function(t,e){switch(e.storage()){case"dense":return b(t,e)}throw new Error("Not implemented")},b=function(t,e){var n,r=t._data,i=t._size,o=t._datatype,s=e._data,u=e._size,l=e._datatype,h=i[0],d=u[1],m=c,v=f;o&&l&&o===l&&"string"==typeof o&&(n=o,m=a.find(c,[n,n]),v=a.find(f,[n,n]));for(var g=[],_=0;_<d;_++){for(var y=v(r[0],s[0][_]),b=1;b<h;b++)y=m(y,v(r[b],s[b][_]));g[_]=y}return new p({data:g,size:[d],datatype:n})},x=function(t,e){switch(t.storage()){case"dense":return j(t,e);case"sparse":return k(t,e)}},w=function(t,e){switch(t.storage()){case"dense":switch(e.storage()){case"dense":return M(t,e);case"sparse":return A(t,e)}break;case"sparse":switch(e.storage()){case"dense":return E(t,e);case"sparse":return z(t,e)}}},j=function(t,e){var n,r=t._data,i=t._size,o=t._datatype,s=e._data,u=e._datatype,l=i[0],h=i[1],d=c,m=f;o&&u&&o===u&&"string"==typeof o&&(n=o,d=a.find(c,[n,n]),m=a.find(f,[n,n]));for(var v=[],g=0;g<l;g++){for(var _=r[g],y=m(_[0],s[0]),b=1;b<h;b++)y=d(y,m(_[b],s[b]));v[g]=y}return new p({data:v,size:[l],datatype:n})},M=function(t,e){var n,r=t._data,i=t._size,o=t._datatype,s=e._data,u=e._size,l=e._datatype,h=i[0],d=i[1],m=u[1],v=c,g=f;o&&l&&o===l&&"string"==typeof o&&(n=o,v=a.find(c,[n,n]),g=a.find(f,[n,n]));for(var _=[],y=0;y<h;y++){var b=r[y];_[y]=[];for(var x=0;x<m;x++){for(var w=g(b[0],s[0][x]),j=1;j<d;j++)w=v(w,g(b[j],s[j][x]));_[y][x]=w}}return new p({data:_,size:[h,m],datatype:n})},A=function(t,e){var n=t._data,r=t._size,i=t._datatype,o=e._values,s=e._index,u=e._ptr,h=e._size,d=e._datatype;if(!o)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var p,v=r[0],g=h[1],_=c,y=f,b=l,x=0;i&&d&&i===d&&"string"==typeof i&&(p=i,_=a.find(c,[p,p]),y=a.find(f,[p,p]),b=a.find(l,[p,p]),x=a.convert(0,p));for(var w=[],j=[],M=[],A=new m({values:w,index:j,ptr:M,size:[v,g],datatype:p}),k=0;k<g;k++){M[k]=j.length;var E=u[k],z=u[k+1];if(z>E)for(var T=0,S=0;S<v;S++){for(var N,O=S+1,C=E;C<z;C++){var P=s[C];T!==O?(N=y(n[S][P],o[C]),T=O):N=_(N,y(n[S][P],o[C]))}T!==O||b(N,x)||(j.push(S),w.push(N))}}return M[g]=j.length,A},k=function(t,e){var n=t._values,r=t._index,i=t._ptr,o=t._datatype;if(!n)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s,u=e._data,h=e._datatype,d=t._size[0],p=e._size[0],v=[],g=[],_=[],y=c,b=f,x=l,w=0;o&&h&&o===h&&"string"==typeof o&&(s=o,y=a.find(c,[s,s]),b=a.find(f,[s,s]),x=a.find(l,[s,s]),w=a.convert(0,s));var j=[],M=[];_[0]=0;for(var A=0;A<p;A++){var k=u[A];if(!x(k,w))for(var E=i[A],z=i[A+1],T=E;T<z;T++){var S=r[T];M[S]?j[S]=y(j[S],b(k,n[T])):(M[S]=!0,g.push(S),j[S]=b(k,n[T]))}}for(var N=g.length,O=0;O<N;O++){var C=g[O];v[O]=j[C]}return _[1]=g.length,new m({values:v,index:g,ptr:_,size:[d,1],datatype:s})},E=function(t,e){var n=t._values,r=t._index,i=t._ptr,o=t._datatype;if(!n)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s,u=e._data,h=e._datatype,d=t._size[0],p=e._size[0],v=e._size[1],g=c,_=f,y=l,b=0;o&&h&&o===h&&"string"==typeof o&&(s=o,g=a.find(c,[s,s]),_=a.find(f,[s,s]),y=a.find(l,[s,s]),b=a.convert(0,s));for(var x=[],w=[],j=[],M=new m({values:x,index:w,ptr:j,size:[d,v],datatype:s}),A=[],k=[],E=0;E<v;E++){j[E]=w.length;for(var z=E+1,T=0;T<p;T++){var S=u[T][E];if(!y(S,b))for(var N=i[T],O=i[T+1],C=N;C<O;C++){var P=r[C];k[P]!==z?(k[P]=z,w.push(P),A[P]=_(S,n[C])):A[P]=g(A[P],_(S,n[C]))}}for(var B=j[E],R=w.length,I=B;I<R;I++){var D=w[I];x[I]=A[D]}}return j[v]=w.length,M},z=function(t,e){var n,r=t._values,i=t._index,o=t._ptr,s=t._datatype,u=e._values,l=e._index,h=e._ptr,d=e._datatype,p=t._size[0],v=e._size[1],g=r&&u,_=c,y=f;s&&d&&s===d&&"string"==typeof s&&(n=s,_=a.find(c,[n,n]),y=a.find(f,[n,n]));for(var b,x,w,j,M,A,k,E,z=g?[]:void 0,T=[],S=[],N=new m({values:z,index:T,ptr:S,size:[p,v],datatype:n}),O=g?[]:void 0,C=[],P=0;P<v;P++){S[P]=T.length;var B=P+1;for(M=h[P],A=h[P+1],j=M;j<A;j++)if(E=l[j],g)for(x=o[E],w=o[E+1],b=x;b<w;b++)C[k=i[b]]!==B?(C[k]=B,T.push(k),O[k]=y(u[j],r[b])):O[k]=_(O[k],y(u[j],r[b]));else for(x=o[E],w=o[E+1],b=x;b<w;b++)C[k=i[b]]!==B&&(C[k]=B,T.push(k));if(g)for(var R=S[P],I=T.length,D=R;D<I;D++){var F=T[D];z[D]=O[F]}}return S[v]=T.length,N};return v.toTex={2:"\\left(${args[0]}"+s.operators.multiply+"${args[1]}\\right)"},v}},"./node_modules/mathjs/lib/function/arithmetic/multiplyScalar.js":function(t,e,n){"use strict";e.factory=function(t,e,n,r){var i=r("multiplyScalar",{"number, number":function(t,e){return t*e},"Complex, Complex":function(t,e){return t.mul(e)},"BigNumber, BigNumber":function(t,e){return t.times(e)},"Fraction, Fraction":function(t,e){return t.mul(e)},"number | Fraction | BigNumber | Complex, Unit":function(t,e){var n=e.clone();return n.value=null===n.value?n._normalize(t):i(n.value,t),n},"Unit, number | Fraction | BigNumber | Complex":function(t,e){var n=t.clone();return n.value=null===n.value?n._normalize(e):i(n.value,e),n},"Unit, Unit":function(t,e){return t.multiply(e)}});return i}},"./node_modules/mathjs/lib/function/arithmetic/pow.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/number.js").isInteger,i=n("./node_modules/mathjs/lib/utils/array.js").size;e.name="pow",e.factory=function(t,e,o,a){var s=n("./node_modules/mathjs/lib/utils/latex.js"),u=o(n("./node_modules/mathjs/lib/function/matrix/eye.js")),c=o(n("./node_modules/mathjs/lib/function/arithmetic/multiply.js")),f=o(n("./node_modules/mathjs/lib/type/matrix/function/matrix.js")),l=o(n("./node_modules/mathjs/lib/type/fraction/function/fraction.js")),h=o(n("./node_modules/mathjs/lib/type/number.js")),d=a("pow",{"number, number":p,"Complex, Complex":function(t,e){return t.pow(e)},"BigNumber, BigNumber":function(n,r){return r.isInteger()||n>=0||e.predictable?n.pow(r):new t.Complex(n.toNumber(),0).pow(r.toNumber(),0)},"Fraction, Fraction":function(t,n){if(1!==n.d){if(e.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return p(t.valueOf(),n.valueOf())}return t.pow(n)},"Array, number":m,"Array, BigNumber":function(t,e){return m(t,e.toNumber())},"Matrix, number":v,"Matrix, BigNumber":function(t,e){return v(t,e.toNumber())},"Unit, number":function(t,e){return t.pow(e)}});function p(n,i){if(e.predictable&&!r(i)&&n<0)try{var o=l(i),a=h(o);if((i===a||Math.abs((i-a)/i)<1e-14)&&o.d%2==1)return(o.n%2==0?1:-1)*Math.pow(-n,i)}catch(t){}return n*n<1&&i===1/0||n*n>1&&i===-1/0?0:e.predictable&&(n<-1&&i===1/0||n>-1&&n<0&&i===-1/0)?NaN:r(i)||n>=0||e.predictable?Math.pow(n,i):new t.Complex(n,0).pow(i,0)}function m(t,e){if(!r(e)||e<0)throw new TypeError("For A^b, b must be a positive integer (value is "+e+")");var n=i(t);if(2!=n.length)throw new Error("For A^b, A must be 2 dimensional (A has "+n.length+" dimensions)");if(n[0]!=n[1])throw new Error("For A^b, A must be square (size is "+n[0]+"x"+n[1]+")");for(var o=u(n[0]).valueOf(),a=t;e>=1;)1==(1&e)&&(o=c(a,o)),e>>=1,a=c(a,a);return o}function v(t,e){return f(m(t.valueOf(),e))}return d.toTex={2:"\\left(${args[0]}\\right)"+s.operators.pow+"{${args[1]}}"},d}},"./node_modules/mathjs/lib/function/matrix/eye.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/array.js"),i=n("./node_modules/mathjs/lib/utils/number.js").isInteger;e.name="eye",e.factory=function(t,e,o,a){var s=o(n("./node_modules/mathjs/lib/type/matrix/function/matrix.js")),u=a("eye",{"":function(){return"Matrix"===e.matrix?s([]):[]},string:function(t){return s(t)},"number | BigNumber":function(t){return f(t,t,"Matrix"===e.matrix?"default":void 0)},"number | BigNumber, string":function(t,e){return f(t,t,e)},"number | BigNumber, number | BigNumber":function(t,n){return f(t,n,"Matrix"===e.matrix?"default":void 0)},"number | BigNumber, number | BigNumber, string":function(t,e,n){return f(t,e,n)},Array:function(t){return c(t)},"Array, string":function(t,e){return c(t,e)},Matrix:function(t){return c(t.valueOf(),t.storage())},"Matrix, string":function(t,e){return c(t.valueOf(),e)}});return u.toTex=void 0,u;function c(t,e){switch(t.length){case 0:return e?s(e):[];case 1:return f(t[0],t[0],e);case 2:return f(t[0],t[1],e);default:throw new Error("Vector containing two values expected")}}function f(e,n,o){var a=t.isBigNumber(e)||t.isBigNumber(n)?t.BigNumber:null;if(t.isBigNumber(e)&&(e=e.toNumber()),t.isBigNumber(n)&&(n=n.toNumber()),!i(e)||e<1)throw new Error("Parameters in function eye must be positive integers");if(!i(n)||n<1)throw new Error("Parameters in function eye must be positive integers");var s=a?new t.BigNumber(1):1,u=a?new a(0):0,c=[e,n];if(o)return t.Matrix.storage(o).diagonal(c,s,0,u);for(var f=r.resize([],c,u),l=e<n?e:n,h=0;h<l;h++)f[h][h]=s;return f}}},"./node_modules/mathjs/lib/function/probability/factorial.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/collection/deepMap.js");e.name="factorial",e.factory=function(t,e,i,o){var a=i(n("./node_modules/mathjs/lib/function/probability/gamma.js")),s=n("./node_modules/mathjs/lib/utils/latex.js"),u=o("factorial",{number:function(t){if(t<0)throw new Error("Value must be non-negative");return a(t+1)},BigNumber:function(t){if(t.isNegative())throw new Error("Value must be non-negative");return a(t.plus(1))},"Array | Matrix":function(t){return r(t,u)}});return u.toTex={1:"\\left(${args[0]}\\right)"+s.operators.factorial},u}},"./node_modules/mathjs/lib/function/probability/gamma.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/collection/deepMap.js"),i=n("./node_modules/mathjs/lib/utils/number.js").isInteger;var o=4.7421875,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.name="gamma",e.factory=function(t,e,s,u){var c=s(n("./node_modules/mathjs/lib/function/arithmetic/multiply.js")),f=s(n("./node_modules/mathjs/lib/function/arithmetic/pow.js")),l=u("gamma",{number:function(t){var e,n;if(i(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var r=t-2,s=t-1;r>1;)s*=r,r--;return 0==s&&(s=1),s}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*l(1-t));if(t>=171.35)return 1/0;if(t>85){var u=t*t,c=u*t,f=c*t,h=f*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*u)-139/(51840*c)-571/(2488320*f)+163879/(209018880*h)+5246819/(75246796800*h*t))}--t,n=a[0];for(var d=1;d<a.length;++d)n+=a[d]/(t+d);return e=t+o+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*n},Complex:function(e){var n,r;if(0==e.im)return l(e.re);e=new t.Complex(e.re-1,e.im),r=new t.Complex(a[0],0);for(var i=1;i<a.length;++i){var s=e.re+i,u=s*s+e.im*e.im;0!=u?(r.re+=a[i]*s/u,r.im+=-a[i]*e.im/u):r.re=a[i]<0?-1/0:1/0}n=new t.Complex(e.re+o+.5,e.im);var h=Math.sqrt(2*Math.PI);e.re+=.5;var d=f(n,e);0==d.im?d.re*=h:0==d.re?d.im*=h:(d.re*=h,d.im*=h);var p=Math.exp(-n.re);return n.re=p*Math.cos(-n.im),n.im=p*Math.sin(-n.im),c(c(d,n),r)},BigNumber:function(n){if(n.isInteger())return n.isNegative()||n.isZero()?new t.BigNumber(1/0):function(n){if(n.isZero())return new t.BigNumber(1);for(var r=e.precision+(0|Math.log(n.toNumber())),i=new(t.BigNumber.clone({precision:r}))(n),o=n.toNumber()-1;o>1;)i=i.times(o),o--;return new t.BigNumber(i.toPrecision(t.BigNumber.precision))}(n.minus(1));if(!n.isFinite())return new t.BigNumber(n.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(t){return r(t,l)}});return l.toTex={1:"\\Gamma\\left(${args[0]}\\right)"},l}},"./node_modules/mathjs/lib/function/relational/equalScalar.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/number.js").nearlyEqual,i=n("./node_modules/mathjs/lib/utils/bignumber/nearlyEqual.js");e.factory=function(t,e,n,o){var a=o("equalScalar",{"boolean, boolean":function(t,e){return t===e},"number, number":function(t,n){return t===n||r(t,n,e.epsilon)},"BigNumber, BigNumber":function(t,n){return t.eq(n)||i(t,n,e.epsilon)},"Fraction, Fraction":function(t,e){return t.equals(e)},"Complex, Complex":function(t,e){return t.equals(e)},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return a(t.value,e.value)},"string, string":function(t,e){return t===e}});return a}},"./node_modules/mathjs/lib/type/fraction/function/fraction.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/collection/deepMap.js");e.name="fraction",e.factory=function(t,e,n,i){var o=i("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new t.Fraction(e)},string:function(e){return new t.Fraction(e)},"number, number":function(e,n){return new t.Fraction(e,n)},BigNumber:function(e){return new t.Fraction(e.toString())},Fraction:function(t){return t},Object:function(e){return new t.Fraction(e)},"Array | Matrix":function(t){return r(t,o)}});return o}},"./node_modules/mathjs/lib/type/matrix/function/matrix.js":function(t,e,n){"use strict";e.name="matrix",e.factory=function(t,e,n,r){var i=r("matrix",{"":function(){return o([])},string:function(t){return o([],t)},"string, string":function(t,e){return o([],t,e)},Array:function(t){return o(t)},Matrix:function(t){return o(t,t.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});return i.toTex={0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},i;function o(e,n,r){return new(t.Matrix.storage(n||"default"))(e,r)}}},"./node_modules/mathjs/lib/type/matrix/utils/algorithm11.js":function(t,e,n){"use strict";e.name="algorithm11",e.factory=function(t,e,r,i){var o=r(n("./node_modules/mathjs/lib/function/relational/equalScalar.js")),a=t.SparseMatrix;return function(t,e,n,r){var s=t._values,u=t._index,c=t._ptr,f=t._size,l=t._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h,d=f[0],p=f[1],m=o,v=0,g=n;"string"==typeof l&&(h=l,m=i.find(o,[h,h]),v=i.convert(0,h),e=i.convert(e,h),g=i.find(n,[h,h]));for(var _=[],y=[],b=[],x=new a({values:_,index:y,ptr:b,size:[d,p],datatype:h}),w=0;w<p;w++){b[w]=y.length;for(var j=c[w],M=c[w+1],A=j;A<M;A++){var k=u[A],E=r?g(e,s[A]):g(s[A],e);m(E,v)||(y.push(k),_.push(E))}}return b[p]=y.length,x}}},"./node_modules/mathjs/lib/type/matrix/utils/algorithm14.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/object.js").clone;e.name="algorithm14",e.factory=function(t,e,n,i){var o=t.DenseMatrix,a=function(t,e,n,r,i,o,s){var u=[];if(e===n.length-1)for(var c=0;c<r;c++)u[c]=s?t(o,i[c]):t(i[c],o);else for(var f=0;f<r;f++)u[f]=a(t,e+1,n,n[e+1],i[f],o,s);return u};return function(t,e,n,s){var u,c=t._data,f=t._size,l=t._datatype,h=n;"string"==typeof l&&(u=l,e=i.convert(e,u),h=i.find(n,[u,u]));var d=f.length>0?a(h,0,f,f[0],c,e,s):[];return new o({data:d,size:r(f),datatype:u})}}},"./node_modules/mathjs/lib/type/number.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/collection/deepMap.js");e.name="number",e.factory=function(t,e,n,i){var o=i("number",{"":function(){return 0},number:function(t){return t},string:function(t){var e=Number(t);if(isNaN(e))throw new SyntaxError('String "'+t+'" is no valid number');return e},BigNumber:function(t){return t.toNumber()},Fraction:function(t){return t.valueOf()},Unit:function(t){throw new Error("Second argument with valueless unit expected")},"Unit, string | Unit":function(t,e){return t.toNumber(e)},"Array | Matrix":function(t){return r(t,o)}});return o.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},o}},"./node_modules/mathjs/lib/utils/array.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/number.js"),i=n("./node_modules/mathjs/lib/utils/string.js"),o=(n("./node_modules/mathjs/lib/utils/object.js"),n("./node_modules/mathjs/lib/utils/types.js"),n("./node_modules/mathjs/lib/error/DimensionError.js")),a=n("./node_modules/mathjs/lib/error/IndexError.js");e.size=function(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e},e.validate=function(t,e){if(0==e.length){if(Array.isArray(t))throw new o(t.length,0)}else!function t(e,n,r){var i,a=e.length;if(a!=n[r])throw new o(a,n[r]);if(r<n.length-1){var s=r+1;for(i=0;i<a;i++){var u=e[i];if(!Array.isArray(u))throw new o(n.length-1,n.length,"<");t(e[i],n,s)}}else for(i=0;i<a;i++)if(Array.isArray(e[i]))throw new o(n.length+1,n.length,">")}(t,e,0)},e.validateIndex=function(t,e){if(!r.isNumber(t)||!r.isInteger(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||"number"==typeof e&&t>=e)throw new a(t,e)},e.UNINITIALIZED={},e.resize=function(t,n,o){if(!Array.isArray(t)||!Array.isArray(n))throw new TypeError("Array expected");if(0===n.length)throw new Error("Resizing to scalar is not supported");return n.forEach(function(t){if(!r.isNumber(t)||!r.isInteger(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+i.format(n)+")")}),function t(n,r,i,o){var a;var s;var u=n.length;var c=r[i];var f=Math.min(u,c);n.length=c;if(i<r.length-1){var l=i+1;for(a=0;a<f;a++)s=n[a],Array.isArray(s)||(s=[s],n[a]=s),t(s,r,l,o);for(a=f;a<c;a++)s=[],n[a]=s,t(s,r,l,o)}else{for(a=0;a<f;a++)for(;Array.isArray(n[a]);)n[a]=n[a][0];if(o!==e.UNINITIALIZED)for(a=f;a<c;a++)n[a]=o}}(t,n,0,void 0!==o?o:0),t},e.reshape=function(t,n){var r,i=e.flatten(t),a=function(t){return t.reduce(function(t,e){return t*e})};if(!Array.isArray(t)||!Array.isArray(n))throw new TypeError("Array expected");if(0===n.length)throw new o(0,a(e.size(t)),"!=");try{r=function t(e,n){var r=[];var i;if(0===n.length){if(0===e.length)throw new o(null,null,"!=");return e.shift()}for(i=0;i<n[0];i+=1)r.push(t(e,n.slice(1)));return r}(i,n)}catch(r){if(r instanceof o)throw new o(a(n),a(e.size(t)),"!=");throw r}if(i.length>0)throw new o(a(n),a(e.size(t)),"!=");return r},e.squeeze=function(t,n){for(var r=n||e.size(t);Array.isArray(t)&&1===t.length;)t=t[0],r.shift();for(var i=r.length;1===r[i-1];)i--;return i<r.length&&(t=function t(e,n,r){var i,o;if(r<n){var a=r+1;for(i=0,o=e.length;i<o;i++)e[i]=t(e[i],n,a)}else for(;Array.isArray(e);)e=e[0];return e}(t,i,0),r.length=i),t},e.unsqueeze=function(t,n,r,i){var o=i||e.size(t);if(r)for(var a=0;a<r;a++)t=[t],o.unshift(1);for(t=function t(e,n,r){var i,o;if(Array.isArray(e)){var a=r+1;for(i=0,o=e.length;i<o;i++)e[i]=t(e[i],n,a)}else for(var s=r;s<n;s++)e=[e];return e}(t,n,0);o.length<n;)o.push(1);return t},e.flatten=function(t){if(!Array.isArray(t))return t;var e=[];return t.forEach(function t(n){Array.isArray(n)?n.forEach(t):e.push(n)}),e},e.map=function(t,e){return Array.prototype.map.call(t,e)},e.forEach=function(t,e){Array.prototype.forEach.call(t,e)},e.filter=function(t,n){if(1!==e.size(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,n)},e.filterRegExp=function(t,n){if(1!==e.size(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,function(t){return n.test(t)})},e.join=function(t,e){return Array.prototype.join.call(t,e)},e.identify=function(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;var e=[],n=0;e[0]={value:t[0],identifier:0};for(var r=1;r<t.length;r++)t[r]===t[r-1]?n++:n=0,e.push({value:t[r],identifier:n});return e},e.generalize=function(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;for(var e=[],n=0;n<t.length;n++)e.push(t[n].value);return e},e.isArray=Array.isArray},"./node_modules/mathjs/lib/utils/bignumber/formatter.js":function(t,e){e.format=function(t,n){if("function"==typeof n)return n(t);if(!t.isFinite())return t.isNaN()?"NaN":t.gt(0)?"Infinity":"-Infinity";var r="auto",i=void 0;switch(void 0!==n&&(n.notation&&(r=n.notation),"number"==typeof n?i=n:n.precision&&(i=n.precision)),r){case"fixed":return e.toFixed(t,i);case"exponential":return e.toExponential(t,i);case"auto":var o=.001,a=1e5;n&&n.exponential&&(void 0!==n.exponential.lower&&(o=n.exponential.lower),void 0!==n.exponential.upper&&(a=n.exponential.upper));t.constructor.toExpNeg,t.constructor.toExpPos;if(t.constructor.config({toExpNeg:Math.round(Math.log(o)/Math.LN10),toExpPos:Math.round(Math.log(a)/Math.LN10)}),t.isZero())return"0";var s=t.abs();return(s.gte(o)&&s.lt(a)?t.toSignificantDigits(i).toFixed():e.toExponential(t,i)).replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", or "fixed".')}},e.toExponential=function(t,e){return void 0!==e?t.toExponential(e-1):t.toExponential()},e.toFixed=function(t,e){return t.toFixed(e||0)}},"./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js":function(t,e){t.exports=function(t){return t&&t.constructor.prototype.isBigNumber||!1}},"./node_modules/mathjs/lib/utils/bignumber/nearlyEqual.js":function(t,e,n){"use strict";t.exports=function(t,e,n){if(null==n)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var r=t.minus(e).abs();if(r.isZero())return!0;var i=t.constructor.max(t.abs(),e.abs());return r.lte(i.times(n))}return!1}},"./node_modules/mathjs/lib/utils/collection/deepMap.js":function(t,e,n){"use strict";t.exports=function t(e,n,r){return e&&"function"==typeof e.map?e.map(function(e){return t(e,n,r)}):n(e)}},"./node_modules/mathjs/lib/utils/collection/isMatrix.js":function(t,e,n){"use strict";t.exports=function(t){return t&&t.constructor.prototype.isMatrix||!1}},"./node_modules/mathjs/lib/utils/emitter.js":function(t,e,n){var r=n("./node_modules/tiny-emitter/index.js");e.mixin=function(t){var e=new r;return t.on=e.on.bind(e),t.off=e.off.bind(e),t.once=e.once.bind(e),t.emit=e.emit.bind(e),t}},"./node_modules/mathjs/lib/utils/latex.js":function(t,e,n){"use strict";e.symbols={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},e.operators={transpose:"^\\top",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},e.defaultTemplate="\\mathrm{${name}}\\left(${args}\\right)";var r={deg:"^\\circ"};e.toSymbol=function(t,n){if(n=void 0!==n&&n)return r.hasOwnProperty(t)?r[t]:"\\mathrm{"+t+"}";if(e.symbols.hasOwnProperty(t))return e.symbols[t];if(-1!==t.indexOf("_")){var i=t.indexOf("_");return e.toSymbol(t.substring(0,i))+"_{"+e.toSymbol(t.substring(i+1))+"}"}return t}},"./node_modules/mathjs/lib/utils/number.js":function(t,e,n){"use strict";function r(t){for(var e=[],n=0;n<t;n++)e.push(0);return e}e.isNumber=function(t){return"number"==typeof t},e.isInteger=function(t){return!!isFinite(t)&&t==Math.round(t)},e.sign=Math.sign||function(t){return t>0?1:t<0?-1:0},e.format=function(t,n){if("function"==typeof n)return n(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var r="auto",i=void 0;switch(n&&(n.notation&&(r=n.notation),e.isNumber(n)?i=n:n.precision&&(i=n.precision)),r){case"fixed":return e.toFixed(t,i);case"exponential":return e.toExponential(t,i);case"engineering":return e.toEngineering(t,i);case"auto":return e.toPrecision(t,i,n&&n.exponential).replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", or "fixed".')}},e.splitNumber=function(t){var e=String(t).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var n=e[1],r=e[2],i=parseFloat(e[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(t){return i-=t.length,""}).replace(/0*$/,"").split("").map(function(t){return parseInt(t)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}},e.toEngineering=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var i=e.roundDigits(e.splitNumber(t),n),o=i.exponent,a=i.coefficients,s=o%3==0?o:o<0?o-3-o%3:o-o%3,u=o>=0?o:Math.abs(s);a.length-1<u&&(a=a.concat(r(u-(a.length-1))));for(var c=Math.abs(o-s),f=1;--c>=0;)f++;var l=a.slice(f).join(""),h=l.match(/[1-9]/)?"."+l:"",d=a.slice(0,f).join("")+h+"e"+(o>=0?"+":"")+s.toString();return i.sign+d},e.toFixed=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var i=e.splitNumber(t),o=e.roundDigits(i,i.exponent+1+(n||0)),a=o.coefficients,s=o.exponent+1,u=s+(n||0);return a.length<u&&(a=a.concat(r(u-a.length))),s<0&&(a=r(1-s).concat(a),s=1),n&&a.splice(s,0,0===s?"0.":"."),o.sign+a.join("")},e.toExponential=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var i=e.splitNumber(t),o=n?e.roundDigits(i,n):i,a=o.coefficients,s=o.exponent;a.length<n&&(a=a.concat(r(n-a.length)));var u=a.shift();return o.sign+u+(a.length>0?"."+a.join(""):"")+"e"+(s>=0?"+":"")+s},e.toPrecision=function(t,n,i){if(isNaN(t)||!isFinite(t))return String(t);var o=i&&void 0!==i.lower?i.lower:.001,a=i&&void 0!==i.upper?i.upper:1e5,s=e.splitNumber(t),u=Math.abs(Math.pow(10,s.exponent));if(u<o||u>=a)return e.toExponential(t,n);var c=n?e.roundDigits(s,n):s,f=c.coefficients,l=c.exponent;f.length<n&&(f=f.concat(r(n-f.length))),f=f.concat(r(l-f.length+1+(f.length<n?n-f.length:0)));var h=l>0?l:0;return h<(f=r(-l).concat(f)).length-1&&f.splice(h+1,0,"."),c.sign+f.join("")},e.roundDigits=function(t,e){for(var n={sign:t.sign,coefficients:t.coefficients,exponent:t.exponent},r=n.coefficients;e<=0;)r.unshift(0),n.exponent++,e++;if(r.length>e&&r.splice(e,r.length-e)[0]>=5){var i=e-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),r[--i]++}return n},e.digits=function(t){return t.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},e.DBL_EPSILON=Number.EPSILON||2.220446049250313e-16,e.nearlyEqual=function(t,n,r){if(null==r)return t==n;if(t==n)return!0;if(isNaN(t)||isNaN(n))return!1;if(isFinite(t)&&isFinite(n)){var i=Math.abs(t-n);return i<e.DBL_EPSILON||i<=Math.max(Math.abs(t),Math.abs(n))*r}return!1}},"./node_modules/mathjs/lib/utils/object.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js");e.clone=function t(n){var i=typeof n;if("number"===i||"string"===i||"boolean"===i||null==n)return n;if("function"==typeof n.clone)return n.clone();if(Array.isArray(n))return n.map(function(e){return t(e)});if(n instanceof Number)return new Number(n.valueOf());if(n instanceof String)return new String(n.valueOf());if(n instanceof Boolean)return new Boolean(n.valueOf());if(n instanceof Date)return new Date(n.valueOf());if(r(n))return n;if(n instanceof RegExp)throw new TypeError("Cannot clone "+n);return e.map(n,t)},e.map=function(t,n){var r={};for(var i in t)e.hasOwnProperty(t,i)&&(r[i]=n(t[i]));return r},e.extend=function(t,n){for(var r in n)e.hasOwnProperty(n,r)&&(t[r]=n[r]);return t},e.deepExtend=function t(n,r){if(Array.isArray(r))throw new TypeError("Arrays are not supported by deepExtend");for(var i in r)if(e.hasOwnProperty(r,i))if(r[i]&&r[i].constructor===Object)void 0===n[i]&&(n[i]={}),n[i].constructor===Object?t(n[i],r[i]):n[i]=r[i];else{if(Array.isArray(r[i]))throw new TypeError("Arrays are not supported by deepExtend");n[i]=r[i]}return n},e.deepEqual=function(t,n){var r,i,o;if(Array.isArray(t)){if(!Array.isArray(n))return!1;if(t.length!=n.length)return!1;for(i=0,o=t.length;i<o;i++)if(!e.deepEqual(t[i],n[i]))return!1;return!0}if(t instanceof Object){if(Array.isArray(n)||!(n instanceof Object))return!1;for(r in t)if(!e.deepEqual(t[r],n[r]))return!1;for(r in n)if(!e.deepEqual(t[r],n[r]))return!1;return!0}return typeof t==typeof n&&t==n},e.canDefineProperty=function(){try{if(Object.defineProperty)return Object.defineProperty({},"x",{get:function(){}}),!0}catch(t){}return!1},e.lazy=function(t,n,r){if(e.canDefineProperty()){var i,o=!0;Object.defineProperty(t,n,{get:function(){return o&&(i=r(),o=!1),i},set:function(t){i=t,o=!1},configurable:!0,enumerable:!0})}else t[n]=r()},e.traverse=function(t,e){var n=t;if(e)for(var r=e.split("."),i=0;i<r.length;i++){var o=r[i];o in n||(n[o]={}),n=n[o]}return n},e.hasOwnProperty=function(t,e){return t&&Object.hasOwnProperty.call(t,e)},e.isFactory=function(t){return t&&"function"==typeof t.factory}},"./node_modules/mathjs/lib/utils/string.js":function(t,e,n){"use strict";var r=n("./node_modules/mathjs/lib/utils/number.js").format,i=n("./node_modules/mathjs/lib/utils/bignumber/formatter.js").format,o=n("./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js");e.isString=function(t){return"string"==typeof t},e.endsWith=function(t,e){var n=t.length-e.length,r=t.length;return t.substring(n,r)===e},e.format=function(t,n){if("number"==typeof t)return r(t,n);if(o(t))return i(t,n);if(function(t){return t&&"object"==typeof t&&"number"==typeof t.s&&"number"==typeof t.n&&"number"==typeof t.d||!1}(t))return n&&"decimal"===n.fraction?t.toString():t.s*t.n+"/"+t.d;if(Array.isArray(t))return function t(n,r){if(Array.isArray(n)){for(var i="[",o=n.length,a=0;a<o;a++)0!=a&&(i+=", "),i+=t(n[a],r);return i+="]"}return e.format(n,r)}(t,n);if(e.isString(t))return'"'+t+'"';if("function"==typeof t)return t.syntax?String(t.syntax):"function";if(t&&"object"==typeof t){if("function"==typeof t.format)return t.format(n);if(t&&t.toString()!=={}.toString())return t.toString();var a=[];for(var s in t)t.hasOwnProperty(s)&&a.push('"'+s+'": '+e.format(t[s],n));return"{"+a.join(", ")+"}"}return String(t)},e.stringify=function(t){for(var e=String(t),n="",r=0;r<e.length;){var i=e.charAt(r);"\\"===i?(n+=i,r++,""!==(i=e.charAt(r))&&-1!=='"\\/bfnrtu'.indexOf(i)||(n+="\\"),n+=i):n+='"'===i?'\\"':i,r++}return'"'+n+'"'},e.escape=function(t){var e=String(t);return e=e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}},"./node_modules/mathjs/lib/utils/types.js":function(t,e,n){"use strict";e.type=function(t){var e=typeof t;return"object"===e?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":"Object":"function"===e?"Function":e}},"./node_modules/mouse-change/mouse-listen.js":function(t,e,n){"use strict";t.exports=function(t,e){e||(e=t,t=window);var n=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function u(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==a.alt,a.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==a.shift,a.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==a.control,a.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==a.meta,a.meta=!!t.metaKey),e}function c(t,s){var c=r.x(s),f=r.y(s);"buttons"in s&&(t=0|s.buttons),(t!==n||c!==i||f!==o||u(s))&&(n=0|t,i=c||0,o=f||0,e&&e(n,i,o,a))}function f(t){c(0,t)}function l(){(n||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,n=0,a.shift=a.alt=a.control=a.meta=!1,e&&e(0,0,0,a))}function h(t){u(t)&&e&&e(n,i,o,a)}function d(t){0===r.buttons(t)?c(0,t):c(n,t)}function p(t){c(n|r.buttons(t),t)}function m(t){c(n&~r.buttons(t),t)}function v(){s||(s=!0,t.addEventListener("mousemove",d),t.addEventListener("mousedown",p),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",f),t.addEventListener("mouseenter",f),t.addEventListener("mouseout",f),t.addEventListener("mouseover",f),t.addEventListener("blur",l),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",l),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}v();var g={element:t};return Object.defineProperties(g,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener("mousemove",d),t.removeEventListener("mousedown",p),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",f),t.removeEventListener("mouseenter",f),t.removeEventListener("mouseout",f),t.removeEventListener("mouseover",f),t.removeEventListener("blur",l),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",l),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),g};var r=n("./node_modules/mouse-event/mouse.js")},"./node_modules/mouse-event-offset/index.js":function(t,e){var n={left:0,top:0};t.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,o=t.clientY||0,a=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-a.left,r[1]=o-a.top,r}},"./node_modules/mouse-event/mouse.js":function(t,e,n){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if("button"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},e.element=r,e.x=function(t){if("object"==typeof t){if("offsetX"in t)return t.offsetX;var e=r(t).getBoundingClientRect();return t.clientX-e.left}return 0},e.y=function(t){if("object"==typeof t){if("offsetY"in t)return t.offsetY;var e=r(t).getBoundingClientRect();return t.clientY-e.top}return 0}},"./node_modules/ndarray-extract-contour/contour.js":function(t,e,n){"use strict";var r=n("./node_modules/typedarray-pool/pool.js");function i(t){return"a"+t}function o(t){return"d"+t}function a(t,e){return"c"+t+"_"+e}function s(t){return"s"+t}function u(t,e){return"t"+t+"_"+e}function c(t){return"o"+t}function f(t){return"x"+t}function l(t){return"p"+t}function h(t,e){return"d"+t+"_"+e}function d(t){return"i"+t}function p(t,e){return"u"+t+"_"+e}function m(t){return"b"+t}function v(t){return"y"+t}function g(t){return"e"+t}function _(t){return"v"+t}t.exports=function(t){function e(t){throw new Error("ndarray-extract-contour: "+t)}"object"!=typeof t&&e("Must specify arguments");var n=t.order;Array.isArray(n)||e("Must specify order");var k=t.arrayArguments||1;k<1&&e("Must have at least one array argument");var E=t.scalarArguments||0;E<0&&e("Scalar arg count must be > 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var z=t.getters||[],T=new Array(k),S=0;S<k;++S)z.indexOf(S)>=0?T[S]=!0:T[S]=!1;return function(t,e,n,k,E,z){var T=z.length,S=E.length;if(S<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var N="extractContour"+E.join("_"),O=[],C=[],P=[],B=0;B<T;++B)P.push(i(B));for(var B=0;B<k;++B)P.push(f(B));for(var B=0;B<S;++B)C.push(s(B)+"="+i(0)+".shape["+B+"]|0");for(var B=0;B<T;++B){C.push(o(B)+"="+i(B)+".data",c(B)+"="+i(B)+".offset|0");for(var R=0;R<S;++R)C.push(u(B,R)+"="+i(B)+".stride["+R+"]|0")}for(var B=0;B<T;++B){C.push(l(B)+"="+c(B)),C.push(a(B,0));for(var R=1;R<1<<S;++R){for(var I=[],D=0;D<S;++D)R&1<<D&&I.push("-"+u(B,D));C.push(h(B,R)+"=("+I.join("")+")|0"),C.push(a(B,R)+"=0")}}for(var B=0;B<T;++B)for(var R=0;R<S;++R){var F=[u(B,E[R])];R>0&&F.push(u(B,E[R-1])+"*"+s(E[R-1])),C.push(p(B,E[R])+"=("+F.join("-")+")|0")}for(var B=0;B<S;++B)C.push(d(B)+"=0");C.push(x+"=0");for(var L=["2"],B=S-2;B>=0;--B)L.push(s(E[B]));C.push(w+"=("+L.join("*")+")|0",b+"=mallocUint32("+w+")",y+"=mallocUint32("+w+")",j+"=0"),C.push(m(0)+"=0");for(var R=1;R<1<<S;++R){for(var U=[],q=[],D=0;D<S;++D)R&1<<D&&(0===q.length?U.push("1"):U.unshift(q.join("*"))),q.push(s(E[D]));var Y="";U[0].indexOf(s(E[S-2]))<0&&(Y="-");var H=A(S,R,E);C.push(g(H)+"=(-"+U.join("-")+")|0",v(H)+"=("+Y+U.join("-")+")|0",m(H)+"=0")}function V(t,e){O.push("for(",d(E[t]),"=",e,";",d(E[t]),"<",s(E[t]),";","++",d(E[t]),"){")}function W(t){for(var e=0;e<T;++e)O.push(l(e),"+=",p(e,E[t]),";");O.push("}")}function X(){for(var t=1;t<1<<S;++t)O.push(M,"=",g(t),";",g(t),"=",v(t),";",v(t),"=",M,";")}C.push(_(0)+"=0",M+"=0"),function t(e,n){if(e<0)return void function(t){for(var e=0;e<T;++e)z[e]?O.push(a(e,0),"=",o(e),".get(",l(e),");"):O.push(a(e,0),"=",o(e),"[",l(e),"];");for(var n=[],e=0;e<T;++e)n.push(a(e,0));for(var e=0;e<k;++e)n.push(f(e));O.push(m(0),"=",b,"[",j,"]=phase(",n.join(),");");for(var r=1;r<1<<S;++r)O.push(m(r),"=",b,"[",j,"+",g(r),"];");for(var i=[],r=1;r<1<<S;++r)i.push("("+m(0)+"!=="+m(r)+")");O.push("if(",i.join("||"),"){");for(var s=[],e=0;e<S;++e)s.push(d(e));for(var e=0;e<T;++e){s.push(a(e,0));for(var r=1;r<1<<S;++r)z[e]?O.push(a(e,r),"=",o(e),".get(",l(e),"+",h(e,r),");"):O.push(a(e,r),"=",o(e),"[",l(e),"+",h(e,r),"];"),s.push(a(e,r))}for(var e=0;e<1<<S;++e)s.push(m(e));for(var e=0;e<k;++e)s.push(f(e));O.push("vertex(",s.join(),");",_(0),"=",y,"[",j,"]=",x,"++;");for(var u=(1<<S)-1,c=m(u),r=0;r<S;++r)if(0==(t&~(1<<r))){for(var p=u^1<<r,v=m(p),w=[],M=p;M>0;M=M-1&p)w.push(y+"["+j+"+"+g(M)+"]");w.push(_(0));for(var M=0;M<T;++M)1&r?w.push(a(M,u),a(M,p)):w.push(a(M,p),a(M,u));1&r?w.push(c,v):w.push(v,c);for(var M=0;M<k;++M)w.push(f(M));O.push("if(",c,"!==",v,"){","face(",w.join(),")}")}O.push("}",j,"+=1;")}(n);!function(t){for(var e=t-1;e>=0;--e)V(e,0);for(var n=[],e=0;e<T;++e)z[e]?n.push(o(e)+".get("+l(e)+")"):n.push(o(e)+"["+l(e)+"]");for(var e=0;e<k;++e)n.push(f(e));O.push(b,"[",j,"++]=phase(",n.join(),");");for(var e=0;e<t;++e)W(e);for(var r=0;r<T;++r)O.push(l(r),"+=",p(r,E[t]),";")}(e);O.push("if(",s(E[e]),">0){",d(E[e]),"=1;");t(e-1,n|1<<E[e]);for(var r=0;r<T;++r)O.push(l(r),"+=",p(r,E[e]),";");e===S-1&&(O.push(j,"=0;"),X());V(e,2);t(e-1,n);e===S-1&&(O.push("if(",d(E[S-1]),"&1){",j,"=0;}"),X());W(e);O.push("}")}(S-1,0),O.push("freeUint32(",y,");freeUint32(",b,");");var G=["'use strict';","function ",N,"(",P.join(),"){","var ",C.join(),";",O.join(""),"}","return ",N].join("");return new Function("vertex","face","phase","mallocUint32","freeUint32",G)(t,e,n,r.mallocUint32,r.freeUint32)}(t.vertex,t.cell,t.phase,E,n,T)};var y="V",b="P",x="N",w="Q",j="X",M="T";function A(t,e,n){for(var r=0,i=0;i<t;++i)e&1<<i&&(r|=1<<n[i]);return r}},"./node_modules/ndarray/ndarray.js":function(t,e,n){var r=n("./node_modules/iota-array/iota.js"),i=n("./node_modules/is-buffer/index.js"),o="undefined"!=typeof Float64Array;function a(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,n=new Array(e.length);for(t=0;t<n.length;++t)n[t]=[Math.abs(e[t]),t];n.sort(a);var r=new Array(n.length);for(t=0;t<r.length;++t)r[t]=n[t][1];return r}function u(t,e){var n=["View",e,"d",t].join("");e<0&&(n="View_Nil"+t);var i="generic"===t;if(-1===e){var o="function "+n+"(a){this.data=a;};var proto="+n+".prototype;proto.dtype='"+t+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+n+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+n+"(a){return new "+n+"(a);}";return new Function(o)()}if(0===e){o="function "+n+"(a,d) {this.data = a;this.offset = d};var proto="+n+".prototype;proto.dtype='"+t+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+n+"_copy() {return new "+n+"(this.data,this.offset)};proto.pick=function "+n+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+n+"_get(){return "+(i?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+n+"_set(v){return "+(i?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+n+"(a,b,c,d){return new "+n+"(a,d)}";return new Function("TrivialArray",o)(c[t][0])}o=["'use strict'"];var a=r(e),u=a.map(function(t){return"i"+t}),f="this.offset+"+a.map(function(t){return"this.stride["+t+"]*i"+t}).join("+"),l=a.map(function(t){return"b"+t}).join(","),h=a.map(function(t){return"c"+t}).join(",");o.push("function "+n+"(a,"+l+","+h+",d){this.data=a","this.shape=["+l+"]","this.stride=["+h+"]","this.offset=d|0}","var proto="+n+".prototype","proto.dtype='"+t+"'","proto.dimension="+e),o.push("Object.defineProperty(proto,'size',{get:function "+n+"_size(){return "+a.map(function(t){return"this.shape["+t+"]"}).join("*"),"}})"),1===e?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),e<4?(o.push("function "+n+"_order(){"),2===e?o.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&o.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push("proto.set=function "+n+"_set("+u.join(",")+",v){"),i?o.push("return this.data.set("+f+",v)}"):o.push("return this.data["+f+"]=v}"),o.push("proto.get=function "+n+"_get("+u.join(",")+"){"),i?o.push("return this.data.get("+f+")}"):o.push("return this.data["+f+"]}"),o.push("proto.index=function "+n+"_index(",u.join(),"){return "+f+"}"),o.push("proto.hi=function "+n+"_hi("+u.join(",")+"){return new "+n+"(this.data,"+a.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+a.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var d=a.map(function(t){return"a"+t+"=this.shape["+t+"]"}),p=a.map(function(t){return"c"+t+"=this.stride["+t+"]"});o.push("proto.lo=function "+n+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+d.join(",")+","+p.join(","));for(var m=0;m<e;++m)o.push("if(typeof i"+m+"==='number'&&i"+m+">=0){d=i"+m+"|0;b+=c"+m+"*d;a"+m+"-=d}");o.push("return new "+n+"(this.data,"+a.map(function(t){return"a"+t}).join(",")+","+a.map(function(t){return"c"+t}).join(",")+",b)}"),o.push("proto.step=function "+n+"_step("+u.join(",")+"){var "+a.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+a.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(m=0;m<e;++m)o.push("if(typeof i"+m+"==='number'){d=i"+m+"|0;if(d<0){c+=b"+m+"*(a"+m+"-1);a"+m+"=ceil(-a"+m+"/d)}else{a"+m+"=ceil(a"+m+"/d)}b"+m+"*=d}");o.push("return new "+n+"(this.data,"+a.map(function(t){return"a"+t}).join(",")+","+a.map(function(t){return"b"+t}).join(",")+",c)}");var v=new Array(e),g=new Array(e);for(m=0;m<e;++m)v[m]="a[i"+m+"]",g[m]="b[i"+m+"]";o.push("proto.transpose=function "+n+"_transpose("+u+"){"+u.map(function(t,e){return t+"=("+t+"===undefined?"+e+":"+t+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+n+"(this.data,"+v.join(",")+","+g.join(",")+",this.offset)}"),o.push("proto.pick=function "+n+"_pick("+u+"){var a=[],b=[],c=this.offset");for(m=0;m<e;++m)o.push("if(typeof i"+m+"==='number'&&i"+m+">=0){c=(c+this.stride["+m+"]*i"+m+")|0}else{a.push(this.shape["+m+"]);b.push(this.stride["+m+"])}");return o.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),o.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+a.map(function(t){return"shape["+t+"]"}).join(",")+","+a.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",o.join("\n"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=function(t,e,n,r){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var a=e.length;if(void 0===n){n=new Array(a);for(var s=a-1,f=1;s>=0;--s)n[s]=f,f*=e[s]}if(void 0===r)for(r=0,s=0;s<a;++s)n[s]<0&&(r-=(e[s]-1)*n[s]);for(var l=function(t){if(i(t))return"buffer";if(o)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}(t),h=c[l];h.length<=a+1;)h.push(u(l,h.length-1));return(0,h[a+1])(t,e,n,r)}},"./node_modules/nextafter/nextafter.js":function(t,e,n){"use strict";var r=n("./node_modules/double-bits/double.js"),i=Math.pow(2,-1074),o=-1>>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var n=r.hi(t),a=r.lo(t);e>t==t>0?a===o?(n+=1,a=0):a+=1:0===a?(a=o,n-=1):a-=1;return r.pack(a,n)}},"./node_modules/permutation-parity/permutation-sign.js":function(t,e,n){"use strict";t.exports=function(t){var e=t.length;if(e<r){for(var n=1,o=0;o<e;++o)for(var a=0;a<o;++a)if(t[o]<t[a])n=-n;else if(t[o]===t[a])return 0;return n}for(var s=i.mallocUint8(e),o=0;o<e;++o)s[o]=0;for(var n=1,o=0;o<e;++o)if(!s[o]){var u=1;s[o]=1;for(var a=t[o];a!==o;a=t[a]){if(s[a])return i.freeUint8(s),0;u+=1,s[a]=1}1&u||(n=-n)}return i.freeUint8(s),n};var r=32,i=n("./node_modules/typedarray-pool/pool.js")},"./node_modules/permutation-rank/index.js":function(t,e,n){"use strict";var r=n("./node_modules/typedarray-pool/pool.js"),i=n("./node_modules/invert-permutation/index.js");e.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var n,o,a,s=r.mallocUint32(e),u=r.mallocUint32(e),c=0;for(i(t,u),a=0;a<e;++a)s[a]=t[a];for(a=e-1;a>0;--a)o=u[a],n=s[a],s[a]=s[o],s[o]=n,u[a]=u[n],u[n]=o,c=(c+n)*a;return r.freeUint32(u),r.freeUint32(s),c},e.unrank=function(t,e,n){switch(t){case 0:return n||[];case 1:return n?(n[0]=0,n):[0];case 2:return n?(e?(n[0]=0,n[1]=1):(n[0]=1,n[1]=0),n):e?[0,1]:[1,0]}var r,i,o,a=1;for((n=n||new Array(t))[0]=0,o=1;o<t;++o)n[o]=o,a=a*o|0;for(o=t-1;o>0;--o)e=e-(r=e/a|0)*a|0,a=a/o|0,i=0|n[o],n[o]=0|n[r],n[r]=0|i;return n}},"./node_modules/planar-dual/loops.js":function(t,e,n){"use strict";t.exports=function(t,e){for(var n=0|e.length,i=t.length,o=[new Array(n),new Array(n)],a=0;a<n;++a)o[0][a]=[],o[1][a]=[];for(var a=0;a<i;++a){var s=t[a];o[0][s[0]].push(s),o[1][s[1]].push(s)}for(var u=[],a=0;a<n;++a)o[0][a].length+o[1][a].length===0&&u.push([a]);function c(t,e){var n=o[e][t[e]];n.splice(n.indexOf(t),1)}function f(t,n,i){for(var a,s,u,f=0;f<2;++f)if(o[f][n].length>0){a=o[f][n][0],u=f;break}s=a[1^u];for(var l=0;l<2;++l)for(var h=o[l][n],d=0;d<h.length;++d){var p=h[d],m=p[1^l],v=r(e[t],e[n],e[s],e[m]);v>0&&(a=p,s=m,u=l)}return i?s:(a&&c(a,u),s)}function l(t,n){var i=o[n][t][0],a=[t];c(i,n);for(var s=i[1^n];;){for(;s!==t;)a.push(s),s=f(a[a.length-2],s,!1);if(o[0][t].length+o[1][t].length===0)break;var u=a[a.length-1],l=t,h=a[1],d=f(u,l,!0);if(r(e[u],e[l],e[h],e[d])<0)break;a.push(t),s=f(u,l)}return a}function h(t,e){return e[1]===e[e.length-1]}for(var a=0;a<n;++a)for(var d=0;d<2;++d){for(var p=[];o[d][a].length>0;){o[0][a].length;var m=l(a,d);h(p,m)?p.push.apply(p,m):(p.length>0&&u.push(p),p=m)}p.length>0&&u.push(p)}return u};var r=n("./node_modules/compare-angle/cmpangle.js")},"./node_modules/planar-graph-to-polyline/lib/trim-leaves.js":function(t,e,n){"use strict";t.exports=function(t,e){for(var n=r(t,e.length),i=new Array(e.length),o=new Array(e.length),a=[],s=0;s<e.length;++s){var u=n[s].length;o[s]=u,i[s]=!0,u<=1&&a.push(s)}for(;a.length>0;){var c=a.pop();i[c]=!1;for(var f=n[c],s=0;s<f.length;++s){var l=f[s];0==--o[l]&&a.push(l)}}for(var h=new Array(e.length),d=[],s=0;s<e.length;++s)if(i[s]){var c=d.length;h[s]=c,d.push(e[s])}else h[s]=-1;for(var p=[],s=0;s<t.length;++s){var m=t[s];i[m[0]]&&i[m[1]]&&p.push([h[m[0]],h[m[1]]])}return[p,d]};var r=n("./node_modules/edges-to-adjacency-list/e2a.js")},"./node_modules/planar-graph-to-polyline/pg2pl.js":function(t,e,n){"use strict";t.exports=function(t,e){var n=c(t,e);t=n[0];for(var l=(e=n[1]).length,h=(t.length,r(t,e.length)),d=0;d<l;++d)if(h[d].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var p=i(t,e);for(var m=(p=p.filter(function(t){for(var n=t.length,r=[0],i=0;i<n;++i){var o=e[t[i]],u=e[t[(i+1)%n]],c=a(-o[0],o[1]),f=a(-o[0],u[1]),l=a(u[0],o[1]),h=a(u[0],u[1]);r=s(r,s(s(c,f),s(l,h)))}return r[r.length-1]>0})).length,v=new Array(m),g=new Array(m),d=0;d<m;++d){v[d]=d;var _=new Array(m),y=p[d].map(function(t){return e[t]}),b=o([y]),x=0;t:for(var w=0;w<m;++w)if(_[w]=0,d!==w){for(var j=p[w],M=j.length,A=0;A<M;++A){var k=b(e[j[A]]);if(0!==k){k<0&&(_[w]=1,x+=1);continue t}}_[w]=1,x+=1}g[d]=[x,d,_]}g.sort(function(t,e){return e[0]-t[0]});for(var d=0;d<m;++d)for(var _=g[d],E=_[1],z=_[2],w=0;w<m;++w)z[w]&&(v[w]=E);for(var T=function(t){for(var e=new Array(t),n=0;n<t;++n)e[n]=[];return e}(m),d=0;d<m;++d)T[d].push(v[d]),T[v[d]].push(d);for(var S={},N=f(l,!1),d=0;d<m;++d)for(var j=p[d],M=j.length,w=0;w<M;++w){var O=j[w],C=j[(w+1)%M],P=Math.min(O,C)+":"+Math.max(O,C);if(P in S){var B=S[P];T[B].push(d),T[d].push(B),N[O]=N[C]=!0}else S[P]=d}function R(t){for(var e=t.length,n=0;n<e;++n)if(!N[t[n]])return!1;return!0}for(var I=[],D=f(m,-1),d=0;d<m;++d)v[d]!==d||R(p[d])?D[d]=-1:(I.push(d),D[d]=0);var n=[];for(;I.length>0;){var F=I.pop(),L=T[F];u(L,function(t,e){return t-e});var U,q=L.length,Y=D[F];if(0===Y){var j=p[F];U=[j]}for(var d=0;d<q;++d){var H=L[d];if(!(D[H]>=0)&&(D[H]=1^Y,I.push(H),0===Y)){var j=p[H];R(j)||(j.reverse(),U.push(j))}}0===Y&&n.push(U)}return n};var r=n("./node_modules/edges-to-adjacency-list/e2a.js"),i=n("./node_modules/planar-dual/loops.js"),o=n("./node_modules/point-in-big-polygon/pnp-big.js"),a=n("./node_modules/two-product/two-product.js"),s=n("./node_modules/robust-sum/robust-sum.js"),u=n("./node_modules/uniq/uniq.js"),c=n("./node_modules/planar-graph-to-polyline/lib/trim-leaves.js");function f(t,e){for(var n=new Array(t),r=0;r<t;++r)n[r]=e;return n}},"./node_modules/point-in-big-polygon/node_modules/binary-search-bounds/search-bounds.js":function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=["function ",t,"(a,l,h,",r.join(","),"){",o?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return o?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;"),n?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),o?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],!1,i),r("B","x"+t+"y",e,["y"],!0,i),r("P","c(x,y)"+t+"0",e,["y","c"],!1,i),r("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",n,"(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",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/point-in-big-polygon/pnp-big.js":function(t,e,n){t.exports=function(t){for(var e=t.length,n=[],o=[],s=0;s<e;++s)for(var f=t[s],l=f.length,h=l-1,d=0;d<l;h=d++){var p=f[h],m=f[d];p[0]===m[0]?o.push([p,m]):n.push([p,m])}if(0===n.length)return 0===o.length?c:(v=u(o),function(t){return v(t[0],t[1])?0:1});var v;var g=i(n),_=function(t,e){return function(n){var i=a.le(e,n[0]);if(i<0)return 1;var o=t[i];if(!o){if(!(i>0&&e[i]===n[0]))return 1;o=t[i-1]}for(var s=1;o;){var u=o.key,c=r(n,u[0],u[1]);if(u[0][0]<u[1][0])if(c<0)o=o.left;else{if(!(c>0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(g.slabs,g.coordinates);return 0===o.length?_:function(t,e){return function(n){return t(n[0],n[1])?0:e(n)}}(u(o),_)};var r=n("./node_modules/robust-orientation/orientation.js")[3],i=n("./node_modules/slab-decomposition/slabs.js"),o=n("./node_modules/interval-tree-1d/interval-tree.js"),a=n("./node_modules/point-in-big-polygon/node_modules/binary-search-bounds/search-bounds.js");function s(){return!0}function u(t){for(var e={},n=0;n<t.length;++n){var r=t[n],i=r[0][0],a=r[0][1],u=r[1][1],c=[Math.min(a,u),Math.max(a,u)];i in e?e[i].push(c):e[i]=[c]}var f={},l=Object.keys(e);for(n=0;n<l.length;++n){var h=e[l[n]];f[l[n]]=o(h)}return function(t){return function(e,n){var r=t[e];return!!r&&!!r.queryPoint(n,s)}}(f)}function c(t){return 1}},"./node_modules/process/browser.js":function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!f){var t=s(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||f||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/rat-vec/add.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/add.js");t.exports=function(t,e){for(var n=t.length,i=new Array(n),o=0;o<n;++o)i[o]=r(t[o],e[o]);return i}},"./node_modules/rat-vec/index.js":function(t,e,n){"use strict";t.exports=function(t){for(var e=new Array(t.length),n=0;n<t.length;++n)e[n]=r(t[n]);return e};var r=n("./node_modules/big-rat/index.js")},"./node_modules/rat-vec/muls.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/index.js"),i=n("./node_modules/big-rat/mul.js");t.exports=function(t,e){for(var n=r(e),o=t.length,a=new Array(o),s=0;s<o;++s)a[s]=i(t[s],n);return a}},"./node_modules/rat-vec/sub.js":function(t,e,n){"use strict";var r=n("./node_modules/big-rat/sub.js");t.exports=function(t,e){for(var n=t.length,i=new Array(n),o=0;o<n;++o)i[o]=r(t[o],e[o]);return i}},"./node_modules/regl/dist/regl.js":function(t,e,n){t.exports=function(){function t(t,e){this.id=U++,this.type=t,this.data=e}function e(t){return"["+function t(e){if(0===e.length)return[];var n=e.charAt(0),r=e.charAt(e.length-1);if(1<e.length&&n===r&&('"'===n||"'"===n))return['"'+e.substr(1,e.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e))return t(e.substr(0,n.index)).concat(t(n[1])).concat(t(e.substr(n.index+n[0].length)));if(1===(n=e.split(".")).length)return['"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(e=[],r=0;r<n.length;++r)e=e.concat(t(n[r]));return e}(t).join("][")+"]"}function n(t){return"string"==typeof t?t.split():t}function r(t){return"string"==typeof t?document.querySelector(t):t}function i(t){var e,i,o,a,s=t||{};t={};var u=[],c=[],f="undefined"==typeof window?1:window.devicePixelRatio,l=!1,h=function(t){},d=function(){};if("string"==typeof s?e=document.querySelector(s):"object"==typeof s&&("string"==typeof s.nodeName&&"function"==typeof s.appendChild&&"function"==typeof s.getBoundingClientRect?e=s:"function"==typeof s.drawArrays||"function"==typeof s.drawElements?o=(a=s).canvas:("gl"in s?a=s.gl:"canvas"in s?o=r(s.canvas):"container"in s&&(i=r(s.container)),"attributes"in s&&(t=s.attributes),"extensions"in s&&(u=n(s.extensions)),"optionalExtensions"in s&&(c=n(s.optionalExtensions)),"onDone"in s&&(h=s.onDone),"profile"in s&&(l=!!s.profile),"pixelRatio"in s&&(f=+s.pixelRatio))),e&&("canvas"===e.nodeName.toLowerCase()?o=e:i=e),!a){if(!o){if(!(e=function(t,e,n){function r(){var e=window.innerWidth,r=window.innerHeight;t!==document.body&&(r=t.getBoundingClientRect(),e=r.right-r.left,r=r.bottom-r.top),i.width=n*e,i.height=n*r,L(i.style,{width:e+"px",height:r+"px"})}var i=document.createElement("canvas");return L(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&&(i.style.position="absolute",L(t.style,{margin:0,padding:0})),window.addEventListener("resize",r,!1),r(),{canvas:i,onDestroy:function(){window.removeEventListener("resize",r),t.removeChild(i)}}}(i||document.body,0,f)))return null;o=e.canvas,d=e.onDestroy}a=function(t,e){function n(n){try{return t.getContext(n,e)}catch(t){return null}}return n("webgl")||n("experimental-webgl")||n("webgl-experimental")}(o,t)}return a?{gl:a,canvas:o,container:i,extensions:u,optionalExtensions:c,pixelRatio:f,profile:l,onDone:h,onDestroy:d}:(d(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function o(t,e){for(var n=Array(t),r=0;r<t;++r)n[r]=e(r);return n}function a(t){var e,n;return e=(65535<t)<<4,e|=n=(255<(t>>>=e))<<3,(e|=n=(15<(t>>>=n))<<2)|(n=(3<(t>>>=n))<<1)|t>>>n>>1}function s(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=n[a(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){n[a(t.byteLength)>>2].push(t)}var n=o(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,n){var r=null;switch(e){case 5120:r=new Int8Array(t(n),0,n);break;case 5121:r=new Uint8Array(t(n),0,n);break;case 5122:r=new Int16Array(t(2*n),0,n);break;case 5123:r=new Uint16Array(t(2*n),0,n);break;case 5124:r=new Int32Array(t(4*n),0,n);break;case 5125:r=new Uint32Array(t(4*n),0,n);break;case 5126:r=new Float32Array(t(4*n),0,n);break;default:return null}return r.length!==n?r.subarray(0,n):r},freeType:function(t){e(t.buffer)}}}function u(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||X(t.data))}function c(t,e,n,r,i,o){for(var a=0;a<e;++a)for(var s=t[a],u=0;u<n;++u)for(var c=s[u],f=0;f<r;++f)i[o++]=c[f]}function f(t){return 0|$[Object.prototype.toString.call(t)]}function l(t,e){for(var n=0;n<e.length;++n)t[n]=e[n]}function h(t,e,n,r,i,o,a){for(var s=0,u=0;u<n;++u)for(var c=0;c<r;++c)t[s++]=e[i*u+o*c+a]}function d(t,e,n,r){function i(e){this.id=c++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,n.profile&&(this.stats={size:0})}function o(e,n,r){e.byteLength=n.byteLength,t.bufferData(e.type,n,r)}function a(t,e,n,r,i,a){if(t.usage=n,Array.isArray(e)){if(t.dtype=r||5126,0<e.length)if(Array.isArray(e[0])){i=tt(e);for(var s=r=1;s<i.length;++s)r*=i[s];t.dimension=r,e=J(e,i,t.dtype),o(t,e,n),a?t.persistentData=e:V.freeType(e)}else"number"==typeof e[0]?(t.dimension=i,l(i=V.allocType(t.dtype,e.length),e),o(t,i,n),a?t.persistentData=i:V.freeType(i)):X(e[0])&&(t.dimension=e[0].length,t.dtype=r||f(e[0])||5126,e=J(e,[e.length,e[0].length],t.dtype),o(t,e,n),a?t.persistentData=e:V.freeType(e))}else if(X(e))t.dtype=r||f(e),t.dimension=i,o(t,e,n),a&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(u(e)){i=e.shape;var c=e.stride,s=e.offset,d=0,p=0,m=0,v=0;1===i.length?(d=i[0],p=1,m=c[0],v=0):2===i.length&&(d=i[0],p=i[1],m=c[0],v=c[1]),t.dtype=r||f(e.data)||5126,t.dimension=p,h(i=V.allocType(t.dtype,d*p),e.data,d,p,m,v,s),o(t,i,n),a?t.persistentData=i:V.freeType(i)}}function s(n){e.bufferCount--;for(var i=0;i<r.state.length;++i){var o=r.state[i];o.buffer===n&&(t.disableVertexAttribArray(i),o.buffer=null)}t.deleteBuffer(n.buffer),n.buffer=null,delete d[n.id]}var c=0,d={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var p=[];return n.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(d).forEach(function(e){t+=d[e].stats.size}),t}),{create:function(r,o,c,p){function m(e){var r=35044,i=null,o=0,s=0,c=1;return Array.isArray(e)||X(e)||u(e)?i=e:"number"==typeof e?o=0|e:e&&("data"in e&&(i=e.data),"usage"in e&&(r=K[e.usage]),"type"in e&&(s=Q[e.type]),"dimension"in e&&(c=0|e.dimension),"length"in e&&(o=0|e.length)),v.bind(),i?a(v,i,r,s,c,p):(o&&t.bufferData(v.type,o,r),v.dtype=s||5121,v.usage=r,v.dimension=c,v.byteLength=o),n.profile&&(v.stats.size=v.byteLength*et[v.dtype]),m}e.bufferCount++;var v=new i(o);return d[v.id]=v,c||m(r),m._reglType="buffer",m._buffer=v,m.subdata=function(e,n){var r,i=0|(n||0);if(v.bind(),X(e))t.bufferSubData(v.type,i,e);else if(Array.isArray(e)){if(0<e.length)if("number"==typeof e[0]){var o=V.allocType(v.dtype,e.length);l(o,e),t.bufferSubData(v.type,i,o),V.freeType(o)}else(Array.isArray(e[0])||X(e[0]))&&(r=tt(e),o=J(e,r,v.dtype),t.bufferSubData(v.type,i,o),V.freeType(o))}else if(u(e)){r=e.shape;var a=e.stride,s=o=0,c=0,d=0;1===r.length?(o=r[0],s=1,c=a[0],d=0):2===r.length&&(o=r[0],s=r[1],c=a[0],d=a[1]),r=Array.isArray(e.data)?v.dtype:f(e.data),h(r=V.allocType(r,o*s),e.data,o,s,c,d,e.offset),t.bufferSubData(v.type,i,r),V.freeType(r)}return m},n.profile&&(m.stats=v.stats),m.destroy=function(){s(v)},m},createStream:function(t,e){var n=p.pop();return n||(n=new i(t)),n.bind(),a(n,e,35040,0,1,!1),n},destroyStream:function(t){p.push(t)},clear:function(){G(d).forEach(s),p.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof i?t._buffer:null},restore:function(){G(d).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:a}}function p(t,e,n,r){function i(t){this.id=c++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function o(r,i,o,a,s,c,f){if(r.buffer.bind(),i){var l=f;f||X(i)&&(!u(i)||X(i.data))||(l=e.oes_element_index_uint?5125:5123),n._initBuffer(r.buffer,i,o,l,3)}else t.bufferData(34963,c,o),r.buffer.dtype=l||5121,r.buffer.usage=o,r.buffer.dimension=3,r.buffer.byteLength=c;if(l=f,!f){switch(r.buffer.dtype){case 5121:case 5120:l=5121;break;case 5123:case 5122:l=5123;break;case 5125:case 5124:l=5125}r.buffer.dtype=l}r.type=l,0>(i=s)&&(i=r.buffer.byteLength,5123===l?i>>=1:5125===l&&(i>>=2)),r.vertCount=i,i=a,0>a&&(i=4,1===(a=r.buffer.dimension)&&(i=0),2===a&&(i=1),3===a&&(i=4)),r.primType=i}function a(t){r.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},c=0,f={uint8:5121,uint16:5123};e.oes_element_index_uint&&(f.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var l=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)c(t),l.primType=4,l.vertCount=0|t,l.type=5121;else{var e=null,n=35044,r=-1,i=-1,a=0,h=0;Array.isArray(t)||X(t)||u(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(n=K[t.usage]),"primitive"in t&&(r=nt[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=f[t.type]),"length"in t?a=0|t.length:(a=i,5123===h||5122===h?a*=2:5125!==h&&5124!==h||(a*=4))),o(l,e,n,r,i,a,h)}else c(),l.primType=4,l.vertCount=0,l.type=5121;return s}var c=n.create(null,34963,!0),l=new i(c._buffer);return r.elementsCount++,s(t),s._reglType="elements",s._elements=l,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){a(l)},s},createStream:function(t){var e=l.pop();return e||(e=new i(n.create(null,34963,!0,!1)._buffer)),o(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){l.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){G(s).forEach(a)}}}function m(t){for(var e=V.allocType(5123,t.length),n=0;n<t.length;++n)if(isNaN(t[n]))e[n]=65535;else if(1/0===t[n])e[n]=31744;else if(-1/0===t[n])e[n]=64512;else{rt[0]=t[n];var r=it[0],i=r>>>31<<15,o=(r<<1>>>24)-127,r=r>>13&1023;e[n]=-24>o?i:-14>o?i+(r+1024>>-14-o):15<o?i+31744:i+(o+15<<10)+r}return e}function v(t){return Array.isArray(t)||X(t)}function g(t){return"[object "+t+"]"}function _(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function y(t){return!(!Array.isArray(t)||0===t.length||!v(t[0]))}function b(t){return Object.prototype.toString.call(t)}function x(t){if(!t)return!1;var e=b(t);return 0<=dt.indexOf(e)||_(t)||y(t)||u(t)}function w(t,e){36193===t.type?(t.data=m(e),V.freeType(e)):t.data=e}function j(t,e,n,r,i,o){if(t=void 0!==mt[t]?mt[t]:st[t]*pt[e],o&&(t*=6),i){for(r=0;1<=n;)r+=t*n*n,n/=2;return r}return t*n*r}function M(t,e,n,r,i,o,a){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function f(t,e){if("object"==typeof e&&e){"premultiplyAlpha"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),"flipY"in e&&(t.flipY=e.flipY),"alignment"in e&&(t.unpackAlignment=e.alignment),"colorSpace"in e&&(t.colorSpace=Y[e.colorSpace]),"type"in e&&(t.type=H[e.type]);var n=t.width,r=t.height,i=t.channels,o=!1;"shape"in e?(n=e.shape[0],r=e.shape[1],3===e.shape.length&&(i=e.shape[2],o=!0)):("radius"in e&&(n=r=e.radius),"width"in e&&(n=e.width),"height"in e&&(r=e.height),"channels"in e&&(i=e.channels,o=!0)),t.width=0|n,t.height=0|r,t.channels=0|i,n=!1,"format"in e&&(n=e.format,r=t.internalformat=W[n],t.format=dt[r],n in H&&!("type"in e)&&(t.type=H[n]),n in Q&&(t.compressed=!0),n=!0),!o&&n?t.channels=st[t.format]:o&&!n&&t.channels!==at[t.format]&&(t.format=t.internalformat=at[t.channels])}}function l(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function d(t,e){var n=null;if(x(e)?n=e:e&&(f(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),x(e.data)&&(n=e.data)),e.copy){var r=i.viewportWidth,o=i.viewportHeight;t.width=t.width||r-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0}else if(n){if(X(n))t.channels=t.channels||4,t.data=n,"type"in e||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(n)]);else if(_(n)){switch(t.channels=t.channels||4,o=(r=n).length,t.type){case 5121:case 5123:case 5125:case 5126:(o=V.allocType(t.type,o)).set(r),t.data=o;break;case 36193:t.data=m(r)}t.alignment=1,t.needsFree=!0}else if(u(n)){r=n.data,Array.isArray(r)||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(r)]);var a,s,c,l,o=n.shape,h=n.stride;3===o.length?(c=o[2],l=h[2]):l=c=1,a=o[0],s=o[1],o=h[0],h=h[1],t.alignment=1,t.width=a,t.height=s,t.channels=c,t.format=t.internalformat=at[c],t.needsFree=!0,a=l,n=n.offset,c=t.width,l=t.height,s=t.channels;for(var d=V.allocType(36193===t.type?5126:t.type,c*l*s),p=0,g=0;g<l;++g)for(var j=0;j<c;++j)for(var M=0;M<s;++M)d[p++]=r[o*j+h*g+a*M+n];w(t,d)}else if(b(n)===ut||b(n)===ct)b(n)===ut?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(b(n)===ft)t.element=n,t.width=n.width,t.height=n.height,t.channels=4;else if(b(n)===lt)t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(b(n)===ht)t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(y(n)){for(r=t.width||n[0].length,o=t.height||n.length,h=t.channels,h=v(n[0][0])?h||n[0][0].length:h||1,a=Z.shape(n),c=1,l=0;l<a.length;++l)c*=a[l];c=V.allocType(36193===t.type?5126:t.type,c),Z.flatten(n,a,"",c),w(t,c),t.alignment=1,t.width=r,t.height=o,t.channels=h,t.format=t.internalformat=at[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function p(e,n,i,o,a){var s=e.element,u=e.data,c=e.internalformat,f=e.format,h=e.type,d=e.width,p=e.height;l(e),s?t.texSubImage2D(n,a,i,o,f,h,s):e.compressed?t.compressedTexSubImage2D(n,a,i,o,c,d,p,u):e.needsCopy?(r(),t.copyTexSubImage2D(n,a,i,o,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(n,a,i,o,d,p,f,h,u)}function g(){return pt.pop()||new h}function M(t){t.needsFree&&V.freeType(t.data),h.call(t),pt.push(t)}function A(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function k(t,e,n){var r=t.images[0]=g();t.mipmask=1,r.width=t.width=e,r.height=t.height=n,r.channels=t.channels=4}function E(t,e){var n=null;if(x(e))c(n=t.images[0]=g(),t),d(n,e),t.mipmask=1;else if(f(t,e),Array.isArray(e.mipmap))for(var r=e.mipmap,i=0;i<r.length;++i)c(n=t.images[i]=g(),t),n.width>>=i,n.height>>=i,d(n,r[i]),t.mipmask|=1<<i;else c(n=t.images[0]=g(),t),d(n,e),t.mipmask=1;c(t,t.images[0])}function z(e,n){for(var i=e.images,o=0;o<i.length&&i[o];++o){var a=i[o],s=n,u=o,c=a.element,f=a.data,h=a.internalformat,d=a.format,p=a.type,m=a.width,v=a.height,g=a.channels;l(a),c?t.texImage2D(s,u,d,d,p,c):a.compressed?t.compressedTexImage2D(s,u,h,m,v,0,f):a.needsCopy?(r(),t.copyTexImage2D(s,u,d,a.xOffset,a.yOffset,m,v,0)):((a=!f)&&(f=V.zero.allocType(p,m*v*g)),t.texImage2D(s,u,d,m,v,0,d,p,f),a&&f&&V.zero.freeType(f))}}function T(){var t=mt.pop()||new A;s.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function S(t){for(var e=t.images,n=0;n<e.length;++n)e[n]&&M(e[n]),e[n]=null;mt.push(t)}function N(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function O(t,e){"min"in e&&(t.minFilter=q[e.min],0<=ot.indexOf(t.minFilter)&&!("faces"in e)&&(t.genMipmaps=!0)),"mag"in e&&(t.magFilter=U[e.mag]);var n=t.wrapS,r=t.wrapT;if("wrap"in e){var i=e.wrap;"string"==typeof i?n=r=F[i]:Array.isArray(i)&&(n=F[i[0]],r=F[i[1]])}else"wrapS"in e&&(n=F[e.wrapS]),"wrapT"in e&&(r=F[e.wrapT]);if(t.wrapS=n,t.wrapT=r,"anisotropic"in e&&(t.anisotropic=e.anisotropic),"mipmap"in e){switch(n=!1,typeof e.mipmap){case"string":t.mipmapHint=D[e.mipmap],n=t.genMipmaps=!0;break;case"boolean":n=t.genMipmaps=e.mipmap;break;case"object":t.genMipmaps=!1,n=!0}!n||"min"in e||(t.minFilter=9984)}}function C(n,r){t.texParameteri(r,10241,n.minFilter),t.texParameteri(r,10240,n.magFilter),t.texParameteri(r,10242,n.wrapS),t.texParameteri(r,10243,n.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(r,34046,n.anisotropic),n.genMipmaps&&(t.hint(33170,n.mipmapHint),t.generateMipmap(r))}function P(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=vt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new N,a.profile&&(this.stats={size:0})}function B(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function R(){var e=yt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function I(e){var n=e.texture,r=e.unit,i=e.target;0<=r&&(t.activeTexture(33984+r),t.bindTexture(i,null),yt[r]=null),t.deleteTexture(n),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete gt[e.id],o.textureCount--}var D={"don't care":4352,"dont care":4352,nice:4354,fast:4353},F={repeat:10497,clamp:33071,mirror:33648},U={nearest:9728,linear:9729},q=L({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},U),Y={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},W={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},Q={};e.ext_srgb&&(W.srgb=35904,W.srgba=35906),e.oes_texture_float&&(H.float32=H.float=5126),e.oes_texture_half_float&&(H.float16=H["half float"]=36193),e.webgl_depth_texture&&(L(W,{depth:6402,"depth stencil":34041}),L(H,{uint16:5123,uint32:5125,"depth stencil":34042})),e.webgl_compressed_texture_s3tc&&L(Q,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),e.webgl_compressed_texture_atc&&L(Q,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),e.webgl_compressed_texture_pvrtc&&L(Q,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),e.webgl_compressed_texture_etc1&&(Q["rgb etc1"]=36196);var K=Array.prototype.slice.call(t.getParameter(34467));Object.keys(Q).forEach(function(t){var e=Q[t];0<=K.indexOf(e)&&(W[t]=e)});var J=Object.keys(W);n.textureFormats=J;var tt=[];Object.keys(W).forEach(function(t){tt[W[t]]=t});var et=[];Object.keys(H).forEach(function(t){et[H[t]]=t});var nt=[];Object.keys(U).forEach(function(t){nt[U[t]]=t});var rt=[];Object.keys(q).forEach(function(t){rt[q[t]]=t});var it=[];Object.keys(F).forEach(function(t){it[F[t]]=t});var dt=J.reduce(function(t,e){var n=W[e];return 6409===n||6406===n||6409===n||6410===n||6402===n||34041===n?t[n]=n:32855===n||0<=e.indexOf("rgba")?t[n]=6408:t[n]=6407,t},{}),pt=[],mt=[],vt=0,gt={},_t=n.maxTextureUnits,yt=Array(_t).map(function(){return null});return L(P.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var n=0;n<_t;++n){var r=yt[n];if(r){if(0<r.bindCount)continue;r.unit=-1}yt[n]=this,e=n;break}a.profile&&o.maxTextureUnits<e+1&&(o.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&I(this)}}),a.profile&&(o.getTotalTextureSize=function(){var t=0;return Object.keys(gt).forEach(function(e){t+=gt[e].stats.size}),t}),{create2D:function(e,n){function r(t,e){var n=i.texInfo;N.call(n);var o=T();return"number"==typeof t?k(o,0|t,"number"==typeof e?0|e:0|t):t?(O(n,t),E(o,t)):k(o,1,1),n.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,c(i,o),i.internalformat=o.internalformat,r.width=o.width,r.height=o.height,B(i),z(o,3553),C(n,3553),R(),S(o),a.profile&&(i.stats.size=j(i.internalformat,i.type,o.width,o.height,n.genMipmaps,!1)),r.format=tt[i.internalformat],r.type=et[i.type],r.mag=nt[n.magFilter],r.min=rt[n.minFilter],r.wrapS=it[n.wrapS],r.wrapT=it[n.wrapT],r}var i=new P(3553);return gt[i.id]=i,o.textureCount++,r(e,n),r.subimage=function(t,e,n,o){e|=0,n|=0,o|=0;var a=g();return c(a,i),a.width=0,a.height=0,d(a,t),a.width=a.width||(i.width>>o)-e,a.height=a.height||(i.height>>o)-n,B(i),p(a,3553,e,n,o),R(),M(a),r},r.resize=function(e,n){var o=0|e,s=0|n||o;if(o===i.width&&s===i.height)return r;r.width=i.width=o,r.height=i.height=s,B(i);for(var u,c=i.channels,f=i.type,l=0;i.mipmask>>l;++l){var h=o>>l,d=s>>l;if(!h||!d)break;u=V.zero.allocType(f,h*d*c),t.texImage2D(3553,l,i.format,h,d,0,i.format,i.type,u),u&&V.zero.freeType(u)}return R(),a.profile&&(i.stats.size=j(i.internalformat,i.type,o,s,!1,!1)),r},r._reglType="texture2d",r._texture=i,a.profile&&(r.stats=i.stats),r.destroy=function(){i.decRef()},r},createCube:function(e,n,r,i,s,u){function l(t,e,n,r,i,o){var s,u=h.texInfo;for(N.call(u),s=0;6>s;++s)m[s]=T();if("number"!=typeof t&&t){if("object"==typeof t)if(e)E(m[0],t),E(m[1],e),E(m[2],n),E(m[3],r),E(m[4],i),E(m[5],o);else if(O(u,t),f(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)c(m[s],h),E(m[s],t[s]);else for(s=0;6>s;++s)E(m[s],t)}else for(t=0|t||1,s=0;6>s;++s)k(m[s],t,t);for(c(h,m[0]),h.mipmask=u.genMipmaps?(m[0].width<<1)-1:m[0].mipmask,h.internalformat=m[0].internalformat,l.width=m[0].width,l.height=m[0].height,B(h),s=0;6>s;++s)z(m[s],34069+s);for(C(u,34067),R(),a.profile&&(h.stats.size=j(h.internalformat,h.type,l.width,l.height,u.genMipmaps,!0)),l.format=tt[h.internalformat],l.type=et[h.type],l.mag=nt[u.magFilter],l.min=rt[u.minFilter],l.wrapS=it[u.wrapS],l.wrapT=it[u.wrapT],s=0;6>s;++s)S(m[s]);return l}var h=new P(34067);gt[h.id]=h,o.cubeCount++;var m=Array(6);return l(e,n,r,i,s,u),l.subimage=function(t,e,n,r,i){n|=0,r|=0,i|=0;var o=g();return c(o,h),o.width=0,o.height=0,d(o,e),o.width=o.width||(h.width>>i)-n,o.height=o.height||(h.height>>i)-r,B(h),p(o,34069+t,n,r,i),R(),M(o),l},l.resize=function(e){if((e|=0)!==h.width){l.width=h.width=e,l.height=h.height=e,B(h);for(var n=0;6>n;++n)for(var r=0;h.mipmask>>r;++r)t.texImage2D(34069+n,r,h.format,e>>r,e>>r,0,h.format,h.type,null);return R(),a.profile&&(h.stats.size=j(h.internalformat,h.type,l.width,l.height,!1,!0)),l}},l._reglType="textureCube",l._texture=h,a.profile&&(l.stats=h.stats),l.destroy=function(){h.decRef()},l},clear:function(){for(var e=0;e<_t;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),yt[e]=null;G(gt).forEach(I),o.cubeCount=0,o.textureCount=0},getTexture:function(t){return null},restore:function(){G(gt).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var n=0;32>n;++n)if(0!=(e.mipmask&1<<n))if(3553===e.target)t.texImage2D(3553,n,e.internalformat,e.width>>n,e.height>>n,0,e.internalformat,e.type,null);else for(var r=0;6>r;++r)t.texImage2D(34069+r,n,e.internalformat,e.width>>n,e.height>>n,0,e.internalformat,e.type,null);C(e.texInfo,e.target)})}}}function A(t,e,n,r,i,o){function a(t,e,n){this.target=t,this.texture=e,this.renderbuffer=n;var r=t=0;e?(t=e.width,r=e.height):n&&(t=n.width,r=n.height),this.width=t,this.height=r}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function u(t,e,n){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,n){n&&(n.texture?t.framebufferTexture2D(36160,e,n.target,n.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,n.renderbuffer._renderbuffer.renderbuffer))}function f(t){var e=3553,n=null,r=null,i=t;return"object"==typeof t&&(i=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=i._reglType)?n=i:"textureCube"===t?n=i:"renderbuffer"===t&&(r=i,e=36161),new a(e,n,r)}function l(t,e,n,o,s){return n?((t=r.create2D({width:t,height:e,format:o,type:s}))._texture.refCount=0,new a(3553,t,null)):((t=i.create({width:t,height:e,format:o}))._renderbuffer.refCount=0,new a(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function d(t,e,n){t&&(t.texture?t.texture.resize(e,n):t.renderbuffer&&t.renderbuffer.resize(e,n))}function p(){this.id=j++,M[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function m(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,o.framebufferCount--,delete M[e.id]}function g(e){var r;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(r=0;r<i.length;++r)c(36064+r,i[r]);for(r=i.length;r<n.maxColorAttachments;++r)t.framebufferTexture2D(36160,36064+r,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),c(36096,e.depthAttachment),c(36128,e.stencilAttachment),c(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,y.next?y.next.framebuffer:null),y.cur=y.next,t.getError()}function _(t,e){function n(t,e){var i,o=0,a=0,s=!0,c=!0;i=null;var d=!0,p="rgba",v="uint8",_=1,y=null,w=null,j=null,M=!1;"number"==typeof t?(o=0|t,a=0|e||o):t?("shape"in t?(a=t.shape,o=a[0],a=a[1]):("radius"in t&&(o=a=t.radius),"width"in t&&(o=t.width),"height"in t&&(a=t.height)),("color"in t||"colors"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||("colorCount"in t&&(_=0|t.colorCount),"colorTexture"in t&&(d=!!t.colorTexture,p="rgba4"),"colorType"in t&&(v=t.colorType,!d)&&("half float"===v||"float16"===v?p="rgba16f":"float"!==v&&"float32"!==v||(p="rgba32f")),"colorFormat"in t&&(p=t.colorFormat,0<=b.indexOf(p)?d=!0:0<=x.indexOf(p)&&(d=!1))),("depthTexture"in t||"depthStencilTexture"in t)&&(M=!(!t.depthTexture&&!t.depthStencilTexture)),"depth"in t&&("boolean"==typeof t.depth?s=t.depth:(y=t.depth,c=!1)),"stencil"in t&&("boolean"==typeof t.stencil?c=t.stencil:(w=t.stencil,s=!1)),"depthStencil"in t&&("boolean"==typeof t.depthStencil?s=c=t.depthStencil:(j=t.depthStencil,c=s=!1))):o=a=1;var A=null,k=null,E=null,z=null;if(Array.isArray(i))A=i.map(f);else if(i)A=[f(i)];else for(A=Array(_),i=0;i<_;++i)A[i]=l(o,a,d,p,v);for(o=o||A[0].width,a=a||A[0].height,y?k=f(y):s&&!c&&(k=l(o,a,M,"depth","uint32")),w?E=f(w):c&&!s&&(E=l(o,a,!1,"stencil","uint8")),j?z=f(j):!y&&!w&&c&&s&&(z=l(o,a,M,"depth stencil","depth stencil")),s=null,i=0;i<A.length;++i)u(A[i]),A[i]&&A[i].texture&&(c=_t[A[i].texture._texture.format]*yt[A[i].texture._texture.type],null===s&&(s=c));return u(k),u(E),u(z),m(r),r.width=o,r.height=a,r.colorAttachments=A,r.depthAttachment=k,r.stencilAttachment=E,r.depthStencilAttachment=z,n.color=A.map(h),n.depth=h(k),n.stencil=h(E),n.depthStencil=h(z),n.width=r.width,n.height=r.height,g(r),n}var r=new p;return o.framebufferCount++,n(t,e),L(n,{resize:function(t,e){var i=0|t,o=0|e||i;if(i===r.width&&o===r.height)return n;for(var a=r.colorAttachments,s=0;s<a.length;++s)d(a[s],i,o);return d(r.depthAttachment,i,o),d(r.stencilAttachment,i,o),d(r.depthStencilAttachment,i,o),r.width=n.width=i,r.height=n.height=o,g(r),n},_reglType:"framebuffer",_framebuffer:r,destroy:function(){v(r),m(r)},use:function(t){y.setFBO({framebuffer:n},t)}})}var y={cur:null,next:null,dirty:!1,setFBO:null},b=["rgba"],x=["rgba4","rgb565","rgb5 a1"];e.ext_srgb&&x.push("srgba"),e.ext_color_buffer_half_float&&x.push("rgba16f","rgb16f"),e.webgl_color_buffer_float&&x.push("rgba32f");var w=["uint8"];e.oes_texture_half_float&&w.push("half float","float16"),e.oes_texture_float&&w.push("float","float32");var j=0,M={};return L(y,{getFramebuffer:function(t){return"function"==typeof t&&"framebuffer"===t._reglType&&(t=t._framebuffer)instanceof p?t:null},create:_,createCube:function(t){function e(t){var i,o={color:null},a=0,s=null;i="rgba";var u="uint8",c=1;if("number"==typeof t?a=0|t:t?("shape"in t?a=t.shape[0]:("radius"in t&&(a=0|t.radius),"width"in t?a=0|t.width:"height"in t&&(a=0|t.height)),("color"in t||"colors"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||("colorCount"in t&&(c=0|t.colorCount),"colorType"in t&&(u=t.colorType),"colorFormat"in t&&(i=t.colorFormat)),"depth"in t&&(o.depth=t.depth),"stencil"in t&&(o.stencil=t.stencil),"depthStencil"in t&&(o.depthStencil=t.depthStencil)):a=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(c),s={radius:a,format:i,type:u},i=0;i<c;++i)t[i]=r.createCube(s);for(o.color=Array(t.length),i=0;i<t.length;++i)c=t[i],a=a||c.width,o.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(c=0;c<t.length;++c)o.color[c].target=34069+i;0<i&&(o.depth=n[0].depth,o.stencil=n[0].stencil,o.depthStencil=n[0].depthStencil),n[i]?n[i](o):n[i]=_(o)}return L(e,{width:a,height:a,color:t})}var n=Array(6);return e(t),L(e,{faces:n,resize:function(t){var r=0|t;if(r===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(r);for(t=0;6>t;++t)n[t].resize(r);return e.width=e.height=r,e},_reglType:"framebufferCube",destroy:function(){n.forEach(function(t){t.destroy()})}})},clear:function(){G(M).forEach(v)},restore:function(){G(M).forEach(function(e){e.framebuffer=t.createFramebuffer(),g(e)})}})}function k(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function E(t,e,n,r){function i(t,e,n,r){this.name=t,this.id=e,this.location=n,this.info=r}function o(t,e){for(var n=0;n<t.length;++n)if(t[n].id===e.id)return void(t[n].location=e.location);t.push(e)}function a(n,r,i){var o=(i=35632===n?c:f)[r];if(!o){var a=e.str(r),o=t.createShader(n);t.shaderSource(o,a),t.compileShader(o),i[r]=o}return o}function s(t,e){this.id=d++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],r.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function u(n,s){var u,c;u=a(35632,n.fragId),c=a(35633,n.vertId);var f=n.program=t.createProgram();t.attachShader(f,u),t.attachShader(f,c),t.linkProgram(f);var l=t.getProgramParameter(f,35718);r.profile&&(n.stats.uniformsCount=l);var h=n.uniforms;for(u=0;u<l;++u)if(c=t.getActiveUniform(f,u))if(1<c.size)for(var d=0;d<c.size;++d){var p=c.name.replace("[0]","["+d+"]");o(h,new i(p,e.id(p),t.getUniformLocation(f,p),c))}else o(h,new i(c.name,e.id(c.name),t.getUniformLocation(f,c.name),c));for(l=t.getProgramParameter(f,35721),r.profile&&(n.stats.attributesCount=l),h=n.attributes,u=0;u<l;++u)(c=t.getActiveAttrib(f,u))&&o(h,new i(c.name,e.id(c.name),t.getAttribLocation(f,c.name),c))}var c={},f={},l={},h=[],d=0;return r.profile&&(n.getMaxUniformsCount=function(){var t=0;return h.forEach(function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)}),t},n.getMaxAttributesCount=function(){var t=0;return h.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);G(c).forEach(e),c={},G(f).forEach(e),f={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,l={},n.shaderCount=0},program:function(t,e,r){var i=l[e];i||(i=l[e]={});var o=i[t];return o||(o=new s(e,t),n.shaderCount++,u(o),i[t]=o,h.push(o)),o},restore:function(){c={},f={};for(var t=0;t<h.length;++t)u(h[t])},shader:a,frag:-1,vert:-1}}function z(t,e,n,r,i,o,a){function s(i){var o;o=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var a=0,s=0,u=r.framebufferWidth,c=r.framebufferHeight,f=null;return X(i)?f=i:i&&(a=0|i.x,s=0|i.y,u=0|(i.width||r.framebufferWidth-a),c=0|(i.height||r.framebufferHeight-s),f=i.data||null),n(),i=u*c*4,f||(5121===o?f=new Uint8Array(i):5126===o&&(f=f||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(a,s,u,c,6408,o,f),f}return function(t){return t&&"framebuffer"in t?function(t){var n;return e.setFBO({framebuffer:t.framebuffer},function(){n=s(t)}),n}(t):s(t)}}function T(t){return Array.prototype.slice.call(t)}function S(t){return T(t).join("")}function N(){function t(){var t=[],e=[];return L(function(){t.push.apply(t,T(arguments))},{def:function(){var r="v"+n++;return e.push(r),0<arguments.length&&(t.push(r,"="),t.push.apply(t,T(arguments)),t.push(";")),r},toString:function(){return S([0<e.length?"var "+e+";":"",S(t)])}})}function e(){function e(t,e){r(t,e,"=",n.def(t,e),";")}var n=t(),r=t(),i=n.toString,o=r.toString;return L(function(){n.apply(n,T(arguments))},{def:n.def,entry:n,exit:r,save:e,set:function(t,r,i){e(t,r),n(t,r,"=",i,";")},toString:function(){return i()+o()}})}var n=0,r=[],i=[],o=t(),a={};return{global:o,link:function(t){for(var e=0;e<i.length;++e)if(i[e]===t)return r[e];return e="g"+n++,r.push(e),i.push(t),e},block:t,proc:function(t,n){function r(){var t="a"+i.length;return i.push(t),t}var i=[];n=n||0;for(var o=0;o<n;++o)r();var o=e(),s=o.toString;return a[t]=L(o,{arg:r,toString:function(){return S(["function(",i.join(),"){",s(),"}"])}})},scope:e,cond:function(){var t=S(arguments),n=e(),r=e(),i=n.toString,o=r.toString;return L(n,{then:function(){return n.apply(n,T(arguments)),this},else:function(){return r.apply(r,T(arguments)),this},toString:function(){var e=o();return e&&(e="else{"+e+"}"),S(["if(",t,"){",i(),"}",e])}})},compile:function(){var t=['"use strict";',o,"return {"];Object.keys(a).forEach(function(e){t.push('"',e,'":',a[e].toString(),",")}),t.push("}");var e=S(t).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return Function.apply(null,r.concat(e)).apply(null,i)}}}function O(t){return Array.isArray(t)||X(t)||u(t)}function C(t){return t.sort(function(t,e){return"viewport"===t?-1:"viewport"===e?1:t<e?-1:1})}function P(t,e,n,r){this.thisDep=t,this.contextDep=e,this.propDep=n,this.append=r}function B(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function R(t){return new P(!1,!1,!1,t)}function I(t,e){var n=t.type;return 0===n?new P(!0,1<=(n=t.data.length),2<=n,e):4===n?new P((n=t.data).thisDep,n.contextDep,n.propDep,e):new P(3===n,2===n,1===n,e)}function D(t,e,n,r,i,a,s,u,c,f,l,h,d,p,m){function g(t){return t.replace(".","_")}function _(t,e,n){var r=g(t);rt.push(t),et[r]=tt[r]=!!n,it[r]=e}function y(t,e,n){var r=g(t);rt.push(t),Array.isArray(n)?(tt[r]=n.slice(),et[r]=n.slice()):tt[r]=et[r]=n,ot[r]=e}function b(){var t=N(),n=t.link,r=t.global;t.id=ut++,t.batchId="0";var i=n(at),o=t.shared={props:"a0"};Object.keys(at).forEach(function(t){o[t]=r.def(i,".",t)});var a=t.next={},s=t.current={};Object.keys(ot).forEach(function(t){Array.isArray(tt[t])&&(a[t]=r.def(o.next,".",t),s[t]=r.def(o.current,".",t))});var u=t.constants={};Object.keys(st).forEach(function(t){u[t]=r.def(JSON.stringify(st[t]))}),t.invoke=function(e,r){switch(r.type){case 0:var i=["this",o.context,o.props,t.batchId];return e.def(n(r.data),".call(",i.slice(0,Math.max(r.data.length+1,4)),")");case 1:return e.def(o.props,r.data);case 2:return e.def(o.context,r.data);case 3:return e.def("this",r.data);case 4:return r.data.append(t,e),r.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){if((t=e.id(t))in c)return c[t];var r=f.scope[t];return r||(r=f.scope[t]=new Z),c[t]=n(r)},t}function x(t,e){var n=t.static,r=t.dynamic;if("framebuffer"in n){var i=n.framebuffer;return i?(i=u.getFramebuffer(i),R(function(t,e){var n=t.link(i),r=t.shared;return e.set(r.framebuffer,".next",n),r=r.context,e.set(r,".framebufferWidth",n+".width"),e.set(r,".framebufferHeight",n+".height"),n})):R(function(t,e){var n=t.shared;return e.set(n.framebuffer,".next","null"),n=n.context,e.set(n,".framebufferWidth",n+".drawingBufferWidth"),e.set(n,".framebufferHeight",n+".drawingBufferHeight"),"null"})}if("framebuffer"in r){var o=r.framebuffer;return I(o,function(t,e){var n=t.invoke(e,o),r=t.shared,i=r.framebuffer,n=e.def(i,".getFramebuffer(",n,")");return e.set(i,".next",n),r=r.context,e.set(r,".framebufferWidth",n+"?"+n+".width:"+r+".drawingBufferWidth"),e.set(r,".framebufferHeight",n+"?"+n+".height:"+r+".drawingBufferHeight"),n})}return null}function w(t){function n(t){if(t in r){var n=e.id(r[t]);return(t=R(function(){return n})).id=n,t}if(t in i){var o=i[t];return I(o,function(t,e){var n=t.invoke(e,o);return e.def(t.shared.strings,".id(",n,")")})}return null}var r=t.static,i=t.dynamic,o=n("frag"),a=n("vert"),s=null;return B(o)&&B(a)?(s=l.program(a.id,o.id),t=R(function(t,e){return t.link(s)})):t=new P(o&&o.thisDep||a&&a.thisDep,o&&o.contextDep||a&&a.contextDep,o&&o.propDep||a&&a.propDep,function(t,e){var n,r,i=t.shared.shader;return n=o?o.append(t,e):e.def(i,".","frag"),r=a?a.append(t,e):e.def(i,".","vert"),e.def(i+".program("+r+","+n+")")}),{frag:o,vert:a,progVar:t,program:s}}function j(t,e){function n(t,e){if(t in r){var n=0|r[t];return R(function(t,r){return e&&(t.OFFSET=n),n})}if(t in i){var a=i[t];return I(a,function(t,n){var r=t.invoke(n,a);return e&&(t.OFFSET=r),r})}return e&&o?R(function(t,e){return t.OFFSET="0",0}):null}var r=t.static,i=t.dynamic,o=function(){if("elements"in r){var t=r.elements;O(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t));var e=R(function(e,n){if(t){var r=e.link(t);return e.ELEMENTS=r}return e.ELEMENTS=null});return e.value=t,e}if("elements"in i){var n=i.elements;return I(n,function(t,e){var r=t.shared,i=r.isBufferArgs,r=r.elements,o=t.invoke(e,n),a=e.def("null"),i=e.def(i,"(",o,")"),o=t.cond(i).then(a,"=",r,".createStream(",o,");").else(a,"=",r,".getElements(",o,");");return e.entry(o),e.exit(t.cond(i).then(r,".destroyStream(",a,");")),t.ELEMENTS=a})}return null}(),s=n("offset",!0);return{elements:o,primitive:function(){if("primitive"in r){var t=r.primitive;return R(function(e,n){return nt[t]})}if("primitive"in i){var e=i.primitive;return I(e,function(t,n){var r=t.constants.primTypes,i=t.invoke(n,e);return n.def(r,"[",i,"]")})}return o?B(o)?o.value?R(function(t,e){return e.def(t.ELEMENTS,".primType")}):R(function(){return 4}):new P(o.thisDep,o.contextDep,o.propDep,function(t,e){var n=t.ELEMENTS;return e.def(n,"?",n,".primType:",4)}):null}(),count:function(){if("count"in r){var t=0|r.count;return R(function(){return t})}if("count"in i){var e=i.count;return I(e,function(t,n){return t.invoke(n,e)})}return o?B(o)?o?s?new P(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,".vertCount-",t.OFFSET)}):R(function(t,e){return e.def(t.ELEMENTS,".vertCount")}):R(function(){return-1}):new P(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var n=t.ELEMENTS;return t.OFFSET?e.def(n,"?",n,".vertCount-",t.OFFSET,":-1"):e.def(n,"?",n,".vertCount:-1")}):null}(),instances:n("instances",!1),offset:s}}function M(t,n){var r=t.static,o=t.dynamic,a={};return Object.keys(r).forEach(function(t){var n=r[t],o=e.id(t),s=new Z;if(O(n))s.state=1,s.buffer=i.getBuffer(i.create(n,34962,!1,!0)),s.type=0;else{var u=i.getBuffer(n);if(u)s.state=1,s.buffer=u,s.type=0;else if("constant"in n){var c=n.constant;s.buffer="null",s.state=2,"number"==typeof c?s.x=c:bt.forEach(function(t,e){e<c.length&&(s[t]=c[e])})}else{var u=O(n.buffer)?i.getBuffer(i.create(n.buffer,34962,!1,!0)):i.getBuffer(n.buffer),f=0|n.offset,l=0|n.stride,h=0|n.size,d=!!n.normalized,p=0;"type"in n&&(p=Q[n.type]),n=0|n.divisor,s.buffer=u,s.state=1,s.size=h,s.normalized=d,s.type=p||u.dtype,s.offset=f,s.stride=l,s.divisor=n}}a[t]=R(function(t,e){var n=t.attribCache;if(o in n)return n[o];var r={isStream:!1};return Object.keys(s).forEach(function(t){r[t]=s[t]}),s.buffer&&(r.buffer=t.link(s.buffer),r.type=r.type||r.buffer+".dtype"),n[o]=r})}),Object.keys(o).forEach(function(t){var e=o[t];a[t]=I(e,function(t,n){function r(t){n(u[t],"=",i,".",t,"|0;")}var i=t.invoke(n,e),o=t.shared,a=o.isBufferArgs,s=o.buffer,u={isStream:n.def(!1)},c=new Z;c.state=1,Object.keys(c).forEach(function(t){u[t]=n.def(""+c[t])});var f=u.buffer,l=u.type;return n("if(",a,"(",i,")){",u.isStream,"=true;",f,"=",s,".createStream(",34962,",",i,");",l,"=",f,".dtype;","}else{",f,"=",s,".getBuffer(",i,");","if(",f,"){",l,"=",f,".dtype;",'}else if("constant" in ',i,"){",u.state,"=",2,";","if(typeof "+i+'.constant === "number"){',u[bt[0]],"=",i,".constant;",bt.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",bt.map(function(t,e){return u[t]+"="+i+".constant.length>"+e+"?"+i+".constant["+e+"]:0;"}).join(""),"}}else{","if(",a,"(",i,".buffer)){",f,"=",s,".createStream(",34962,",",i,".buffer);","}else{",f,"=",s,".getBuffer(",i,".buffer);","}",l,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",f,".dtype;",u.normalized,"=!!",i,".normalized;"),r("size"),r("offset"),r("stride"),r("divisor"),n("}}"),n.exit("if(",u.isStream,"){",s,".destroyStream(",f,");","}"),u})}),a}function A(t,e,n,r,i){var a=x(t),s=function(t,e,n){function r(t){if(t in i){var n=i[t];t=!0;var r,a,s=0|n.x,u=0|n.y;return"width"in n?r=0|n.width:t=!1,"height"in n?a=0|n.height:t=!1,new P(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,o=r;"width"in n||(o=e.def(i,".","framebufferWidth","-",s));var c=a;return"height"in n||(c=e.def(i,".","framebufferHeight","-",u)),[s,u,o,c]})}if(t in o){var c=o[t];return t=I(c,function(t,e){var n=t.invoke(e,c),r=t.shared.context,i=e.def(n,".x|0"),o=e.def(n,".y|0"),a=e.def('"width" in ',n,"?",n,".width|0:","(",r,".","framebufferWidth","-",i,")"),n=e.def('"height" in ',n,"?",n,".height|0:","(",r,".","framebufferHeight","-",o,")");return[i,o,a,n]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new P(e.thisDep,e.contextDep,e.propDep,function(t,e){var n=t.shared.context;return[0,0,e.def(n,".","framebufferWidth"),e.def(n,".","framebufferHeight")]}):null}var i=t.static,o=t.dynamic;if(t=r("viewport")){var a=t;t=new P(t.thisDep,t.contextDep,t.propDep,function(t,e){var n=a.append(t,e),r=t.shared.context;return e.set(r,".viewportWidth",n[2]),e.set(r,".viewportHeight",n[3]),n})}return{viewport:t,scissor_box:r("scissor.box")}}(t,a),u=j(t),c=function(t,e){var n=t.static,r=t.dynamic,i={};return rt.forEach(function(t){function e(e,o){if(t in n){var s=e(n[t]);i[a]=R(function(){return s})}else if(t in r){var u=r[t];i[a]=I(u,function(t,e){return o(t,e,t.invoke(e,u))})}}var a=g(t);switch(t){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return e(function(t){return t},function(t,e,n){return n});case"depth.func":return e(function(t){return jt[t]},function(t,e,n){return e.def(t.constants.compareFuncs,"[",n,"]")});case"depth.range":return e(function(t){return t},function(t,e,n){return[e.def("+",n,"[0]"),e=e.def("+",n,"[1]")]});case"blend.func":return e(function(t){return[wt["srcRGB"in t?t.srcRGB:t.src],wt["dstRGB"in t?t.dstRGB:t.dst],wt["srcAlpha"in t?t.srcAlpha:t.src],wt["dstAlpha"in t?t.dstAlpha:t.dst]]},function(t,e,n){function r(t,r){return e.def('"',t,r,'" in ',n,"?",n,".",t,r,":",n,".",t)}t=t.constants.blendFuncs;var i=r("src","RGB"),o=r("dst","RGB"),a=(i=e.def(t,"[",i,"]"),e.def(t,"[",r("src","Alpha"),"]"));return[i,o=e.def(t,"[",o,"]"),a,t=e.def(t,"[",r("dst","Alpha"),"]")]});case"blend.equation":return e(function(t){return"string"==typeof t?[$[t],$[t]]:"object"==typeof t?[$[t.rgb],$[t.alpha]]:void 0},function(t,e,n){var r=t.constants.blendEquations,i=e.def(),o=e.def();return(t=t.cond("typeof ",n,'==="string"')).then(i,"=",o,"=",r,"[",n,"];"),t.else(i,"=",r,"[",n,".rgb];",o,"=",r,"[",n,".alpha];"),e(t),[i,o]});case"blend.color":return e(function(t){return o(4,function(e){return+t[e]})},function(t,e,n){return o(4,function(t){return e.def("+",n,"[",t,"]")})});case"stencil.mask":return e(function(t){return 0|t},function(t,e,n){return e.def(n,"|0")});case"stencil.func":return e(function(t){return[jt[t.cmp||"keep"],t.ref||0,"mask"in t?t.mask:-1]},function(t,e,n){return[t=e.def('"cmp" in ',n,"?",t.constants.compareFuncs,"[",n,".cmp]",":",7680),e.def(n,".ref|0"),e=e.def('"mask" in ',n,"?",n,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return e(function(e){return["stencil.opBack"===t?1029:1028,Mt[e.fail||"keep"],Mt[e.zfail||"keep"],Mt[e.zpass||"keep"]]},function(e,n,r){function i(t){return n.def('"',t,'" in ',r,"?",o,"[",r,".",t,"]:",7680)}var o=e.constants.stencilOps;return["stencil.opBack"===t?1029:1028,i("fail"),i("zfail"),i("zpass")]});case"polygonOffset.offset":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,n){return[e.def(n,".factor|0"),e=e.def(n,".units|0")]});case"cull.face":return e(function(t){var e=0;return"front"===t?e=1028:"back"===t&&(e=1029),e},function(t,e,n){return e.def(n,'==="front"?',1028,":",1029)});case"lineWidth":return e(function(t){return t},function(t,e,n){return n});case"frontFace":return e(function(t){return At[t]},function(t,e,n){return e.def(n+'==="cw"?2304:2305')});case"colorMask":return e(function(t){return t.map(function(t){return!!t})},function(t,e,n){return o(4,function(t){return"!!"+n+"["+t+"]"})});case"sample.coverage":return e(function(t){return["value"in t?t.value:1,!!t.invert]},function(t,e,n){return[e.def('"value" in ',n,"?+",n,".value:1"),e=e.def("!!",n,".invert")]})}}),i}(t),f=w(t),l=s.viewport;return l&&(c.viewport=l),l=g("scissor.box"),(s=s[l])&&(c[l]=s),s=0<Object.keys(c).length,(a={framebuffer:a,draw:u,shader:f,state:c,dirty:s}).profile=function(t){var e,n=t.static;if(t=t.dynamic,"profile"in n){var r=!!n.profile;(e=R(function(t,e){return r})).enable=r}else if("profile"in t){var i=t.profile;e=I(i,function(t,e){return t.invoke(e,i)})}return e}(t),a.uniforms=function(t,e){var n=t.static,r=t.dynamic,i={};return Object.keys(n).forEach(function(t){var e,r=n[t];if("number"==typeof r||"boolean"==typeof r)e=R(function(){return r});else if("function"==typeof r){var a=r._reglType;"texture2d"===a||"textureCube"===a?e=R(function(t){return t.link(r)}):"framebuffer"!==a&&"framebufferCube"!==a||(e=R(function(t){return t.link(r.color[0])}))}else v(r)&&(e=R(function(t){return t.global.def("[",o(r.length,function(t){return r[t]}),"]")}));e.value=r,i[t]=e}),Object.keys(r).forEach(function(t){var e=r[t];i[t]=I(e,function(t,n){return t.invoke(n,e)})}),i}(n),a.attributes=M(e),a.context=function(t){var e=t.static,n=t.dynamic,r={};return Object.keys(e).forEach(function(t){var n=e[t];r[t]=R(function(t,e){return"number"==typeof n||"boolean"==typeof n?""+n:t.link(n)})}),Object.keys(n).forEach(function(t){var e=n[t];r[t]=I(e,function(t,n){return t.invoke(n,e)})}),r}(r),a}function k(t,e,n){var r=t.shared.context,i=t.scope();Object.keys(n).forEach(function(o){e.save(r,"."+o),i(r,".",o,"=",n[o].append(t,e),";")}),e(i)}function E(t,e,n,r){var i,o=t.shared,a=o.gl,s=o.framebuffer;J&&(i=e.def(o.extensions,".webgl_draw_buffers"));var u=t.constants,o=u.drawBuffer,u=u.backBuffer;t=n?n.append(t,e):e.def(s,".next"),r||e("if(",t,"!==",s,".cur){"),e("if(",t,"){",a,".bindFramebuffer(",36160,",",t,".framebuffer);"),J&&e(i,".drawBuffersWEBGL(",o,"[",t,".colorAttachments.length]);"),e("}else{",a,".bindFramebuffer(",36160,",null);"),J&&e(i,".drawBuffersWEBGL(",u,");"),e("}",s,".cur=",t,";"),r||e("}")}function z(t,e,n){var r=t.shared,i=r.gl,a=t.current,s=t.next,u=r.current,c=r.next,f=t.cond(u,".dirty");rt.forEach(function(e){var r,l;if(!((e=g(e))in n.state))if(e in s){r=s[e],l=a[e];var h=o(tt[e].length,function(t){return f.def(r,"[",t,"]")});f(t.cond(h.map(function(t,e){return t+"!=="+l+"["+e+"]"}).join("||")).then(i,".",ot[e],"(",h,");",h.map(function(t,e){return l+"["+e+"]="+t}).join(";"),";"))}else r=f.def(c,".",e),h=t.cond(r,"!==",u,".",e),f(h),e in it?h(t.cond(r).then(i,".enable(",it[e],");").else(i,".disable(",it[e],");"),u,".",e,"=",r,";"):h(i,".",ot[e],"(",r,");",u,".",e,"=",r,";")}),0===Object.keys(n.state).length&&f(u,".dirty=false;"),e(f)}function T(t,e,n,r){var i=t.shared,o=t.current,a=i.current,s=i.gl;C(Object.keys(n)).forEach(function(i){var u=n[i];if(!r||r(u)){var c=u.append(t,e);if(it[i]){var f=it[i];B(u)?e(s,c?".enable(":".disable(",f,");"):e(t.cond(c).then(s,".enable(",f,");").else(s,".disable(",f,");")),e(a,".",i,"=",c,";")}else if(v(c)){var l=o[i];e(s,".",ot[i],"(",c,");",c.map(function(t,e){return l+"["+e+"]="+t}).join(";"),";")}else e(s,".",ot[i],"(",c,");",a,".",i,"=",c,";")}})}function S(t,e){K&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function D(t,e,n,r,i){function o(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function a(t){c=e.def(),t(c,"=",o(),";"),"string"==typeof i?t(h,".count+=",i,";"):t(h,".count++;"),p&&(r?(f=e.def(),t(f,"=",m,".getNumPendingQueries();")):t(m,".beginQuery(",h,");"))}function s(t){t(h,".cpuTime+=",o(),"-",c,";"),p&&(r?t(m,".pushScopeStats(",f,",",m,".getNumPendingQueries(),",h,");"):t(m,".endQuery();"))}function u(t){var n=e.def(d,".profile");e(d,".profile=",t,";"),e.exit(d,".profile=",n,";")}var c,f,l=t.shared,h=t.stats,d=l.current,m=l.timer;if(n=n.profile){if(B(n))return void(n.enable?(a(e),s(e.exit),u("true")):u("false"));u(n=n.append(t,e))}else n=e.def(d,".profile");a(l=t.block()),e("if(",n,"){",l,"}"),s(t=t.block()),e.exit("if(",n,"){",t,"}")}function F(t,e,n,r,i){function o(n,r,i){function o(){e("if(!",f,".buffer){",u,".enableVertexAttribArray(",c,");}");var n,o=i.type;n=i.size?e.def(i.size,"||",r):r,e("if(",f,".type!==",o,"||",f,".size!==",n,"||",d.map(function(t){return f+"."+t+"!=="+i[t]}).join("||"),"){",u,".bindBuffer(",34962,",",l,".buffer);",u,".vertexAttribPointer(",[c,n,o,i.normalized,i.stride,i.offset],");",f,".type=",o,";",f,".size=",n,";",d.map(function(t){return f+"."+t+"="+i[t]+";"}).join(""),"}"),K&&(o=i.divisor,e("if(",f,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[c,o],");",f,".divisor=",o,";}"))}function s(){e("if(",f,".buffer){",u,".disableVertexAttribArray(",c,");","}if(",bt.map(function(t,e){return f+"."+t+"!=="+h[e]}).join("||"),"){",u,".vertexAttrib4f(",c,",",h,");",bt.map(function(t,e){return f+"."+t+"="+h[e]+";"}).join(""),"}")}var u=a.gl,c=e.def(n,".location"),f=e.def(a.attributes,"[",c,"]");n=i.state;var l=i.buffer,h=[i.x,i.y,i.z,i.w],d=["buffer","normalized","offset","stride"];1===n?o():2===n?s():(e("if(",n,"===",1,"){"),o(),e("}else{"),s(),e("}"))}var a=t.shared;r.forEach(function(r){var a,s=r.name,u=n.attributes[s];if(u){if(!i(u))return;a=u.append(t,e)}else{if(!i(kt))return;var c=t.scopeAttrib(s);a={},Object.keys(new Z).forEach(function(t){a[t]=e.def(c,".",t)})}o(t.link(r),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(r.info.type),a)})}function L(t,n,r,i,a){for(var s,u=t.shared,c=u.gl,f=0;f<i.length;++f){var l,h=i[f],d=h.name,p=h.info.type,m=r.uniforms[d],h=t.link(h)+".location";if(m){if(!a(m))continue;if(B(m)){if(d=m.value,35678===p||35680===p)p=t.link(d._texture||d.color[0]._texture),n(c,".uniform1i(",h,",",p+".bind());"),n.exit(p,".unbind();");else if(35674===p||35675===p||35676===p)d=t.global.def("new Float32Array(["+Array.prototype.slice.call(d)+"])"),m=2,35675===p?m=3:35676===p&&(m=4),n(c,".uniformMatrix",m,"fv(",h,",false,",d,");");else{switch(p){case 5126:s="1f";break;case 35664:s="2f";break;case 35665:s="3f";break;case 35666:s="4f";break;case 35670:case 5124:s="1i";break;case 35671:case 35667:s="2i";break;case 35672:case 35668:s="3i";break;case 35673:s="4i";break;case 35669:s="4i"}n(c,".uniform",s,"(",h,",",v(d)?Array.prototype.slice.call(d):d,");")}continue}l=m.append(t,n)}else{if(!a(kt))continue;l=n.def(u.uniforms,"[",e.id(d),"]")}switch(35678===p?n("if(",l,"&&",l,'._reglType==="framebuffer"){',l,"=",l,".color[0];","}"):35680===p&&n("if(",l,"&&",l,'._reglType==="framebufferCube"){',l,"=",l,".color[0];","}"),d=1,p){case 35678:case 35680:p=n.def(l,"._texture"),n(c,".uniform1i(",h,",",p,".bind());"),n.exit(p,".unbind();");continue;case 5124:case 35670:s="1i";break;case 35667:case 35671:s="2i",d=2;break;case 35668:case 35672:s="3i",d=3;break;case 35669:case 35673:s="4i",d=4;break;case 5126:s="1f";break;case 35664:s="2f",d=2;break;case 35665:s="3f",d=3;break;case 35666:s="4f",d=4;break;case 35674:s="Matrix2fv";break;case 35675:s="Matrix3fv";break;case 35676:s="Matrix4fv"}if(n(c,".uniform",s,"(",h,","),"M"===s.charAt(0)){var h=Math.pow(p-35674+2,2),g=t.global.def("new Float32Array(",h,")");n("false,(Array.isArray(",l,")||",l," instanceof Float32Array)?",l,":(",o(h,function(t){return g+"["+t+"]="+l+"["+t+"]"}),",",g,")")}else n(1<d?o(d,function(t){return l+"["+t+"]"}):l);n(");")}}function U(t,e,n,r){function i(i){var o=h[i];return o?o.contextDep&&r.contextDynamic||o.propDep?o.append(t,n):o.append(t,e):e.def(l,".",i)}function o(){function t(){n(u,".drawElementsInstancedANGLE(",[p,v,g,m+"<<(("+g+"-5121)>>1)",s],");")}function e(){n(u,".drawArraysInstancedANGLE(",[p,m,v,s],");")}d?_?t():(n("if(",d,"){"),t(),n("}else{"),e(),n("}")):e()}function a(){function t(){n(f+".drawElements("+[p,v,g,m+"<<(("+g+"-5121)>>1)"]+");")}function e(){n(f+".drawArrays("+[p,m,v]+");")}d?_?t():(n("if(",d,"){"),t(),n("}else{"),e(),n("}")):e()}var s,u,c=t.shared,f=c.gl,l=c.draw,h=r.draw,d=function(){var i=h.elements,o=e;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(o=n),i=i.append(t,o)):i=o.def(l,".","elements"),i&&o("if("+i+")"+f+".bindBuffer(34963,"+i+".buffer.buffer);"),i}(),p=i("primitive"),m=i("offset"),v=function(){var i=h.count,o=e;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(o=n),i=i.append(t,o)):i=o.def(l,".","count"),i}();if("number"==typeof v){if(0===v)return}else n("if(",v,"){"),n.exit("}");K&&(s=i("instances"),u=t.instancing);var g=d+".type",_=h.elements&&B(h.elements);K&&("number"!=typeof s||0<=s)?"string"==typeof s?(n("if(",s,">0){"),o(),n("}else if(",s,"<0){"),a(),n("}")):o():a()}function Y(t,e,n,r,i){return e=b(),i=e.proc("body",i),K&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,n,r),e.compile().body}function H(t,e,n,r){S(t,e),F(t,e,n,r.attributes,function(){return!0}),L(t,e,n,r.uniforms,function(){return!0}),U(t,e,e,n)}function V(t,e,n,r){function i(){return!0}t.batchId="a1",S(t,e),F(t,e,n,r.attributes,i),L(t,e,n,r.uniforms,i),U(t,e,e,n)}function W(t,e,n,r){function i(t){return t.contextDep&&a||t.propDep}function o(t){return!i(t)}S(t,e);var a=n.contextDep,s=e.def(),u=e.def();t.shared.props=u,t.batchId=s;var c=t.scope(),f=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",u,"=","a0","[",s,"];",f,"}",c.exit),n.needsContext&&k(t,f,n.context),n.needsFramebuffer&&E(t,f,n.framebuffer),T(t,f,n.state,i),n.profile&&i(n.profile)&&D(t,f,n,!1,!0),r?(F(t,c,n,r.attributes,o),F(t,f,n,r.attributes,i),L(t,c,n,r.uniforms,o),L(t,f,n,r.uniforms,i),U(t,c,f,n)):(e=t.global.def("{}"),r=n.shader.progVar.append(t,f),u=f.def(r,".id"),c=f.def(e,"[",u,"]"),f(t.shared.gl,".useProgram(",r,".program);","if(!",c,"){",c,"=",e,"[",u,"]=",t.link(function(e){return Y(V,t,n,e,2)}),"(",r,");}",c,".call(this,a0[",s,"],",s,");"))}function X(t,n){function r(e){var r=n.shader[e];r&&i.set(o.shader,"."+e,r.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var o=t.shared,a=o.current;k(t,i,n.context),n.framebuffer&&n.framebuffer.append(t,i),C(Object.keys(n.state)).forEach(function(e){var r=n.state[e].append(t,i);v(r)?r.forEach(function(n,r){i.set(t.next[e],"["+r+"]",n)}):i.set(o.next,"."+e,r)}),D(t,i,n,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(e){var r=n.draw[e];r&&i.set(o.draw,"."+e,""+r.append(t,i))}),Object.keys(n.uniforms).forEach(function(r){i.set(o.uniforms,"["+e.id(r)+"]",n.uniforms[r].append(t,i))}),Object.keys(n.attributes).forEach(function(e){var r=n.attributes[e].append(t,i),o=t.scopeAttrib(e);Object.keys(new Z).forEach(function(t){i.set(o,"."+t,r[t])})}),r("vert"),r("frag"),0<Object.keys(n.state).length&&(i(a,".dirty=true;"),i.exit(a,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function G(t,e,n){var r=e.static[n];if(r&&function(t){if("object"==typeof t&&!v(t)){for(var e=Object.keys(t),n=0;n<e.length;++n)if(q.isDynamic(t[e[n]]))return!0;return!1}}(r)){var i=t.global,o=Object.keys(r),a=!1,s=!1,u=!1,c=t.global.def("{}");o.forEach(function(e){var n=r[e];if(q.isDynamic(n))"function"==typeof n&&(n=r[e]=q.unbox(n)),e=I(n,null),a=a||e.thisDep,u=u||e.propDep,s=s||e.contextDep;else{switch(i(c,".",e,"="),typeof n){case"number":i(n);break;case"string":i('"',n,'"');break;case"object":Array.isArray(n)&&i("[",n.join(),"]");break;default:i(t.link(n))}i(";")}}),e.dynamic[n]=new q.DynamicVariable(4,{thisDep:a,contextDep:s,propDep:u,ref:c,append:function(t,e){o.forEach(function(n){var i=r[n];q.isDynamic(i)&&(i=t.invoke(e,i),e(c,".",n,"=",i,";"))})}}),delete e.static[n]}}var Z=f.Record,$={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&($.min=32775,$.max=32776);var K=n.angle_instanced_arrays,J=n.webgl_draw_buffers,tt={dirty:!0,profile:m.profile},et={},rt=[],it={},ot={};_("dither",3024),_("blend.enable",3042),y("blend.color","blendColor",[0,0,0,0]),y("blend.equation","blendEquationSeparate",[32774,32774]),y("blend.func","blendFuncSeparate",[1,0,1,0]),_("depth.enable",2929,!0),y("depth.func","depthFunc",513),y("depth.range","depthRange",[0,1]),y("depth.mask","depthMask",!0),y("colorMask","colorMask",[!0,!0,!0,!0]),_("cull.enable",2884),y("cull.face","cullFace",1029),y("frontFace","frontFace",2305),y("lineWidth","lineWidth",1),_("polygonOffset.enable",32823),y("polygonOffset.offset","polygonOffset",[0,0]),_("sample.alpha",32926),_("sample.enable",32928),y("sample.coverage","sampleCoverage",[1,!1]),_("stencil.enable",2960),y("stencil.mask","stencilMask",-1),y("stencil.func","stencilFunc",[519,0,-1]),y("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),y("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),_("scissor.enable",3089),y("scissor.box","scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),y("viewport","viewport",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var at={gl:t,context:d,strings:e,next:et,current:tt,draw:h,elements:a,buffer:i,shader:l,attributes:f.state,uniforms:c,framebuffer:u,extensions:n,timer:p,isBufferArgs:O},st={primTypes:nt,compareFuncs:jt,blendFuncs:wt,blendEquations:$,stencilOps:Mt,glTypes:Q,orientationType:At};J&&(st.backBuffer=[1029],st.drawBuffer=o(r.maxDrawbuffers,function(t){return 0===t?[0]:o(t,function(t){return 36064+t})}));var ut=0;return{next:et,current:tt,procs:function(){var t=b(),e=t.proc("poll"),n=t.proc("refresh"),i=t.block();e(i),n(i);var a,s=t.shared,u=s.gl,c=s.next,f=s.current;i(f,".dirty=false;"),E(t,e),E(t,n,null,!0),K&&(a=t.link(K));for(var l=0;l<r.maxAttributes;++l){var h=n.def(s.attributes,"[",l,"]"),d=t.cond(h,".buffer");d.then(u,".enableVertexAttribArray(",l,");",u,".bindBuffer(",34962,",",h,".buffer.buffer);",u,".vertexAttribPointer(",l,",",h,".size,",h,".type,",h,".normalized,",h,".stride,",h,".offset);").else(u,".disableVertexAttribArray(",l,");",u,".vertexAttrib4f(",l,",",h,".x,",h,".y,",h,".z,",h,".w);",h,".buffer=null;"),n(d),K&&n(a,".vertexAttribDivisorANGLE(",l,",",h,".divisor);")}return Object.keys(it).forEach(function(r){var o=it[r],a=i.def(c,".",r),s=t.block();s("if(",a,"){",u,".enable(",o,")}else{",u,".disable(",o,")}",f,".",r,"=",a,";"),n(s),e("if(",a,"!==",f,".",r,"){",s,"}")}),Object.keys(ot).forEach(function(r){var a,s,l=ot[r],h=tt[r],d=t.block();d(u,".",l,"("),v(h)?(l=h.length,a=t.global.def(c,".",r),s=t.global.def(f,".",r),d(o(l,function(t){return a+"["+t+"]"}),");",o(l,function(t){return s+"["+t+"]="+a+"["+t+"];"}).join("")),e("if(",o(l,function(t){return a+"["+t+"]!=="+s+"["+t+"]"}).join("||"),"){",d,"}")):(a=i.def(c,".",r),s=i.def(f,".",r),d(a,");",f,".",r,"=",a,";"),e("if(",a,"!==",s,"){",d,"}")),n(d)}),t.compile()}(),compile:function(t,e,n,r,i){var o=b();return o.stats=o.link(i),Object.keys(e.static).forEach(function(t){G(o,e,t)}),xt.forEach(function(e){G(o,t,e)}),n=A(t,e,n,r),function(t,e){var n=t.proc("draw",1);S(t,n),k(t,n,e.context),E(t,n,e.framebuffer),z(t,n,e),T(t,n,e.state),D(t,n,e,!1,!0);var r=e.shader.progVar.append(t,n);if(n(t.shared.gl,".useProgram(",r,".program);"),e.shader.program)H(t,n,e,e.shader.program);else{var i=t.global.def("{}"),o=n.def(r,".id"),a=n.def(i,"[",o,"]");n(t.cond(a).then(a,".call(this,a0);").else(a,"=",i,"[",o,"]=",t.link(function(n){return Y(H,t,e,n,1)}),"(",r,");",a,".call(this,a0);"))}0<Object.keys(e.state).length&&n(t.shared.current,".dirty=true;")}(o,n),X(o,n),function(t,e){function n(t){return t.contextDep&&i||t.propDep}var r=t.proc("batch",2);t.batchId="0",S(t,r);var i=!1,o=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(k(t,r,e.context),o=!1);var a=e.framebuffer,s=!1;if(a?(a.propDep?i=s=!0:a.contextDep&&i&&(s=!0),s||E(t,r,a)):E(t,r,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),z(t,r,e),T(t,r,e.state,function(t){return!n(t)}),e.profile&&n(e.profile)||D(t,r,e,!1,"a1"),e.contextDep=i,e.needsContext=o,e.needsFramebuffer=s,(o=e.shader.progVar).contextDep&&i||o.propDep)W(t,r,e,null);else if(o=o.append(t,r),r(t.shared.gl,".useProgram(",o,".program);"),e.shader.program)W(t,r,e,e.shader.program);else{var a=t.global.def("{}"),s=r.def(o,".id"),u=r.def(a,"[",s,"]");r(t.cond(u).then(u,".call(this,a0,a1);").else(u,"=",a,"[",s,"]=",t.link(function(n){return Y(W,t,e,n,2)}),"(",o,");",u,".call(this,a0,a1);"))}0<Object.keys(e.state).length&&r(t.shared.current,".dirty=true;")}(o,n),o.compile()}}}function F(t,e){for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}var L=function(t,e){for(var n=Object.keys(e),r=0;r<n.length;++r)t[n[r]]=e[n[r]];return t},U=0,q={DynamicVariable:t,define:function(n,r){return new t(n,e(r+""))},isDynamic:function(e){return"function"==typeof e&&!e._reglType||e instanceof t},unbox:function(e,n){return"function"==typeof e?new t(0,e):e},accessor:e},Y={next:"function"==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:"function"==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},H="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},V=s();V.zero=s();var W=function(t,e){var n=1;e.ext_texture_filter_anisotropic&&(n=t.getParameter(34047));var r=1,i=1;e.webgl_draw_buffers&&(r=t.getParameter(34852),i=t.getParameter(36063));var o=!!e.oes_texture_float;if(o){o=t.createTexture(),t.bindTexture(3553,o),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var a=t.createFramebuffer();if(t.bindFramebuffer(36160,a),t.framebufferTexture2D(36160,36064,3553,o,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))o=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=V.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?o=!1:(t.deleteFramebuffer(a),t.deleteTexture(o),o=1===s[0]),V.freeType(s)}}return s=!0,s=t.createTexture(),a=V.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,a),V.freeType(a),t.bindTexture(34067,null),t.deleteTexture(s),s=!t.getError(),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:n,maxDrawbuffers:r,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:o,npotTextureCube:s}},X=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},G=function(t){return Object.keys(t).map(function(e){return t[e]})},Z={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,n,r){var i=1;if(e.length)for(var o=0;o<e.length;++o)i*=e[o];else i=0;switch(n=r||V.allocType(n,i),e.length){case 0:break;case 1:for(r=e[0],e=0;e<r;++e)n[e]=t[e];break;case 2:for(r=e[0],e=e[1],o=i=0;o<r;++o)for(var a=t[o],s=0;s<e;++s)n[i++]=a[s];break;case 3:c(t,e[0],e[1],e[2],n,0);break;default:!function t(e,n,r,i,o){for(var a=1,s=r+1;s<n.length;++s)a*=n[s];var u=n[r];if(4==n.length-r){var f=n[r+1],l=n[r+2];for(n=n[r+3],s=0;s<u;++s)c(e[s],f,l,n,i,o),o+=a}else for(s=0;s<u;++s)t(e[s],n,r+1,i,o),o+=a}(t,e,0,n,0)}return n}},$={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Q={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},K={dynamic:35048,stream:35040,static:35044},J=Z.flatten,tt=Z.shape,et=[];et[5120]=1,et[5122]=2,et[5124]=4,et[5121]=1,et[5123]=2,et[5125]=4,et[5126]=4;var nt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rt=new Float32Array(1),it=new Uint32Array(rt.buffer),ot=[9984,9986,9985,9987],at=[0,6409,6410,6407,6408],st={};st[6409]=st[6406]=st[6402]=1,st[34041]=st[6410]=2,st[6407]=st[35904]=3,st[6408]=st[35906]=4;var ut=g("HTMLCanvasElement"),ct=g("CanvasRenderingContext2D"),ft=g("ImageBitmap"),lt=g("HTMLImageElement"),ht=g("HTMLVideoElement"),dt=Object.keys($).concat([ut,ct,ft,lt,ht]),pt=[];pt[5121]=1,pt[5126]=4,pt[36193]=2,pt[5123]=2,pt[5125]=4;var mt=[];mt[32854]=2,mt[32855]=2,mt[36194]=2,mt[34041]=4,mt[33776]=.5,mt[33777]=.5,mt[33778]=1,mt[33779]=1,mt[35986]=.5,mt[35987]=1,mt[34798]=1,mt[35840]=.5,mt[35841]=.25,mt[35842]=.5,mt[35843]=.25,mt[36196]=.5;var vt=[];vt[32854]=2,vt[32855]=2,vt[36194]=2,vt[33189]=2,vt[36168]=1,vt[34041]=4,vt[35907]=4,vt[34836]=16,vt[34842]=8,vt[34843]=6;var gt=function(t,e,n,r,i){function o(t){this.id=c++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function a(e){var n=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(n),e.renderbuffer=null,e.refCount=0,delete f[e.id],r.renderbufferCount--}var s={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var u=[];Object.keys(s).forEach(function(t){u[s[t]]=t});var c=0,f={};return o.prototype.decRef=function(){0>=--this.refCount&&a(this)},i.profile&&(r.getTotalRenderbufferSize=function(){var t=0;return Object.keys(f).forEach(function(e){t+=f[e].stats.size}),t}),{create:function(e,n){function a(e,n){var r=0,o=0,f=32854;if("object"==typeof e&&e?("shape"in e?(o=e.shape,r=0|o[0],o=0|o[1]):("radius"in e&&(r=o=0|e.radius),"width"in e&&(r=0|e.width),"height"in e&&(o=0|e.height)),"format"in e&&(f=s[e.format])):"number"==typeof e?(r=0|e,o="number"==typeof n?0|n:r):e||(r=o=1),r!==c.width||o!==c.height||f!==c.format)return a.width=c.width=r,a.height=c.height=o,c.format=f,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,f,r,o),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),a.format=u[c.format],a}var c=new o(t.createRenderbuffer());return f[c.id]=c,r.renderbufferCount++,a(e,n),a.resize=function(e,n){var r=0|e,o=0|n||r;return r===c.width&&o===c.height?a:(a.width=c.width=r,a.height=c.height=o,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,r,o),i.profile&&(c.stats.size=vt[c.format]*c.width*c.height),a)},a._reglType="renderbuffer",a._renderbuffer=c,i.profile&&(a.stats=c.stats),a.destroy=function(){c.decRef()},a},clear:function(){G(f).forEach(a)},restore:function(){G(f).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},_t=[];_t[6408]=4,_t[6407]=3;var yt=[];yt[5121]=1,yt[5126]=4,yt[36193]=2;var bt=["x","y","z","w"],xt="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),wt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},jt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Mt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},At={cw:2304,ccw:2305},kt=new P(!1,!1,!1,function(){});return function(t){function e(){if(0===Z.length)w&&w.update(),J=null;else{J=Y.next(e),l();for(var t=Z.length-1;0<=t;--t){var n=Z[t];n&&n(N,null,0)}v.flush(),w&&w.update()}}function n(){!J&&0<Z.length&&(J=Y.next(e))}function r(){J&&(Y.cancel(e),J=null)}function o(t){t.preventDefault(),r(),$.forEach(function(t){t()})}function a(t){v.getError(),_.restore(),B.restore(),C.restore(),R.restore(),I.restore(),U.restore(),w&&w.restore(),V.procs.refresh(),n(),Q.forEach(function(t){t()})}function s(t){function e(t){var e={},n={};return Object.keys(t).forEach(function(r){var i=t[r];q.isDynamic(i)?n[r]=q.unbox(i,r):e[r]=i}),{dynamic:n,static:e}}var n=e(t.context||{}),r=e(t.uniforms||{}),i=e(t.attributes||{}),o=e(function(t){function e(t){if(t in n){var e=n[t];delete n[t],Object.keys(e).forEach(function(r){n[t+"."+r]=e[r]})}}var n=L({},t);return delete n.uniforms,delete n.attributes,delete n.context,"stencil"in n&&n.stencil.op&&(n.stencil.opBack=n.stencil.opFront=n.stencil.op,delete n.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),n}(t));t={gpuTime:0,cpuTime:0,count:0};var n=V.compile(o,i,r,n,t),a=n.draw,s=n.batch,u=n.scope,c=[];return L(function(t,e){var n;if("function"==typeof t)return u.call(this,null,t,0);if("function"==typeof e)if("number"==typeof t)for(n=0;n<t;++n)u.call(this,null,e,n);else{if(!Array.isArray(t))return u.call(this,t,e,0);for(n=0;n<t.length;++n)u.call(this,t[n],e,n)}else if("number"==typeof t){if(0<t)return s.call(this,function(t){for(;c.length<t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return a.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function u(t,e){var n=0;V.procs.poll();var r=e.color;r&&(v.clearColor(+r[0]||0,+r[1]||0,+r[2]||0,+r[3]||0),n|=16384),"depth"in e&&(v.clearDepth(+e.depth),n|=256),"stencil"in e&&(v.clearStencil(0|e.stencil),n|=1024),v.clear(n)}function c(t){return Z.push(t),n(),{cancel:function(){var e=F(Z,t);Z[e]=function t(){var e=F(Z,t);Z[e]=Z[Z.length-1],--Z.length,0>=Z.length&&r()}}}}function f(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,N.viewportWidth=N.framebufferWidth=N.drawingBufferWidth=t[2]=e[2]=v.drawingBufferWidth,N.viewportHeight=N.framebufferHeight=N.drawingBufferHeight=t[3]=e[3]=v.drawingBufferHeight}function l(){N.tick+=1,N.time=m(),f(),V.procs.poll()}function h(){f(),V.procs.refresh(),w&&w.update()}function m(){return(H()-j)/1e3}if(!(t=i(t)))return null;var v=t.gl,g=v.getContextAttributes();v.isContextLost();var _=function(t,e){function n(e){var n;e=e.toLowerCase();try{n=r[e]=t.getExtension(e)}catch(t){}return!!n}for(var r={},i=0;i<e.extensions.length;++i){var o=e.extensions[i];if(!n(o))return e.onDestroy(),e.onDone('"'+o+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(n),{extensions:r,restore:function(){Object.keys(r).forEach(function(t){if(!n(t))throw Error("(regl): error restoring extension "+t)})}}}(v,t);if(!_)return null;var y=function(){var t={"":0},e=[""];return{id:function(n){var r=t[n];return r||(r=t[n]=e.length,e.push(n),r)},str:function(t){return e[t]}}}(),b={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},x=_.extensions,w=function(t,e){function n(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function r(t,e,r){var i=s.pop()||new n;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=r,u.push(i)}var i=e.ext_disjoint_timer_query;if(!i)return null;var o=[],a=[],s=[],u=[],c=[],f=[];return{beginQuery:function(t){var e=o.pop()||i.createQueryEXT();i.beginQueryEXT(35007,e),a.push(e),r(a.length-1,a.length,t)},endQuery:function(){i.endQueryEXT(35007)},pushScopeStats:r,update:function(){var t,e;if(0!==(t=a.length)){f.length=Math.max(f.length,t+1),c.length=Math.max(c.length,t+1),c[0]=0;var n=f[0]=0;for(e=t=0;e<a.length;++e){var r=a[e];i.getQueryObjectEXT(r,34919)?(n+=i.getQueryObjectEXT(r,34918),o.push(r)):a[t++]=r,c[e+1]=n,f[e+1]=t}for(a.length=t,e=t=0;e<u.length;++e){var n=u[e],l=n.startQueryIndex,r=n.endQueryIndex;n.sum+=c[r]-c[l],l=f[l],(r=f[r])===l?(n.stats.gpuTime+=n.sum/1e6,s.push(n)):(n.startQueryIndex=l,n.endQueryIndex=r,u[t++]=n)}u.length=t}},getNumPendingQueries:function(){return a.length},clear:function(){o.push.apply(o,a);for(var t=0;t<o.length;t++)i.deleteQueryEXT(o[t]);a.length=0,o.length=0},restore:function(){a.length=0,o.length=0}}}(0,x),j=H(),T=v.drawingBufferWidth,S=v.drawingBufferHeight,N={tick:0,time:0,viewportWidth:T,viewportHeight:S,framebufferWidth:T,framebufferHeight:S,drawingBufferWidth:T,drawingBufferHeight:S,pixelRatio:t.pixelRatio},O=W(v,x),T=function(t,e,n,r){for(t=n.maxAttributes,e=Array(t),n=0;n<t;++n)e[n]=new k;return{Record:k,scope:{},state:e}}(v,x,O),C=d(v,b,t,T),P=p(v,x,C,b),B=E(v,y,b,t),R=M(v,x,O,function(){V.procs.poll()},N,b,t),I=gt(v,x,0,b,t),U=A(v,x,O,R,I,b),V=D(v,y,x,O,C,P,0,U,{},T,B,{elements:null,primitive:4,count:-1,offset:0,instances:-1},N,w,t),y=z(v,U,V.procs.poll,N),X=V.next,G=v.canvas,Z=[],$=[],Q=[],K=[t.onDestroy],J=null;G&&(G.addEventListener("webglcontextlost",o,!1),G.addEventListener("webglcontextrestored",a,!1));var tt=U.setFBO=s({framebuffer:q.define.call(null,1,"framebuffer")});return h(),g=L(s,{clear:function(t){if("framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;6>e;++e)tt(L({framebuffer:t.framebuffer.faces[e]},t),u);else tt(t,u);else u(0,t)},prop:q.define.bind(null,1),context:q.define.bind(null,2),this:q.define.bind(null,3),draw:s({}),buffer:function(t){return C.create(t,34962,!1,!1)},elements:function(t){return P.create(t,!1)},texture:R.create2D,cube:R.createCube,renderbuffer:I.create,framebuffer:U.create,framebufferCube:U.createCube,attributes:g,frame:c,on:function(t,e){var n;switch(t){case"frame":return c(e);case"lost":n=$;break;case"restore":n=Q;break;case"destroy":n=K}return n.push(e),{cancel:function(){for(var t=0;t<n.length;++t)if(n[t]===e){n[t]=n[n.length-1],n.pop();break}}}},limits:O,hasExtension:function(t){return 0<=O.extensions.indexOf(t.toLowerCase())},read:y,destroy:function(){Z.length=0,r(),G&&(G.removeEventListener("webglcontextlost",o),G.removeEventListener("webglcontextrestored",a)),B.clear(),U.clear(),I.clear(),R.clear(),P.clear(),C.clear(),w&&w.clear(),K.forEach(function(t){t()})},_gl:v,_refresh:h,poll:function(){l(),w&&w.update()},now:m,stats:b}),t.onDone(null,g),g}}()},"./node_modules/robust-in-sphere/in-sphere.js":function(t,e,n){"use strict";var r=n("./node_modules/two-product/two-product.js"),i=n("./node_modules/robust-sum/robust-sum.js"),o=n("./node_modules/robust-subtract/robust-diff.js"),a=n("./node_modules/robust-scale/robust-scale.js"),s=6;function u(t,e){for(var n=new Array(t.length-1),r=1;r<t.length;++r)for(var i=n[r-1]=new Array(t.length-1),o=0,a=0;o<t.length;++o)o!==e&&(i[a++]=t[r][o]);return n}function c(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var e=t.length>>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function f(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var n=t.split("[");return["w",e.substr(1),"m",n[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return f(e,t)}function l(t){if(2===t.length)return[["diff(",f(t[0][0],t[1][1]),",",f(t[1][0],t[0][1]),")"].join("")];for(var e=[],n=0;n<t.length;++n)e.push(["scale(",c(l(u(t,n))),",",(r=n,!0&r?"-":""),t[0][n],")"].join(""));return e;var r}function h(t,e){for(var n=[],r=0;r<e-2;++r)n.push(["prod(m",t,"[",r,"],m",t,"[",r,"])"].join(""));return c(n)}function d(t){for(var e=[],n=[],s=function(t){for(var e=new Array(t),n=0;n<t;++n){e[n]=new Array(t);for(var r=0;r<t;++r)e[n][r]=["m",r,"[",t-n-2,"]"].join("")}return e}(t),f=0;f<t;++f)s[0][f]="1",s[t-1][f]="w"+f;for(f=0;f<t;++f)0==(1&f)?e.push.apply(e,l(u(s,f))):n.push.apply(n,l(u(s,f)));var d=c(e),p=c(n),m="exactInSphere"+t,v=[];for(f=0;f<t;++f)v.push("m"+f);var g=["function ",m,"(",v.join(),"){"];for(f=0;f<t;++f){g.push("var w",f,"=",h(f,t),";");for(var _=0;_<t;++_)_!==f&&g.push("var w",f,"m",_,"=scale(w",f,",m",_,"[0]);")}return g.push("var p=",d,",n=",p,",d=diff(p,n);return d[d.length-1];}return ",m),new Function("sum","diff","prod","scale",g.join(""))(i,o,r,a)}var p=[function(){return 0},function(){return 0},function(){return 0}];function m(t){var e=p[t.length];return e||(e=p[t.length]=d(t.length)),e.apply(void 0,t)}!function(){for(;p.length<=s;)p.push(d(p.length));for(var e=[],n=["slow"],r=0;r<=s;++r)e.push("a"+r),n.push("o"+r);var i=["function testInSphere(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(r=2;r<=s;++r)i.push("case ",r,":return o",r,"(",e.slice(0,r).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere"),n.push(i.join(""));var o=Function.apply(void 0,n);for(t.exports=o.apply(void 0,[m].concat(p)),r=0;r<=s;++r)t.exports[r]=p[r]}()},"./node_modules/robust-orientation/orientation.js":function(t,e,n){"use strict";var r=n("./node_modules/two-product/two-product.js"),i=n("./node_modules/robust-sum/robust-sum.js"),o=n("./node_modules/robust-scale/robust-scale.js"),a=n("./node_modules/robust-subtract/robust-diff.js"),s=5;function u(t,e){for(var n=new Array(t.length-1),r=1;r<t.length;++r)for(var i=n[r-1]=new Array(t.length-1),o=0,a=0;o<t.length;++o)o!==e&&(i[a++]=t[r][o]);return n}function c(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var e=t.length>>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function f(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],n=0;n<t.length;++n)e.push(["scale(",c(f(u(t,n))),",",(r=n,1&r?"-":""),t[0][n],")"].join(""));return e;var r}function l(t){for(var e=[],n=[],s=function(t){for(var e=new Array(t),n=0;n<t;++n){e[n]=new Array(t);for(var r=0;r<t;++r)e[n][r]=["m",r,"[",t-n-1,"]"].join("")}return e}(t),l=[],h=0;h<t;++h)0==(1&h)?e.push.apply(e,f(u(s,h))):n.push.apply(n,f(u(s,h))),l.push("m"+h);var d=c(e),p=c(n),m="orientation"+t+"Exact",v=["function ",m,"(",l.join(),"){var p=",d,",n=",p,",d=sub(p,n);return d[d.length-1];};return ",m].join("");return new Function("sum","prod","scale","sub",v)(i,r,o,a)}var h=l(3),d=l(4),p=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,n){var r,i=(t[1]-n[1])*(e[0]-n[0]),o=(t[0]-n[0])*(e[1]-n[1]),a=i-o;if(i>0){if(o<=0)return a;r=i+o}else{if(!(i<0))return a;if(o>=0)return a;r=-(i+o)}var s=3.3306690738754716e-16*r;return a>=s||a<=-s?a:h(t,e,n)},function(t,e,n,r){var i=t[0]-r[0],o=e[0]-r[0],a=n[0]-r[0],s=t[1]-r[1],u=e[1]-r[1],c=n[1]-r[1],f=t[2]-r[2],l=e[2]-r[2],h=n[2]-r[2],p=o*c,m=a*u,v=a*s,g=i*c,_=i*u,y=o*s,b=f*(p-m)+l*(v-g)+h*(_-y),x=7.771561172376103e-16*((Math.abs(p)+Math.abs(m))*Math.abs(f)+(Math.abs(v)+Math.abs(g))*Math.abs(l)+(Math.abs(_)+Math.abs(y))*Math.abs(h));return b>x||-b>x?b:d(t,e,n,r)}];function m(t){var e=p[t.length];return e||(e=p[t.length]=l(t.length)),e.apply(void 0,t)}!function(){for(;p.length<=s;)p.push(l(p.length));for(var e=[],n=["slow"],r=0;r<=s;++r)e.push("a"+r),n.push("o"+r);var i=["function getOrientation(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(r=2;r<=s;++r)i.push("case ",r,":return o",r,"(",e.slice(0,r).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),n.push(i.join(""));var o=Function.apply(void 0,n);for(t.exports=o.apply(void 0,[m].concat(p)),r=0;r<=s;++r)t.exports[r]=p[r]}()},"./node_modules/robust-product/product.js":function(t,e,n){"use strict";var r=n("./node_modules/robust-sum/robust-sum.js"),i=n("./node_modules/robust-scale/robust-scale.js");t.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var n=[0];if(t.length<e.length)for(var o=0;o<t.length;++o)n=r(n,i(e,t[o]));else for(var o=0;o<e.length;++o)n=r(n,i(t,e[o]));return n}},"./node_modules/robust-scale/robust-scale.js":function(t,e,n){"use strict";var r=n("./node_modules/two-product/two-product.js"),i=n("./node_modules/two-sum/two-sum.js");t.exports=function(t,e){var n=t.length;if(1===n){var o=r(t[0],e);return o[0]?o:[o[1]]}var a=new Array(2*n),s=[.1,.1],u=[.1,.1],c=0;r(t[0],e,s),s[0]&&(a[c++]=s[0]);for(var f=1;f<n;++f){r(t[f],e,u);var l=s[1];i(l,u[0],s),s[0]&&(a[c++]=s[0]);var h=u[1],d=s[1],p=h+d,m=p-h,v=d-m;s[1]=p,v&&(a[c++]=v)}s[1]&&(a[c++]=s[1]);0===c&&(a[c++]=0);return a.length=c,a}},"./node_modules/robust-segment-intersect/segseg.js":function(t,e,n){"use strict";t.exports=function(t,e,n,i){var o=r(t,n,i),a=r(e,n,i);if(o>0&&a>0||o<0&&a<0)return!1;var s=r(n,t,e),u=r(i,t,e);if(s>0&&u>0||s<0&&u<0)return!1;if(0===o&&0===a&&0===s&&0===u)return function(t,e,n,r){for(var i=0;i<2;++i){var o=t[i],a=e[i],s=Math.min(o,a),u=Math.max(o,a),c=n[i],f=r[i],l=Math.min(c,f),h=Math.max(c,f);if(h<s||u<l)return!1}return!0}(t,e,n,i);return!0};var r=n("./node_modules/robust-orientation/orientation.js")[3]},"./node_modules/robust-subtract/robust-diff.js":function(t,e,n){"use strict";t.exports=function(t,e){var n=0|t.length,r=0|e.length;if(1===n&&1===r)return function(t,e){var n=t+e,r=n-t,i=t-(n-r)+(e-r);if(i)return[i,n];return[n]}(t[0],-e[0]);var i,o,a=new Array(n+r),s=0,u=0,c=0,f=Math.abs,l=t[u],h=f(l),d=-e[c],p=f(d);h<p?(o=l,(u+=1)<n&&(l=t[u],h=f(l))):(o=d,(c+=1)<r&&(d=-e[c],p=f(d)));u<n&&h<p||c>=r?(i=l,(u+=1)<n&&(l=t[u],h=f(l))):(i=d,(c+=1)<r&&(d=-e[c],p=f(d)));var m,v,g=i+o,_=g-i,y=o-_,b=y,x=g;for(;u<n&&c<r;)h<p?(i=l,(u+=1)<n&&(l=t[u],h=f(l))):(i=d,(c+=1)<r&&(d=-e[c],p=f(d))),(y=(o=b)-(_=(g=i+o)-i))&&(a[s++]=y),b=x-((m=x+g)-(v=m-x))+(g-v),x=m;for(;u<n;)(y=(o=b)-(_=(g=(i=l)+o)-i))&&(a[s++]=y),b=x-((m=x+g)-(v=m-x))+(g-v),x=m,(u+=1)<n&&(l=t[u]);for(;c<r;)(y=(o=b)-(_=(g=(i=d)+o)-i))&&(a[s++]=y),b=x-((m=x+g)-(v=m-x))+(g-v),x=m,(c+=1)<r&&(d=-e[c]);b&&(a[s++]=b);x&&(a[s++]=x);s||(a[s++]=0);return a.length=s,a}},"./node_modules/robust-sum/robust-sum.js":function(t,e,n){"use strict";t.exports=function(t,e){var n=0|t.length,r=0|e.length;if(1===n&&1===r)return function(t,e){var n=t+e,r=n-t,i=t-(n-r)+(e-r);if(i)return[i,n];return[n]}(t[0],e[0]);var i,o,a=new Array(n+r),s=0,u=0,c=0,f=Math.abs,l=t[u],h=f(l),d=e[c],p=f(d);h<p?(o=l,(u+=1)<n&&(l=t[u],h=f(l))):(o=d,(c+=1)<r&&(d=e[c],p=f(d)));u<n&&h<p||c>=r?(i=l,(u+=1)<n&&(l=t[u],h=f(l))):(i=d,(c+=1)<r&&(d=e[c],p=f(d)));var m,v,g=i+o,_=g-i,y=o-_,b=y,x=g;for(;u<n&&c<r;)h<p?(i=l,(u+=1)<n&&(l=t[u],h=f(l))):(i=d,(c+=1)<r&&(d=e[c],p=f(d))),(y=(o=b)-(_=(g=i+o)-i))&&(a[s++]=y),b=x-((m=x+g)-(v=m-x))+(g-v),x=m;for(;u<n;)(y=(o=b)-(_=(g=(i=l)+o)-i))&&(a[s++]=y),b=x-((m=x+g)-(v=m-x))+(g-v),x=m,(u+=1)<n&&(l=t[u]);for(;c<r;)(y=(o=b)-(_=(g=(i=d)+o)-i))&&(a[s++]=y),b=x-((m=x+g)-(v=m-x))+(g-v),x=m,(c+=1)<r&&(d=e[c]);b&&(a[s++]=b);x&&(a[s++]=x);s||(a[s++]=0);return a.length=s,a}},"./node_modules/signum/sgn.js":function(t,e,n){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},"./node_modules/simplicial-complex/node_modules/bit-twiddle/twiddle.js":function(t,e,n){"use strict";function r(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}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,n;return e=(t>65535)<<4,e|=n=((t>>>=e)>255)<<3,e|=n=((t>>>=n)>15)<<2,(e|=n=((t>>>=n)>3)<<1)|(t>>>=n)>>1},e.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},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.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 n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<<i&255}}(i),e.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,n){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},"./node_modules/simplicial-complex/node_modules/union-find/index.js":function(t,e,n){"use strict";function r(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}t.exports=r,r.prototype.length=function(){return this.roots.length},r.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},r.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var n=e[t];e[t]=e[n],t=n}return t},r.prototype.link=function(t,e){var n=this.find(t),r=this.find(e);if(n!==r){var i=this.ranks,o=this.roots,a=i[n],s=i[r];a<s?o[n]=r:s<a?o[r]=n:(o[r]=n,++i[n])}}},"./node_modules/simplicial-complex/topology.js":function(t,e,n){"use strict";var r=n("./node_modules/simplicial-complex/node_modules/bit-twiddle/twiddle.js"),i=n("./node_modules/simplicial-complex/node_modules/union-find/index.js");function o(t,e){var n=t.length,r=t.length-e.length,i=Math.min;if(r)return r;switch(n){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],a=e[0]+e[1];if(s=o+t[2]-(a+e[2]))return s;var s,u=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(u,t[2])-i(c,e[2]))||i(u+t[2],o)-i(c+e[2],a);default:var f=t.slice(0);f.sort();var l=e.slice(0);l.sort();for(var h=0;h<n;++h)if(r=f[h]-l[h])return r;return 0}}function a(t,e){return o(t[0],e[0])}function s(t,e){if(e){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=[t[i],e[i]];r.sort(a);for(i=0;i<n;++i)t[i]=r[i][0],e[i]=r[i][1];return t}return t.sort(o),t}function u(t){if(0===t.length)return[];for(var e=1,n=t.length,r=1;r<n;++r){var i=t[r];if(o(i,t[r-1])){if(r===e){e++;continue}t[e++]=i}}return t.length=e,t}function c(t,e){for(var n=0,r=t.length-1,i=-1;n<=r;){var a=n+r>>1,s=o(t[a],e);s<=0?(0===s&&(i=a),n=a+1):s>0&&(r=a-1)}return i}function f(t,e){for(var n=new Array(t.length),i=0,a=n.length;i<a;++i)n[i]=[];for(var s=[],u=(i=0,e.length);i<u;++i)for(var f=e[i],l=f.length,h=1,d=1<<l;h<d;++h){s.length=r.popCount(h);for(var p=0,m=0;m<l;++m)h&1<<m&&(s[p++]=f[m]);var v=c(t,s);if(!(v<0))for(;n[v++].push(i),!(v>=t.length||0!==o(t[v],s)););}return n}function l(t,e){if(e<0)return[];for(var n=[],i=(1<<e+1)-1,o=0;o<t.length;++o)for(var a=t[o],u=i;u<1<<a.length;u=r.nextCombination(u)){for(var c=new Array(e+1),f=0,l=0;l<a.length;++l)u&1<<l&&(c[f++]=a[l]);n.push(c)}return s(n)}e.dimension=function(t){for(var e=0,n=Math.max,r=0,i=t.length;r<i;++r)e=n(e,t[r].length);return e-1},e.countVertices=function(t){for(var e=-1,n=Math.max,r=0,i=t.length;r<i;++r)for(var o=t[r],a=0,s=o.length;a<s;++a)e=n(e,o[a]);return e+1},e.cloneCells=function(t){for(var e=new Array(t.length),n=0,r=t.length;n<r;++n)e[n]=t[n].slice(0);return e},e.compareCells=o,e.normalize=s,e.unique=u,e.findCell=c,e.incidence=f,e.dual=function(t,e){if(!e)return f(u(l(t,0)),t);for(var n=new Array(e),r=0;r<e;++r)n[r]=[];r=0;for(var i=t.length;r<i;++r)for(var o=t[r],a=0,s=o.length;a<s;++a)n[o[a]].push(r);return n},e.explode=function(t){for(var e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0|i.length,a=1,u=1<<o;a<u;++a){for(var c=[],f=0;f<o;++f)a>>>f&1&&c.push(i[f]);e.push(c)}return s(e)},e.skeleton=l,e.boundary=function(t){for(var e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length;o<a;++o){for(var u=new Array(i.length-1),c=0,f=0;c<a;++c)c!==o&&(u[f++]=i[c]);e.push(u)}return s(e)},e.connectedComponents=function(t,e){return e?function(t,e){for(var n=new i(e),r=0;r<t.length;++r)for(var o=t[r],a=0;a<o.length;++a)for(var s=a+1;s<o.length;++s)n.link(o[a],o[s]);var u=[],c=n.ranks;for(r=0;r<c.length;++r)c[r]=-1;for(r=0;r<t.length;++r){var f=n.find(t[r][0]);c[f]<0?(c[f]=u.length,u.push([t[r].slice(0)])):u[c[f]].push(t[r].slice(0))}return u}(t,e):function(t){for(var e=u(s(l(t,0))),n=new i(e.length),r=0;r<t.length;++r)for(var o=t[r],a=0;a<o.length;++a)for(var f=c(e,[o[a]]),h=a+1;h<o.length;++h)n.link(f,c(e,[o[h]]));var d=[],p=n.ranks;for(r=0;r<p.length;++r)p[r]=-1;for(r=0;r<t.length;++r){var m=n.find(c(e,[t[r][0]]));p[m]<0?(p[m]=d.length,d.push([t[r].slice(0)])):d[p[m]].push(t[r].slice(0))}return d}(t)}},"./node_modules/simplify-planar-graph/simplify.js":function(t,e,n){"use strict";t.exports=function(t,e,n){for(var o=e.length,a=t.length,s=new Array(o),u=new Array(o),c=new Array(o),f=new Array(o),l=0;l<o;++l)s[l]=u[l]=-1,c[l]=1/0,f[l]=!1;for(var l=0;l<a;++l){var h=t[l];if(2!==h.length)throw new Error("Input must be a graph");var d=h[1],p=h[0];-1!==u[p]?u[p]=-2:u[p]=d,-1!==s[d]?s[d]=-2:s[d]=p}function m(t){if(f[t])return 1/0;var n,i,o,a,c,l=s[t],h=u[t];return l<0||h<0?1/0:(n=e[t],i=e[l],o=e[h],a=Math.abs(r(n,i,o)),c=Math.sqrt(Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)),a/c)}function v(t,e){var n=M[t],r=M[e];M[t]=r,M[e]=n,A[n]=e,A[r]=t}function g(t){return c[M[t]]}function _(t){return 1&t?t-1>>1:(t>>1)-1}function y(t){for(var e=g(t);;){var n=e,r=2*t+1,i=2*(t+1),o=t;if(r<E){var a=g(r);a<n&&(o=r,n=a)}if(i<E){var s=g(i);s<n&&(o=i)}if(o===t)return t;v(t,o),t=o}}function b(t){for(var e=g(t);t>0;){var n=_(t);if(n>=0){var r=g(n);if(e<r){v(t,n),t=n;continue}}return t}}function x(){if(E>0){var t=M[0];return v(0,E-1),E-=1,y(0),t}return-1}function w(t,e){var n=M[t];return c[n]===e?t:(c[n]=-1/0,b(t),x(),c[n]=e,b((E+=1)-1))}function j(t){if(!f[t]){f[t]=!0;var e=s[t],n=u[t];s[n]>=0&&(s[n]=e),u[e]>=0&&(u[e]=n),A[e]>=0&&w(A[e],m(e)),A[n]>=0&&w(A[n],m(n))}}for(var M=[],A=new Array(o),l=0;l<o;++l){var k=c[l]=m(l);k<1/0?(A[l]=M.length,M.push(l)):A[l]=-1}for(var E=M.length,l=E>>1;l>=0;--l)y(l);for(;;){var z=x();if(z<0||c[z]>n)break;j(z)}for(var T=[],l=0;l<o;++l)f[l]||(A[l]=T.length,T.push(e[l].slice()));T.length;function S(t,e){if(t[e]<0)return e;var n=e,r=e;do{var i=t[r];if(!f[r]||i<0||i===r)break;if(i=t[r=i],!f[r]||i<0||i===r)break;r=i,n=t[n]}while(n!==r);for(var o=e;o!==r;o=t[o])t[o]=r;return r}var N=[];return t.forEach(function(t){var e=S(s,t[0]),n=S(u,t[1]);if(e>=0&&n>=0&&e!==n){var r=A[e],i=A[n];r!==i&&N.push([r,i])}}),i.unique(i.normalize(N)),{positions:T,edges:N}};var r=n("./node_modules/robust-orientation/orientation.js"),i=n("./node_modules/simplicial-complex/topology.js")},"./node_modules/slab-decomposition/lib/order-segments.js":function(t,e,n){"use strict";t.exports=function(t,e){var n,o,a,s;if(e[0][0]<e[1][0])n=e[0],o=e[1];else{if(!(e[0][0]>e[1][0]))return i(e,t);n=e[1],o=e[0]}if(t[0][0]<t[1][0])a=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-i(t,e);a=t[1],s=t[0]}var u=r(n,o,s),c=r(n,o,a);if(u<0){if(c<=0)return u}else if(u>0){if(c>=0)return u}else if(c)return c;if(u=r(s,a,o),c=r(s,a,n),u<0){if(c<=0)return u}else if(u>0){if(c>=0)return u}else if(c)return c;return o[0]-s[0]};var r=n("./node_modules/robust-orientation/orientation.js");function i(t,e){var n,i,o,a;if(e[0][0]<e[1][0])n=e[0],i=e[1];else{if(!(e[0][0]>e[1][0])){var s=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),f=Math.max(e[0][1],e[1][1]);return u<c?u-c:s>f?s-f:u-f}n=e[1],i=e[0]}t[0][1]<t[1][1]?(o=t[0],a=t[1]):(o=t[1],a=t[0]);var l=r(i,n,o);return l||((l=r(i,n,a))||a-i)}},"./node_modules/slab-decomposition/node_modules/binary-search-bounds/search-bounds.js":function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=["function ",t,"(a,l,h,",r.join(","),"){",o?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return o?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;"),n?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),o?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],!1,i),r("B","x"+t+"y",e,["y"],!0,i),r("P","c(x,y)"+t+"0",e,["y","c"],!1,i),r("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",n,"(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",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/slab-decomposition/slabs.js":function(t,e,n){"use strict";t.exports=function(t){for(var e=t.length,n=2*e,r=new Array(n),o=0;o<e;++o){var u=t[o],c=u[0][0]<u[1][0];r[2*o]=new l(u[0][0],u,c,o),r[2*o+1]=new l(u[1][0],u,!c,o)}r.sort(function(t,e){var n=t.x-e.x;return n||((n=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1]))});for(var h=i(a),d=[],p=[],m=[],o=0;o<n;){for(var v=r[o].x,g=[];o<n;){var _=r[o];if(_.x!==v)break;o+=1,_.segment[0][0]===_.x&&_.segment[1][0]===_.x?_.create&&(_.segment[0][1]<_.segment[1][1]?(g.push(new f(_.segment[0][1],_.index,!0,!0)),g.push(new f(_.segment[1][1],_.index,!1,!1))):(g.push(new f(_.segment[1][1],_.index,!0,!1)),g.push(new f(_.segment[0][1],_.index,!1,!0)))):h=_.create?h.insert(_.segment,_.index):h.remove(_.segment)}d.push(h.root),p.push(v),m.push(g)}return new s(d,p,m)};var r=n("./node_modules/slab-decomposition/node_modules/binary-search-bounds/search-bounds.js"),i=n("./node_modules/functional-red-black-tree/rbtree.js"),o=n("./node_modules/robust-orientation/orientation.js"),a=n("./node_modules/slab-decomposition/lib/order-segments.js");function s(t,e,n){this.slabs=t,this.coordinates=e,this.horizontal=n}function u(t,e){return t.y-e}function c(t,e){for(var n=null;t;){var r,i,a=t.key;a[0][0]<a[1][0]?(r=a[0],i=a[1]):(r=a[1],i=a[0]);var s=o(r,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==a[1][0])n=t,t=t.right;else{if(u=c(t.right,e))return u;t=t.left}else{if(e[0]!==a[1][0])return t;var u;if(u=c(t.right,e))return u;t=t.left}}return n}function f(t,e,n,r){this.y=t,this.index=e,this.start=n,this.closed=r}function l(t,e,n,r){this.x=t,this.segment=e,this.create=n,this.index=r}s.prototype.castUp=function(t){var e=r.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var n=c(this.slabs[e],t),i=-1;if(n&&(i=n.value),this.coordinates[e]===t[0]){var s=null;if(n&&(s=n.key),e>0){var f=c(this.slabs[e-1],t);f&&(s?a(f.key,s)>0&&(s=f.key,i=f.value):(i=f.value,s=f.key))}var l=this.horizontal[e];if(l.length>0){var h=r.ge(l,t[1],u);if(h<l.length){var d=l[h];if(t[1]===d.y){if(d.closed)return d.index;for(;h<l.length-1&&l[h+1].y===t[1];)if((d=l[h+=1]).closed)return d.index;if(d.y===t[1]&&!d.start){if((h+=1)>=l.length)return i;d=l[h]}}if(d.start)if(s){var p=o(s[0],s[1],[t[0],d.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=d.index)}else i=d.index;else d.y!==t[1]&&(i=d.index)}}}return i}},"./node_modules/surface-nets/surfacenets.js":function(t,e,n){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var n=o(t,e),r=n.length,i=new Array(r),a=new Array(r),s=0;s<r;++s)i[s]=[n[s]],a[s]=[s];return{positions:i,cells:a}}(t,e);var n=t.order.join()+"-"+t.dtype,s=a[n],e=+e||0;s||(s=a[n]=function(t,e){var n=t.length,o=["'use strict';"],a="surfaceNets"+t.join("_")+"d"+e;o.push("var contour=genContour({","order:[",t.join(),"],","scalarArguments: 3,","phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },"),"generic"===e&&o.push("getters:[0],");for(var s=[],u=[],c=0;c<n;++c)s.push("d"+c),u.push("d"+c);for(var c=0;c<1<<n;++c)s.push("v"+c),u.push("v"+c);for(var c=0;c<1<<n;++c)s.push("p"+c),u.push("p"+c);s.push("a","b","c"),u.push("a","c"),o.push("vertex:function vertexFunc(",s.join(),"){");for(var f=[],c=0;c<1<<n;++c)f.push("(p"+c+"<<"+c+")");o.push("var m=(",f.join("+"),")|0;if(m===0||m===",(1<<(1<<n))-1,"){return}");var l=[],h=[];1<<(1<<n)<=128?(o.push("switch(m){"),h=o):o.push("switch(m>>>7){");for(var c=0;c<1<<(1<<n);++c){if(1<<(1<<n)>128&&c%128==0){l.length>0&&h.push("}}");var d="vExtra"+l.length;o.push("case ",c>>>7,":",d,"(m&0x7f,",u.join(),");break;"),h=["function ",d,"(m,",u.join(),"){switch(m){"],l.push(h)}h.push("case ",127&c,":");for(var p=new Array(n),m=new Array(n),v=new Array(n),g=new Array(n),_=0,y=0;y<n;++y)p[y]=[],m[y]=[],v[y]=0,g[y]=0;for(var y=0;y<1<<n;++y)for(var b=0;b<n;++b){var x=y^1<<b;if(!(x>y)&&!(c&1<<x)!=!(c&1<<y)){var w=1;c&1<<x?m[b].push("v"+x+"-v"+y):(m[b].push("v"+y+"-v"+x),w=-w),w<0?(p[b].push("-v"+y+"-v"+x),v[b]+=2):(p[b].push("v"+y+"+v"+x),v[b]-=2),_+=1;for(var j=0;j<n;++j)j!==b&&(x&1<<j?g[j]+=1:g[j]-=1)}}for(var M=[],b=0;b<n;++b)if(0===p[b].length)M.push("d"+b+"-0.5");else{var A="";v[b]<0?A=v[b]+"*c":v[b]>0&&(A="+"+v[b]+"*c");var k=p[b].length/_*.5,E=.5+g[b]/_*.5;M.push("d"+b+"-"+E+"-"+k+"*("+p[b].join("+")+A+")/("+m[b].join("+")+")")}h.push("a.push([",M.join(),"]);","break;")}o.push("}},"),l.length>0&&h.push("}}");for(var z=[],c=0;c<1<<n-1;++c)z.push("v"+c);z.push("c0","c1","p0","p1","a","b","c"),o.push("cell:function cellFunc(",z.join(),"){");var T=i(n-1);o.push("if(p0){b.push(",T.map(function(t){return"["+t.map(function(t){return"v"+t})+"]"}).join(),")}else{b.push(",T.map(function(t){var e=t.slice();return e.reverse(),"["+e.map(function(t){return"v"+t})+"]"}).join(),")}}});function ",a,"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return ",a,";");for(var c=0;c<l.length;++c)o.push(l[c].join(""));return new Function("genContour",o.join(""))(r)}(t.order,t.dtype));return s(t,e)};var r=n("./node_modules/ndarray-extract-contour/contour.js"),i=n("./node_modules/triangulate-hypercube/triangulate-cube.js"),o=n("./node_modules/zero-crossings/zc.js");var a={}},"./node_modules/tiny-emitter/index.js":function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function i(){r.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],i=[];if(r&&e)for(var o=0,a=r.length;o<a;o++)r[o].fn!==e&&r[o].fn._!==e&&i.push(r[o]);return i.length?n[t]=i:delete n[t],this}},t.exports=n},"./node_modules/triangulate-hypercube/triangulate-cube.js":function(t,e,n){"use strict";t.exports=function(t){if(t<0)return[];if(0===t)return[[0]];for(var e=0|Math.round(o(t+1)),n=[],a=0;a<e;++a){for(var s=r.unrank(t,a),u=[0],c=0,f=0;f<s.length;++f)c+=1<<s[f],u.push(c);i(s)<1&&(u[0]=c,u[t]=0),n.push(u)}return n};var r=n("./node_modules/permutation-rank/index.js"),i=n("./node_modules/permutation-parity/permutation-sign.js"),o=n("./node_modules/gamma/index.js")},"./node_modules/two-product/two-product.js":function(t,e,n){"use strict";t.exports=function(t,e,n){var i=t*e,o=r*t,a=o-(o-t),s=t-a,u=r*e,c=u-(u-e),f=e-c,l=s*f-(i-a*c-s*c-a*f);if(n)return n[0]=l,n[1]=i,n;return[l,i]};var r=+(Math.pow(2,27)+1)},"./node_modules/two-sum/two-sum.js":function(t,e,n){"use strict";t.exports=function(t,e,n){var r=t+e,i=r-t,o=e-i,a=t-(r-i);if(n)return n[0]=a+o,n[1]=r,n;return[a+o,r]}},"./node_modules/typed-function/typed-function.js":function(t,e,n){"use strict";var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function t(){function e(t){for(var e,n=0;n<v.types.length;n++){var r=v.types[n];if(r.name===t){e=r.test;break}}if(!e){var i;for(n=0;n<v.types.length;n++)if((r=v.types[n]).name.toLowerCase()==t.toLowerCase()){i=r.name;break}throw new Error('Unknown type "'+t+'"'+(i?'. Did you mean "'+i+'"?':""))}return e}function n(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(r.signatures&&""!=r.name)if(""==e)e=r.name;else if(e!=r.name){var i=new Error("Function names do not match (expected: "+e+", actual: "+r.name+")");throw i.data={actual:r.name,expected:e},i}}return e}function r(t,e,n,r,i){var o,a=c(r),s=i?i.split(","):null,u=t||"unnamed",l=s&&f(s,"any"),h={fn:t,index:n,actual:r,expected:s};o=s?e>n&&!l?"Unexpected type of argument in function "+u+" (expected: "+s.join(" or ")+", actual: "+a+", index: "+n+")":"Too few arguments in function "+u+" (expected: "+s.join(" or ")+", index: "+n+")":"Too many arguments in function "+u+" (expected: "+n+", actual: "+e+")";var d=new TypeError(o);return d.data=h,d}function i(t){this.name=t||"refs",this.categories={}}function o(t,e){if("string"==typeof t){var n=t.trim(),r="..."===n.substr(0,3);if(r&&(n=n.substr(3)),""===n)this.types=["any"];else{this.types=n.split("|");for(var i=0;i<this.types.length;i++)this.types[i]=this.types[i].trim()}}else{if(!Array.isArray(t)){if(t instanceof o)return t.clone();throw new Error("String or Array expected")}this.types=t}this.conversions=[],this.varArgs=r||e||!1,this.anyType=-1!==this.types.indexOf("any")}function a(t,e){var n;if("string"==typeof t)n=""!==t?t.split(","):[];else{if(!Array.isArray(t))throw new Error("string or Array expected");n=t}this.params=new Array(n.length),this.anyType=!1,this.varArgs=!1;for(var r=0;r<n.length;r++){var i=new o(n[r]);if(this.params[r]=i,i.anyType&&(this.anyType=!0),r===n.length-1)this.varArgs=i.varArgs;else if(i.varArgs)throw new SyntaxError('Unexpected variable arguments operator "..."')}this.fn=e}function s(t,e,n,r){this.path=t||[],this.param=t[t.length-1]||null,this.signature=e||null,this.childs=n||[],this.fallThrough=r||!1}function u(t,e){var n=new i,u=function(t){var e,n,r={},i=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];if((e=new a(o,s)).ignore())continue;var u=e.expand();for(n=0;n<u.length;n++){var c=u[n],l=c.toString(),h=r[l];if(h){var d=a.compare(c,h);if(d<0)r[l]=c;else if(0===d)throw new Error('Signature "'+l+'" is defined twice')}else r[l]=c}}for(l in r)r.hasOwnProperty(l)&&i.push(r[l]);for(i.sort(function(t,e){return a.compare(t,e)}),n=0;n<i.length;n++)if((e=i[n]).varArgs)for(var p=e.params.length-1,m=e.params[p],v=0;v<m.types.length;){if(m.conversions[v])for(var g=m.types[v],_=0;_<i.length;_++){var y=i[_],b=y.params[p];if(y!==e&&b&&f(b.types,g)&&!b.conversions[p]){m.types.splice(v,1),m.conversions.splice(v,1),v--;break}}v++}return i}(e);if(0==u.length)throw new Error("No signatures provided");var c=function(t){for(var e=[],n=0;n<t.length;n++)t[n].anyType&&e.push(t[n]);return e}(u),l=function t(e,n,r){var i,a,u,c=n.length,l=[];for(i=0;i<e.length;i++)(a=e[i]).params.length!==c||u||(u=a),null!=a.params[c]&&l.push(a);l.sort(function(t,e){return o.compare(t.params[c],e.params[c])});var h=[];for(i=0;i<l.length;i++){var d=(a=l[i]).params[c],p=h.filter(function(t){return t.param.overlapping(d)})[0];if(p){if(p.param.varArgs)throw new Error('Conflicting types "'+p.param+'" and "'+d+'"');p.signatures.push(a)}else h.push({param:d,signatures:[a]})}var m=[];for(i=0;i<r.length;i++)r[i].paramsStartWith(n)&&m.push(r[i]);var v=!1;for(i=0;i<m.length;i++)if(!f(e,m[i])){v=!0;break}var g=new Array(h.length);for(i=0;i<h.length;i++){var _=h[i];g[i]=t(_.signatures,n.concat(_.param),m)}return new s(n,u,g,v)}(u,[],c),h=[],d=(t||"").replace(/[^a-zA-Z0-9_$]/g,"_"),p=function(t){for(var e=[],n=0;n<t;n++)e[n]="arg"+n;return e}(function(t){for(var e=0,n=0;n<t.length;n++){var r=t[n].params.length;r>e&&(e=r)}return e}(u));h.push("function "+d+"("+p.join(", ")+") {"),h.push(' "use strict";'),h.push(" var name = "+JSON.stringify(t||"")+";"),h.push(l.toCode(n," ",!1)),h.push("}");var m=[n.toCode(),"return "+h.join("\n")].join("\n"),v=new Function(n.name,"createError",m),g=v(n,r);return g.signatures=function(t){for(var e={},n=0;n<t.length;n++){var r=t[n];if(r.fn&&!r.hasConversions()){var i=r.params.join(",");e[i]=r.fn}}return e}(u),g}function c(t){for(var e,n=0;n<v.types.length;n++){var r=v.types[n];if("Object"===r.name)e=r;else if(r.test(t))return r.name}return e&&e.test(t)?e.name:"unknown"}function f(t,e){return-1!==t.indexOf(e)}function l(t){return t[t.length-1]}i.prototype.add=function(t,e){var n=e||"fn";this.categories[n]||(this.categories[n]=[]);var r=this.categories[n].indexOf(t);return-1==r&&(r=this.categories[n].length,this.categories[n].push(t)),n+r},i.prototype.toCode=function(){var t=[],e=this.name+".categories",n=this.categories;for(var r in n)if(n.hasOwnProperty(r))for(var i=n[r],o=0;o<i.length;o++)t.push("var "+r+o+" = "+e+"['"+r+"']["+o+"];");return t.join("\n")},o.compare=function(t,e){if(t.anyType)return 1;if(e.anyType)return-1;if(f(t.types,"Object"))return 1;if(f(e.types,"Object"))return-1;if(t.hasConversions()){if(e.hasConversions()){var n,r,i;for(n=0;n<t.conversions.length;n++)if(void 0!==t.conversions[n]){r=t.conversions[n];break}for(n=0;n<e.conversions.length;n++)if(void 0!==e.conversions[n]){i=e.conversions[n];break}return v.conversions.indexOf(r)-v.conversions.indexOf(i)}return 1}if(e.hasConversions())return-1;var o,a;for(n=0;n<v.types.length;n++)if(v.types[n].name===t.types[0]){o=n;break}for(n=0;n<v.types.length;n++)if(v.types[n].name===e.types[0]){a=n;break}return o-a},o.prototype.overlapping=function(t){for(var e=0;e<this.types.length;e++)if(f(t.types,this.types[e]))return!0;return!1},o.prototype.matches=function(t){return this.anyType||t.anyType||this.overlapping(t)},o.prototype.clone=function(){var t=new o(this.types.slice(),this.varArgs);return t.conversions=this.conversions.slice(),t},o.prototype.hasConversions=function(){return this.conversions.length>0},o.prototype.contains=function(t){for(var e=0;e<this.types.length;e++)if(t[this.types[e]])return!0;return!1},o.prototype.toString=function(t){for(var e=[],n={},r=0;r<this.types.length;r++){var i=this.conversions[r],o=t&&i?i.to:this.types[r];o in n||(n[o]=!0,e.push(o))}return(this.varArgs?"...":"")+e.join("|")},a.prototype.clone=function(){return new a(this.params.slice(),this.fn)},a.prototype.expand=function(){var t=[];return function e(n,r){if(r.length<n.params.length){var i,s,u,c=n.params[r.length];if(c.varArgs){for(s=c.clone(),i=0;i<v.conversions.length;i++)if(u=v.conversions[i],!f(c.types,u.from)&&f(c.types,u.to)){var l=s.types.length;s.types[l]=u.from,s.conversions[l]=u}e(n,r.concat(s))}else{for(i=0;i<c.types.length;i++)e(n,r.concat(new o(c.types[i])));for(i=0;i<v.conversions.length;i++)u=v.conversions[i],!f(c.types,u.from)&&f(c.types,u.to)&&((s=new o(u.from)).conversions[0]=u,e(n,r.concat(s)))}}else t.push(new a(r,n.fn))}(this,[]),t},a.compare=function(t,e){if(t.params.length>e.params.length)return 1;if(t.params.length<e.params.length)return-1;var n,r=t.params.length,i=0,a=0;for(n=0;n<r;n++)t.params[n].hasConversions()&&i++,e.params[n].hasConversions()&&a++;if(i>a)return 1;if(i<a)return-1;for(n=0;n<t.params.length;n++){var s=o.compare(t.params[n],e.params[n]);if(0!==s)return s}return 0},a.prototype.hasConversions=function(){for(var t=0;t<this.params.length;t++)if(this.params[t].hasConversions())return!0;return!1},a.prototype.ignore=function(){for(var t={},e=0;e<v.ignore.length;e++)t[v.ignore[e]]=!0;for(e=0;e<this.params.length;e++)if(this.params[e].contains(t))return!0;return!1},a.prototype.paramsStartWith=function(t){if(0===t.length)return!0;for(var e=l(this.params),n=l(t),r=0;r<t.length;r++){var i=this.params[r]||(e.varArgs?e:null),o=t[r]||(n.varArgs?n:null);if(!i||!o||!i.matches(o))return!1}return!0},a.prototype.toCode=function(t,e){for(var n=new Array(this.params.length),r=0;r<this.params.length;r++){var i=this.params[r],o=i.conversions[0];i.varArgs?n[r]="varArgs":n[r]=o?t.add(o.convert,"convert")+"(arg"+r+")":"arg"+r}var a=this.fn?t.add(this.fn,"signature"):void 0;return a?e+"return "+a+"("+n.join(", ")+"); // signature: "+this.params.join(", "):[].join("\n")},a.prototype.toString=function(){return this.params.join(", ")},s.prototype.toCode=function(t,n){var r=[];if(this.param){var i=this.path.length-1,o=this.param.conversions[0],a="// type: "+(o?o.from+" (convert to "+o.to+")":this.param);if(this.param.varArgs)if(this.param.anyType)r.push(n+"if (arguments.length > "+i+") {"),r.push(n+" var varArgs = [];"),r.push(n+" for (var i = "+i+"; i < arguments.length; i++) {"),r.push(n+" varArgs.push(arguments[i]);"),r.push(n+" }"),r.push(this.signature.toCode(t,n+" ")),r.push(n+"}");else{for(var s=function(n,r){for(var i=[],o=0;o<n.length;o++)i[o]=t.add(e(n[o]),"test")+"("+r+")";return i.join(" || ")}.bind(this),u=this.param.types,c=[],f=0;f<u.length;f++)void 0===this.param.conversions[f]&&c.push(u[f]);r.push(n+"if ("+s(u,"arg"+i)+") { "+a),r.push(n+" var varArgs = [arg"+i+"];"),r.push(n+" for (var i = "+(i+1)+"; i < arguments.length; i++) {"),r.push(n+" if ("+s(c,"arguments[i]")+") {"),r.push(n+" varArgs.push(arguments[i]);");for(var f=0;f<u.length;f++){var l=this.param.conversions[f];if(l){var h=t.add(e(u[f]),"test"),d=t.add(l.convert,"convert");r.push(n+" }"),r.push(n+" else if ("+h+"(arguments[i])) {"),r.push(n+" varArgs.push("+d+"(arguments[i]));")}}r.push(n+" } else {"),r.push(n+" throw createError(name, arguments.length, i, arguments[i], '"+c.join(",")+"');"),r.push(n+" }"),r.push(n+" }"),r.push(this.signature.toCode(t,n+" ")),r.push(n+"}")}else if(this.param.anyType)r.push(n+"// type: any"),r.push(this._innerCode(t,n));else{var p=this.param.types[0],h="any"!==p?t.add(e(p),"test"):null;r.push(n+"if ("+h+"(arg"+i+")) { "+a),r.push(this._innerCode(t,n+" ")),r.push(n+"}")}}else r.push(this._innerCode(t,n));return r.join("\n")},s.prototype._innerCode=function(t,e){var n,r=[];for(this.signature&&(r.push(e+"if (arguments.length === "+this.path.length+") {"),r.push(this.signature.toCode(t,e+" ")),r.push(e+"}")),n=0;n<this.childs.length;n++)r.push(this.childs[n].toCode(t,e));if(!this.fallThrough||this.param&&this.param.anyType){var i=this._exceptions(t,e);i&&r.push(i)}return r.join("\n")},s.prototype._exceptions=function(t,e){var n=this.path.length;if(0===this.childs.length)return[e+"if (arguments.length > "+n+") {",e+" throw createError(name, arguments.length, "+n+", arguments["+n+"]);",e+"}"].join("\n");for(var r={},i=[],o=0;o<this.childs.length;o++){var a=this.childs[o];if(a.param)for(var s=0;s<a.param.types.length;s++){var u=a.param.types[s];u in r||a.param.conversions[s]||(r[u]=!0,i.push(u))}}return e+"throw createError(name, arguments.length, "+n+", arguments["+n+"], '"+i.join(",")+"');"};var h=[{name:"number",test:function(t){return"number"==typeof t}},{name:"string",test:function(t){return"string"==typeof t}},{name:"boolean",test:function(t){return"boolean"==typeof t}},{name:"Function",test:function(t){return"function"==typeof t}},{name:"Array",test:Array.isArray},{name:"Date",test:function(t){return t instanceof Date}},{name:"RegExp",test:function(t){return t instanceof RegExp}},{name:"Object",test:function(t){return"object"==typeof t}},{name:"null",test:function(t){return null===t}},{name:"undefined",test:function(t){return void 0===t}}],d={},p=[],m=[],v={config:d,types:h,conversions:p,ignore:m};return(v=u("typed",{Object:function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(t[r]);var i=n(e);return u(i,t)},"string, Object":u,"...Function":function(t){for(var e,r=n(t),i={},o=0;o<t.length;o++){var a=t[o];if("object"!=typeof a.signatures)throw(e=new TypeError("Function is no typed-function (index: "+o+")")).data={index:o},e;for(var s in a.signatures)if(a.signatures.hasOwnProperty(s))if(i.hasOwnProperty(s)){if(a.signatures[s]!==i[s])throw(e=new Error('Signature "'+s+'" is defined twice')).data={signature:s},e}else i[s]=a.signatures[s]}return u(r,i)}})).config=d,v.types=h,v.conversions=p,v.ignore=m,v.create=t,v.find=function(t,e){if(!t.signatures)throw new TypeError("Function is no typed-function");var n;if("string"==typeof e){n=e.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(e))throw new TypeError("String array or a comma separated string expected");n=e}var i=n.join(","),o=t.signatures[i];if(o)return o;throw new TypeError("Signature not found (signature: "+(t.name||"unnamed")+"("+n.join(", ")+"))")},v.convert=function(t,e){var n=c(t);if(e===n)return t;for(var r=0;r<v.conversions.length;r++){var i=v.conversions[r];if(i.from===n&&i.to===e)return i.convert(t)}throw new Error("Cannot convert from "+n+" to "+e)},v.addType=function(t){if(!t||"string"!=typeof t.name||"function"!=typeof t.test)throw new TypeError("Object with properties {name: string, test: function} expected");v.types.push(t)},v.addConversion=function(t){if(!t||"string"!=typeof t.from||"string"!=typeof t.to||"function"!=typeof t.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");v.conversions.push(t)},v}()})?r.apply(e,i):r)||(t.exports=o)},"./node_modules/typedarray-pool/pool.js":function(t,e,n){"use strict";(function(t,r){var i=n("./node_modules/bit-twiddle/twiddle.js"),o=n("./node_modules/dup/dup.js");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:o([32,0]),UINT16:o([32,0]),UINT32:o([32,0]),INT8:o([32,0]),INT16:o([32,0]),INT32:o([32,0]),FLOAT:o([32,0]),DOUBLE:o([32,0]),DATA:o([32,0]),UINT8C:o([32,0]),BUFFER:o([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s=t.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=o([32,0])),s.BUFFER||(s.BUFFER=o([32,0]));var u=s.DATA,c=s.BUFFER;function f(t){if(t){var e=t.length||t.byteLength,n=i.log2(e);u[n].push(t)}}function l(t){t=i.nextPow2(t);var e=i.log2(t),n=u[e];return n.length>0?n.pop():new ArrayBuffer(t)}function h(t){return new Uint8Array(l(t),0,t)}function d(t){return new Uint16Array(l(2*t),0,t)}function p(t){return new Uint32Array(l(4*t),0,t)}function m(t){return new Int8Array(l(t),0,t)}function v(t){return new Int16Array(l(2*t),0,t)}function g(t){return new Int32Array(l(4*t),0,t)}function _(t){return new Float32Array(l(4*t),0,t)}function y(t){return new Float64Array(l(8*t),0,t)}function b(t){return a?new Uint8ClampedArray(l(t),0,t):h(t)}function x(t){return new DataView(l(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),n=c[e];return n.length>0?n.pop():new r(t)}e.free=function(t){if(r.isBuffer(t))c[i.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,n=0|i.log2(e);u[n].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeInt8=e.freeInt16=e.freeInt32=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){f(t.buffer)},e.freeArrayBuffer=f,e.freeBuffer=function(t){c[i.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return l(t);switch(e){case"uint8":return h(t);case"uint16":return d(t);case"uint32":return p(t);case"int8":return m(t);case"int16":return v(t);case"int32":return g(t);case"float":case"float32":return _(t);case"double":case"float64":return y(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return x(t);default:return null}return null},e.mallocArrayBuffer=l,e.mallocUint8=h,e.mallocUint16=d,e.mallocUint32=p,e.mallocInt8=m,e.mallocInt16=v,e.mallocInt32=g,e.mallocFloat32=e.mallocFloat=_,e.mallocFloat64=e.mallocDouble=y,e.mallocUint8Clamped=b,e.mallocDataView=x,e.mallocBuffer=w,e.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,u[t].length=0,c[t].length=0}}).call(this,n("./node_modules/webpack/buildin/global.js"),n("./node_modules/buffer/index.js").Buffer)},"./node_modules/underscore/underscore.js":function(t,e,n){var r;(function(){var n=this,i=n._,o=Array.prototype,a=Object.prototype,s=Function.prototype,u=o.push,c=o.slice,f=a.toString,l=a.hasOwnProperty,h=Array.isArray,d=Object.keys,p=s.bind,m=Object.create,v=function(){},g=function(t){return t instanceof g?t:this instanceof g?void(this._wrapped=t):new g(t)};t.exports&&(e=t.exports=g),e._=g,g.VERSION="1.8.3";var _=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},y=function(t,e,n){return null==t?g.identity:g.isFunction(t)?_(t,e,n):g.isObject(t)?g.matcher(t):g.property(t)};g.iteratee=function(t,e){return y(t,e,1/0)};var b=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var c=a[u];e&&void 0!==n[c]||(n[c]=o[c])}return n}},x=function(t){if(!g.isObject(t))return{};if(m)return m(t);v.prototype=t;var e=new v;return v.prototype=null,e},w=function(t){return function(e){return null==e?void 0:e[t]}},j=Math.pow(2,53)-1,M=w("length"),A=function(t){var e=M(t);return"number"==typeof e&&e>=0&&e<=j};function k(t){return function(e,n,r,i){n=_(n,i,4);var o=!A(e)&&g.keys(e),a=(o||e).length,s=t>0?0:a-1;return arguments.length<3&&(r=e[o?o[s]:s],s+=t),function(e,n,r,i,o,a){for(;o>=0&&o<a;o+=t){var s=i?i[o]:o;r=n(r,e[s],s,e)}return r}(e,n,r,o,s,a)}}g.each=g.forEach=function(t,e,n){var r,i;if(e=_(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=g.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},g.map=g.collect=function(t,e,n){e=y(e,n);for(var r=!A(t)&&g.keys(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o},g.reduce=g.foldl=g.inject=k(1),g.reduceRight=g.foldr=k(-1),g.find=g.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?g.findIndex(t,e,n):g.findKey(t,e,n))&&-1!==r)return t[r]},g.filter=g.select=function(t,e,n){var r=[];return e=y(e,n),g.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},g.reject=function(t,e,n){return g.filter(t,g.negate(y(e)),n)},g.every=g.all=function(t,e,n){e=y(e,n);for(var r=!A(t)&&g.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},g.some=g.any=function(t,e,n){e=y(e,n);for(var r=!A(t)&&g.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},g.contains=g.includes=g.include=function(t,e,n,r){return A(t)||(t=g.values(t)),("number"!=typeof n||r)&&(n=0),g.indexOf(t,e,n)>=0},g.invoke=function(t,e){var n=c.call(arguments,2),r=g.isFunction(e);return g.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},g.pluck=function(t,e){return g.map(t,g.property(e))},g.where=function(t,e){return g.filter(t,g.matcher(e))},g.findWhere=function(t,e){return g.find(t,g.matcher(e))},g.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e&&null!=t)for(var s=0,u=(t=A(t)?t:g.values(t)).length;s<u;s++)(r=t[s])>o&&(o=r);else e=y(e,n),g.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},g.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e&&null!=t)for(var s=0,u=(t=A(t)?t:g.values(t)).length;s<u;s++)(r=t[s])<o&&(o=r);else e=y(e,n),g.each(t,function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)});return o},g.shuffle=function(t){for(var e,n=A(t)?t:g.values(t),r=n.length,i=Array(r),o=0;o<r;o++)(e=g.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},g.sample=function(t,e,n){return null==e||n?(A(t)||(t=g.values(t)),t[g.random(t.length-1)]):g.shuffle(t).slice(0,Math.max(0,e))},g.sortBy=function(t,e,n){return e=y(e,n),g.pluck(g.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var E=function(t){return function(e,n,r){var i={};return n=y(n,r),g.each(e,function(r,o){var a=n(r,o,e);t(i,r,a)}),i}};g.groupBy=E(function(t,e,n){g.has(t,n)?t[n].push(e):t[n]=[e]}),g.indexBy=E(function(t,e,n){t[n]=e}),g.countBy=E(function(t,e,n){g.has(t,n)?t[n]++:t[n]=1}),g.toArray=function(t){return t?g.isArray(t)?c.call(t):A(t)?g.map(t,g.identity):g.values(t):[]},g.size=function(t){return null==t?0:A(t)?t.length:g.keys(t).length},g.partition=function(t,e,n){e=y(e,n);var r=[],i=[];return g.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},g.first=g.head=g.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:g.initial(t,t.length-e)},g.initial=function(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},g.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:g.rest(t,Math.max(0,t.length-e))},g.rest=g.tail=g.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},g.compact=function(t){return g.filter(t,g.identity)};var z=function(t,e,n,r){for(var i=[],o=0,a=r||0,s=M(t);a<s;a++){var u=t[a];if(A(u)&&(g.isArray(u)||g.isArguments(u))){e||(u=z(u,e,n));var c=0,f=u.length;for(i.length+=f;c<f;)i[o++]=u[c++]}else n||(i[o++]=u)}return i};function T(t){return function(e,n,r){n=y(n,r);for(var i=M(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function S(t,e,n){return function(r,i,o){var a=0,s=M(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),g.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o<s;o+=t)if(r[o]===i)return o;return-1}}g.flatten=function(t,e){return z(t,e,!1)},g.without=function(t){return g.difference(t,c.call(arguments,1))},g.uniq=g.unique=function(t,e,n,r){g.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=y(n,r));for(var i=[],o=[],a=0,s=M(t);a<s;a++){var u=t[a],c=n?n(u,a,t):u;e?(a&&o===c||i.push(u),o=c):n?g.contains(o,c)||(o.push(c),i.push(u)):g.contains(i,u)||i.push(u)}return i},g.union=function(){return g.uniq(z(arguments,!0,!0))},g.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=M(t);r<i;r++){var o=t[r];if(!g.contains(e,o)){for(var a=1;a<n&&g.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},g.difference=function(t){var e=z(arguments,!0,!0,1);return g.filter(t,function(t){return!g.contains(e,t)})},g.zip=function(){return g.unzip(arguments)},g.unzip=function(t){for(var e=t&&g.max(t,M).length||0,n=Array(e),r=0;r<e;r++)n[r]=g.pluck(t,r);return n},g.object=function(t,e){for(var n={},r=0,i=M(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},g.findIndex=T(1),g.findLastIndex=T(-1),g.sortedIndex=function(t,e,n,r){for(var i=(n=y(n,r,1))(e),o=0,a=M(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o},g.indexOf=S(1,g.findIndex,g.sortedIndex),g.lastIndexOf=S(-1,g.findLastIndex),g.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var N=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=x(t.prototype),a=t.apply(o,i);return g.isObject(a)?a:o};g.bind=function(t,e){if(p&&t.bind===p)return p.apply(t,c.call(arguments,1));if(!g.isFunction(t))throw new TypeError("Bind must be called on a function");var n=c.call(arguments,2),r=function(){return N(t,r,e,this,n.concat(c.call(arguments)))};return r},g.partial=function(t){var e=c.call(arguments,1),n=function(){for(var r=0,i=e.length,o=Array(i),a=0;a<i;a++)o[a]=e[a]===g?arguments[r++]:e[a];for(;r<arguments.length;)o.push(arguments[r++]);return N(t,n,this,this,o)};return n},g.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)t[n=arguments[e]]=g.bind(t[n],t);return t},g.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return g.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},g.delay=function(t,e){var n=c.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},g.defer=g.partial(g.delay,g,1),g.throttle=function(t,e,n){var r,i,o,a=null,s=0;n||(n={});var u=function(){s=!1===n.leading?0:g.now(),a=null,o=t.apply(r,i),a||(r=i=null)};return function(){var c=g.now();s||!1!==n.leading||(s=c);var f=e-(c-s);return r=this,i=arguments,f<=0||f>e?(a&&(clearTimeout(a),a=null),s=c,o=t.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(u,f)),o}},g.debounce=function(t,e,n){var r,i,o,a,s,u=function(){var c=g.now()-a;c<e&&c>=0?r=setTimeout(u,e-c):(r=null,n||(s=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=g.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(s=t.apply(o,i),o=i=null),s}},g.wrap=function(t,e){return g.partial(e,t)},g.negate=function(t){return function(){return!t.apply(this,arguments)}},g.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},g.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},g.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},g.once=g.partial(g.before,2);var O=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function P(t,e){var n=C.length,r=t.constructor,i=g.isFunction(r)&&r.prototype||a,o="constructor";for(g.has(t,o)&&!g.contains(e,o)&&e.push(o);n--;)(o=C[n])in t&&t[o]!==i[o]&&!g.contains(e,o)&&e.push(o)}g.keys=function(t){if(!g.isObject(t))return[];if(d)return d(t);var e=[];for(var n in t)g.has(t,n)&&e.push(n);return O&&P(t,e),e},g.allKeys=function(t){if(!g.isObject(t))return[];var e=[];for(var n in t)e.push(n);return O&&P(t,e),e},g.values=function(t){for(var e=g.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},g.mapObject=function(t,e,n){e=y(e,n);for(var r,i=g.keys(t),o=i.length,a={},s=0;s<o;s++)a[r=i[s]]=e(t[r],r,t);return a},g.pairs=function(t){for(var e=g.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},g.invert=function(t){for(var e={},n=g.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},g.functions=g.methods=function(t){var e=[];for(var n in t)g.isFunction(t[n])&&e.push(n);return e.sort()},g.extend=b(g.allKeys),g.extendOwn=g.assign=b(g.keys),g.findKey=function(t,e,n){e=y(e,n);for(var r,i=g.keys(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r},g.pick=function(t,e,n){var r,i,o={},a=t;if(null==a)return o;g.isFunction(e)?(i=g.allKeys(a),r=_(e,n)):(i=z(arguments,!1,!1,1),r=function(t,e,n){return e in n},a=Object(a));for(var s=0,u=i.length;s<u;s++){var c=i[s],f=a[c];r(f,c,a)&&(o[c]=f)}return o},g.omit=function(t,e,n){if(g.isFunction(e))e=g.negate(e);else{var r=g.map(z(arguments,!1,!1,1),String);e=function(t,e){return!g.contains(r,e)}}return g.pick(t,e,n)},g.defaults=b(g.allKeys,!0),g.create=function(t,e){var n=x(t);return e&&g.extendOwn(n,e),n},g.clone=function(t){return g.isObject(t)?g.isArray(t)?t.slice():g.extend({},t):t},g.tap=function(t,e){return e(t),t},g.isMatch=function(t,e){var n=g.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0};var B=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof g&&(t=t._wrapped),e instanceof g&&(e=e._wrapped);var i=f.call(t);if(i!==f.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!(g.isFunction(a)&&a instanceof a&&g.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===t)return r[u]===e;if(n.push(t),r.push(e),o){if((u=t.length)!==e.length)return!1;for(;u--;)if(!B(t[u],e[u],n,r))return!1}else{var c,l=g.keys(t);if(u=l.length,g.keys(e).length!==u)return!1;for(;u--;)if(c=l[u],!g.has(e,c)||!B(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0};g.isEqual=function(t,e){return B(t,e)},g.isEmpty=function(t){return null==t||(A(t)&&(g.isArray(t)||g.isString(t)||g.isArguments(t))?0===t.length:0===g.keys(t).length)},g.isElement=function(t){return!(!t||1!==t.nodeType)},g.isArray=h||function(t){return"[object Array]"===f.call(t)},g.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},g.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){g["is"+t]=function(e){return f.call(e)==="[object "+t+"]"}}),g.isArguments(arguments)||(g.isArguments=function(t){return g.has(t,"callee")}),"object"!=typeof Int8Array&&(g.isFunction=function(t){return"function"==typeof t||!1}),g.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},g.isNaN=function(t){return g.isNumber(t)&&t!==+t},g.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===f.call(t)},g.isNull=function(t){return null===t},g.isUndefined=function(t){return void 0===t},g.has=function(t,e){return null!=t&&l.call(t,e)},g.noConflict=function(){return n._=i,this},g.identity=function(t){return t},g.constant=function(t){return function(){return t}},g.noop=function(){},g.property=w,g.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},g.matcher=g.matches=function(t){return t=g.extendOwn({},t),function(e){return g.isMatch(e,t)}},g.times=function(t,e,n){var r=Array(Math.max(0,t));e=_(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},g.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},g.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},I=g.invert(R),D=function(t){var e=function(e){return t[e]},n="(?:"+g.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};g.escape=D(R),g.unescape=D(I),g.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),g.isFunction(r)?r.call(t):r};var F=0;g.uniqueId=function(t){var e=++F+"";return t?t+e:e},g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var L=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,Y=function(t){return"\\"+U[t]};g.template=function(t,e,n){!e&&n&&(e=n),e=g.defaults({},e,g.templateSettings);var r=RegExp([(e.escape||L).source,(e.interpolate||L).source,(e.evaluate||L).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,s){return o+=t.slice(i,s).replace(q,Y),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var s=function(t){return a.call(this,t,g)},u=e.variable||"obj";return s.source="function("+u+"){\n"+o+"}",s},g.chain=function(t){var e=g(t);return e._chain=!0,e};var H=function(t,e){return t._chain?g(e).chain():e};g.mixin=function(t){g.each(g.functions(t),function(e){var n=g[e]=t[e];g.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),H(this,n.apply(g,t))}})},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];g.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],H(this,n)}}),g.each(["concat","join","slice"],function(t){var e=o[t];g.prototype[t]=function(){return H(this,e.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return g}.apply(e,[]))||(t.exports=r)}).call(this)},"./node_modules/union-find/index.js":function(t,e,n){"use strict";function r(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}t.exports=r;var i=r.prototype;Object.defineProperty(i,"length",{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,n=this.roots;n[t]!==t;)t=n[t];for(;n[e]!==t;){var r=n[e];n[e]=t,e=r}return t},i.link=function(t,e){var n=this.find(t),r=this.find(e);if(n!==r){var i=this.ranks,o=this.roots,a=i[n],s=i[r];a<s?o[n]=r:s<a?o[r]=n:(o[r]=n,++i[n])}}},"./node_modules/uniq/uniq.js":function(t,e,n){"use strict";t.exports=function(t,e,n){return 0===t.length?t:e?(n||t.sort(e),function(t,e){for(var n=1,r=t.length,i=t[0],o=t[0],a=1;a<r;++a)if(o=i,e(i=t[a],o)){if(a===n){n++;continue}t[n++]=i}return t.length=n,t}(t,e)):(n||t.sort(),function(t){for(var e=1,n=t.length,r=t[0],i=t[0],o=1;o<n;++o,i=r)if(i=r,(r=t[o])!==i){if(o===e){e++;continue}t[e++]=r}return t.length=e,t}(t))}},"./node_modules/util-extend/extend.js":function(t,e){t.exports=function(t,e){if(!e||"object"!=typeof e)return t;var n=Object.keys(e),r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}},"./node_modules/vectorize-text/index.js":function(t,e,n){"use strict";t.exports=function(t,e){"object"==typeof e&&null!==e||(e={});return r(t,e.canvas||i,e.context||o,e)};var r=n("./node_modules/vectorize-text/lib/vtext.js"),i=null,o=null;"undefined"!=typeof document&&((i=document.createElement("canvas")).width=8192,i.height=1024,o=i.getContext("2d"))},"./node_modules/vectorize-text/lib/vtext.js":function(t,e,n){t.exports=function(t,e,n,r){var o=64,a=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};r&&(r.size&&r.size>0&&(o=r.size),r.lineSpacing&&r.lineSpacing>0&&(a=r.lineSpacing),r.styletags&&r.styletags.breaklines&&(s.breaklines=!!r.styletags.breaklines),r.styletags&&r.styletags.bolds&&(s.bolds=!!r.styletags.bolds),r.styletags&&r.styletags.italics&&(s.italics=!!r.styletags.italics),r.styletags&&r.styletags.subscripts&&(s.subscripts=!!r.styletags.subscripts),r.styletags&&r.styletags.superscripts&&(s.superscripts=!!r.styletags.superscripts));return n.font=[r.fontStyle,r.fontVariant,r.fontWeight,o+"px",r.font].filter(function(t){return t}).join(" "),n.textAlign="start",n.textBaseline="alphabetic",n.direction="ltr",w(function(t,e,n,r,o,a){n=n.replace(/\n/g,""),n=!0===a.breaklines?n.replace(/\<br\>/g,"\n"):n.replace(/\<br\>/g," ");var s="",u=[];for(j=0;j<n.length;++j)u[j]=s;!0===a.bolds&&(u=y(c,f,n,u)),!0===a.italics&&(u=y(l,h,n,u)),!0===a.superscripts&&(u=y(d,m,n,u)),!0===a.subscripts&&(u=y(v,_,n,u));var b=[],x="";for(j=0;j<n.length;++j)null!==u[j]&&(x+=n[j],b.push(u[j]));var w,j,M,A,k,E=x.split("\n"),z=E.length,T=Math.round(o*r),S=r,N=2*r,O=0,C=z*T+N;t.height<C&&(t.height=C),e.fillStyle="#000",e.fillRect(0,0,t.width,t.height),e.fillStyle="#fff";var P=0,B="";function R(){if(""!==B){var t=e.measureText(B).width;e.fillText(B,S+M,N+A),M+=t}}function I(){return Math.round(k)+"px "}function D(t,n){var r=""+e.font;if(!0===a.subscripts){var i=t.indexOf(g),o=n.indexOf(g),s=i>-1?parseInt(t[1+i]):0,u=o>-1?parseInt(n[1+o]):0;s!==u&&(r=r.replace(I(),"?px "),k*=Math.pow(.75,u-s),r=r.replace("?px ",I())),A+=.25*T*(u-s)}if(!0===a.superscripts){var c=t.indexOf(p),l=n.indexOf(p),d=c>-1?parseInt(t[1+c]):0,m=l>-1?parseInt(n[1+l]):0;d!==m&&(r=r.replace(I(),"?px "),k*=Math.pow(.75,m-d),r=r.replace("?px ",I())),A-=.25*T*(m-d)}if(!0===a.bolds){var v=t.indexOf(f)>-1,_=n.indexOf(f)>-1;!v&&_&&(r=y?r.replace("italic ","italic bold "):"bold "+r),v&&!_&&(r=r.replace("bold ",""))}if(!0===a.italics){var y=t.indexOf(h)>-1,b=n.indexOf(h)>-1;!y&&b&&(r="italic "+r),y&&!b&&(r=r.replace("italic ",""))}e.font=r}for(w=0;w<z;++w){var F=E[w]+"\n";for(M=0,A=w*T,k=r,B="",j=0;j<F.length;++j){var L=j+P<b.length?b[j+P]:b[b.length-1];s===L?B+=F[j]:(R(),B=F[j],void 0!==L&&(D(s,L),s=L))}R(),P+=F.length;var U=0|Math.round(M+2*S);O<U&&(O=U)}var q=O,Y=N+T*z;return i(e.getImageData(0,0,q,Y).data,[Y,q,4]).pick(-1,-1,0).transpose(1,0)}(e,n,t,o,a,s),r,o)},t.exports.processPixels=w;var r=n("./node_modules/surface-nets/surfacenets.js"),i=n("./node_modules/ndarray/ndarray.js"),o=n("./node_modules/simplify-planar-graph/simplify.js"),a=n("./node_modules/clean-pslg/clean-pslg.js"),s=n("./node_modules/cdt2d/cdt2d.js"),u=n("./node_modules/planar-graph-to-polyline/pg2pl.js"),c="b",f="b|",l="i",h="i|",d="sup",p="+",m="+1",v="sub",g="-",_="-1";function y(t,e,n,r){for(var i="<"+t+">",o="</"+t+">",a=i.length,s=o.length,u=e[0]===p||e[0]===g,c=0,f=-s;c>-1&&-1!==(c=n.indexOf(i,c))&&-1!==(f=n.indexOf(o,c+a))&&!(f<=c);){for(var l=c;l<f+s;++l)if(l<c+a||l>=f)r[l]=null,n=n.substr(0,l)+" "+n.substr(l+1);else if(null!==r[l]){var h=r[l].indexOf(e[0]);-1===h?r[l]+=e:u&&(r[l]=r[l].substr(0,h+1)+(1+parseInt(r[l][h+1]))+r[l].substr(h+2))}var d=c+a,m=n.substr(d,f-d).indexOf(i);c=-1!==m?m:f+s}return r}function b(t,e){var n=r(t,128);return e?o(n.cells,n.positions,.25):{edges:n.cells,positions:n.positions}}function x(t,e,n,r){var i=b(t,r),o=function(t,e,n){for(var r=e.textAlign||"start",i=e.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=t.length,u=0;u<s;++u)for(var c=t[u],f=0;f<2;++f)o[f]=0|Math.min(o[f],c[f]),a[f]=0|Math.max(a[f],c[f]);var l=0;switch(r){case"center":l=-.5*(o[0]+a[0]);break;case"right":case"end":l=-a[0];break;case"left":case"start":l=-o[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+r+"'")}var h=0;switch(i){case"hanging":case"top":h=-o[1];break;case"middle":h=-.5*(o[1]+a[1]);break;case"alphabetic":case"ideographic":h=-3*n;break;case"bottom":h=-a[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+i+"'")}var d=1/n;return"lineHeight"in e?d*=+e.lineHeight:"width"in e?d=e.width/(a[0]-o[0]):"height"in e&&(d=e.height/(a[1]-o[1])),t.map(function(t){return[d*(t[0]+l),d*(t[1]+h)]})}(i.positions,e,n),c=i.edges,f="ccw"===e.orientation;if(a(o,c),e.polygons||e.polygon||e.polyline){for(var l=u(c,o),h=new Array(l.length),d=0;d<l.length;++d){for(var p=l[d],m=new Array(p.length),v=0;v<p.length;++v){for(var g=p[v],_=new Array(g.length),y=0;y<g.length;++y)_[y]=o[g[y]].slice();f&&_.reverse(),m[v]=_}h[d]=m}return h}return e.triangles||e.triangulate||e.triangle?{cells:s(o,c,{delaunay:!1,exterior:!1,interior:!0}),positions:o}:{edges:c,positions:o}}function w(t,e,n){try{return x(t,e,n,!0)}catch(t){}try{return x(t,e,n,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},"./node_modules/webpack/buildin/global.js":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"./node_modules/webpack/buildin/module.js":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"./node_modules/xtend/mutable.js":function(t,e){t.exports=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},"./node_modules/zero-crossings/lib/zc-core.js":function(t,e,n){t.exports=n("./node_modules/cwise-compiler/compiler.js")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},"./node_modules/zero-crossings/zc.js":function(t,e,n){"use strict";t.exports=function(t,e){var n=[];return e=+e||0,r(t.hi(t.shape[0]-1),n,e),n};var r=n("./node_modules/zero-crossings/lib/zc-core.js")},"./src/cameras/camera_interaction.js":function(t,e,n){var r=n("./node_modules/gl-vec4/index.js");t.exports=function(t,e,n,i,o,a,s,u,c){switch(e.type){case"wheel":e.dsx=e.dsy=Math.exp(-e.dy/100),e.dx=e.dy=0}if(e.buttons||-1!==["wheel","touch","pinch"].indexOf(e.type)){var f=t.x.inst_zoom,l=t.x.pan_by_zoom,h=t.x.pan_by_drag,d=t.y.inst_zoom,p=t.y.pan_by_zoom,m=t.y.pan_by_drag;"row-labels"===n&&(f=1,h=0,l=0),"col-labels"===n&&(d=1,m=0,p=0),"static"===n&&(f=1,h=0,l=0,d=1,m=0,p=0),e.preventDefault(),u[0]=f,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=d,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=l+h,u[13]=p+m,u[14]=0,u[15]=1,o.multiply(u,u,c),o.multiply(u,i,u),o.multiply(a,u,a)}var v=r.transformMat4([],r.transformMat4([],[e.x0,e.y0,0,1],i),o.invert([],a));e.x=v[0],e.y=v[1],s.emit("move",e)}},"./src/cameras/custom_camera_2d.js":function(t,e,n){var r=n("./src/interactions/interaction-events.js"),i=n("./node_modules/xtend/mutable.js"),o=n("./node_modules/gl-mat4/index.js"),a=n("./node_modules/event-emitter/index.js"),s=n("./src/cameras/camera_interaction.js");o.viewport=function(t,e,n,r,i,o,a){return t[0]=.5*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=.5*i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=.5*(a-o),t[11]=0,t[12]=e+.5*r,t[13]=n+.5*i,t[14]=.5*(a+o),t[15]=1,t},t.exports=function(t,e,n,u,c){var f=i({element:(n=n||{}).element||t._gl.canvas},n||{}).element,l=!0,h=f===window?function(){return f.innerWidth}:function(){return f.offsetWidth},d=f===window?function(){return f.innerHeight}:function(){return f.offsetHeight},p=void 0===n.xrange?[-1,1]:n.xrange,m=void 0===n.yrange?[-1,1]:n.yrange,v=void 0===n.aspectRatio?1:n.aspectRatio,g=h(),_=d(),y=.5*(p[1]+p[0])+e.viz_dim.shift_camera.x,b=.5*(m[1]+m[0])+e.viz_dim.shift_camera.y,x=.5*(p[1]-p[0]),w=x/v/g*_,j=o.identity([]);j[0]=1/x,j[5]=1/w,j[12]=-y/x,j[13]=-b/w;var M=o.identity([]),A=o.identity([]);function k(){g=h(),_=d(),o.viewport(M,0,_,g,-_,0,1),o.invert(A,M)}k();var E=[],z=new a;r({element:f}).on("interactionstart",function(t){t.preventDefault()}).on("interactionend",function(t){t.preventDefault()}).on("interaction",function(t){e.int.enable_viz_interact&&s(u,t,c,A,o,j,z,E,M)});var T=t({context:{view:t.prop("view")}});return{draw:function(t){T({view:j},function(){t({dirty:l})}),l=!1},on:function(t,e){z.on(t,e)},off:function(t,e){z.off(t,e)},taint:function(){l=!0},resize:function(){k(),j[5]=j[0]*v*g/_,l=!0}}}},"./src/cameras/make_cameras.js":function(t,e,n){var r=n("./src/cameras/custom_camera_2d.js");t.exports=function(t,e){var n=e.zoom_data;const i={};var o={xrange:[-1,1],yrange:[-1,1]};i.mat=r(t,e,o,n,"matrix"),i["row-labels"]=r(t,e,o,n,"row-labels"),i["col-labels"]=r(t,e,o,n,"col-labels"),i.static=r(t,e,o,n,"static"),e.cameras=i}},"./src/cameras/reset_cameras.js":function(t,e,n){var r=n("./src/zoom/ini_zoom_data.js"),i=n("./src/cameras/make_cameras.js");t.exports=function(t,e){e.reset_cameras=!1,e.zoom_data=r(),i(t,e),e.labels.draw_labels=!1,e.ani.ini_viz=!0,e.int.total=0}},"./src/cats/binom_prop_pval_lookup.js":function(t,e){t.exports={p:[.5,.4800611941616275,.460172162722971,.4403823076297575,.42074029056089696,.4012936743170763,.3820885778110473,.3631693488243809,.3445782583896758,.32635522028791997,.3085375387259869,.29115968678834636,.27425311775007355,.2578461108058647,.24196365222307303,.2266273523768682,.2118553985833967,.19766254312269238,.18406012534675947,.17105612630848183,.15865525393145707,.1468590563758959,.13566606094638267,.12507193563715024,.11506967022170828,.10564977366685535,.09680048458561036,.08850799143740196,.08075665923377107,.0735292596096483,.06680720126885807,.06057075800205901,.054799291699557974,.049471468033648075,.044565462758543006,.040059156863817086,.03593031911292579,.03215677479561371,.028716559816001783,.02558805952163861,.022750131948179195,.020182215405704383,.017864420562816542,.0157776073910905,.013903447513498595,.012224472655044696,.010724110021675795,.009386705534838566,.008197535924596114,.007142810735271415,.006209665325776132,.005386145954066684,.004661188023718747,.004024588542758303,.0034669738030406647,.002979763235054555,.002555130330427929,.0021859614549132405,.0018658133003840339,.0015888696473648667,.0013498980316300933,.0011442068310226977,.0009676032132183563,.0008163523128285604,.0006871379379158471,.0005770250423907659,.00048342414238377663,.0004040578018640207,.0003369292656768799,.00028029327681617744,.00023262907903552502,.00019261557563563279,.00015910859015753364,.00013112015442048433,.00010779973347738823,8841728520080377e-20,7234804392511979e-20,59058912418922374e-21,48096344017602614e-21,39075596597787456e-21,3167124183311986e-20,2560881647404149e-20,20657506912546683e-21,16623763729652213e-21,1334574901590631e-20,10688525774934402e-21,8539905470991794e-21,6806876599334031e-21,5412543907703841e-21,4293514469971858e-21,33976731247300535e-22,26822957796388472e-22,2112454702502842e-21,16596751443714555e-22,13008074539172771e-22,10170832425687032e-22,7.933281519755892e-7,6.173073720091925e-7,4.791832765903185e-7,3.710674079633327e-7,2.8665157187919333e-7,2.2090503226954194e-7,1.6982674071475937e-7,1.3024322953320117e-7,9.96442631693347e-8,7.6049605164887e-8,5.790134039964557e-8,4.397711594005869e-8,3.332044848542845e-8,2.518491005446105e-8,1.898956246588768e-8,1.4283479893922661e-8,1.0717590258310852e-8,8.022391850663474e-9,5.99037140106353e-9,4.462172453901611e-9,3.3157459783261365e-9,2.4578650618080152e-9,1.8175078630994235e-9,1.3407124440918662e-9,9.865876450376946e-10,7.242291705137605e-10,5.303423262948808e-10,3.8741473466756636e-10,2.823158037043268e-10,2.0522634252189396e-10,1.4882282217622966e-10,1.0765746385121517e-10,7.768847581709776e-11,5.592507575942645e-11,4.016000583859088e-11,2.876854173604311e-11,2.055788909399508e-11,1.4654650977302715e-11,1.0420976987965154e-11,7.392257778017794e-12,5.230957544144525e-12,3.692499427235561e-12,2.600126965638173e-12,1.826431061976961e-12,1.279812543885835e-12,8.945889558769844e-13,6.23784446333152e-13,4.3388950271780343e-13,3.010627981117422e-13,2.0838581586720548e-13,1.4388386381575764e-13,9.910342749547509e-14,6.809224890620016e-14,4.6670115887190274e-14,3.1908916729108844e-14,2.1762912097085575e-14,1.4806537490047908e-14,1.0048965656526223e-14,6.803311540773901e-15,4.594627435778562e-15,3.095358771958668e-15,2.0801863521393674e-15,1.394517146659261e-15,9.325575771681205e-16,6.22096057427174e-16,4.139701816273122e-16,2.747959392398221e-16,1.8196213635266084e-16,1.2019351542735647e-16,7.919726314642476e-17,5.2055697448902465e-17,3.413148326458146e-17,2.232393197288031e-17,1.456514112590909e-17,9.47953482220325e-18,6.154425590850395e-18,3.985804962848151e-18,2.5749715380118873e-18,1.6594208699647519e-18,1.0667637375474856e-18,6.840807685935497e-19,4.375964799309017e-19,2.7923343749396233e-19,1.7774117841455144e-19,1.1285884059538324e-19,7.148417011269684e-20,4.516591491435403e-20,2.846677408460209e-20,1.7897488120140146e-20,1.1224633591327901e-20,7.022284240441541e-21,4.38238629906646e-21,2.7281535713460872e-21,1.6941535024881097e-21,1.0494515075362604e-21,6.484814453077208e-22,3.9972212057261192e-22,2.4577864834723153e-22,1.507493168810159e-22,9.223413524939353e-23,5.629282311376514e-23,3.4271987941135974e-23,2.0813752194932085e-23,1.2609160670206559e-23],z:[0,.05,.1,.15000000000000002,.2,.25,.30000000000000004,.35000000000000003,.4,.45,.5,.55,.6000000000000001,.65,.7000000000000001,.75,.8,.8500000000000001,.9,.9500000000000001,1,1.05,1.1,1.1500000000000001,1.2000000000000002,1.25,1.3,1.35,1.4000000000000001,1.4500000000000002,1.5,1.55,1.6,1.6500000000000001,1.7000000000000002,1.75,1.8,1.85,1.9000000000000001,1.9500000000000002,2,2.0500000000000003,2.1,2.15,2.2,2.25,2.3000000000000003,2.35,2.4000000000000004,2.45,2.5,2.5500000000000003,2.6,2.6500000000000004,2.7,2.75,2.8000000000000003,2.85,2.9000000000000004,2.95,3,3.0500000000000003,3.1,3.1500000000000004,3.2,3.25,3.3000000000000003,3.35,3.4000000000000004,3.45,3.5,3.5500000000000003,3.6,3.6500000000000004,3.7,3.75,3.8000000000000003,3.85,3.9000000000000004,3.95,4,4.05,4.1000000000000005,4.15,4.2,4.25,4.3,4.3500000000000005,4.4,4.45,4.5,4.55,4.6000000000000005,4.65,4.7,4.75,4.800000000000001,4.8500000000000005,4.9,4.95,5,5.050000000000001,5.1000000000000005,5.15,5.2,5.25,5.300000000000001,5.3500000000000005,5.4,5.45,5.5,5.550000000000001,5.6000000000000005,5.65,5.7,5.75,5.800000000000001,5.8500000000000005,5.9,5.95,6,6.050000000000001,6.1000000000000005,6.15,6.2,6.25,6.300000000000001,6.3500000000000005,6.4,6.45,6.5,6.550000000000001,6.6000000000000005,6.65,6.7,6.75,6.800000000000001,6.8500000000000005,6.9,6.95,7,7.050000000000001,7.1000000000000005,7.15,7.2,7.25,7.300000000000001,7.3500000000000005,7.4,7.45,7.5,7.550000000000001,7.6000000000000005,7.65,7.7,7.75,7.800000000000001,7.8500000000000005,7.9,7.95,8,8.05,8.1,8.15,8.200000000000001,8.25,8.3,8.35,8.4,8.450000000000001,8.5,8.55,8.6,8.65,8.700000000000001,8.75,8.8,8.85,8.9,8.950000000000001,9,9.05,9.1,9.15,9.200000000000001,9.25,9.3,9.35,9.4,9.450000000000001,9.5,9.55,9.600000000000001,9.65,9.700000000000001,9.75,9.8,9.850000000000001,9.9,9.950000000000001]}},"./src/cats/binom_test.js":function(t,e,n){var r=n("./src/cats/binom_prop_pval_lookup.js"),i=n("./node_modules/mathjs/core.js").create();i.import(n("./node_modules/mathjs/lib/function/probability/factorial.js")),t.exports=function(t,e,n){var o,a=i.factorial;function s(t,e,n){return n=a(e)/(a(t)*a(e-t))*(Math.pow(n,t)*Math.pow(1-n,e-t))}return o=function(t,e,n){for(var r=0,i=t;i<e+1;i++)r+=s(i,e,n);return r}(t,e,n),isNaN(o)&&(o=function(t,e,n){for(var i=(t-e*n)/Math.sqrt(e*n*(1-n)),a=r.z,s=r.p,u=-1,c=!1,f=0;f<a.length;f++)i<a[f]&&!1===c&&(u=f,c=!0);return-1===u&&(u=a.length-1),o=s[u]}(t,e,n)),o}},"./src/cats/build_reorder_cat_titles.js":function(t,e,n){var r=n("d3"),i=n("./src/reorders/run_reorder.js");t.exports=function(t,e){var n=e.params,o=845,a=125,s=r.select(n.root+" .canvas-container").append("g").style("position","absolute").style("top",a+"px").style("left",o+"px").classed("col-cat-title-group",!0),u=s.append("svg").style("height",function(){return 10*n.cat_data.col.length+5+"px"}).style("width","55px").classed("col-cat-title-svg",!0).append("g").classed("col-cat-reorder-group",!0);u.selectAll("rect").data(n.cat_data.col).enter().append("text").text(function(t){return t.cat_title}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800).style("font-size",12).attr("transform",function(t,e){return"translate( 0, "+(11*e+10)+")"}),u.selectAll("rect").data(n.cat_data.col).enter().append("rect").style("width","55px").style("height",function(){return"12px"}).style("fill","white").style("opacity",0).on("dblclick",function(e,o){i(t,n,"col","cat_"+String(o)+"_index"),n.order.inst.col="cat_"+String(o)+"_index",r.select(n.root+" .col-reorder-buttons").selectAll("rect").style("stroke","#eee")}).attr("transform",function(t,e){return"translate( 0, "+12*e+")"}).style("user-select","none"),o=125,a=62+12*n.cat_data.col.length;var c=r.select(n.root+" .canvas-container").append("g").style("position","absolute").style("top",a+"px").style("left",o+"px").classed("row-cat-title-group",!0),f=c.append("svg").style("width",function(){return 10*n.cat_data.row.length+5+"px"}).style("height","60px").classed("row-cat-title-svg",!0).append("g").classed("row-cat-reorder-group",!0).attr("transform",function(){return-90,"translate(0,60), rotate(-90)"});f.selectAll("rect").data(n.cat_data.row).enter().append("text").text(function(t){return t.cat_title}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800).style("font-size",12).attr("transform",function(t,e){return"translate( 0, "+(11*e+10)+")"}),f.selectAll("rect").data(n.cat_data.row).enter().append("rect").style("width","60px").style("height",function(){return"12px"}).style("fill","white").style("opacity",0).on("dblclick",function(e,o){i(t,n,"row","cat_"+String(o)+"_index"),n.order.inst.row="cat_"+String(o)+"_index",r.select(n.root+" .row-reorder-buttons").selectAll("rect").style("stroke","#eee")}).attr("transform",function(t,e){return"translate( 0, "+12*e+")"}).style("user-select","none")}},"./src/cats/calc_cat_cluster_breakdown.js":function(t,e,n){var r=n("./src/cats/binom_test.js");t.exports=function(t,e,n){"both"===n&&(n="row");var i=e.all_names;t.dendro.selected_clust_names=i;var o,a=[],s=t.network[n+"_nodes"],u=null,c=!1;_.each(s,function(t){(o=t.name).indexOf(": ")>=0&&(o=o.split(": ")[1]),i.indexOf(o)>=0&&a.push(t)});var f=[];if(null!==t.viz.cat_info[n]){for(var l,h,d,p=t.viz.cat_info[n],m=_.keys(p),v=[],g=[],y=0;y<m.length;y++)d="cat-"+String(y),"cat_strings"===t.viz.cat_info[n][d].type?(l=t.viz.cat_names[n][d],g.push(l),v.push(d)):"number in clust"===t.viz.cat_names[n][d]&&(u=d,c=!0);var b,x,w={},j={},M=4;if(c&&(M=5),x=l===d,g.length>0){var A,k=i.length;_.each(v,function(e){if(h=e.split("-")[1],l=g[h],x)if(e.indexOf("-")>=0){var i=parseInt(e.split("-")[1],10)+1;l="Category "+String(i)}else l="Category";var o,s;w[l]={},_.each(a,function(t){(A=t[e]).indexOf(": ")>=0&&(A=A.split(": ")[1]),A in w[l]?(w[l][A].num_nodes=w[l][A].num_nodes+1,null!==u&&(w[l][A].num_nodes_ds=w[l][A].num_nodes_ds+parseInt(t[u].split(": ")[1],10))):(w[l][A]={},w[l][A].num_nodes=1,null!==u&&(w[l][A].num_nodes_ds=parseInt(t[u].split(": ")[1],10)))}),(j={}).type_name=l,j.num_in_clust=k,b=[];var c=w[l];for(var d in c){var p=t.viz.cat_info[n][e].cat_hist[d]/t.network[n+"_nodes"].length;s=x?d:l+": "+d;var m=c[d].num_nodes,v=r(m,k,p);if(_.has(c[d],"num_nodes_ds"))var y=c[d].num_nodes_ds;else y=null;o=t.viz.cat_colors[n][e][s],b.push([e,s,c[d],o,m,y,v])}b.sort(function(t,e){return e[M]-t[M]}),j.bar_data=b,f.push(j)})}}return f}},"./src/cats/cat_breakdown_bars.js":function(t,e,n){var r=n("d3");t.exports=function(t,e,n,i,o,a,s){var u=t.viz.cat_bar_width,c=t.viz.cat_bar_height,f=e.bar_data[0][o],l=e.type_name;l.length>=25&&(l=l.slice(0,25)+".."),n.append("text").classed("cat_graph_title",!0).text(l).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800);n.append("line").attr("x1",0).attr("x2",u).attr("y1",4).attr("y2",4).attr("stroke","blue").attr("stroke-width",1).attr("opacity",1);var h=r.scaleLinear().domain([0,f]).range([0,u]);s.append("rect").attr("height",c+"px").attr("width",function(t){return h(t[o])+"px"}).attr("fill",function(t){return t[3]}).attr("opacity",t.viz.cat_colors.opacity).attr("stroke","grey").attr("stroke-width","0.5px"),s.append("text").classed("bar_labels",!0).text(function(t){var e=t[1];return e.indexOf(": ")>0&&(e=e.split(": ")[1]),e.indexOf("<p>")>0&&(e=e.split("<p>")[0]),e.length>=25&&(e=e.slice(0,25)+".."),e}).attr("transform",function(){return"translate(5, "+.75*c+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","right")}},"./src/cats/cat_breakdown_values.js":function(t,e){t.exports=function(t,e,n,r,i,o,a,s){var u=t.viz.cat_bar_width,c=t.viz.cat_bar_height;e.append("text").text("Count").attr("transform",function(){return"translate("+(u+o)+", 0)"}),e.append("text").text("Pct").attr("transform",function(){return"translate("+(u+o+60)+", 0)"}),e.append("text").text("P-val").attr("transform",function(){return"translate("+(u+o+115)+", 0)"}),i&&e.append("text").text("Clusters").attr("transform",function(){return"translate("+(u+150)+", 0)"});n.append("text").classed("count_labels",!0).text(function(t){var e=t[a];return e=e.toLocaleString(),String(e)}).attr("transform",function(){return"translate("+(u+o+35)+", "+.75*c+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),n.append("text").classed("count_labels",!0).text(function(t){var e=t[a]/s*100;return e=(e=Math.round(10*e)/10).toLocaleString(),String(e)}).attr("transform",function(){return"translate("+(u+o+35+47)+", "+.75*c+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),n.append("text").classed("count_labels",!0).text(function(t){var e=t[6];return e=e<.001?(e=parseFloat(e.toPrecision(3))).toExponential():parseFloat(e.toPrecision(2))}).attr("transform",function(){return"translate("+(u+o+35+112)+", "+.75*c+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),i&&n.append("text").classed("count_labels",!0).text(function(t){return String(t[r].toLocaleString())}).attr("transform",function(){return"translate("+(u+35+150+20)+", "+.75*c+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end")}},"./src/cats/check_if_value_cats.js":function(t,e,n){var r=n("d3");t.exports=function(t){var e=t[0],n=!1,i=!1,o="cat_strings",a=NaN,s=[],u=null;if("string"==typeof e&&e.indexOf(": ")>-1&&(n=!0,e=e.split(": ")[1]),0==isNaN(e)&&(i=!0),i&&(o="cat_values",_.each(t,function(t){n&&(t=t.split(": ")[1]),!0===isNaN(t)?o="cat_strings":(t=parseFloat(t),s.push(t))})),"cat_values"===o){var c=_.max(s,function(t){return Math.abs(t)});a=Math.abs(c),u=r.scaleLinear().domain([0,a]).range([0,1])}var f={};return f.type=o,f.max_abs_val=a,f.cat_scale=u,f}},"./src/cats/generate_cat_array.js":function(t,e){t.exports=function(t,e){u={};var n,r,i,o=[],a=t.network[e+"_nodes"][0],s=_.keys(a),u={};_.each(s,function(t){t.indexOf("cat-")>=0&&(n=a[t],i=parseInt(t.split("cat-")[1],10),r=n.indexOf(": ")>=0?n.split(": ")[0]:t,u[i]=r)});var c,f=_.keys(u).sort();return _.each(f,function(t){(c={}).cat_title=u[t],c.cats=[],o.push(c)}),o}},"./src/cats/generate_cat_info.js":function(t,e,n){t.exports=function(t){var e,r,i={};i.show_categories={},i.all_cats={},i.cat_names={},i.cat_info={},i.cat_bar_width=180,i.cat_bar_height=20,i.cat_value_colors=["#2F4F4F","#9370DB"];var o={row:null,col:null};i.cat_colors={},i.cat_colors.value_opacity=o,_.each(["row","col"],function(o){i.show_categories[o]=!1,i.all_cats[o]=[];var a=_.keys(t.network[o+"_nodes"][0]);a=a.sort(),_.each(a,function(t){t.indexOf("cat-")>=0&&(i.show_categories[o]=!0,i.all_cats[o].push(t))}),i.cat_info[o]=null,i.cat_colors[o]={},i.cat_info[o]={},i.cat_names[o]={},_.each(i.all_cats[o],function(a){var s=t.network[o+"_nodes"][0];"string"==typeof s[a]&&s[a].indexOf(": ")>0?(e=s[a].split(": ")[0],i.cat_names[o][a]=e):i.cat_names[o][a]=a;var u=_.pluck(t.network[o+"_nodes"],a),c=[];_.each(u,function(t){var e;e=t.indexOf(": ")>0?t.split(": ")[1]:t,c.push(e)});var f=_.uniq(u).sort();if("cat_strings"===(r=n("./src/cats/check_if_value_cats.js")(f)).type){var l=_.countBy(c);r.cat_hist=l}else r.cat_hist=null;i.cat_info[o][a]=r,i.cat_colors[o][a]={}}),i.cat_colors[o]=t.network.cat_colors[o]}),i.cat_colors.opacity=.6,i.cat_colors.active_opacity=.9,t.viz=i}},"./src/cats/get_cat_value.js":function(t,e){t.exports=function(t){return"string"==typeof t&&t.indexOf(": ")>-1&&(t=t.split(": ")[1]),parseFloat(t)}},"./src/cats/make_cat_args.js":function(t,e,n){var r=n("./src/draws/mat3_transform.js"),i=n("./src/colors/color_to_rgba.js"),o=n("./src/cats/get_cat_value.js");t.exports=function(t,e,n,a){var s,u,c,f="cat-"+String(a),l=i("purple",.95),h=e.labels["num_"+n];"col"===n?(u=e.viz_dim.heat_size.x,c=e.viz_dim.mat_size.y,s=u/.5/h):(u=e.viz_dim.heat_size.y,c=e.viz_dim.mat_size.x,s=e.viz_dim.heat_size.y/.5/h);var d,p=-c-.04+.025*(a+1),m=!1,v=1;if(e.tooltip.tooltip_type&&e.tooltip.tooltip_type.includes("-cat-")){m=!0;var g=e.tooltip.tooltip_type.split("-")[2];d=e.int.mouseover[n].cats[g]}var _=!1;"cat_values"==e.viz.cat_info[n][f].type&&(_=!0);for(var y,b,x=[],w=0;w<h;w++){var j,M=e.network[n+"_nodes"][w][f];if(_&&(b=o(M),v=e.viz.cat_info[n][f].cat_scale(Math.abs(b)),ini_value_color=b>0?e.viz.cat_value_colors[0]:e.viz.cat_value_colors[1],y=i(ini_value_color).map(t=>t*v+(1-v))),!1===_)if("cat_colors"in e.network)if(f in e.network.cat_colors[n])try{j=e.network.cat_colors[n][f][M]}catch(t){j="white"}else j="white";else j="white";else j=y;v=1;m?d==M?!1===_&&(j=i(j,v)):!1===_&&(j=i(j,v).map(t=>.25*t+.75)):!1===_&&(j=i(j,v)),x[w]=j}const A=t.buffer({length:h,usage:"dynamic"});A(x),e.color_arr=x;var k,E=r.scaling(2,1);"row"===n?k=0:"col"===n&&(k=Math.PI/2);var z=r.rotation(k);return{vert:"\n precision highp float;\n attribute vec2 ini_position;\n attribute vec2 cat_pos_att_inst;\n attribute vec2 cat_pos_att_new;\n attribute vec4 color_att;\n uniform float interp_uni;\n uniform bool run_animation;\n\n\n uniform mat3 mat_rotate;\n uniform mat3 scale_y;\n uniform mat4 zoom;\n uniform float top_offset;\n\n varying vec3 new_position;\n varying vec3 vec_translate;\n varying vec2 cat_pos;\n\n // pass varying variable to fragment from vector\n varying vec4 color_vary;\n\n void main () {\n\n new_position = vec3(ini_position, 0);\n\n // interpolate between the two positions using the interpolate uniform\n if (run_animation == true){\n cat_pos = mix(cat_pos_att_inst, cat_pos_att_new, interp_uni);\n } else {\n cat_pos = cat_pos_att_inst;\n }\n\n vec_translate = vec3(top_offset, cat_pos[0], 0);\n\n // rotate translated triangles\n new_position = mat_rotate * ( new_position + vec_translate ) ;\n\n // depth is being set to 0.45\n gl_Position = zoom * vec4( vec2(new_position), 0.45, 1);\n\n // pass attribute (in vert) to varying in frag\n color_vary = color_att;\n\n }\n ",frag:"\n\n precision mediump float;\n uniform vec4 triangle_color;\n\n // use the varying being passed from the vertex shader\n varying vec4 color_vary;\n\n // color triangle red\n void main () {\n\n // gl_FragColor = vec4(0.6, 0.6, 0.6, opacity_vary);\n\n // defining the triangle color using a uniform\n // gl_FragColor = triangle_color;\n\n // define the triangle color using a varying\n gl_FragColor = color_vary;\n }\n\n ",attributes:{ini_position:[[.04,s/2],[.02,s/2],[.04,-s/2],[.02,-s/2],[.04,-s/2],[.02,s/2]],cat_pos_att_inst:{buffer:t.buffer(e.cat_arrs.inst[n][a]),divisor:1},cat_pos_att_new:{buffer:t.buffer(e.cat_arrs.new[n][a]),divisor:1},color_att:{buffer:A,divisor:1}},uniforms:{zoom:function(t){return t.view},mat_rotate:z,scale_y:E,top_offset:p,triangle_color:l,interp_uni:(t,e)=>Math.max(0,Math.min(1,e.interp_prop)),run_animation:t.prop("run_animation")},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:1,dstRGB:"one minus src alpha",dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},count:6,instances:h,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/cats/make_cat_breakdown_graph.js":function(t,e,n){var r=n("d3");t.exports=function(t,e,i){if(i.length>0){var o=370,a=!1;null!==i[0].bar_data[0][5]&&(o+=100,a=!0);var s=e.all_names.length,u=4;if(a){u=5;var c=i[0].bar_data;s=0,_.each(c,function(t){s+=t[5]})}var f=20;_.each(i.slice(0,3),function(t){var e=t.bar_data.length;e>10&&(e=10),f+=27*(e+1)});var l=r.select(t.tooltip_id).append("div").style("margin-top","5px").classed("cat_graph",!0).append("svg").style("height",f+"px").style("width",o+"px");l.append("rect").classed("cat_background",!0).attr("height",f+"px").attr("width",o+"px").attr("fill","white").attr("opacity",1),i=i.slice(0,3);var h=r.scaleLinear().domain([0,1e5]).range([20,30]),d=27;_.each(i,function(e){var r=e.bar_data[0][u];e.bar_data=e.bar_data.slice(0,10);var i=h(r),o=l.append("g").classed("cgg",!0).attr("transform","translate(10, "+d+")"),c=o.append("g").classed("cat_bar_container",!0).attr("transform","translate(0, 10)").selectAll("g").data(e.bar_data).enter().append("g").attr("transform",function(t,e){return"translate(0,"+23*e+")"});n("./src/cats/cat_breakdown_bars.js")(t,e,o,27,u,10,c),n("./src/cats/cat_breakdown_values.js")(t,o,c,4,a,i,u,s),d+=27*(e.bar_data.length+1)})}}},"./src/cats/make_cat_position_array.js":function(t,e){t.exports=function(t,e,n,r){var i,o,a=t.labels["num_"+e];"col"===e?i=(o=t.viz_dim.heat_size.x)/.5/a:(o=t.viz_dim.heat_size.y,i=t.viz_dim.heat_size.y/.5/a);var s,u=[];for(s=0;s<a;s++){var c,f;"row"==e?(c=a-t.network[e+"_nodes"][s][r]-1,f=-(t.viz_dim.mat_size.y-t.viz_dim.heat_size.y)):(c=t.network[e+"_nodes"][s][r],f=t.viz_dim.mat_size.x-t.viz_dim.heat_size.x),u[s]=[o-i/2-c*i+f,0]}return u}},"./src/colors/color_table.js":function(t,e){t.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],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],transparent:[0,0,0,0],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],rebeccapurple:[102,51,153,1]}},"./src/colors/color_to_rgba.js":function(t,e,n){var r=n("./src/colors/color_table.js");t.exports=function(t,e=1){var n;if(t in r){var i=r[t];i.push(e),n=[i[0],i[1],i[2],e]}else{var o;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))3==(o=t.substring(1).split("")).length&&(o=[o[0],o[0],o[1],o[1],o[2],o[2]]),n=[((o="0x"+o.join(""))>>16&255)/256,(o>>8&255)/256,(255&o)/256,e];else n=[0,0,0,e]}return n}},"./src/control_panel/build_control_panel.js":function(t,e,n){var r=n("d3");t.exports=function(){var t=this.regl,e=this.params;e.tooltip_id="#d3-tip_"+e.root.replace("#","");var i=n("./node_modules/d3-tip/index.js").default().attr("id",e.tooltip_id.replace("#","")).attr("class","cgm-tooltip").direction("sw").html(function(){return""});e.tooltip_fun=i;var o=r.select(e.root+" .control-container")._groups[0][0],a=e.viz_width,s=r.select(o).style("height","135px").style("width",a+"px").append("svg").style("height","135px").style("width",a+"px").on("mouseover",function(){e.tooltip.in_bounds_tooltip=!1});s.append("rect").style("height","135px").style("width",a+"px").style("position","absolute").style("fill","white").attr("class","control-panel-background").call(i),n("./src/tooltip/initialize_d3_tip.js")(e),r.select(e.tooltip_id).style("line-height",1.5).style("font-weight","bold").style("padding","12px").style("background","rgba(0, 0, 0, 0.8)").style("color","#fff").style("border-radius","2px").style("pointer-events","none").style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-size","12px");s.append("rect").classed("north_border",!0).style("height","1px").style("width",a+"px").style("position","absolute").style("stroke","#eee").style("stroke-width",3).attr("transform",function(){return"translate( 0, 134)"});var u={height:32,width:63,buffer:12};u.x_trans=u.width+u.buffer,u.fs=11;var c={row:{},col:{}};s.append("svg:a").append("svg:image").classed("cgm-logo",!0).attr("x",15).attr("y",55).attr("width",50).attr("height",50).attr("xlink:href","https://amp.pharm.mssm.edu/clustergrammer/static/icons/graham_cracker_70.png").on("click",function(t){window.open("https://clustergrammer.readthedocs.io/clustergrammer2.html","_blank")}).style("cursor","pointer");c.row.x_trans=130,c.col.x_trans=130;c.col.y_trans=47,c.row.y_trans=c.col.y_trans+u.height+u.buffer;var f=["clust","sum","var","alpha"];s.append("text").classed("reorder_title",!0).text("rearrange".toUpperCase()).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("font-size",u.fs).style("text-anchor","middle").style("stroke","#47515b").style("alignment-baseline","middle").style("letter-spacing","2px").style("cursor","default").style("-webkit-user-select","none").attr("transform",function(){return"translate( 280, "+(47-2*u.buffer+2)+")"}),s.append("rect").style("height","1px").style("width",function(){return(f.length+1)*u.width-u.buffer}).style("position","absolute").style("stroke","#eee").style("stroke-width",2).attr("transform",function(){return"translate( "+(u.x_trans-u.buffer+1+65)+", "+(47-u.buffer+2)+")"}),_.each(["row","col"],function(i){s.append("g").attr("transform",function(){return"translate(0, "+c[i].y_trans+")"}).append("text").classed("reorder_title",!0).text(i.toUpperCase()).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("font-size",u.fs).style("text-anchor","middle").style("stroke","#47515b").style("alignment-baseline","middle").style("letter-spacing","2px").style("cursor","default").style("-webkit-user-select","none").attr("transform","translate(95, "+u.height/2+")");var o=s.append("g");o.classed(i+"-reorder-buttons",!0);var a=o.selectAll("g").data(f).enter().append("g").attr("transform",function(t,e){return"translate("+(u.x_trans*e+c[i].x_trans)+", "+c[i].y_trans+")"}).on("click",function(o){var a=o.replace("sum","rank").replace("var","rankvar");e.order.inst[i]!=a&&"disp"!=a&&(n("./src/reorders/run_reorder.js")(t,e,i,o),r.select(e.root+" ."+i+"-reorder-buttons").selectAll("rect").style("stroke","#eee"),r.select(this).select("rect").style("stroke","#0000FF75"))});a.append("rect").style("height",u.height).style("width",u.width).style("fill","white").style("rx",10).style("ry",10).style("stroke",function(t){return e.order.inst[i]==t?"#0000FF75":"#eee"}).style("stroke-width",2.5),a.append("text").classed("button-name",!0).text(function(t){return t.toUpperCase()}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("font-size",u.fs).style("text-anchor","middle").style("stroke","#47515b").style("alignment-baseline","middle").style("letter-spacing","2px").style("cursor","default").style("-webkit-user-select","none").attr("transform","translate("+u.width/2+", "+u.height/2+")")}),n("./src/cats/build_reorder_cat_titles.js")(t,this)}},"./src/dendrogram/build_dendrogram_sliders.js":function(t,e,n){var r=n("d3"),i=n("./src/dendrogram/build_single_dendro_slider.js");t.exports=function(){var t,e,n=this.params,o=this.regl;_.each(["row","col"],function(a){"row"===a?(t=150,e=n.viz_width-25):(t=795,e=55),r.select(n.root+" .canvas-container").append("svg").style("height","130px").style("width","20px").style("position","absolute").style("top",t+"px").style("left",e+"px").attr("class",a+"_dendro_slider_svg").attr("transform",function(){return"rotate("+("row"===a?0:-90)+")"}).append("rect").style("height","130px").style("width","25px").style("fill","white"),i(o,n,a)})}},"./src/dendrogram/build_single_dendro_slider.js":function(t,e,n){var r=n("d3"),i=n("./src/dendrogram/change_groups.js");t.exports=function(t,e,n){function o(t,e){return null==e?Math.round(t):Math.round(t*(e=Math.pow(10,e)))/e}var a=100,s=a+20,u=r.drag().on("drag",function(){e.is_slider_drag=!0;var s=r.event.y;s<0&&(s=0);s>a&&(s=a);this.nextSibling&&this.parentNode.appendChild(this);var u=10-(s=o(s,-1))/10;r.select(this).attr("transform","translate(0, "+s+")"),i(t,e,n,u)}).on("end",function(){e.is_slider_drag=!1}),c=r.select(e.root+" ."+n+"_dendro_slider_svg").append("g").classed(n+"_slider_group",!0).attr("transform",function(){return"translate(10, "+s/10+")"});c.append("rect").classed(n+"_slider_background",!0).attr("height",s+"px").attr("width","20px").attr("fill","red").attr("transform",function(){return"translate(-10, -5)"}).style("opacity",0),c.append("line").style("stroke-width",a/7+"px").style("stroke","black").style("stroke-linecap","round").style("opacity",0).attr("y1",0).attr("y2",function(){return a-2}).on("click",l);var f=-a/40;c.append("path").style("fill","black").attr("transform","translate("+f+", 0)").attr("d",function(){return"M0,0 L0, "+a+" L"+a/10+",0 Z"}).style("opacity",.35).on("click",l);function l(){var a=o(r.mouse(this)[1],-1);r.select(e.root+" ."+n+"_group_circle").attr("transform","translate(0, "+a+")"),i(t,e,n,10-a/10)}c.append("circle").classed(n+"_group_circle",!0).attr("r",.08*a).attr("transform",function(){return"translate(0, "+a/2+")"}).style("fill","blue").style("opacity",.35).on("mouseover",function(){r.select(this).style("opacity",.6)}).on("mouseout",function(){r.select(this).style("opacity",.35)}).call(u)}},"./src/dendrogram/calc_dendro_triangles.js":function(t,e){t.exports=function(t,e){var n,r,i,o={},a=t.dendro.group_level[e],s=t.network[e+"_nodes"],u=t.labels["num_"+e];"row"===e?(r=t.viz_dim.heat_size.y,i=r/u):(r=t.viz_dim.heat_size.x,i=r/u);var c=t.order.inst[e];_.each(s,function(r){var s,u=r[c],f=r.group[a];"row"===e?(n=t.viz_dim.mat_size.y-t.viz_dim.heat_size.y,s=-t.node_canvas_pos.y_arr[u]-2*i-2*n):(n=t.viz_dim.mat_size.x-t.viz_dim.heat_size.x,s=-t.node_canvas_pos.x_arr[u]-2*i+2*n);var l=s+i,h=r.name;h.indexOf(": ")>=0&&(h=h.split(": ")[1]),!1===_.has(o,f)&&(o[f]={},o[f].name_top=h,o[f].name_bot=h,o[f].pos_top=s,o[f].pos_bot=l,o[f].pos_mid=(s+l)/2,o[f].name=f,o[f].all_names=[],o[f].inst_axis=e),o[f].all_names.push(h),s<o[f].pos_top&&(o[f].name_top=h,o[f].pos_top=s,o[f].pos_mid=(s+o[f].pos_bot)/2),l>o[f].pos_bot&&(o[f].name_bot=h,o[f].pos_bot=l,o[f].pos_mid=(o[f].pos_top+l)/2)});var f=[];return _.each(o,function(t){f.push(t)}),f}},"./src/dendrogram/change_groups.js":function(t,e,n){var r=n("./src/dendrogram/calc_dendro_triangles.js"),i=n("./src/dendrogram/make_dendro_args.js");t.exports=function(t,e,n,o){"row"===n?e.dendro.group_level.row=o:"col"===n&&(e.dendro.group_level.col=o),e.dendro.update_dendro=!0,e.dendro.group_level[n]=o,e.dendro.group_info[n]=r(e,n),e.dendro.dendro_args[n]=i(t,e,n)}},"./src/dendrogram/make_dendro_args.js":function(t,e,n){var r=n("./src/draws/mat3_transform.js"),i=n("./src/colors/color_to_rgba.js"),o=n("./src/dendrogram/make_dendro_arr.js");t.exports=function(t,e,n){var a,s,u;"row"===n?(a=0,s=e.viz_dim.heat_size.y,u=e.viz_dim.mat_size.x):"col"===n&&(a=Math.PI/2,s=e.viz_dim.heat_size.x,u=e.viz_dim.mat_size.y);var c=e.labels["num_"+n],f=e.dendro.tri_height,l=s/c,h=o(e,n);const d=t.buffer({length:h.length,type:"float",usage:"dynamic"});d(h);var p=r.scaling(1,1),m=r.rotation(a),v=i("black",.35);return{vert:"\n precision highp float;\n attribute vec2 position;\n attribute vec2 dendro_att;\n\n uniform mat3 mat_rotate;\n uniform mat3 mat_scale;\n uniform mat4 zoom;\n uniform float mat_size_offset;\n\n varying vec3 new_position;\n varying vec3 vec_translate;\n\n void main () {\n\n // offset[1] will contain dendro width\n new_position = vec3(position[0], position[1] * dendro_att[1], 0);\n\n // offset[0] contains the actual offset\n vec_translate = vec3(mat_size_offset, dendro_att[0], 0);\n\n new_position = mat_rotate * ( mat_scale * new_position + vec_translate ) ;\n\n // depth is being set to 0.40\n gl_Position = zoom * vec4(new_position[0], new_position[1], 0.40, 1);\n\n }\n ",frag:"\n\n precision highp float;\n uniform vec4 triangle_color;\n\n // color triangle red\n void main () {\n gl_FragColor = triangle_color;\n }\n\n ",attributes:{position:[[e.dendro.trap_float,2*l],[f,l],[e.dendro.trap_float,0]],dendro_att:{buffer:d,divisor:1}},uniforms:{zoom:function(t){return t.view},mat_rotate:m,mat_scale:p,mat_size_offset:u,triangle_color:v},count:3,instances:h.length,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/dendrogram/make_dendro_arr.js":function(t,e){t.exports=function(t,e){var n,r;r="row"===e?t.dendro.group_info.row:t.dendro.group_info.col;var i,o=[];return _.each(r,function(t){i=t.all_names.length,n=[t.pos_top,i],o.push(n)}),o}},"./src/draws/draw_axis_components.js":function(t,e,n){t.exports=function(t,e,r,i=!1){var o;o="col"===r?"x":"y",e.cameras[r+"-labels"].draw(()=>{var a;(e.viz_aid_tri_args[r]=n("./src/matrix_labels/make_viz_aid_tri_args.js")(t,e,r),t(e.viz_aid_tri_args[r])(),_.each(e.cat_args[r],function(r){t(r)({interp_prop:n("./src/draws/interp_fun.js")(e),run_animation:e.ani.running})}),"clust"===e.order.inst[r]&&"clust"===e.order.new[r]&&t(e.dendro.dendro_args[r])(),a="col"===r?n("./src/matrix_labels/make_col_text_args.js")(t,e,e.zoom_data.zoom_function):n("./src/matrix_labels/make_row_text_args.js")(t,e,e.zoom_data.zoom_function),i)?e.labels["num_"+r]/e.zoom_data[o].total_zoom<e.max_num_text&&0==e.labels.queue.high[r].length&&(n("./src/params/calc_viz_area.js")(e),e.labels["num_"+r]>=e.max_num_text&&n("./src/matrix_labels/gather_text_triangles.js")(e,r),t(a)(e.text_triangles.draw[r])):0!=e.text_triangles.draw[r]&&t(a)(e.text_triangles.draw[r])})}},"./src/draws/draw_background_calculations.js":function(t,e,n){var r=n("./src/matrix_labels/vectorize_label.js"),i=n("./src/matrix_labels/drop_label_from_queue.js");t.exports=function(t,e){_.each(["row","col"],function(t){if(e.labels.queue.high[t].length>0){var n=e.labels.queue.high[t][0],o=r(e,t,n);e.text_triangles[t][n]=o,i(e.labels.queue.high[t],t,n),0==e.labels.queue.high[t].length&&0==e.labels.precalc[t]&&(e.ani.update_viz=!0)}})}},"./src/draws/draw_commands.js":function(t,e,n){t.exports=function(t,e){var r=!1;e.tooltip.tooltip_type&&e.tooltip.tooltip_type.includes("-cat-")&&(n("./src/params/generate_cat_args_arrs.js")(t,e),e.int.need_reset_cat_opacity=!0,r=!0),e.int.need_reset_cat_opacity&&0==r&&(n("./src/params/generate_cat_args_arrs.js")(t,e),e.int.need_reset_cat_opacity=!1);var i=e.labels.draw_labels;n("./src/draws/draw_matrix_components.js")(t,e),n("./src/draws/draw_axis_components.js")(t,e,"row",i),n("./src/draws/draw_axis_components.js")(t,e,"col",i),n("./src/draws/draw_static_components.js")(t,e);var o=e.tooltip;o.show_tooltip&&o.in_bounds_tooltip&&o.on_canvas&&n("./src/tooltip/run_show_tooltip.js")(e),e.labels.draw_labels&&(e.labels.draw_labels=!1)}},"./src/draws/draw_interacting.js":function(t,e,n){t.exports=function(t,e){e.int.total=e.int.total+1,n("./src/draws/draw_commands.js")(t,e),setTimeout(n("./src/interactions/final_interaction_frame.js"),100,t,e),e.ani.ini_viz=!1,e.ani.time_remain>0&&(e.ani.time_remain=e.ani.time_remain-1)}},"./src/draws/draw_labels_tooltips_or_dendro.js":function(t,e,n){var r=n("./src/draws/draw_commands.js");t.exports=function(t){var e=this.regl,n=this.params;r(e,n),n.tooltip.show_tooltip&&(n.tooltip.show_tooltip=!1),n.dendro.update_dendro&&(n.dendro.update_dendro=!1)}},"./src/draws/draw_matrix_components.js":function(t,e,n){var r=n("./src/draws/interp_fun.js");t.exports=function(t,e){e.cameras.mat.draw(()=>{t(e.matrix_args.regl_props.rects)({interp_prop:r(e),run_animation:e.ani.running})})}},"./src/draws/draw_mouseover.js":function(t,e,n){var r=n("d3"),i=n("./src/interactions/final_mouseover_frame.js");t.exports=function(t,e){r.selectAll(e.root+" .group-svg-tooltip").remove(),e.zoom_data.x.total_mouseover=e.zoom_data.x.total_mouseover+1,setTimeout(i,100,t,e)}},"./src/draws/draw_static_components.js":function(t,e){t.exports=function(t,e){e.cameras.static.draw(()=>{var n=e.spillover_args,r=e.spillover_triangles;t(n.mat_sides)(r.mat_sides),t(n.cats)(r.cats),t(n.mat_corners)(r.mat_corners),t(n.label_corners)(r.label_corners)})}},"./src/draws/end_animation.js":function(t,e,n){var r=n("d3");t.exports=function(t,e){e.ani.running=!1,e.ani.run_animation=!1,e.matrix_args.regl_props.rects.attributes.pos_att_ini={buffer:t.buffer(e.arrs.position_arr.new),divisor:1},_.each(["row","col"],function(n){for(var i=0;i<e.cat_data.cat_num[n];i++)e.cat_args[n][i].attributes.cat_pos_att_inst={buffer:t.buffer(e.cat_arrs.new[n][i]),divisor:1};e.order.inst[n]=e.order.new[n],"clust"===e.order.inst[n]&&r.select("."+n+"_dendro_slider_svg").style("display","block")}),_.each(["row","col"],function(t){e.text_triangles.draw[t]=n("./src/matrix_labels/update_text_triangle_order.js")(e,t),n("./src/matrix_labels/calc_text_offsets.js")(e,t)}),n("./src/matrix_labels/gen_ordered_labels.js")(e)}},"./src/draws/interp_fun.js":function(t,e,n){const r=n("./node_modules/eases/cubic-in-out.js");t.exports=function(t){return r((t.ani.time-t.ani.last_switch_time)/t.ani.ani_duration)}},"./src/draws/mat3_transform.js":function(t,e){t.exports={translation:function(t,e){return[1,0,0,0,1,0,t,e,1]},rotation:function(t){var e=Math.cos(t),n=Math.sin(t);return[e,-n,0,n,e,0,0,0,1]},scaling:function(t,e){return[t,0,0,0,e,0,0,0,1]}}},"./src/draws/run_viz.js":function(t,e,n){var r=n("d3");_=n("./node_modules/underscore/underscore.js");var i=n("./src/cameras/reset_cameras.js"),o=n("./src/draws/start_animation.js"),a=n("./src/draws/end_animation.js"),s=n("./src/draws/draw_interacting.js"),u=n("./src/draws/draw_mouseover.js"),c=n("./src/draws/draw_background_calculations.js");t.exports=function(t){var e=this,n=e.regl,f=e.params;f.ani.first_frame=!0,n.frame(function({time:l}){f.ani.time=l,f.int.total>1&&r.selectAll(f.root+" .group-svg-tooltip").remove(),f.int.total<0&&(f.int.total=0),f.reset_cameras&&i(n,f),f.ani.run_animation?o(f):f.ani.time>f.ani.duration_end&&!0===f.ani.running&&a(n,f),1==f.int.still_interacting||1==f.ani.ini_viz||1==f.ani.running||1==f.ani.update_viz?(s(n,f),f.ani.update_viz=!1):1==f.int.still_mouseover?(u(n,f),c(n,f)):f.labels.draw_labels||f.tooltip.show_tooltip||f.dendro.update_dendro?e.draw_labels_tooltips_or_dendro(t):c(n,f)})}},"./src/draws/start_animation.js":function(t,e){t.exports=function(t){t.ani.run_animation=!1,t.ani.last_switch_time=t.ani.time,t.ani.running=!0,t.ani.duration_end=t.ani.last_switch_time+t.ani.ani_duration}},"./src/initialize_viz/destroy_viz.js":function(t,e,n){var r=n("d3");t.exports=function(){r.select(this.params.base_container).selectAll("div").remove(),this.regl.destroy()}},"./src/initialize_viz/ini_canvas_mouseover.js":function(t,e,n){var r=n("d3");t.exports=function(){var t=this.params;r.select(t.root+" .canvas-container canvas").on("mouseover",function(){t.tooltip.on_canvas=!0}).on("mouseout",function(){t.tooltip.on_canvas=!1})}},"./src/initialize_viz/initialize_containers.js":function(t,e,n){var r=n("d3");t.exports=function(){var t=this.args.container;r.select(t).append("div").attr("class","control-container").style("cursor","default"),r.select(t).append("div").attr("class","canvas-container").style("position","absolute").style("cursor","default"),console.log("base_container"),console.log(t);var e=r.select(t).select(".canvas-container")._groups[0][0],n=this.args.viz_height,i=this.args.viz_width;r.select(e).style("height",n+"px").style("width",i+"px"),this.canvas_container=e}},"./src/initialize_viz/viz_from_network.js":function(t,e){t.exports=function(t){this.initialize_containers(),this.initialize_regl(),this.initialize_params(t),this.build_control_panel(),this.build_dendrogram_sliders(),this.ini_canvas_mouseover(),this.run_viz(t)}},"./src/interactions/double_clicking.js":function(t,e,n){var r=n("./src/reorders/custom_label_reorder.js");t.exports=function(t,e){"col-label"===e.tooltip.tooltip_type&&r(t,e,"col"),"row-label"===e.tooltip.tooltip_type&&r(t,e,"row")}},"./src/interactions/final_interaction_frame.js":function(t,e){t.exports=function(t,e){e.int.total=e.int.total-1,0==e.int.total&&0==e.ani.ini_viz&&(0==e.ani.first_frame?(e.labels.draw_labels=!0,e.zoom_data.x.total_mouseover):e.ani.first_frame=!1)}},"./src/interactions/final_mouseover_frame.js":function(t,e){t.exports=function(t,e){e.zoom_data.x.total_mouseover=e.zoom_data.x.total_mouseover-1,0==e.zoom_data.x.total_mouseover&&0==e.int.still_mouseover&&(e.tooltip.show_tooltip=!0)}},"./src/interactions/find_mouseover_element.js":function(t,e,n){t.exports=function(t,e,r){var i=e.viz_dim.heat,o=e.int.mouseover;_.each(["row","col"],function(t){e.int.mouseover[t]={},e.int.mouseover[t].name=null,e.int.mouseover[t].cats=[]}),e.int.mouseover.value=null;var a,s={},u={x:"width",y:"height"},c={};_.each(["x","y"],function(t){e.zoom_data[t].cursor_position=r[t+"0"],s[t]=e.viz_dim.canvas[u[t]]*e.viz_dim.offcenter[t]/2,c[t]=e.zoom_data[t].cursor_position-i[t].min-s[t],c[t]=c[t]/e.zoom_data[t].total_zoom-e.zoom_data[t].total_pan_min,e.zoom_data[t].cursor_rel_min=c[t]}),n("./src/interactions/get_mouseover_type.js")(e);var f={};if(e.tooltip.in_bounds_tooltip){var l,h=[];if("matrix-cell"===e.tooltip.tooltip_type)h=["row","col"];else if(e.tooltip.tooltip_type.indexOf("row")>=0)h=["row"];else if(e.tooltip.tooltip_type.indexOf("col")>=0&&(h=["col"],e.zoom_data.x.total_zoom/e.zoom_restrict.x.max>.01)){var d=126-e.zoom_data.y.cursor_position;d>0&&(c.x=c.x-d/e.zoom_data.x.total_zoom)}_.each(h,function(t){"row"===t?(l=Math.floor(c.y/e.tile_pix_height),f[t]=e.labels.ordered_labels[t+"_indices"][l]):(l=Math.floor(c.x/e.tile_pix_width),f[t]=e.labels.ordered_labels[t+"_indices"][l]),o[t].name=e.labels.ordered_labels[t+"s"][l],"string"==typeof o[t].name&&o[t].name.includes(": ")&&(o[t].name=o[t].name.split(": ")[1]),o[t].cats=[],_.each(e.cat_data[t],function(n,r){a=e.labels.ordered_labels[t+"_cats-"+r][l],o[t].cats[r]=a})}),"matrix-cell"===e.tooltip.tooltip_type&&(e.int.mouseover.value=e.mat_data[f.row][f.col])}e.tooltip.tooltip_type.indexOf("dendro")>=0&&("row-dendro"===e.tooltip.tooltip_type&&_.each(e.dendro.group_info.row,function(t){t.all_names.includes(o.row.name)&&(o.row.dendro=t)}),"col-dendro"===e.tooltip.tooltip_type&&_.each(e.dendro.group_info.col,function(t){t.all_names.includes(o.col.name)&&(o.col.dendro=t)}))}},"./src/interactions/get_mouseover_type.js":function(t,e){t.exports=function(t){var e={x:{}};e.x.heat_min=125+12*t.cat_data.row.length,e.x.dendro_start=845,e.x.dendro_end=860,e.y={},e.y.heat_min=126+12*t.cat_data.col.length,e.y.dendro_start=845,e.y.dendro_end=860;var n,r={};r.x=t.zoom_data.x.cursor_position,r.y=t.zoom_data.y.cursor_position,t.tooltip.in_bounds_tooltip=!1,t.tooltip.tooltip_type="out-of-bounds",r.x>e.x.heat_min&&r.x<e.x.dendro_start&&r.y>e.y.heat_min&&r.y<e.y.dendro_start?(t.tooltip.in_bounds_tooltip=!0,t.tooltip.tooltip_type="matrix-cell"):r.x<=e.x.heat_min&&r.y>e.y.heat_min&&r.y<e.y.dendro_start?(t.tooltip.in_bounds_tooltip=!0,t.cat_data.row.length>0&&(n=Math.floor((e.x.heat_min-r.x)/12))+1<=t.cat_data.row.length?t.tooltip.tooltip_type="row-cat-"+String(t.cat_data.row.length-n-1):t.tooltip.tooltip_type="row-label"):r.y<=e.y.heat_min&&r.x>e.x.heat_min&&r.x<e.x.dendro_start?(t.tooltip.in_bounds_tooltip=!0,t.cat_data.col.length>0&&(n=Math.floor((e.y.heat_min-r.y)/12))+1<=t.cat_data.col.length?t.tooltip.tooltip_type="col-cat-"+String(t.cat_data.col.length-n-1):t.tooltip.tooltip_type="col-label"):r.x>=e.x.dendro_start&&r.x<e.x.dendro_end&&r.y>e.y.heat_min&&r.y<e.y.dendro_start?"clust"==t.order.inst.row&&(t.tooltip.tooltip_type="row-dendro",t.tooltip.in_bounds_tooltip=!0):r.y>=e.y.dendro_start&&r.y<e.y.dendro_end&&r.x>e.x.heat_min&&r.x<e.x.dendro_start&&"clust"==t.order.inst.col&&(t.tooltip.tooltip_type="col-dendro",t.tooltip.in_bounds_tooltip=!0)}},"./src/interactions/interaction-events.js":function(t,e,n){t.exports=function(t){var e,n,c=r({element:window,constrainZoom:!1},t||{}),f=s({}),l=c.element,h=!1,d=[null,null],p=[null,null],m=!1,v=0,g={},_=0,y={},b=o(l,function(t,e,n,r){_=t,y=r});function x(t,e){return t.preventDefault=e.preventDefault.bind(e),t.stopPropagation=e.stopPropagation.bind(e),t}function w(t){var e=this.getBoundingClientRect();g.type="wheel",g.buttons=_,g.mods=y,g.x0=t.x-e.left,g.y0=t.y-e.top,g.dx=t.deltaX,g.dy=t.deltaY,g.dz=t.deltaZ,g.dsx=1,g.dsy=1,g.dsz=1,g.theta=0,g.dtheta=0,f.emit("interaction",x(g,t))}function j(t){e=i.x(t),n=i.y(t),g.type="mousedown",g.buttons=_,g.mods=y,g.x0=e,g.y0=n,g.dx=0,g.dy=0,g.dz=0,g.dsx=1,g.dsy=1,g.dsz=1,g.theta=0,g.dtheta=0,f.emit("interactionend",x(g,t))}function M(t){var r=i.x(t),o=i.y(t);g.type="mousemove",g.buttons=_,g.mods=y,g.x0=r,g.y0=o,g.dx=r-e,g.dy=o-n,g.dz=0,g.dsx=1,g.dsy=1,g.dsz=1,g.theta=0,g.dtheta=0,e=r,n=o,f.emit("interaction",x(g,t))}function A(t){for(var e=t.identifier,n=0;n<p.length;n++)if(p[n]&&p[n].touch&&p[n].touch.identifier===e)return n;return-1}function k(t){d=[null,null];for(var e=0;e<t.changedTouches.length;e++){var n=t.changedTouches[e],r=n.identifier,i=A(r);if(-1===i&&v<2){var o=0===v,s=p[0]?1:0,c=new u;p[s]=c,v+=1,c.touch=n,a(n,l,c.position),o||(m=!1)}}v>0&&(g.type=1===v?"touchstart":"pinchstart",g.buttons=0,g.mods={},g.x0=0,g.y0=0,g.dx=0,g.dy=0,g.dz=0,g.dsx=1,g.dsy=1,g.dsz=1,g.theta=0,g.dtheta=0,f.emit("interactionstart",x(g,t)))}function E(t){for(var e,n=!1,r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];-1!==(e=A(i))&&(n=!0,p[e].touch=i,a(i,l,p[e].position))}if(n)if(1===v){for(e=0;e<p.length&&!p[e];e++);if(p[e]&&d[e]){var o=p[e].position[0],s=p[e].position[1],u=o-d[e][0],c=s-d[e][1];g.type="touch",g.buttons=0,g.mods={},g.x0=o,g.y0=s,g.dx=u,g.dy=c,g.dz=0,g.dsx=1,g.dsy=1,g.dsz=1,g.theta=0,g.dtheta=0,f.emit("interaction",x(g,t))}}else if(2===v&&d[0]&&d[1]){var h=d[0],m=d[1],_=m[0]-h[0],y=m[1]-h[1],b=p[0].position,w=p[1].position,j=w[0]-b[0],M=w[1]-b[1],k=Math.sqrt(_*_+y*y),E=Math.atan2(y,_),z=Math.sqrt(j*j+M*M),T=Math.atan2(M,j),S=.5*(m[0]+h[0]),N=.5*(m[1]+h[1]);u=.5*(w[0]+b[0]-h[0]-m[0]),c=.5*(w[1]+b[1]-h[1]-m[1]);var O=z/k,C=T-E;g.type="pinch",g.buttons=0,g.mods={},g.x0=S,g.y0=N,g.dx=u,g.dy=c,g.dz=0,g.dsx=O,g.dsy=O,g.dsz=1,g.theta=T,g.dtheta=C,f.emit("interaction",x(g,t))}p[0]&&(d[0]=p[0].position.slice()),p[1]&&(d[1]=p[1].position.slice())}function z(t){for(var e=0;e<t.changedTouches.length;e++){var n=t.changedTouches[e],r=A(n);-1!==r&&(p[r]=null,v-=1)}m||2===v||(m=!0),v<2&&(g.type=0===v?"touchend":"pinchend",g.buttons=0,g.mods={},g.x0=0,g.y0=0,g.dx=0,g.dy=0,g.dz=0,g.dsx=1,g.dsy=1,g.dsz=1,g.theta=0,g.dtheta=0,f.emit("interactionend",x(g,t)))}function T(){h||(h=!0,b.enabled=!0,l.addEventListener("wheel",w,!1),l.addEventListener("mousedown",j,!1),l.addEventListener("mousemove",M,!1),l.addEventListener("touchstart",k,!1),l.addEventListener("touchmove",E,!1),l.addEventListener("touchend",z,!1),l.addEventListener("touchcancel",z,!1))}return T(),f.enable=T,f.disable=function(){h&&(h=!1,b.enabled=!1,l.removeEventListener("wheel",w,!1),l.removeEventListener("mousedown",j,!1),l.removeEventListener("mousemove",M,!1),l.removeEventListener("touchstart",k,!1),l.removeEventListener("touchmove",E,!1),l.removeEventListener("touchend",z,!1),l.removeEventListener("touchcancel",z,!1))},f};var r=n("./node_modules/util-extend/extend.js"),i=n("./node_modules/mouse-event/mouse.js"),o=n("./node_modules/mouse-change/mouse-listen.js"),a=n("./node_modules/mouse-event-offset/index.js"),s=n("./node_modules/event-emitter/index.js");function u(){this.position=[0,0],this.touch=null}},"./src/interactions/keep_track_of_interactions.js":function(t,e){t.exports=function(t){0==t.int.still_interacting&&(t.int.still_interacting=!0,setTimeout(function(){t.int.still_interacting=!1},100))}},"./src/interactions/keep_track_of_mouseovers.js":function(t,e){t.exports=function(t){0==t.int.still_mouseover&&(t.int.still_mouseover=!0,setTimeout(function(){t.int.still_mouseover=!1},1e3))}},"./src/interactions/single_clicking.js":function(t,e,n){var r=n("./src/tooltip/run_hide_tooltip.js");t.exports=function(t,e){t.ani.last_click=t.ani.time;r(t,!0),t.tooltip.tooltip_type.includes("-dendro")&&!1===t.tooltip.permanent_tooltip&&(n("./src/tooltip/run_show_tooltip.js")(t),t.tooltip.permanent_tooltip=!0),t.is_widget&&(console.log("--\x3e running widget callback on click"),this.widget_callback(e))}},"./src/interactions/track_interaction_zoom_data.js":function(t,e,n){var r=n("./src/zoom/zoom_rules_low_mat.js"),i=n("./src/interactions/find_mouseover_element.js"),o=n("./src/interactions/keep_track_of_interactions.js"),a=n("./src/interactions/keep_track_of_mouseovers.js");t.exports=function(t,e,n){var s=e.zoom_data,u=e.zoom_restrict,c=e.viz_dim;if(n.buttons||-1!==["wheel","touch","pinch"].indexOf(n.type)){switch(n.type){case"wheel":n.dsx=n.dsy=Math.exp(-n.dy/100),n.dx=n.dy=0}var f;s.x.inst_zoom=n.dsx,s.x.pan_by_drag=n.dx,s.x.cursor_position=n.x0,s.y.inst_zoom=n.dsy,s.y.pan_by_drag=n.dy,s.y.cursor_position=n.y0,s.y.total_zoom<u.y.ratio?(s.x.inst_zoom=1,(f=s.y.total_zoom*s.y.inst_zoom)>u.y.ratio&&(s.x.inst_zoom=f/u.y.ratio)):s.x.total_zoom<u.x.ratio&&(s.y.inst_zoom=1,(f=s.x.total_zoom*s.x.inst_zoom)>u.x.ratio&&(s.y.inst_zoom=f/u.x.ratio)),s.x=r(e,u.x,s.x,c.heat.x,c.mat.x,"x"),s.y=r(e,u.y,s.y,c.heat.y,c.mat.y,"y"),o(e)}else"mousemove"===n.type&&(a(e),i(t,e,n))}},"./src/main.js":function(t,e,n){t.exports=function(t,e=null){var r=n("d3");console.log("required d3",r.version),console.log(e),console.log("#################################"),console.log("clustergrammer-gl version 0.11.10"),console.log("#################################");var i={};if(null!=t.container)return i.args=t,i.initialize_params=n("./src/params/initialize_params.js"),i.initialize_regl=n("./src/params/initialize_regl.js"),i.initialize_containers=n("./src/initialize_viz/initialize_containers.js"),i.build_dendrogram_sliders=n("./src/dendrogram/build_dendrogram_sliders.js"),i.build_control_panel=n("./src/control_panel/build_control_panel.js"),i.run_viz=n("./src/draws/run_viz.js"),i.destroy_viz=n("./src/initialize_viz/destroy_viz.js"),i.ini_canvas_mouseover=n("./src/initialize_viz/ini_canvas_mouseover.js"),i.viz_from_network=n("./src/initialize_viz/viz_from_network.js"),i.draw_labels_tooltips_or_dendro=n("./src/draws/draw_labels_tooltips_or_dendro.js"),i.single_clicking=n("./src/interactions/single_clicking.js"),i.zoom_rules_high_mat=n("./src/zoom/zoom_rules_high_mat.js"),void 0!==t.widget_callback&&(console.log("pass widget_callback to cgm "),i.widget_callback=t.widget_callback),i.network=t.network,i.viz_from_network(e),null!=e&&(e.cgm=i),i}},"./src/matrix_cells/make_matrix_args.js":function(t,e,n){var r=n("./src/matrix_cells/make_position_arr.js"),i=n("./src/matrix_cells/make_opacity_arr.js");t.exports=function(t,e){e.arrs={},e.arrs.opacity_arr=i(e),e.arrs.position_arr={},e.arrs.position_arr.ini=r(e,e.order.inst.row,e.order.inst.col),e.arrs.position_arr.new=r(e,e.order.new.row,e.order.new.col);var n=t.buffer({type:"float",usage:"dynamic"})(e.arrs.opacity_arr),o=e.viz_dim.tile_width,a=e.viz_dim.tile_height,s=[[o,0],[o,a],[0,a],[o,0],[0,0],[0,a]],u=e.arrs.position_arr.ini.length,c=e.zoom_data.zoom_function,f={vert:"\n // precision highp float;\n precision lowp float;\n attribute vec2 position;\n attribute vec2 pos_att_ini, pos_att_new;\n attribute float opacity_att;\n uniform mat4 zoom;\n uniform bool run_animation;\n uniform float interp_uni;\n varying vec2 pos;\n\n // pass varying variables to fragment from vector\n varying float opacity_vary;\n\n void main() {\n\n // interpolate between the two positions using the interpolate uniform\n if (run_animation == true){\n pos = mix(pos_att_ini, pos_att_new, interp_uni);\n } else {\n pos = pos_att_ini;\n }\n\n gl_Position = zoom *\n vec4( position.x + pos.x,\n position.y + pos.y,\n 0.75,\n 1\n );\n\n // pass attribute (in vert) to varying in frag\n opacity_vary = opacity_att;\n\n }",frag:"\n // precision highp float;\n precision lowp float;\n\n // use the varying being passed from the vertex shader\n varying float opacity_vary;\n\n void main() {\n\n if (opacity_vary > 0.0){\n gl_FragColor = vec4(1, 0, 0, abs(opacity_vary));\n } else {\n gl_FragColor = vec4(0, 0, 1, abs(opacity_vary));\n }\n\n }",attributes:{position:s,pos_att_ini:{buffer:t.buffer(e.arrs.position_arr.ini),divisor:1},pos_att_new:{buffer:t.buffer(e.arrs.position_arr.new),divisor:1},opacity_att:{buffer:n,divisor:1}},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:1,dstRGB:"one minus src alpha",dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},count:6,uniforms:{zoom:c,interp_uni:(t,e)=>Math.max(0,Math.min(1,e.interp_prop)),run_animation:t.prop("run_animation")},instances:u,depth:{enable:!1}},l={regl_props:{}};return l.regl_props.rects=f,l}},"./src/matrix_cells/make_opacity_arr.js":function(t,e,n){var r=n("d3");t.exports=function(t){var e=t.mat_data,n=[].concat.apply([],e),i=Math.abs(_.max(n,function(t){return Math.abs(t)})),o=r.scaleLinear(),a=i;return o.domain([-a,a]).range([-1,1]).clamp(!0),n=n.map(function(t){return o(t)})}},"./src/matrix_cells/make_position_arr.js":function(t,e){t.exports=function(t,e,n){var r,i=t.labels.num_row,o=t.labels.num_col,a=t.node_canvas_pos,s=t.network.row_nodes,u=t.network.col_nodes;return Array(i*o).fill().map(function(t,c){return r=a.y_arr[i-1-s[Math.floor(c/o)][e]],[a.x_arr[o-1-u[c%o][n]],r]})}},"./src/matrix_labels/calc_text_offsets.js":function(t,e){t.exports=function(t,e){t.labels.offset_dict[e]={},_.each(t.network[e+"_nodes"],function(n,r){var i,o,a,s={};a="col"===e?"x":"y";var u=t.canvas_pos[a+"_arr"],c=t.order.inst[e],f=t.order.new[e],l=t.labels["num_"+e];_.each(["inst","new"],function(n){o="inst"===n?c:f,"col"===e?(i=t.network[e+"_nodes"][r][o],s[n]=u[l-1-i]+.5/l):(i=l-1-t.network[e+"_nodes"][r][o],s[n]=u[i]+.5/l)}),n.offsets=s;var h=n.name;h.indexOf(": ")>=0&&(h=n.name.split(": ")[1]),t.labels.offset_dict[e][h]=s})}},"./src/matrix_labels/drop_label_from_queue.js":function(t,e){t.exports=function(t,e,n){var r=t.indexOf(n);r>-1&&t.splice(r,1)}},"./src/matrix_labels/gather_text_triangles.js":function(t,e,n){var r=n("./src/matrix_labels/vectorize_label.js");t.exports=function(t,e){var n;console.log("gather_text_triangles"),n="col"===e?"x":"y",t.text_triangles.draw[e]=[];var i=t.viz_area,o=i[n+"_min"],a=i[n+"_max"];_.each(t.network[e+"_nodes"],function(n){if(n.offsets.inst>o&&n.offsets.inst<a){var i,s=n.name;s.indexOf(": ")>=0&&(s=n.name.split(": ")[1]),s in t.text_triangles[e]?((i=t.text_triangles[e][s]).inst_offset=[0,n.offsets.inst],i.new_offset=[0,n.offsets.new],t.text_triangles.draw[e].push(i)):(t.labels.queue.high[e].push(s),t.labels.precalc[e]&&(i=r(t,e,s),t.text_triangles[e][s]=i,i.inst_offset=[0,n.offsets.inst],i.new_offset=[0,n.offsets.new],t.text_triangles.draw[e].push(i)))}})}},"./src/matrix_labels/gen_ordered_labels.js":function(t,e){t.exports=function(t){var e,n,r,i,o={};_.each(["row","col"],function(a){for(o[a+"s"]=[],o[a+"_indices"]=[],n=t.network[a+"_nodes"],i=!1,r=0;r<t.cat_data.cat_num[a];r++)o[a+"_cats-"+String(r)]=[];t.cat_data.cat_num[a]>0&&(i=!0),_.each(n,function(n,s){if(e=t.labels["num_"+a]-1-n[t.order.inst[a]],o[a+"s"][e]=n.name,o[a+"_indices"][e]=s,i)for(r=0;r<t.cat_data.cat_num[a];r++)o[a+"_cats-"+String(r)][e]=n["cat-"+String(r)]})}),t.labels.ordered_labels=o}},"./src/matrix_labels/make_col_text_args.js":function(t,e,n){var r=n("d3"),i=n("./src/draws/mat3_transform.js"),o=n("./src/draws/interp_fun.js");t.exports=function(t,e,n){var a=e.labels.num_col,s=e.viz_dim.heat_size.x/a;e.text_scale.col=r.scaleLinear().domain([1,10]).range([1,10/e.allow_zoom.col]);var u=a/5;e.text_scale.col=r.scaleLinear().domain([1,e.max_zoom]).range([1,u]);var c=a,f=1/a*e.zoom_data.x.total_zoom,l=e.text_zoom.col.max_webgl_fs;f>l&&(c*=f/l);var h=i.rotation(Math.PI/4),d=i.scaling(1,e.zoom_data.x.total_zoom),p=s,m=-.5*(s/Math.sqrt(2));return{vert:"\n precision mediump float;\n attribute vec2 position;\n uniform mat4 zoom;\n uniform vec2 inst_offset;\n uniform vec2 new_offset;\n uniform float y_offset;\n uniform float scale_text;\n uniform mat3 mat_rotate;\n uniform mat3 text_y_scale;\n uniform float total_zoom;\n uniform float col_width;\n varying vec3 rotated_text;\n varying vec3 position_cols;\n uniform float heat_size;\n varying vec3 xy_positions;\n varying float x_position;\n varying float y_position;\n uniform float shift_text_out;\n uniform float shift_text_right;\n uniform float shift_text_up;\n uniform float shift_heat;\n uniform float interp_uni;\n uniform bool run_animation;\n varying vec2 mixed_offset;\n\n // last value is a sort-of zoom\n void main () {\n\n // rotate, reduce size, stretch in y, and give text triangles positions\n // shifting text up in the original text triangle units\n rotated_text = text_y_scale *\n mat_rotate *\n vec3(position.y/scale_text, position.x/scale_text, 0.0);\n\n // the y position is constant for all column labels\n //---------------------------------------------------------------\n // working on shifting text up\n //---------------------------------------------------------------\n y_position = y_offset;\n\n // the x position varies for all column labelss\n //---------------------------------------------------------------\n // interpolate between the two positions using the interpolate uniform\n if (run_animation){\n mixed_offset = mix(inst_offset, new_offset , interp_uni);\n } else {\n mixed_offset = inst_offset;\n }\n\n // mixed_offset = inst_offset;\n\n x_position = (mixed_offset[1] * 2.0 * heat_size + shift_heat + shift_text_right);\n\n position_cols = vec3( x_position, y_position, 0.10);\n\n xy_positions = rotated_text + position_cols;\n\n // reverse y position to get words to be upright\n ////////////////////////////\n // vec4: x, y, depth, zoom\n ////////////////////////////\n gl_Position = zoom * vec4( xy_positions, 1.0);\n\n }",frag:"\n precision mediump float;\n void main () {\n gl_FragColor = vec4(0.2, 0.2, 0.2, 1.0);\n }",attributes:{position:t.prop("positions")},elements:t.prop("cells"),uniforms:{zoom:n,inst_offset:t.prop("inst_offset"),new_offset:t.prop("new_offset"),scale_text:c,y_offset:e.viz_dim.mat_size.y,heat_size:e.viz_dim.heat_size.x,shift_heat:e.viz_dim.mat_size.x-e.viz_dim.heat_size.x,shift_text_right:p,shift_text_out:0,shift_text_up:m,mat_rotate:h,text_y_scale:d,total_zoom:e.zoom_data.x.total_zoom,col_width:s,interp_uni:()=>Math.max(0,Math.min(1,o(e))),run_animation:e.ani.running},depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/matrix_labels/make_label_queue.js":function(t,e){t.exports=function(t){var e;t.labels.queue={},t.labels.queue.low={},t.labels.queue.high={},t.labels.max_label_queue=2e3,_.each(["row","col"],function(n){t.labels.queue.high[n]=[],e=[];var r=t.labels.ordered_labels[n+"s"];_.each(r,function(t){t.indexOf(": ")>=0&&(t=t.split(": ")[1]),e.push(t)}),t.labels.queue.low[n]=e})}},"./src/matrix_labels/make_row_text_args.js":function(t,e,n){var r=n("./src/draws/mat3_transform.js"),i=n("./src/draws/interp_fun.js");t.exports=function(t,e,n){var o=e.labels.num_row,a=o,s=1/o*e.zoom_data.y.total_zoom,u=e.text_zoom.row.max_webgl_fs;s>u&&(a*=s/u);var c=r.rotation(Math.PI/2),f=e.viz_dim.mat_size.x+.02;return{vert:"\n precision mediump float;\n attribute vec2 position;\n uniform mat4 zoom;\n uniform vec2 inst_offset;\n uniform vec2 new_offset;\n uniform float x_offset;\n uniform float scale_text;\n uniform float total_zoom;\n uniform mat3 mat_rotate;\n uniform float heat_size;\n varying float x_position;\n varying float y_position;\n uniform float shift_heat;\n uniform float interp_uni;\n uniform bool run_animation;\n varying vec2 mixed_offset;\n\n // vec3 tmp = vec3(1,1,1);\n\n // last value is a sort-of zoom\n void main () {\n\n // reverse y position to get words to be upright\n\n // the x position is constant for all row labels\n //------------------------------------------------------\n // total_zoom stretches out row labels horizontally\n // then text is offset to the left side of the heatmap\n //------------------------------------------------------\n x_position = position.x/scale_text * total_zoom - x_offset;\n\n // the y position varies for all row labels\n //------------------------------------------------------\n // shift by offset and then uniformly shift down by s\n // shift_heat\n //------------------------------------------------------\n // interpolate between the two positions using the interpolate uniform\n if (run_animation){\n mixed_offset = mix(inst_offset, new_offset , interp_uni);\n } else {\n mixed_offset = inst_offset;\n }\n\n // mixed_offset = inst_offset;\n\n y_position = -position.y/scale_text + 2.0 * heat_size * mixed_offset[1] - shift_heat ;\n\n gl_Position = zoom *\n vec4(x_position,\n y_position,\n 0.50,\n 1.0);\n }",frag:"\n precision mediump float;\n void main () {\n gl_FragColor = vec4(0.2, 0.2, 0.2, 1.0);\n }",attributes:{position:t.prop("positions")},elements:t.prop("cells"),uniforms:{zoom:n,inst_offset:t.prop("inst_offset"),new_offset:t.prop("new_offset"),scale_text:a,x_offset:f,heat_size:e.viz_dim.heat_size.y,shift_heat:e.viz_dim.mat_size.y-e.viz_dim.heat_size.y,total_zoom:e.zoom_data.y.total_zoom,mat_rotate:c,interp_uni:()=>Math.max(0,Math.min(1,i(e))),run_animation:e.ani.running},depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/matrix_labels/make_viz_aid_tri_args.js":function(t,e,n){var r=n("./src/draws/mat3_transform.js"),i=n("./src/colors/color_to_rgba.js"),o=n("./src/matrix_labels/make_viz_aid_tri_pos_arr.js"),a=n("./src/draws/interp_fun.js");t.exports=function(t,e,n){var s,u,c,f,l=i("#eee",1),h=e.labels["num_"+n];"col"===n?(s=(c=e.viz_dim.heat_size.x)/h*e.zoom_data.x.total_zoom,u=c/h,f=-e.viz_dim.mat_size.y-s):(s=.0125,u=(c=e.viz_dim.heat_size.y)/h,f=-e.viz_dim.mat_size.x-s);var d,p=o(e,n,e.order.inst[n]),m=o(e,n,e.order.new[n]),v=r.scaling(2,1);"row"===n?d=0:"col"===n&&(d=Math.PI/2);var g=r.rotation(d),_=e.zoom_data.x.total_zoom;return{vert:"\n precision highp float;\n attribute vec2 ini_position;\n attribute float tri_offset_att_inst;\n attribute float tri_offset_att_new;\n\n uniform mat3 mat_rotate;\n uniform mat3 scale_y;\n uniform mat4 zoom;\n uniform float top_offset;\n uniform float total_zoom;\n uniform float interp_uni;\n uniform bool run_animation;\n\n varying vec3 new_position;\n varying vec3 vec_translate;\n varying vec2 viz_aid_pos;\n\n void main () {\n\n new_position = vec3(ini_position, 0);\n\n // interpolate between the two positions using the interpolate uniform\n if (run_animation){\n viz_aid_pos = mix(vec2(tri_offset_att_inst, 0), vec2(tri_offset_att_new, 0), interp_uni);\n } else{\n viz_aid_pos = vec2(tri_offset_att_inst, 0);\n }\n\n vec_translate = vec3(top_offset, viz_aid_pos);\n\n // rotate translated triangles\n new_position = mat_rotate * ( new_position + vec_translate );\n\n // depth is being set to 0.45\n gl_Position = zoom * vec4( vec2(new_position), 0.45, 1);\n\n }\n ",frag:"\n\n precision highp float;\n uniform vec4 triangle_color;\n\n // color triangle red\n void main () {\n\n // defining the triangle color using a uniform\n gl_FragColor = triangle_color;\n\n }\n\n ",attributes:{ini_position:[[s,0],[0,-u],[s,-2*u]],tri_offset_att_inst:{buffer:t.buffer(p),divisor:1},tri_offset_att_new:{buffer:t.buffer(m),divisor:1}},uniforms:{zoom:function(t){return t.view},mat_rotate:g,scale_y:v,top_offset:f,triangle_color:l,total_zoom:_,interp_uni:()=>Math.max(0,Math.min(1,a(e))),run_animation:e.ani.running},count:3,instances:h,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/matrix_labels/make_viz_aid_tri_pos_arr.js":function(t,e){t.exports=function(t,e,n){var r,i,o,a=t.labels["num_"+e];"row"===e?(i=(r=t.viz_dim.heat_size.y)/a,o=t.viz_dim.mat_size.y-t.viz_dim.heat_size.y):(i=(r=t.viz_dim.heat_size.x)/a,o=-(t.viz_dim.mat_size.x-t.viz_dim.heat_size.x));var s,u,c,f=[];for(s=0;s<a;s++)c=t.network[e+"_nodes"][s][n],u="row"==e?a-c-1:c,f[s]=r-o-2*i*u;return f}},"./src/matrix_labels/update_text_triangle_order.js":function(t,e){t.exports=function(t,e){var n,r,i,o=t.order.inst[e],a=t.order.new[e],s=t.text_triangles.draw[e],u=t.labels["num_"+e];n="col"===e?"x":"y";var c={},f=t.canvas_pos[n+"_arr"];return _.each(s,function(n,s){_.each(["inst","new"],function(n){i="inst"===n?o:a,"col"===e?(r=t.network[e+"_nodes"][s][i],c[n]=f[u-1-r]+.5/u):(r=u-1-t.network[e+"_nodes"][s][i],c[n]=f[r]+.5/u)}),n.inst_offset=[0,c.inst],n.new_offset=[0,c.new]}),s}},"./src/matrix_labels/vectorize_label.js":function(t,e,n){const r=n("./node_modules/vectorize-text/index.js");var i=n("./src/matrix_labels/drop_label_from_queue.js");t.exports=function(t,e,n){var o={textAlign:"left",triangles:!0,size:t.labels.font_detail,font:'"Open Sans", verdana, arial, sans-serif'};return"col"===e?(o.textAlign="left",o.textBaseline="bottom"):(o.textAlign="right",o.textBaseline="middle"),i(t.labels.queue.low[e],e,n),r(n,o)}},"./src/params/calc_alpha_order.js":function(t,e,n){var r=n("./src/utils/utils_clust.js");t.exports=function(t){var e,n,i=t.network;_.each(["row","col"],function(t){var o=i[t+"_nodes"];e=r.pluck(o,"name"),i[t+"_node_names"]=e,n=e.concat().sort(),_.map(o,function(t){var r=e.length-n.indexOf(t.name)-1;t.alpha=r,t.custom=r})})}},"./src/params/calc_mat_arr.js":function(t,e){t.exports=function(t){var e,n,r,i,o,a,s=t.labels.num_row,u=t.labels.num_col;t.node_canvas_pos={},_.each(["x","y"],function(c){n="x"==c?u:s,a=t.viz_dim.mat_size[c]-t.viz_dim.heat_size[c],e=t.viz_dim.heat_size[c],o=e/n,t.node_canvas_pos[c+"_arr"]=Array(n).fill().map(function(t,f){return"x"===c?(r=f,i=-1,n=u):(r=f+1,i=1,n=s),(e-a-2*o*r)*i})})}},"./src/params/calc_row_and_col_canvas_positions.js":function(t,e){t.exports=function(t){var e="row",n=t.labels["num_"+e];e="col";var r=t.labels["num_"+e],i={};i.x=t.viz_dim.center.x,i.y=t.viz_dim.center.y;var o=Array(r).fill().map(function(t,e){return e/r-i.x}),a=Array(n).fill().map(function(t,e){return-e/n+i.y-1/n}),s={};return s.x_arr=o,s.y_arr=a,s}},"./src/params/calc_viz_area.js":function(t,e){t.exports=function(t){var e,n,r,i=t.zoom_data,o=t.pix_to_webgl,a={},s={},u={};u.x="width",u.y="height";var c={x:"col",y:"row"};t.labels.visible_labels={},_.each(["x","y"],function(f){e=u[f],a[f+"_min"]=-i[f].total_pan_min,a[f+"_max"]=t.viz_dim.heat[e]+i[f].total_pan_max,"x"==f?(s[f+"_min"]=o[f](a[f+"_min"])-0,s[f+"_max"]=o[f](a[f+"_max"])+0):(s[f+"_min"]=o[f](a[f+"_max"])-0,s[f+"_max"]=o[f](a[f+"_min"])+0),n=c[f],t.labels.visible_labels[c[f]]=[];var l=s[f+"_min"],h=s[f+"_max"];_.each(t.network[n+"_nodes"],function(e){e.offsets.inst>l&&e.offsets.inst<h&&((r=e.name).indexOf(": ")>=0&&(r=r.split(": ")[1]),t.labels.visible_labels[c[f]].push(r))})}),t.viz_area=s}},"./src/params/calc_viz_dim.js":function(t,e,n){var r=n("d3"),i=n("./node_modules/xtend/mutable.js");t.exports=function(t,e){var n={},o=o||{},a=i({element:o.element||t._gl.canvas},o||{}).element;n.canvas={},_.each(["width","height"],function(t){n.canvas[t]=Number.parseFloat(r.select(a).style(t).replace("px",""))});var s,u,c,f={x:"row",y:"col"},l={x:"col",y:"row"},h={};h.x="width",h.y="height",n.mat={},n.heat={},n.heat_size={},n.center={},n.offcenter={},n.shift_camera={},n.mat_size={};var d={};_.each(["x","y"],function(t){s=f[t],u=l[t],c=h[t],n.mat_size[t]=.8,n.heat_size[t]=n.mat_size[t]-e.cat_data.cat_room[t]*e.cat_data.cat_num[s],n.mat[c]=n.mat_size[t]*n.canvas[c],n.mat[t]={},n.mat[t].min=n.canvas[c]/2-n.mat[c]/2,n.mat[t].max=n.canvas[c]/2+n.mat[c]/2,n.heat[c]=n.heat_size[t]*n.canvas[c],d[t]=(n.mat[c]-n.heat[c])/2,n.heat[t]={},n.heat[t].min=n.canvas[c]/2-n.heat[c]/2+d[t],n.heat[t].max="x"==t?n.canvas[c]/2+n.heat[c]/2:n.canvas[c]/2+n.heat[c]/2+d.x,n.center[t]=.5,n["tile_"+c]=n.heat_size[t]/.5/e.labels["num_"+u],n.offcenter[t]=.075,n.shift_camera[t]="x"===t?-.075:.075}),e.viz_dim=n}},"./src/params/gen_ani_par.js":function(t,e){t.exports=function(t){var e={time_remain:0,running:!1,run_animation:!1,last_switch_time:0,ani_duration:3,duration_end:0,time:0,first_frame:!0,ini_viz:!0,last_click:0,dblclick_duration:.5,update_viz:!1};t.ani=e}},"./src/params/gen_cat_par.js":function(t,e,n){var r=n("./src/cats/generate_cat_array.js"),i=n("./src/cats/generate_cat_info.js");t.exports=function(t){var e={};e.row=r(t,"row"),e.col=r(t,"col"),e.cat_num={},e.cat_num.row=e.row.length,e.cat_num.col=e.col.length;var n={webgl:.0135};n.x=n.webgl,n.y=n.webgl,e.cat_room=n,t.cat_data=e,i(t)}},"./src/params/gen_dendro_par.js":function(t,e,n){var r=n("./src/dendrogram/calc_dendro_triangles.js"),i=n("./src/dendrogram/make_dendro_args.js");t.exports=function(t,e){var n={default_level:5,tri_height:.1,trap_height:.03,trap_float:.005,dendro_args:{},group_level:{},update_dendro:!1,selected_clust_names:[],group_info:{}};e.dendro=n,_.each(["row","col"],function(n){e.dendro.group_level[n]=e.dendro.default_level,e.dendro.group_info[n]=r(e,n),e.dendro.dendro_args[n]=i(t,e,n)})}},"./src/params/gen_int_par.js":function(t,e){t.exports=function(t){var e={total:0,still_interacting:!1,still_mouseover:!1,need_reset_cat_opacity:!1,mouseover:{}};_.each(["row","col"],function(t){e.mouseover[t]={},e.mouseover[t].name=null,e.mouseover[t].cats=[]}),e.mouseover.value=null,e.enable_viz_interact=!0,t.int=e}},"./src/params/gen_label_par.js":function(t,e,n){t.exports=function(t){var e,r={};r.num_row=t.mat_data.length,r.num_col=t.mat_data[0].length,r.offset_dict={},r.draw_labels=!1,r.font_detail=40,r.titles={},r.precalc={},_.each(["row","col"],function(n){r.titles[n]="",(e=t.network[n+"_nodes"][0].name).indexOf(": ")>0&&(r.titles[n]=e.split(": ")[0]),r.precalc[n]=!1}),t.labels=r,n("./src/matrix_labels/gen_ordered_labels.js")(t)}},"./src/params/gen_pix_to_webgl.js":function(t,e,n){var r=n("d3");t.exports=function(t){var e={};e.x=r.scaleLinear(),e.x.domain([0,t.viz_dim.heat.width]).range([-.5,.5]),e.y=r.scaleLinear(),e.y.domain([0,t.viz_dim.heat.height]).range([.5,-.5]),t.pix_to_webgl=e}},"./src/params/gen_text_zoom_par.js":function(t,e){t.exports=function(t){var e={},n={row:.05,col:.06};_.each(["row","col"],function(r){e[r]={},e[r].scaled_num=t.labels["num_"+r],e[r].reference=e[r].scaled_num,e[r].factor=1,e[r].max_webgl_fs=n[r]}),t.text_zoom=e}},"./src/params/generate_cat_args_arrs.js":function(t,e,n){var r=n("./src/cats/make_cat_position_array.js"),i=n("./src/cats/make_cat_args.js");t.exports=function(t,e){e.cat_args={},e.cat_args.row=[],e.cat_args.col=[],e.cat_arrs={},_.each(["inst","new"],function(t){e.cat_arrs[t]={},e.cat_arrs[t].row={},e.cat_arrs[t].col={}}),_.each(["row","col"],function(n){for(var o=0;o<e.cat_data.cat_num[n];o++)_.each(["inst","new"],function(t){e.cat_arrs[t][n][o]=r(e,n,o,e.order[t][n])}),e.cat_args[n][o]=i(t,e,n,o)})}},"./src/params/generate_order_params.js":function(t,e){t.exports=function(t){t.order={},_.each(["inst","new"],function(e){t.order[e]={},t.order[e].row="clust",t.order[e].col="clust"})}},"./src/params/generate_spillover_params.js":function(t,e,n){var r=n("./src/spillover/make_spillover_args.js"),i=n("./src/spillover/calc_spillover_triangles.js");t.exports=function(t,e){var n={},o=[1,1,1,1];e.spill_depth={},e.spill_depth.mat_sides=.5,e.spill_depth.cats=.5,e.spill_depth.mat_corners=.2,e.spill_depth.label_corners=.001;_.each(["mat_sides","cats","mat_corners","label_corners"],function(i){n[i]=r(t,e.spill_depth[i],o)}),e.spillover_args=n,e.spillover_triangles=i(e)}},"./src/params/generate_text_triangle_params.js":function(t,e,n){var r=n("./src/matrix_labels/gather_text_triangles.js");t.exports=function(t){t.text_triangles={},t.text_triangles.row={},t.text_triangles.col={},t.max_num_text=200,t.text_triangles.draw={},_.each(["row","col"],function(e){t.labels.precalc[e]=t.labels["num_"+e]<t.max_num_text,!1===t.labels.precalc[e]?t.text_triangles.draw[e]=!1:r(t,e)})}},"./src/params/generate_tooltip_params.js":function(t,e){t.exports=function(t,e){var n={show_tooltip:!1,in_bounds_tooltip:!1,background_opacity:.75,tooltip_type:null,border_width:10,on_canvas:!0,permanent_tooltip:!1};e.tooltip=n}},"./src/params/generate_webgl_to_pix.js":function(t,e,n){var r=n("d3");t.exports=function(t){var e={};e.x=r.scaleLinear(),e.x.domain([-.5,.5]).range([0,t.viz_dim.heat.width]).clamp(!0),e.y=r.scaleLinear(),e.y.domain([.5,-.5]).range([0,t.viz_dim.heat.height]).clamp(!0),t.webgl_to_pix=e}},"./src/params/initialize_params.js":function(t,e,n){var r=n("d3"),i=n("./src/tooltip/hzome_functions.js");t.exports=function(t){var e=this.args,o=this.canvas_container,a=this.regl,s=this.network,u={};u.network=s,n("./src/params/gen_ani_par.js")(u),n("./src/params/calc_alpha_order.js")(u),n("./src/params/gen_int_par.js")(u),u.mat_data=u.network.mat,n("./src/params/gen_cat_par.js")(u),n("./src/params/generate_order_params.js")(u),n("./src/params/gen_label_par.js")(u);var c,f=u.labels;n("./src/params/generate_tooltip_params.js")(a,u),n("./src/params/calc_viz_dim.js")(a,u),n("./src/params/generate_cat_args_arrs.js")(a,u),u.zoom_data=n("./src/zoom/ini_zoom_data.js")(),u.canvas_pos=n("./src/params/calc_row_and_col_canvas_positions.js")(u),u.is_downsampled=!1,u.viz_aid_tri_args={},_.each(["row","col"],function(t){n("./src/matrix_labels/calc_text_offsets.js")(u,t)}),u.tile_pix_width=u.viz_dim.heat.width/f.num_col,u.tile_pix_height=u.viz_dim.heat.height/f.num_row,n("./src/params/gen_pix_to_webgl.js")(u),n("./src/params/generate_webgl_to_pix.js")(u),n("./src/matrix_labels/make_label_queue.js")(u),n("./src/params/gen_text_zoom_par.js")(u),n("./src/params/calc_viz_area.js")(u),n("./src/params/generate_text_triangle_params.js")(u),c=f.num_col<f.num_row?f.num_col:f.num_row,u.max_zoom=c/4,u.zoom_restrict=n("./src/zoom/ini_zoom_restrict.js")(u),this.zoom_rules_high_mat(a,u,t),n("./src/cameras/make_cameras.js")(a,u),n("./src/params/calc_mat_arr.js")(u),u.matrix_args=n("./src/matrix_cells/make_matrix_args.js")(a,u),n("./src/params/gen_dendro_par.js")(a,u),n("./src/params/generate_spillover_params.js")(a,u);var l=r.scaleLinear().domain([10,1e3]).range([2,30]);u.allow_zoom={},u.allow_zoom.col=l(f.num_col),u.allow_zoom.row=l(f.num_col),u.text_scale={},u.cat_colors=u.network.cat_colors,u.hzome=i(u),u.viz_height=1035,u.viz_width=900,u.root="#"+e.container.id,u.canvas_root=u.root+" .canvas-container",u.base_container=e.container,u.canvas_container=o,u.is_widget=!1,null!==t&&(console.log("found widget"),u.is_widget=!0),this.params=u}},"./src/params/initialize_regl.js":function(t,e,n){t.exports=function(){var t=this.canvas_container,e=n("./node_modules/regl/dist/regl.js")({extensions:["angle_instanced_arrays"],container:t});this.regl=e}},"./src/reorders/custom_label_reorder.js":function(t,e,n){var r=n("d3"),i=n("./src/reorders/run_reorder.js");t.exports=function(t,e,n){var o;o=""!==e.labels.titles[n]?e.labels.titles[n]+": "+e.int.mouseover[n].name:e.int.mouseover[n].name;var a,s=_.indexOf(e.network[n+"_node_names"],o),u=e.mat_data,c=[];"col"===n?(a="row",_.each(u,function(t){c.push(t[s])})):(a="col",c=u[s]);var f=r.range(c.length).sort(function(t,e){return c[e]-c[t]});_.map(e.network[a+"_nodes"],function(t,n){t.custom=e.labels["num_"+a]-f[n]});var l=[];_.map(f,function(t){l.push(e.network[a+"_nodes"][t].name)}),e.network[a+"_nodes"].forEach(function(t){t.custom=e.labels["num_"+a]-_.indexOf(l,t.name)-1}),i(t,e,a,"custom");r.select(e.root+" ."+a+"-reorder-buttons").selectAll("rect").style("stroke","#eee")}},"./src/reorders/reorder_cat_args.js":function(t,e,n){var r=n("./src/cats/make_cat_position_array.js");t.exports=function(t,e){_.each(["row","col"],function(n){for(var i=0;i<e.cat_data.cat_num[n];i++)e.cat_arrs.new[n][i]=r(e,n,i,e.order.new[n]),e.cat_args[n][i].attributes.cat_pos_att_new={buffer:t.buffer(e.cat_arrs.new[n][i]),divisor:1}})}},"./src/reorders/reorder_matrix_args.js":function(t,e,n){var r=n("./src/matrix_cells/make_position_arr.js");t.exports=function(t,e){e.arrs.position_arr.new=r(e,e.order.new.row,e.order.new.col),e.matrix_args.regl_props.rects.attributes.pos_att_new={buffer:t.buffer(e.arrs.position_arr.new),divisor:1}}},"./src/reorders/run_reorder.js":function(t,e,n){var r=n("d3");t.exports=function(t,e,i,o){var a=o.replace("sum","rank").replace("var","rankvar");"clust"!=a&&r.select("."+i+"_dendro_slider_svg").style("display","none"),e.ani.run_animation=!0,e.order.new[i]=a,n("./src/reorders/reorder_matrix_args.js")(t,e),n("./src/reorders/reorder_cat_args.js")(t,e),0!=e.text_triangles.draw[i]&&e.labels["num_"+i]<=e.max_num_text?e.text_triangles.draw[i]=n("./src/matrix_labels/update_text_triangle_order.js")(e,i):e.text_triangles.draw[i]=!1}},"./src/spillover/calc_spillover_triangles.js":function(t,e){t.exports=function(t){var e=t.viz_dim,n=e.offcenter,r=e.mat_size,i=e.heat_size,o=e.canvas.height/e.canvas.width,a={};a.x=r.x/o,a.y=r.y/o;var s={};s.x=i.x/o,s.y=i.y/o;var u={},c=t.dendro.trap_height+t.dendro.trap_float,f={};return f.x=e.mat_size.x-e.heat_size.x,f.y=e.mat_size.y-e.heat_size.y,u.mat_sides=[{pos:[[-1,1],[-r.x+n.x,-1],[-1,-1]]},{pos:[[-1,1],[-r.x+n.x,1],[-r.x+n.x,-1]]},{pos:[[1,1],[r.x+n.x,-1],[1,-1]]},{pos:[[1,1],[r.x+n.x,1],[r.x+n.x,-1]]},{pos:[[-r.x+n.x,1],[-r.x+n.x,a.y-n.y],[r.x+n.x,1]]},{pos:[[r.x+n.x,1],[r.x+n.x,a.y-n.y],[-r.x+n.x,a.y-n.y]]},{pos:[[-r.x+n.x,-1],[-r.x+n.x,-a.y-n.y],[r.x+n.x,-1]]},{pos:[[r.x+n.x,-1],[r.x+n.x,-a.y-n.y],[-r.x+n.x,-a.y-n.y]]}],u.cats=[{pos:[[i.x+f.x+n.x,a.y-n.y],[-i.x+f.x+n.x,s.y-f.y-n.y],[i.x+f.x+n.x,s.y-f.y-n.y]]},{pos:[[-i.x+f.x+n.x,a.y-n.y],[r.x+n.x,a.y-n.y],[-i.x+f.x+n.x,s.y-f.y-n.y]]},{pos:[[-r.x+n.x,-a.y-n.y],[-r.x+n.x,s.y-f.y-n.y],[-i.x+f.x+n.x,s.y-f.y-n.y]]},{pos:[[-r.x+n.x,-a.y-n.y],[-i.x+f.x+n.x,-a.y-n.y],[-i.x+f.x+n.x,s.y-f.y-n.y]]}],u.mat_corners=[{pos:[[-1,1],[-i.x+f.x+n.x,s.y-f.y-n.y],[-1,s.y-f.y-n.y]]},{pos:[[-1,1],[-i.x+f.x+n.x,1],[-i.x+f.x+n.x,s.y-f.y-n.y]]},{pos:[[-1,-1],[-r.x+n.x,-a.y-n.y],[-1,-a.y-n.y]]},{pos:[[-1,-1],[-r.x+n.x,-1],[-r.x+n.x,-a.y-n.y]]},{pos:[[1,1],[r.x+n.x,a.y-n.y],[1,a.y-n.y]]},{pos:[[1,1],[r.x+n.x,1],[r.x+n.x,a.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-a.y-n.y],[1,-a.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-1],[r.x+n.x,-a.y-n.y]]}],u.label_corners=[{pos:[[-1,1],[-i.x+f.x+n.x,s.y-f.y-n.y],[-1,s.y-f.y-n.y]]},{pos:[[-1,1],[-i.x+f.x+n.x,1],[-i.x+f.x+n.x,s.y-f.y-n.y]]},{pos:[[-1,-1],[-i.x+f.x+n.x,-a.y-n.y],[-1,-a.y-n.y]]},{pos:[[-1,-1],[-i.x+f.x+n.x,-1],[-i.x+f.x+n.x,-a.y-n.y]]},{pos:[[1,a.y+1-r.y-2*n.x],[r.x+n.x,a.y-n.y],[1,a.y-n.y]]},{pos:[[1,a.y-n.y],[r.x+n.x,s.y-f.y-n.y],[1,s.y-f.y-n.y]]},{pos:[[r.x+n.x,a.y-n.y],[1,a.y-n.y],[r.x+n.x,s.y-f.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-a.y-n.y],[1,-a.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-1],[r.x+n.x,-a.y-n.y]]},{pos:[[1,s.y-f.y-n.y],[r.x+n.x+c,-a.y-n.y],[1,-a.y-n.y]]},{pos:[[1,s.y-f.y-n.y],[r.x+n.x+c,s.y-f.y-n.y],[r.x+n.x+c,-a.y-n.y]]},{pos:[[-i.x+f.x+n.x,-1],[-i.x+f.x+n.x,-a.y-n.y-c],[r.x+n.x,-1]]},{pos:[[r.x+n.x,-1],[r.x+n.x,-a.y-n.y-c],[-i.x+f.x+n.x,-a.y-n.y-c]]}],u}},"./src/spillover/make_spillover_args.js":function(t,e){t.exports=function(t,e,n=[1,1,1,1]){return{frag:"\n precision mediump float;\n uniform vec4 color;\n void main () {\n gl_FragColor = color;\n }",vert:"\n precision mediump float;\n attribute vec2 position;\n uniform float inst_depth;\n void main () {\n // positioned further up (matrix is lower at 0.)\n gl_Position = vec4(position, inst_depth, 1);\n }",attributes:{position:t.prop("pos")},uniforms:{color:n,inst_depth:e},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:1,dstRGB:"one minus src alpha",dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},count:3,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/tooltip/display_and_position_tooltip.js":function(t,e,n){var r=n("d3");t.exports=function(t){r.selectAll(".cgm-tooltip").style("display","none"),r.select(t.tooltip_id).style("opacity",1).style("display","block").style("z-index",99);var e=parseFloat(r.select(t.tooltip_id).style("width").replace("px","")),n=parseFloat(r.select(t.tooltip_id).style("height").replace("px",""));t.d3_tip_width=e,"matrix-cell"===t.tooltip.tooltip_type?r.select(t.tooltip_id).style("margin-left",function(){return t.zoom_data.x.cursor_position-e+22+"px"}).style("margin-top",function(){return t.zoom_data.y.cursor_position-n+"px"}):"row-label"===t.tooltip.tooltip_type?r.select(t.tooltip_id).style("margin-left",function(){return 150+12*t.cat_data.row.length+"px"}).style("margin-top",function(){return t.zoom_data.y.cursor_position-n+"px"}):"col-label"===t.tooltip.tooltip_type?r.select(t.tooltip_id).style("margin-left",function(){return t.zoom_data.x.cursor_position-e+22+"px"}).style("margin-top",function(){return 125+12*t.cat_data.col.length+"px"}):"col-dendro"===t.tooltip.tooltip_type?r.select(t.tooltip_id).style("margin-left",function(){return t.zoom_data.x.cursor_position-e/2+22+"px"}).style("margin-top",function(){return 845-n+"px"}):"row-dendro"===t.tooltip.tooltip_type?r.select(t.tooltip_id).style("margin-left",function(){return 870-e+"px"}).style("margin-top",function(){return t.zoom_data.y.cursor_position-n+"px"}):t.tooltip.tooltip_type.includes("col-cat-")?r.select(t.tooltip_id).style("margin-left",function(){return t.zoom_data.x.cursor_position-e+22+"px"}).style("margin-top",function(){return 125+12*t.cat_data.col.length+"px"}):t.tooltip.tooltip_type.includes("row-cat-")&&r.select(t.tooltip_id).style("margin-left",function(){return 150+12*t.cat_data.row.length+"px"}).style("margin-top",function(){return t.zoom_data.y.cursor_position-n+"px"})}},"./src/tooltip/hzome_functions.js":function(t,e,n){var r=n("d3"),i=n("./node_modules/axios/index.js");t.exports=function(t){function e(e){var r,o="https://amp.pharm.mssm.edu/Harmonizome/api/1.0/gene/"+(r=e.indexOf(" ")>0?e.split(" ")[0]:e.indexOf("_")>0?e.split("_")[0]:e);i.get(o).then(function(i){n(i.data,e),t.hzome.gene_data[r]={},t.hzome.gene_data[r].name=i.data.name,t.hzome.gene_data[r].description=i.data.description}).finally(function(){})}function n(e,n){null!=e.name&&(r.select(t.tooltip_id).html(function(){return"<p>"+(n+": "+e.name)+"</p> <p>"+e.description+"</p>"}),r.select(t.tooltip_id).selectAll("p").style("width","500px"))}var o={gene_info:function(r){_.has(t.hzome.gene_data,r)?n(t.hzome.gene_data[r],r):e(r)},gene_data:{}};return o.get_request=e,o}},"./src/tooltip/initialize_d3_tip.js":function(t,e,n){var r=n("d3");t.exports=function(t){var e=t.root+" .control-panel-background",n=r.select(e).node();t.control_panel_bkg=n,t.tooltip_fun.show("tooltip",t.control_panel_bkg);var i=parseFloat(r.select(t.tooltip_id).style("width").replace("px","")),o=parseFloat(r.select(t.tooltip_id).style("height").replace("px",""));t.tooltip_ini_width=i,t.tooltip_ini_height=o,t.tooltip_fun.hide()}},"./src/tooltip/make_dendro_tooltip.js":function(t,e,n){var r=n("d3"),i=n("./src/cats/make_cat_breakdown_graph.js"),o=n("./src/cats/calc_cat_cluster_breakdown.js"),a=n("./src/tooltip/run_hide_tooltip.js");t.exports=function(t,e){var n=t.int.mouseover;t.tooltip_fun.show("tooltip"),r.select(t.tooltip_id).append("div").style("text-align","right").style("cursor","default").on("click",function(){t.tooltip.permanent_tooltip=!1,a(t)}).append("text").text("X").style("font-size","15px");var s=o(t,n[e].dendro,e);i(t,n[e].dendro,s),r.select(t.tooltip_id).append("text").text("Selcted "+e.replace("row","Rows").replace("col","Columns")),r.select(t.tooltip_id).append("input").attr("value",function(){return t.dendro.selected_clust_names.join(", ")}).style("width","364px").style("display","block").style("color","black")}},"./src/tooltip/make_tooltip_text.js":function(t,e,n){var r=n("d3"),i=n("./src/tooltip/make_dendro_tooltip.js");t.exports=function(t){var e,n,o=t.int.mouseover;if("matrix-cell"===t.tooltip.tooltip_type)n=o.row.name,n+=" and ",n=(n+=o.col.name)+" <br>value: "+o.value.toFixed(3),t.tooltip_fun.show("tooltip"),r.select(t.tooltip_id).style("text-align","left").html(n);else if(t.tooltip.tooltip_type.indexOf("-label")>0)e=t.tooltip.tooltip_type.split("-")[0],n=o[e].name,_.each(o[e].cats,function(t){n=n+"<br>"+t}),t.tooltip_fun.show("tooltip"),r.select(t.tooltip_id).style("text-align","left").html(n),t.hzome.gene_info(o[e].name);else if(t.tooltip.tooltip_type.indexOf("-dendro")>0)e=t.tooltip.tooltip_type.split("-")[0],i(t,e);else if(t.tooltip.tooltip_type.indexOf("-cat-")>0){e=t.tooltip.tooltip_type.split("-")[0];var a=t.tooltip.tooltip_type.split("-")[2];n=o[e].cats[a],t.tooltip_fun.show("tooltip"),r.select(t.tooltip_id).style("text-align","left").html(n)}}},"./src/tooltip/remove_lost_tooltips.js":function(t,e,n){var r=n("d3");t.exports=function(){r.selectAll(".cgm-tooltip").each(function(){var t=r.select(this).attr("id").split("_")[1];r.select("#"+t).empty()&&r.select(this).style("display","none")})}},"./src/tooltip/run_hide_tooltip.js":function(t,e){t.exports=function(t,e=!1){!1===t.tooltip.permanent_tooltip&&t.tooltip_fun.hide(),e&&(t.tooltip.permanent_tooltip=!1,t.tooltip_fun.hide())}},"./src/tooltip/run_show_tooltip.js":function(t,e,n){var r=n("./src/tooltip/make_tooltip_text.js"),i=n("./src/tooltip/remove_lost_tooltips.js"),o=n("./src/tooltip/display_and_position_tooltip.js");t.exports=function(t){!1===t.tooltip.permanent_tooltip&&(i(),r(t),o(t))}},"./src/utils/utils_clust.js":function(t,e,n){var r=n("./node_modules/underscore/underscore.js");t.exports={normal_name:function(t){return t.name.replace(/_/g," ").split("#")[0]},is_supported_order:function(t){return"ini"===t||"clust"===t||"rank_var"===t||"rank"===t||"class"===t||"alpha"==t},has:function(t,e){return null!=t&&hasOwnProperty.call(t,e)},property:function(t){return function(e){return null==e?void 0:e[t]}},pluck:function(t,e){if(window._){if("function"==typeof r.pluck)return r.pluck(t,e);if("function"==typeof r.map)return r.map(t,this.property(e))}else if(t.map&&"function"==typeof t.map)return t.map(this.property(e))},is_undefined:function(t){return void 0===t},extend:function(t,e){for(var n in t=t||{},e)"object"==typeof e[n]?t[n]=this.extend(t[n],e[n]):t[n]=e[n];return t}}},"./src/zoom/calc_cursor_relative.js":function(t,e){t.exports=function(t,e){var n={};return n.min=t.cursor_position-e.min-t.viz_offcenter,n.min<0?n.min=0:n.min>e.max&&(n.min=e.max),n.max=e.max+t.heat_offset-t.cursor_position+t.viz_offcenter,n.max<0?n.max=0:n.max>e.max+t.heat_offset&&(n.max=e.max+t.heat_offset),n}},"./src/zoom/calc_pan_by_zoom.js":function(t,e){t.exports=function(t,e){t.inst_eff_zoom=t.inst_zoom-1,t.pbz_relative_min=-t.inst_eff_zoom*e.min,t.pbz_relative_max=-t.inst_eff_zoom*e.max}},"./src/zoom/calc_potential_total_pan.js":function(t,e){t.exports=function(t){var e={};return e.min=t.total_pan_min+t.pan_by_drag/t.total_zoom+t.pbz_relative_min/t.total_zoom,e.max=t.total_pan_max+-t.pan_by_drag/t.total_zoom+t.pbz_relative_max/t.total_zoom,e}},"./src/zoom/ini_zoom_data.js":function(t,e){t.exports=function(){var t={zoom_function:function(t){return t.view}};return _.each(["x","y"],function(e){var n={total_zoom:1,cursor_position:0,total_pan_min:0,total_pan_max:0,pan_room:0,pan_by_zoom:0,pan_by_drag:0,inst_zoom:1,filter_zoom:1,prev_restrict:!1,zoom_step:10,show_text:!1,still_zooming:!1,total_mouseover:0,cursor_rel_min:0};t[e]=n}),t}},"./src/zoom/ini_zoom_restrict.js":function(t,e){t.exports=function(t){var e="row",n=t.labels["num_"+e];e="col";var r=t.labels["num_"+e],i=t.max_zoom,o={x:{}};o.x.max=i,o.x.min=1,o.x.ratio=1,o.y={},o.y.max=i,o.y.min=1,o.y.ratio=1;var a=r/t.viz_dim.heat.width/(n/t.viz_dim.heat.height);return n>r?(o.y.max=o.y.max*(1/a),o.y.ratio=1/a):(o.x.max=o.x.max*a,o.x.ratio=a),o}},"./src/zoom/pan_by_drag_rules.js":function(t,e){t.exports=function(t,e){t.inst_zoom>1&&(t.pan_by_drag=0),t.pan_by_drag>0&&t.total_pan_min+t.pan_by_drag>=0&&(t.pan_by_drag=-t.total_pan_min),t.pan_by_drag<0&&t.total_pan_max-t.pan_by_drag>=0&&(t.pan_by_drag=t.total_pan_max),t.cursor_position<e.min+t.viz_offcenter?t.cursor_position=e.min+t.viz_offcenter:t.cursor_position>e.max+t.heat_offset+t.viz_offcenter&&(t.cursor_position=e.max+t.heat_offset+t.viz_offcenter)}},"./src/zoom/run_zoom_restrictions.js":function(t,e){t.exports=function(t,e,n,r,i){t.fully_zoomed_out=!1,t.total_pan_min>=0&&t.total_pan_max>=0&&(t.fully_zoomed_out=!0);var o=!1;if(e.min>1e-4&&e.max>1e-4&&(o=!0),e.min<=1e-4&&e.max<=1e-4&&(t.pan_by_zoom=-t.inst_eff_zoom*t.cursor_position,t.total_pan_min=e.min,t.total_pan_max=e.max,t.prev_restrict=!1),e.min>1e-4){t.pan_by_zoom=-t.inst_eff_zoom*(n.min+t.viz_offcenter)-t.total_pan_min*t.total_zoom,t.total_pan_min=0;var a=n.max-n.min+t.viz_offcenter,s=-t.inst_eff_zoom*a;t.total_pan_max=t.total_pan_max+s/t.total_zoom,1==t.fully_zoomed_out&&(t.pan_by_zoom=0,t.total_pan_max=0),t.prev_restrict="min"}if(e.max>1e-4){t.pan_by_zoom=-t.inst_eff_zoom*(n.max+t.heat_offset+t.viz_offcenter)+t.total_pan_max*t.total_zoom,t.total_pan_max=0;var u=n.max+t.heat_offset-n.min+t.viz_offcenter,c=-t.inst_eff_zoom*u;t.total_pan_min=t.total_pan_min+c/t.total_zoom,1==t.fully_zoomed_out&&(t.pan_by_zoom=0,t.total_pan_min=0),t.prev_restrict="max"}o&&("min"===i.prev_restrict?t.pan_by_zoom=-t.inst_eff_zoom*(n.min+t.viz_offcenter):"max"===i.prev_restrict&&(t.pan_by_zoom=-t.inst_eff_zoom*(n.max+t.heat_offset+t.viz_offcenter)))}},"./src/zoom/sanitize_inst_zoom.js":function(t,e){t.exports=function(t,e){1==e.total_zoom&&e.inst_zoom<1&&(e.inst_zoom=1,t.reset_cameras=!0)}},"./src/zoom/sanitize_potential_zoom.js":function(t,e){t.exports=function(t,e){var n=e.max,r=e.min,i=t.total_zoom*t.inst_zoom;i<n&&i>r?t.total_zoom=i:i>=n?t.inst_zoom<1?t.total_zoom=t.total_zoom*t.inst_zoom:(t.inst_zoom=n/t.total_zoom,t.total_zoom=n):i<=r&&(t.inst_zoom>1?t.total_zoom=t.total_zoom*t.inst_zoom:(t.inst_zoom=r/t.total_zoom,t.total_zoom=r))}},"./src/zoom/zoom_rules_high_mat.js":function(t,e,n){var r=n("./src/interactions/interaction-events.js"),i=n("./node_modules/xtend/mutable.js"),o=n("./src/interactions/track_interaction_zoom_data.js"),a=n("./src/tooltip/run_hide_tooltip.js"),s=n("./src/interactions/double_clicking.js");t.exports=function(t,e,n){var u=this,c=c||{},f=i({element:c.element||t._gl.canvas},c||{}).element;r({element:f}).on("interaction",function(n){o(t,e,n),a(e)}).on("interactionend",function(){e.ani.time-e.ani.last_click<e.ani.dblclick_duration?s(t,e):(console.log("single-click"),u.single_clicking(e,n))})}},"./src/zoom/zoom_rules_low_mat.js":function(t,e,n){var r=n("./src/zoom/sanitize_inst_zoom.js"),i=n("./src/zoom/sanitize_potential_zoom.js"),o=n("./src/zoom/pan_by_drag_rules.js"),a=n("./src/zoom/calc_cursor_relative.js"),s=n("./src/zoom/calc_pan_by_zoom.js"),u=n("./src/zoom/calc_potential_total_pan.js"),c=n("./src/zoom/run_zoom_restrictions.js");t.exports=function(t,e,n,f,l,h){var d;d="x"===h?"width":"height",n.viz_offcenter=t.viz_dim.canvas[d]*t.viz_dim.offcenter[h]/2;var p=_.clone(n);r(t,n),i(n,e),n.heat_offset=l.max-f.max,o(n,f);var m=a(n,f);s(n,m);var v=u(n);return c(n,v,f,h,p),n}},0:function(t,e){},d3:function(e,n){e.exports=t("d3")}})}).call(this,t("buffer").Buffer)},{buffer:35,d3:33}],2:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function n(t){var n;return 1===t.length&&(n=t,t=function(t,r){return e(n(t),r)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var r=n(e),i=r.right,o=r.left;function a(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function u(t,e){var n,r,i=t.length,o=0,a=-1,u=0,c=0;if(null==e)for(;++a<i;)isNaN(n=s(t[a]))||(c+=(r=n-u)*(n-(u+=r/++o)));else for(;++a<i;)isNaN(n=s(e(t[a],a,t)))||(c+=(r=n-u)*(n-(u+=r/++o)));if(o>1)return c/(o-1)}function c(t,e){var n=u(t,e);return n?Math.sqrt(n):n}function f(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var l=Array.prototype,h=l.slice,d=l.map;function p(t){return function(){return t}}function m(t){return t}function v(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var g=Math.sqrt(50),_=Math.sqrt(10),y=Math.sqrt(2);function b(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=g?10:o>=_?5:o>=y?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=g?10:o>=_?5:o>=y?2:1)}function x(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=g?i*=10:o>=_?i*=5:o>=y&&(i*=2),e<t?-i:i}function w(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function j(t,e,n){if(null==n&&(n=s),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function M(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}function A(t){if(!(i=t.length))return[];for(var e=-1,n=M(t,k),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r}function k(t){return t.length}t.bisect=i,t.bisectRight=i,t.bisectLeft=o,t.ascending=e,t.bisector=n,t.cross=function(t,e,n){var r,i,o,s,u=t.length,c=e.length,f=new Array(u*c);for(null==n&&(n=a),r=o=0;r<u;++r)for(s=t[r],i=0;i<c;++i,++o)f[o]=n(s,e[i]);return f},t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.deviation=c,t.extent=f,t.histogram=function(){var t=m,e=f,n=w;function r(r){var o,a,s=r.length,u=new Array(s);for(o=0;o<s;++o)u[o]=t(r[o],o,r);var c=e(u),f=c[0],l=c[1],h=n(u,f,l);Array.isArray(h)||(h=x(f,l,h),h=v(Math.ceil(f/h)*h,l,h));for(var d=h.length;h[0]<=f;)h.shift(),--d;for(;h[d-1]>l;)h.pop(),--d;var p,m=new Array(d+1);for(o=0;o<=d;++o)(p=m[o]=[]).x0=o>0?h[o-1]:f,p.x1=o<d?h[o]:l;for(o=0;o<s;++o)f<=(a=u[o])&&a<=l&&m[i(h,a,0,d)].push(r[o]);return m}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:p(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:p([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?p(h.call(t)):p(t),r):n},r},t.thresholdFreedmanDiaconis=function(t,n,r){return t=d.call(t,s).sort(e),Math.ceil((r-n)/(2*(j(t,.75)-j(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,n){return Math.ceil((n-e)/(3.5*c(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=w,t.max=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},t.mean=function(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o<r;)isNaN(n=s(t[o]))?--i:a+=n;else for(;++o<r;)isNaN(n=s(e(t[o],o,t)))?--i:a+=n;if(i)return a/i},t.median=function(t,n){var r,i=t.length,o=-1,a=[];if(null==n)for(;++o<i;)isNaN(r=s(t[o]))||a.push(r);else for(;++o<i;)isNaN(r=s(n(t[o],o,t)))||a.push(r);return j(a.sort(e),.5)},t.merge=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},t.min=M,t.pairs=function(t,e){null==e&&(e=a);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return o},t.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},t.quantile=j,t.range=v,t.scan=function(t,n){if(r=t.length){var r,i,o=0,a=0,s=t[a];for(null==n&&(n=e);++o<r;)(n(i=t[o],s)<0||0!==n(s,s))&&(s=i,a=o);return 0===n(s,s)?a:void 0}},t.shuffle=function(t,e,n){for(var r,i,o=(null==n?t.length:n)-(e=null==e?0:+e);o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},t.sum=function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o},t.ticks=function(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=b(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o},t.tickIncrement=b,t.tickStep=x,t.transpose=A,t.variance=u,t.zip=function(){return A(arguments)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:r.d3=r.d3||{})},{}],3:[function(t,e,n){var r;r=this,function(t){"use strict";var e=Array.prototype.slice;function n(t){return t}var r=1,i=2,o=3,a=4,s=1e-6;function u(t){return"translate("+(t+.5)+",0)"}function c(t){return"translate(0,"+(t+.5)+")"}function f(){return!this.__axis}function l(t,l){var h=[],d=null,p=null,m=6,v=6,g=3,_=t===r||t===a?-1:1,y=t===a||t===i?"x":"y",b=t===r||t===o?u:c;function x(e){var u=null==d?l.ticks?l.ticks.apply(l,h):l.domain():d,c=null==p?l.tickFormat?l.tickFormat.apply(l,h):n:p,x=Math.max(m,0)+g,w=l.range(),j=+w[0]+.5,M=+w[w.length-1]+.5,A=(l.bandwidth?function(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}:function(t){return function(e){return+t(e)}})(l.copy()),k=e.selection?e.selection():e,E=k.selectAll(".domain").data([null]),z=k.selectAll(".tick").data(u,l).order(),T=z.exit(),S=z.enter().append("g").attr("class","tick"),N=z.select("line"),O=z.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),z=z.merge(S),N=N.merge(S.append("line").attr("stroke","currentColor").attr(y+"2",_*m)),O=O.merge(S.append("text").attr("fill","currentColor").attr(y,_*x).attr("dy",t===r?"0em":t===o?"0.71em":"0.32em")),e!==k&&(E=E.transition(e),z=z.transition(e),N=N.transition(e),O=O.transition(e),T=T.transition(e).attr("opacity",s).attr("transform",function(t){return isFinite(t=A(t))?b(t):this.getAttribute("transform")}),S.attr("opacity",s).attr("transform",function(t){var e=this.parentNode.__axis;return b(e&&isFinite(e=e(t))?e:A(t))})),T.remove(),E.attr("d",t===a||t==i?v?"M"+_*v+","+j+"H0.5V"+M+"H"+_*v:"M0.5,"+j+"V"+M:v?"M"+j+","+_*v+"V0.5H"+M+"V"+_*v:"M"+j+",0.5H"+M),z.attr("opacity",1).attr("transform",function(t){return b(A(t))}),N.attr(y+"2",_*m),O.attr(y,_*x).text(c),k.filter(f).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===i?"start":t===a?"end":"middle"),k.each(function(){this.__axis=A})}return x.scale=function(t){return arguments.length?(l=t,x):l},x.ticks=function(){return h=e.call(arguments),x},x.tickArguments=function(t){return arguments.length?(h=null==t?[]:e.call(t),x):h.slice()},x.tickValues=function(t){return arguments.length?(d=null==t?null:e.call(t),x):d&&d.slice()},x.tickFormat=function(t){return arguments.length?(p=t,x):p},x.tickSize=function(t){return arguments.length?(m=v=+t,x):m},x.tickSizeInner=function(t){return arguments.length?(m=+t,x):m},x.tickSizeOuter=function(t){return arguments.length?(v=+t,x):v},x.tickPadding=function(t){return arguments.length?(g=+t,x):g},x}t.axisTop=function(t){return l(r,t)},t.axisRight=function(t){return l(i,t)},t.axisBottom=function(t){return l(o,t)},t.axisLeft=function(t){return l(a,t)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:r.d3=r.d3||{})},{}],4:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o){"use strict";function a(t){return function(){return t}}function s(t,e,n){this.target=t,this.type=e,this.selection=n}function u(){i.event.stopImmediatePropagation()}function c(){i.event.preventDefault(),i.event.stopImmediatePropagation()}var f={name:"drag"},l={name:"space"},h={name:"handle"},d={name:"center"};function p(t){return[+t[0],+t[1]]}function m(t){return[p(t[0]),p(t[1])]}var v={name:"x",handles:["w","e"].map(M),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},g={name:"y",handles:["n","s"].map(M),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},_={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(M),input:function(t){return null==t?null:m(t)},output:function(t){return t}},y={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},b={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},x={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},w={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},j={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function M(t){return{type:t}}function A(){return!i.event.ctrlKey&&!i.event.button}function k(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function E(){return navigator.maxTouchPoints||"ontouchstart"in this}function z(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function T(t){var p,_=k,T=A,S=E,N=!0,O=e.dispatch("start","brush","end"),C=6;function P(e){var n=e.property("__brush",U).selectAll(".overlay").data([M("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",y.overlay).merge(n).each(function(){var t=z(this).extent;i.select(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([M("selection")]).enter().append("rect").attr("class","selection").attr("cursor",y.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return y[t.type]}),e.each(B).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",D).filter(S).on("touchstart.brush",D).on("touchmove.brush",F).on("touchend.brush touchcancel.brush",L).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function B(){var t=i.select(this),e=z(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-C/2:e[0][0]-C/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-C/2:e[0][1]-C/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+C:C}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+C:C})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function R(t,e,n){return!n&&t.__brush.emitter||new I(t,e)}function I(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function D(){if((!p||i.event.touches)&&T.apply(this,arguments)){var e,r,a,s,m,_,M,A,k,E,S,O,C=this,P=i.event.target.__data__.type,I="selection"===(N&&i.event.metaKey?P="overlay":P)?f:N&&i.event.altKey?d:h,D=t===g?null:w[P],F=t===v?null:j[P],L=z(C),U=L.extent,q=L.selection,Y=U[0][0],H=U[0][1],V=U[1][0],W=U[1][1],X=0,G=0,Z=D&&F&&N&&i.event.shiftKey,$=i.event.touches?(O=i.event.changedTouches[0].identifier,function(t){return i.touch(t,i.event.touches,O)}):i.mouse,Q=$(C),K=Q,J=R(C,arguments,!0).beforestart();"overlay"===P?(q&&(k=!0),L.selection=q=[[e=t===g?Y:Q[0],a=t===v?H:Q[1]],[m=t===g?V:e,M=t===v?W:a]]):(e=q[0][0],a=q[0][1],m=q[1][0],M=q[1][1]),r=e,s=a,_=m,A=M;var tt=i.select(C).attr("pointer-events","none"),et=tt.selectAll(".overlay").attr("cursor",y[P]);if(i.event.touches)J.moved=rt,J.ended=ot;else{var nt=i.select(i.event.view).on("mousemove.brush",rt,!0).on("mouseup.brush",ot,!0);N&&nt.on("keydown.brush",function(){switch(i.event.keyCode){case 16:Z=D&&F;break;case 18:I===h&&(D&&(m=_-X*D,e=r+X*D),F&&(M=A-G*F,a=s+G*F),I=d,it());break;case 32:I!==h&&I!==d||(D<0?m=_-X:D>0&&(e=r-X),F<0?M=A-G:F>0&&(a=s-G),I=l,et.attr("cursor",y.selection),it());break;default:return}c()},!0).on("keyup.brush",function(){switch(i.event.keyCode){case 16:Z&&(E=S=Z=!1,it());break;case 18:I===d&&(D<0?m=_:D>0&&(e=r),F<0?M=A:F>0&&(a=s),I=h,it());break;case 32:I===l&&(i.event.altKey?(D&&(m=_-X*D,e=r+X*D),F&&(M=A-G*F,a=s+G*F),I=d):(D<0?m=_:D>0&&(e=r),F<0?M=A:F>0&&(a=s),I=h),et.attr("cursor",y[P]),it());break;default:return}c()},!0),n.dragDisable(i.event.view)}u(),o.interrupt(C),B.call(C),J.start()}function rt(){var t=$(C);!Z||E||S||(Math.abs(t[0]-K[0])>Math.abs(t[1]-K[1])?S=!0:E=!0),K=t,k=!0,c(),it()}function it(){var t;switch(X=K[0]-Q[0],G=K[1]-Q[1],I){case l:case f:D&&(X=Math.max(Y-e,Math.min(V-m,X)),r=e+X,_=m+X),F&&(G=Math.max(H-a,Math.min(W-M,G)),s=a+G,A=M+G);break;case h:D<0?(X=Math.max(Y-e,Math.min(V-e,X)),r=e+X,_=m):D>0&&(X=Math.max(Y-m,Math.min(V-m,X)),r=e,_=m+X),F<0?(G=Math.max(H-a,Math.min(W-a,G)),s=a+G,A=M):F>0&&(G=Math.max(H-M,Math.min(W-M,G)),s=a,A=M+G);break;case d:D&&(r=Math.max(Y,Math.min(V,e-X*D)),_=Math.max(Y,Math.min(V,m+X*D))),F&&(s=Math.max(H,Math.min(W,a-G*F)),A=Math.max(H,Math.min(W,M+G*F)))}_<r&&(D*=-1,t=e,e=m,m=t,t=r,r=_,_=t,P in b&&et.attr("cursor",y[P=b[P]])),A<s&&(F*=-1,t=a,a=M,M=t,t=s,s=A,A=t,P in x&&et.attr("cursor",y[P=x[P]])),L.selection&&(q=L.selection),E&&(r=q[0][0],_=q[1][0]),S&&(s=q[0][1],A=q[1][1]),q[0][0]===r&&q[0][1]===s&&q[1][0]===_&&q[1][1]===A||(L.selection=[[r,s],[_,A]],B.call(C),J.brush())}function ot(){if(u(),i.event.touches){if(i.event.touches.length)return;p&&clearTimeout(p),p=setTimeout(function(){p=null},500)}else n.dragEnable(i.event.view,k),nt.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);var t;tt.attr("pointer-events","all"),et.attr("cursor",y.overlay),L.selection&&(q=L.selection),((t=q)[0][0]===t[1][0]||t[0][1]===t[1][1])&&(L.selection=null,B.call(C)),J.end()}}function F(){R(this,arguments).moved()}function L(){R(this,arguments).ended()}function U(){var e=this.__brush||{selection:null};return e.extent=m(_.apply(this,arguments)),e.dim=t,e}return P.move=function(e,n){e.selection?e.on("start.brush",function(){R(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){R(this,arguments).end()}).tween("brush",function(){var e=this,i=e.__brush,o=R(e,arguments),a=i.selection,s=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),u=r.interpolate(a,s);function c(t){i.selection=1===t&&null===s?null:u(t),B.call(e),o.brush()}return null!==a&&null!==s?c:c(1)}):e.each(function(){var e=arguments,r=this.__brush,i=t.input("function"==typeof n?n.apply(this,e):n,r.extent),a=R(this,e).beforestart();o.interrupt(this),r.selection=null===i?null:i,B.call(this),a.start().brush().end()})},P.clear=function(t){P.move(t,null)},I.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){i.customEvent(new s(P,e,t.output(this.state.selection)),O.apply,O,[e,this.that,this.args])}},P.extent=function(t){return arguments.length?(_="function"==typeof t?t:a(m(t)),P):_},P.filter=function(t){return arguments.length?(T="function"==typeof t?t:a(!!t),P):T},P.touchable=function(t){return arguments.length?(S="function"==typeof t?t:a(!!t),P):S},P.handleSize=function(t){return arguments.length?(C=+t,P):C},P.keyModifiers=function(t){return arguments.length?(N=!!t,P):N},P.on=function(){var t=O.on.apply(O,arguments);return t===O?P:t},P}t.brush=function(){return T(_)},t.brushSelection=function(t){var e=t.__brush;return e?e.dim.output(e.selection):null},t.brushX=function(){return T(v)},t.brushY=function(){return T(g)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-dispatch"),t("d3-drag"),t("d3-interpolate"),t("d3-selection"),t("d3-transition")):i((r=r||self).d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3)},{"d3-dispatch":9,"d3-drag":10,"d3-interpolate":18,"d3-selection":25,"d3-transition":30}],5:[function(t,e,n){var r,i;r=this,i=function(t,e,n){"use strict";var r=Math.cos,i=Math.sin,o=Math.PI,a=o/2,s=2*o,u=Math.max,c=Array.prototype.slice;function f(t){return function(){return t}}function l(t){return t.source}function h(t){return t.target}function d(t){return t.radius}function p(t){return t.startAngle}function m(t){return t.endAngle}t.chord=function(){var t=0,n=null,r=null,i=null;function o(o){var a,c,f,l,h,d,p=o.length,m=[],v=e.range(p),g=[],_=[],y=_.groups=new Array(p),b=new Array(p*p);for(a=0,h=-1;++h<p;){for(c=0,d=-1;++d<p;)c+=o[h][d];m.push(c),g.push(e.range(p)),a+=c}for(n&&v.sort(function(t,e){return n(m[t],m[e])}),r&&g.forEach(function(t,e){t.sort(function(t,n){return r(o[e][t],o[e][n])})}),l=(a=u(0,s-t*p)/a)?t:s/p,c=0,h=-1;++h<p;){for(f=c,d=-1;++d<p;){var x=v[h],w=g[x][d],j=o[x][w],M=c,A=c+=j*a;b[w*p+x]={index:x,subindex:w,startAngle:M,endAngle:A,value:j}}y[x]={index:x,startAngle:f,endAngle:c,value:m[x]},c+=l}for(h=-1;++h<p;)for(d=h-1;++d<p;){var k=b[d*p+h],E=b[h*p+d];(k.value||E.value)&&_.push(k.value<E.value?{source:E,target:k}:{source:k,target:E})}return i?_.sort(i):_}return o.padAngle=function(e){return arguments.length?(t=u(0,e),o):t},o.sortGroups=function(t){return arguments.length?(n=t,o):n},o.sortSubgroups=function(t){return arguments.length?(r=t,o):r},o.sortChords=function(t){return arguments.length?(null==t?i=null:(e=t,i=function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)})._=t,o):i&&i._;var e},o},t.ribbon=function(){var t=l,e=h,o=d,s=p,u=m,v=null;function g(){var f,l=c.call(arguments),h=t.apply(this,l),d=e.apply(this,l),p=+o.apply(this,(l[0]=h,l)),m=s.apply(this,l)-a,g=u.apply(this,l)-a,_=p*r(m),y=p*i(m),b=+o.apply(this,(l[0]=d,l)),x=s.apply(this,l)-a,w=u.apply(this,l)-a;if(v||(v=f=n.path()),v.moveTo(_,y),v.arc(0,0,p,m,g),m===x&&g===w||(v.quadraticCurveTo(0,0,b*r(x),b*i(x)),v.arc(0,0,b,x,w)),v.quadraticCurveTo(0,0,_,y),v.closePath(),f)return v=null,f+""||null}return g.radius=function(t){return arguments.length?(o="function"==typeof t?t:f(+t),g):o},g.startAngle=function(t){return arguments.length?(s="function"==typeof t?t:f(+t),g):s},g.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:f(+t),g):u},g.source=function(e){return arguments.length?(t=e,g):t},g.target=function(t){return arguments.length?(e=t,g):e},g.context=function(t){return arguments.length?(v=null==t?null:t,g):v},g},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-array"),t("d3-path")):i(r.d3=r.d3||{},r.d3,r.d3)},{"d3-array":2,"d3-path":19}],6:[function(t,e,n){var r;r=this,function(t){"use strict";function e(){}function n(t,n){var r=new e;if(t instanceof e)t.each(function(t,e){r.set(e,t)});else if(Array.isArray(t)){var i,o=-1,a=t.length;if(null==n)for(;++o<a;)r.set(o,t[o]);else for(;++o<a;)r.set(n(i=t[o],o,t),i)}else if(t)for(var s in t)r.set(s,t[s]);return r}function r(){return{}}function i(t,e,n){t[e]=n}function o(){return n()}function a(t,e,n){t.set(e,n)}function s(){}e.prototype=n.prototype={constructor:e,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var u=n.prototype;function c(t,e){var n=new s;if(t instanceof s)t.each(function(t){n.add(t)});else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}s.prototype=c.prototype={constructor:s,has:u.has,add:function(t){return this["$"+(t+="")]=t,this},remove:u.remove,clear:u.clear,values:u.keys,size:u.size,empty:u.empty,each:u.each},t.nest=function(){var t,e,s,u=[],c=[];function f(r,i,o,a){if(i>=u.length)return null!=t&&r.sort(t),null!=e?e(r):r;for(var s,c,l,h=-1,d=r.length,p=u[i++],m=n(),v=o();++h<d;)(l=m.get(s=p(c=r[h])+""))?l.push(c):m.set(s,[c]);return m.each(function(t,e){a(v,e,f(t,i,o,a))}),v}return s={object:function(t){return f(t,0,r,i)},map:function(t){return f(t,0,o,a)},entries:function(t){return function t(n,r){if(++r>u.length)return n;var i,o=c[r-1];return null!=e&&r>=u.length?i=n.entries():(i=[],n.each(function(e,n){i.push({key:n,values:t(e,r)})})),null!=o?i.sort(function(t,e){return o(t.key,e.key)}):i}(f(t,0,o,a),0)},key:function(t){return u.push(t),s},sortKeys:function(t){return c[u.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=n,t.keys=function(t){var e=[];for(var n in t)e.push(n);return e},t.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},t.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:r.d3=r.d3||{})},{}],7:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function n(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function r(){}var i="\\s*([+-]?\\d+)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,u=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),c=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),f=new RegExp("^rgba\\("+[i,i,i,o]+"\\)$"),l=new RegExp("^rgba\\("+[a,a,a,o]+"\\)$"),h=new RegExp("^hsl\\("+[o,a,a]+"\\)$"),d=new RegExp("^hsla\\("+[o,a,a,o]+"\\)$"),p={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};function m(){return this.rgb().formatHex()}function v(){return this.rgb().formatRgb()}function g(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?_(e):3===n?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?y(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?y(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=u.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?y(e[1],e[2],e[3],e[4]):(e=l.exec(t))?y(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?k(e[1],e[2]/100,e[3]/100,1):(e=d.exec(t))?k(e[1],e[2]/100,e[3]/100,e[4]):p.hasOwnProperty(t)?_(p[t]):"transparent"===t?new w(NaN,NaN,NaN,0):null}function _(t){return new w(t>>16&255,t>>8&255,255&t,1)}function y(t,e,n,r){return r<=0&&(t=e=n=NaN),new w(t,e,n,r)}function b(t){return t instanceof r||(t=g(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function x(t,e,n,r){return 1===arguments.length?b(t):new w(t,e,n,null==r?1:r)}function w(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function j(){return"#"+A(this.r)+A(this.g)+A(this.b)}function M(){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+")")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function k(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new T(t,e,n,r)}function E(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=g(t)),!t)return new T;if(t instanceof T)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),a=Math.max(e,n,i),s=NaN,u=a-o,c=(a+o)/2;return u?(s=e===a?(n-i)/u+6*(n<i):n===a?(i-e)/u+2:(e-n)/u+4,u/=c<.5?a+o:2-a-o,s*=60):u=c>0&&c<1?0:s,new T(s,u,c,t.opacity)}function z(t,e,n,r){return 1===arguments.length?E(t):new T(t,e,n,null==r?1:r)}function T(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function S(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e(r,g,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:m,formatHex:m,formatHsl:function(){return E(this).formatHsl()},formatRgb:v,toString:v}),e(w,x,n(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:j,formatHex:j,formatRgb:M,toString:M})),e(T,z,n(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new w(S(t>=240?t-240:t+120,i,r),S(t,i,r),S(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var N=Math.PI/180,O=180/Math.PI,C=.96422,P=1,B=.82521,R=4/29,I=6/29,D=3*I*I,F=I*I*I;function L(t){if(t instanceof q)return new q(t.l,t.a,t.b,t.opacity);if(t instanceof Z)return $(t);t instanceof w||(t=b(t));var e,n,r=W(t.r),i=W(t.g),o=W(t.b),a=Y((.2225045*r+.7168786*i+.0606169*o)/P);return r===i&&i===o?e=n=a:(e=Y((.4360747*r+.3850649*i+.1430804*o)/C),n=Y((.0139322*r+.0971045*i+.7141733*o)/B)),new q(116*a-16,500*(e-a),200*(a-n),t.opacity)}function U(t,e,n,r){return 1===arguments.length?L(t):new q(t,e,n,null==r?1:r)}function q(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Y(t){return t>F?Math.pow(t,1/3):t/D+R}function H(t){return t>I?t*t*t:D*(t-R)}function V(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function W(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function X(t){if(t instanceof Z)return new Z(t.h,t.c,t.l,t.opacity);if(t instanceof q||(t=L(t)),0===t.a&&0===t.b)return new Z(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*O;return new Z(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function G(t,e,n,r){return 1===arguments.length?X(t):new Z(t,e,n,null==r?1:r)}function Z(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function $(t){if(isNaN(t.h))return new q(t.l,0,0,t.opacity);var e=t.h*N;return new q(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}e(q,U,n(r,{brighter:function(t){return new q(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new q(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new w(V(3.1338561*(e=C*H(e))-1.6168667*(t=P*H(t))-.4906146*(n=B*H(n))),V(-.9787684*e+1.9161415*t+.033454*n),V(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),e(Z,G,n(r,{brighter:function(t){return new Z(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Z(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return $(this).rgb()}}));var Q=-.14861,K=1.78277,J=-.29227,tt=-.90649,et=1.97294,nt=et*tt,rt=et*K,it=K*J-tt*Q;function ot(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof at)return new at(t.h,t.s,t.l,t.opacity);t instanceof w||(t=b(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(it*r+nt*e-rt*n)/(it+nt-rt),o=r-i,a=(et*(n-i)-J*o)/tt,s=Math.sqrt(a*a+o*o)/(et*i*(1-i)),u=s?Math.atan2(a,o)*O-120:NaN;return new at(u<0?u+360:u,s,i,t.opacity)}(t):new at(t,e,n,null==r?1:r)}function at(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}e(at,ot,n(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new at(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new at(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*N,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new w(255*(e+n*(Q*r+K*i)),255*(e+n*(J*r+tt*i)),255*(e+n*(et*r)),this.opacity)}})),t.color=g,t.cubehelix=ot,t.gray=function(t,e){return new q(t,0,0,null==e?1:e)},t.hcl=G,t.hsl=z,t.lab=U,t.lch=function(t,e,n,r){return 1===arguments.length?X(t):new Z(n,e,t,null==r?1:r)},t.rgb=x,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],8:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";var n=Array.prototype.slice;function r(t,e){return t-e}function i(t){return function(){return t}}function o(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=a(t,e[r]))return n;return 0}function a(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var c=t[o],f=c[0],l=c[1],h=t[u],d=h[0],p=h[1];if(s(c,h,e))return 0;l>r!=p>r&&n<(d-f)*(r-l)/(p-l)+f&&(i=-i)}return i}function s(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}function u(){}var c=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function f(){var t=1,a=1,s=e.thresholdSturges,f=p;function l(t){var n=s(t);if(Array.isArray(n))n=n.slice().sort(r);else{var i=e.extent(t),o=i[0],a=i[1];n=e.tickStep(o,a,n),n=e.range(Math.floor(o/n)*n,Math.floor(a/n)*n,n)}return n.map(function(e){return h(t,e)})}function h(e,n){var r=[],i=[];return function(e,n,r){var i,o,s,u,f,l,h=new Array,p=new Array;i=o=-1,u=e[0]>=n,c[u<<1].forEach(m);for(;++i<t-1;)s=u,u=e[i+1]>=n,c[s|u<<1].forEach(m);c[u<<0].forEach(m);for(;++o<a-1;){for(i=-1,u=e[o*t+t]>=n,f=e[o*t]>=n,c[u<<1|f<<2].forEach(m);++i<t-1;)s=u,u=e[o*t+t+i+1]>=n,l=f,f=e[o*t+i+1]>=n,c[s|u<<1|f<<2|l<<3].forEach(m);c[u|f<<3].forEach(m)}i=-1,f=e[o*t]>=n,c[f<<2].forEach(m);for(;++i<t-1;)l=f,f=e[o*t+i+1]>=n,c[f<<2|l<<3].forEach(m);function m(t){var e,n,a=[t[0][0]+i,t[0][1]+o],s=[t[1][0]+i,t[1][1]+o],u=d(a),c=d(s);(e=p[u])?(n=h[c])?(delete p[e.end],delete h[n.start],e===n?(e.ring.push(s),r(e.ring)):h[e.start]=p[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete p[e.end],e.ring.push(s),p[e.end=c]=e):(e=h[c])?(n=p[u])?(delete h[e.start],delete p[n.end],e===n?(e.ring.push(s),r(e.ring)):h[n.start]=p[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(a),h[e.start=u]=e):h[u]=p[c]={start:u,end:c,ring:[a,s]}}c[f<<3].forEach(m)}(e,n,function(t){f(t,e,n),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?r.push([t]):i.push(t)}),i.forEach(function(t){for(var e,n=0,i=r.length;n<i;++n)if(-1!==o((e=r[n])[0],t))return void e.push(t)}),{type:"MultiPolygon",value:n,coordinates:r}}function d(e){return 2*e[0]+e[1]*(t+1)*4}function p(e,n,r){e.forEach(function(e){var i,o=e[0],s=e[1],u=0|o,c=0|s,f=n[c*t+u];o>0&&o<t&&u===o&&(i=n[c*t+u-1],e[0]=o+(r-i)/(f-i)-.5),s>0&&s<a&&c===s&&(i=n[(c-1)*t+u],e[1]=s+(r-i)/(f-i)-.5)})}return l.contour=h,l.size=function(e){if(!arguments.length)return[t,a];var n=Math.ceil(e[0]),r=Math.ceil(e[1]);if(!(n>0&&r>0))throw new Error("invalid size");return t=n,a=r,l},l.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?i(n.call(t)):i(t),l):s},l.smooth=function(t){return arguments.length?(f=t?p:u,l):f===p},l}function l(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<i;++a)for(var s=0,u=0;s<r+n;++s)s<r&&(u+=t.data[s+a*r]),s>=n&&(s>=o&&(u-=t.data[s-o+a*r]),e.data[s-n+a*r]=u/Math.min(s+1,r-1+o-s,o))}function h(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<r;++a)for(var s=0,u=0;s<i+n;++s)s<i&&(u+=t.data[a+s*r]),s>=n&&(s>=o&&(u-=t.data[a+(s-o)*r]),e.data[a+(s-n)*r]=u/Math.min(s+1,i-1+o-s,o))}function d(t){return t[0]}function p(t){return t[1]}function m(){return 1}t.contours=f,t.contourDensity=function(){var t=d,r=p,o=m,a=960,s=500,u=20,c=2,v=3*u,g=a+2*v>>c,_=s+2*v>>c,y=i(20);function b(n){var i=new Float32Array(g*_),a=new Float32Array(g*_);n.forEach(function(e,n,a){var s=+t(e,n,a)+v>>c,u=+r(e,n,a)+v>>c,f=+o(e,n,a);s>=0&&s<g&&u>=0&&u<_&&(i[s+u*g]+=f)}),l({width:g,height:_,data:i},{width:g,height:_,data:a},u>>c),h({width:g,height:_,data:a},{width:g,height:_,data:i},u>>c),l({width:g,height:_,data:i},{width:g,height:_,data:a},u>>c),h({width:g,height:_,data:a},{width:g,height:_,data:i},u>>c),l({width:g,height:_,data:i},{width:g,height:_,data:a},u>>c),h({width:g,height:_,data:a},{width:g,height:_,data:i},u>>c);var s=y(i);if(!Array.isArray(s)){var d=e.max(i);s=e.tickStep(0,d,s),(s=e.range(0,Math.floor(d/s)*s,s)).shift()}return f().thresholds(s).size([g,_])(i).map(x)}function x(t){return t.value*=Math.pow(2,-2*c),t.coordinates.forEach(w),t}function w(t){t.forEach(j)}function j(t){t.forEach(M)}function M(t){t[0]=t[0]*Math.pow(2,c)-v,t[1]=t[1]*Math.pow(2,c)-v}function A(){return g=a+2*(v=3*u)>>c,_=s+2*v>>c,b}return b.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),b):t},b.y=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),b):r},b.weight=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),b):o},b.size=function(t){if(!arguments.length)return[a,s];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return a=e,s=n,A()},b.cellSize=function(t){if(!arguments.length)return 1<<c;if(!((t=+t)>=1))throw new Error("invalid cell size");return c=Math.floor(Math.log(t)/Math.LN2),A()},b.thresholds=function(t){return arguments.length?(y="function"==typeof t?t:Array.isArray(t)?i(n.call(t)):i(t),b):y},b.bandwidth=function(t){if(!arguments.length)return Math.sqrt(u*(u+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return u=Math.round((Math.sqrt(4*t*t+1)-1)/2),A()},b},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-array")):i(r.d3=r.d3||{},r.d3)},{"d3-array":2}],9:[function(t,e,n){var r;r=this,function(t){"use strict";var e={value:function(){}};function n(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new r(i)}function r(t){this._=t}function i(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function o(t,n,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===n){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:n,value:r}),t}r.prototype=n.prototype={constructor:r,on:function(t,e){var n,r,a=this._,s=(r=a,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),u=-1,c=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<c;)if(n=(t=s[u]).type)a[n]=o(a[n],t.name,e);else if(null==e)for(n in a)a[n]=o(a[n],t.name,null);return this}for(;++u<c;)if((n=(t=s[u]).type)&&(n=i(a[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new r(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}},t.dispatch=n,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],10:[function(t,e,n){var r,i;r=this,i=function(t,e,n){"use strict";function r(){n.event.stopImmediatePropagation()}function i(){n.event.preventDefault(),n.event.stopImmediatePropagation()}function o(t){var e=t.document.documentElement,r=n.select(t).on("dragstart.drag",i,!0);"onselectstart"in e?r.on("selectstart.drag",i,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function a(t,e){var r=t.document.documentElement,o=n.select(t).on("dragstart.drag",null);e&&(o.on("click.drag",i,!0),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function s(t){return function(){return t}}function u(t,e,n,r,i,o,a,s,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=u,this._=c}function c(){return!n.event.ctrlKey&&!n.event.button}function f(){return this.parentNode}function l(t){return null==t?{x:n.event.x,y:n.event.y}:t}function h(){return navigator.maxTouchPoints||"ontouchstart"in this}u.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t},t.drag=function(){var t,d,p,m,v=c,g=f,_=l,y=h,b={},x=e.dispatch("start","drag","end"),w=0,j=0;function M(t){t.on("mousedown.drag",A).filter(y).on("touchstart.drag",z).on("touchmove.drag",T).on("touchend.drag touchcancel.drag",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function A(){if(!m&&v.apply(this,arguments)){var e=N("mouse",g.apply(this,arguments),n.mouse,this,arguments);e&&(n.select(n.event.view).on("mousemove.drag",k,!0).on("mouseup.drag",E,!0),o(n.event.view),r(),p=!1,t=n.event.clientX,d=n.event.clientY,e("start"))}}function k(){if(i(),!p){var e=n.event.clientX-t,r=n.event.clientY-d;p=e*e+r*r>j}b.mouse("drag")}function E(){n.select(n.event.view).on("mousemove.drag mouseup.drag",null),a(n.event.view,p),i(),b.mouse("end")}function z(){if(v.apply(this,arguments)){var t,e,i=n.event.changedTouches,o=g.apply(this,arguments),a=i.length;for(t=0;t<a;++t)(e=N(i[t].identifier,o,n.touch,this,arguments))&&(r(),e("start"))}}function T(){var t,e,r=n.event.changedTouches,o=r.length;for(t=0;t<o;++t)(e=b[r[t].identifier])&&(i(),e("drag"))}function S(){var t,e,i=n.event.changedTouches,o=i.length;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),t=0;t<o;++t)(e=b[i[t].identifier])&&(r(),e("end"))}function N(t,e,r,i,o){var a,s,c,f=r(e,t),l=x.copy();if(n.customEvent(new u(M,"beforestart",a,t,w,f[0],f[1],0,0,l),function(){return null!=(n.event.subject=a=_.apply(i,o))&&(s=a.x-f[0]||0,c=a.y-f[1]||0,!0)}))return function h(d){var p,m=f;switch(d){case"start":b[t]=h,p=w++;break;case"end":delete b[t],--w;case"drag":f=r(e,t),p=w}n.customEvent(new u(M,d,a,t,p,f[0]+s,f[1]+c,f[0]-m[0],f[1]-m[1],l),l.apply,l,[d,i,o])}}return M.filter=function(t){return arguments.length?(v="function"==typeof t?t:s(!!t),M):v},M.container=function(t){return arguments.length?(g="function"==typeof t?t:s(t),M):g},M.subject=function(t){return arguments.length?(_="function"==typeof t?t:s(t),M):_},M.touchable=function(t){return arguments.length?(y="function"==typeof t?t:s(!!t),M):y},M.on=function(){var t=x.on.apply(x,arguments);return t===x?M:t},M.clickDistance=function(t){return arguments.length?(j=(t=+t)*t,M):Math.sqrt(j)},M},t.dragDisable=o,t.dragEnable=a,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-dispatch"),t("d3-selection")):i((r=r||self).d3=r.d3||{},r.d3,r.d3)},{"d3-dispatch":9,"d3-selection":25}],11:[function(t,e,n){var r;r=this,function(t){"use strict";var e={},n={},r=34,i=10,o=13;function a(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function s(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}function u(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function c(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+u(-e,6):e>9999?"+"+u(e,6):u(e,4))+"-"+u(t.getUTCMonth()+1,2)+"-"+u(t.getUTCDate(),2)+(o?"T"+u(n,2)+":"+u(r,2)+":"+u(i,2)+"."+u(o,3)+"Z":i?"T"+u(n,2)+":"+u(r,2)+":"+u(i,2)+"Z":r||n?"T"+u(n,2)+":"+u(r,2)+"Z":"")}function f(t){var u=new RegExp('["'+t+"\n\r]"),f=t.charCodeAt(0);function l(t,a){var s,u=[],c=t.length,l=0,h=0,d=c<=0,p=!1;function m(){if(d)return n;if(p)return p=!1,e;var a,s,u=l;if(t.charCodeAt(u)===r){for(;l++<c&&t.charCodeAt(l)!==r||t.charCodeAt(++l)===r;);return(a=l)>=c?d=!0:(s=t.charCodeAt(l++))===i?p=!0:s===o&&(p=!0,t.charCodeAt(l)===i&&++l),t.slice(u+1,a-1).replace(/""/g,'"')}for(;l<c;){if((s=t.charCodeAt(a=l++))===i)p=!0;else if(s===o)p=!0,t.charCodeAt(l)===i&&++l;else if(s!==f)continue;return t.slice(u,a)}return d=!0,t.slice(u,c)}for(t.charCodeAt(c-1)===i&&--c,t.charCodeAt(c-1)===o&&--c;(s=m())!==n;){for(var v=[];s!==e&&s!==n;)v.push(s),s=m();a&&null==(v=a(v,h++))||u.push(v)}return u}function h(e,n){return e.map(function(e){return n.map(function(t){return p(e[t])}).join(t)})}function d(e){return e.map(p).join(t)}function p(t){return null==t?"":t instanceof Date?c(t):u.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,r,i=l(t,function(t,i){if(n)return n(t,i-1);r=t,n=e?function(t,e){var n=a(t);return function(r,i){return e(n(r),i,t)}}(t,e):a(t)});return i.columns=r||[],i},parseRows:l,format:function(e,n){return null==n&&(n=s(e)),[n.map(p).join(t)].concat(h(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=s(t)),h(t,e).join("\n")},formatRows:function(t){return t.map(d).join("\n")},formatRow:d,formatValue:p}}var l=f(","),h=l.parse,d=l.parseRows,p=l.format,m=l.formatBody,v=l.formatRows,g=l.formatRow,_=l.formatValue,y=f("\t"),b=y.parse,x=y.parseRows,w=y.format,j=y.formatBody,M=y.formatRows,A=y.formatRow,k=y.formatValue,E=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();t.autoType=function(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;E&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t},t.csvFormat=p,t.csvFormatBody=m,t.csvFormatRow=g,t.csvFormatRows=v,t.csvFormatValue=_,t.csvParse=h,t.csvParseRows=d,t.dsvFormat=f,t.tsvFormat=w,t.tsvFormatBody=j,t.tsvFormatRow=A,t.tsvFormatRows=M,t.tsvFormatValue=k,t.tsvParse=b,t.tsvParseRows=x,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],12:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function n(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var r=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),i=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),o=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),a=Math.PI,s=a/2;function u(t){return(1-Math.cos(a*t))/2}function c(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function f(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var l=4/11,h=6/11,d=8/11,p=.75,m=9/11,v=10/11,g=.9375,_=21/22,y=63/64,b=1/l/l;function x(t){return(t=+t)<l?b*t*t:t<d?b*(t-=h)*t+p:t<v?b*(t-=m)*t+g:b*(t-=_)*t+y}var w=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),j=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),M=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),A=2*Math.PI,k=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=A);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*A)},i.period=function(n){return t(e,n)},i}(1,.3),E=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=A);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*A)},i.period=function(n){return t(e,n)},i}(1,.3),z=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=A);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*A)},i.period=function(n){return t(e,n)},i}(1,.3);t.easeBack=M,t.easeBackIn=w,t.easeBackInOut=M,t.easeBackOut=j,t.easeBounce=x,t.easeBounceIn=function(t){return 1-x(1-t)},t.easeBounceInOut=function(t){return((t*=2)<=1?1-x(1-t):x(t-1)+1)/2},t.easeBounceOut=x,t.easeCircle=f,t.easeCircleIn=function(t){return 1-Math.sqrt(1-t*t)},t.easeCircleInOut=f,t.easeCircleOut=function(t){return Math.sqrt(1- --t*t)},t.easeCubic=n,t.easeCubicIn=function(t){return t*t*t},t.easeCubicInOut=n,t.easeCubicOut=function(t){return--t*t*t+1},t.easeElastic=E,t.easeElasticIn=k,t.easeElasticInOut=z,t.easeElasticOut=E,t.easeExp=c,t.easeExpIn=function(t){return Math.pow(2,10*t-10)},t.easeExpInOut=c,t.easeExpOut=function(t){return 1-Math.pow(2,-10*t)},t.easeLinear=function(t){return+t},t.easePoly=o,t.easePolyIn=r,t.easePolyInOut=o,t.easePolyOut=i,t.easeQuad=e,t.easeQuadIn=function(t){return t*t},t.easeQuadInOut=e,t.easeQuadOut=function(t){return t*(2-t)},t.easeSin=u,t.easeSinIn=function(t){return 1-Math.cos(t*s)},t.easeSinInOut=u,t.easeSinOut=function(t){return Math.sin(t*s)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],13:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";function n(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function r(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function i(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function o(t,e){return fetch(t,e).then(i)}function a(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),o(e,n).then(function(e){return t(e,r)})}}var s=a(e.csvParse),u=a(e.tsvParse);function c(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}function f(t){return function(e,n){return o(e,n).then(function(e){return(new DOMParser).parseFromString(e,t)})}}var l=f("application/xml"),h=f("text/html"),d=f("image/svg+xml");t.blob=function(t,e){return fetch(t,e).then(n)},t.buffer=function(t,e){return fetch(t,e).then(r)},t.dsv=function(t,n,r,i){3===arguments.length&&"function"==typeof r&&(i=r,r=void 0);var a=e.dsvFormat(t);return o(n,r).then(function(t){return a.parse(t,i)})},t.csv=s,t.tsv=u,t.image=function(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})},t.json=function(t,e){return fetch(t,e).then(c)},t.text=o,t.xml=l,t.html=h,t.svg=d,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-dsv")):i(r.d3=r.d3||{},r.d3)},{"d3-dsv":11}],14:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i){"use strict";function o(t){return function(){return t}}function a(){return 1e-6*(Math.random()-.5)}function s(t){return t.x+t.vx}function u(t){return t.y+t.vy}function c(t){return t.index}function f(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function l(t){return t.x}function h(t){return t.y}var d=10,p=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){var n;function r(){var r,i,o=n.length,a=0,s=0;for(r=0;r<o;++r)a+=(i=n[r]).x,s+=i.y;for(a=a/o-t,s=s/o-e,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},t.forceCollide=function(t){var n,r,i=1,c=1;function f(){for(var t,o,f,h,d,p,m,v=n.length,g=0;g<c;++g)for(o=e.quadtree(n,s,u).visitAfter(l),t=0;t<v;++t)f=n[t],p=r[f.index],m=p*p,h=f.x+f.vx,d=f.y+f.vy,o.visit(_);function _(t,e,n,r,o){var s=t.data,u=t.r,c=p+u;if(!s)return e>h+c||r<h-c||n>d+c||o<d-c;if(s.index>f.index){var l=h-s.x-s.vx,v=d-s.y-s.vy,g=l*l+v*v;g<c*c&&(0===l&&(g+=(l=a())*l),0===v&&(g+=(v=a())*v),g=(c-(g=Math.sqrt(g)))/g*i,f.vx+=(l*=g)*(c=(u*=u)/(m+u)),f.vy+=(v*=g)*c,s.vx-=l*(c=1-c),s.vy-=v*c)}}}function l(t){if(t.data)return t.r=r[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function h(){if(n){var e,i,o=n.length;for(r=new Array(o),e=0;e<o;++e)i=n[e],r[i.index]=+t(i,e,n)}}return"function"!=typeof t&&(t=o(null==t?1:+t)),f.initialize=function(t){n=t,h()},f.iterations=function(t){return arguments.length?(c=+t,f):c},f.strength=function(t){return arguments.length?(i=+t,f):i},f.radius=function(e){return arguments.length?(t="function"==typeof e?e:o(+e),h(),f):t},f},t.forceLink=function(t){var e,r,i,s,u,l=c,h=function(t){return 1/Math.min(s[t.source.index],s[t.target.index])},d=o(30),p=1;function m(n){for(var i=0,o=t.length;i<p;++i)for(var s,c,f,l,h,d,m,v=0;v<o;++v)c=(s=t[v]).source,l=(f=s.target).x+f.vx-c.x-c.vx||a(),h=f.y+f.vy-c.y-c.vy||a(),l*=d=((d=Math.sqrt(l*l+h*h))-r[v])/d*n*e[v],h*=d,f.vx-=l*(m=u[v]),f.vy-=h*m,c.vx+=l*(m=1-m),c.vy+=h*m}function v(){if(i){var o,a,c=i.length,h=t.length,d=n.map(i,l);for(o=0,s=new Array(c);o<h;++o)(a=t[o]).index=o,"object"!=typeof a.source&&(a.source=f(d,a.source)),"object"!=typeof a.target&&(a.target=f(d,a.target)),s[a.source.index]=(s[a.source.index]||0)+1,s[a.target.index]=(s[a.target.index]||0)+1;for(o=0,u=new Array(h);o<h;++o)a=t[o],u[o]=s[a.source.index]/(s[a.source.index]+s[a.target.index]);e=new Array(h),g(),r=new Array(h),_()}}function g(){if(i)for(var n=0,r=t.length;n<r;++n)e[n]=+h(t[n],n,t)}function _(){if(i)for(var e=0,n=t.length;e<n;++e)r[e]=+d(t[e],e,t)}return null==t&&(t=[]),m.initialize=function(t){i=t,v()},m.links=function(e){return arguments.length?(t=e,v(),m):t},m.id=function(t){return arguments.length?(l=t,m):l},m.iterations=function(t){return arguments.length?(p=+t,m):p},m.strength=function(t){return arguments.length?(h="function"==typeof t?t:o(+t),g(),m):h},m.distance=function(t){return arguments.length?(d="function"==typeof t?t:o(+t),_(),m):d},m},t.forceManyBody=function(){var t,n,r,i,s=o(-30),u=1,c=1/0,f=.81;function d(i){var o,a=t.length,s=e.quadtree(t,l,h).visitAfter(m);for(r=i,o=0;o<a;++o)n=t[o],s.visit(v)}function p(){if(t){var e,n,r=t.length;for(i=new Array(r),e=0;e<r;++e)n=t[e],i[n.index]=+s(n,e,t)}}function m(t){var e,n,r,o,a,s=0,u=0;if(t.length){for(r=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(s+=e.value,u+=n,r+=n*e.x,o+=n*e.y);t.x=r/u,t.y=o/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=i[e.data.index]}while(e=e.next)}t.value=s}function v(t,e,o,s){if(!t.value)return!0;var l=t.x-n.x,h=t.y-n.y,d=s-e,p=l*l+h*h;if(d*d/f<p)return p<c&&(0===l&&(p+=(l=a())*l),0===h&&(p+=(h=a())*h),p<u&&(p=Math.sqrt(u*p)),n.vx+=l*t.value*r/p,n.vy+=h*t.value*r/p),!0;if(!(t.length||p>=c)){(t.data!==n||t.next)&&(0===l&&(p+=(l=a())*l),0===h&&(p+=(h=a())*h),p<u&&(p=Math.sqrt(u*p)));do{t.data!==n&&(d=i[t.data.index]*r/p,n.vx+=l*d,n.vy+=h*d)}while(t=t.next)}}return d.initialize=function(e){t=e,p()},d.strength=function(t){return arguments.length?(s="function"==typeof t?t:o(+t),p(),d):s},d.distanceMin=function(t){return arguments.length?(u=t*t,d):Math.sqrt(u)},d.distanceMax=function(t){return arguments.length?(c=t*t,d):Math.sqrt(c)},d.theta=function(t){return arguments.length?(f=t*t,d):Math.sqrt(f)},d},t.forceRadial=function(t,e,n){var r,i,a,s=o(.1);function u(t){for(var o=0,s=r.length;o<s;++o){var u=r[o],c=u.x-e||1e-6,f=u.y-n||1e-6,l=Math.sqrt(c*c+f*f),h=(a[o]-l)*i[o]*t/l;u.vx+=c*h,u.vy+=f*h}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+s(r[e],e,r)}}return"function"!=typeof t&&(t=o(+t)),null==e&&(e=0),null==n&&(n=0),u.initialize=function(t){r=t,c()},u.strength=function(t){return arguments.length?(s="function"==typeof t?t:o(+t),c(),u):s},u.radius=function(e){return arguments.length?(t="function"==typeof e?e:o(+e),c(),u):t},u.x=function(t){return arguments.length?(e=+t,u):e},u.y=function(t){return arguments.length?(n=+t,u):n},u},t.forceSimulation=function(t){var e,o=1,a=.001,s=1-Math.pow(a,1/300),u=0,c=.6,f=n.map(),l=i.timer(m),h=r.dispatch("tick","end");function m(){v(),h.call("tick",e),o<a&&(l.stop(),h.call("end",e))}function v(n){var r,i,a=t.length;void 0===n&&(n=1);for(var l=0;l<n;++l)for(o+=(u-o)*s,f.each(function(t){t(o)}),r=0;r<a;++r)null==(i=t[r]).fx?i.x+=i.vx*=c:(i.x=i.fx,i.vx=0),null==i.fy?i.y+=i.vy*=c:(i.y=i.fy,i.vy=0);return e}function g(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=d*Math.sqrt(n),o=n*p;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function _(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),g(),e={tick:v,restart:function(){return l.restart(m),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,g(),f.each(_),e):t},alpha:function(t){return arguments.length?(o=+t,e):o},alphaMin:function(t){return arguments.length?(a=+t,e):a},alphaDecay:function(t){return arguments.length?(s=+t,e):+s},alphaTarget:function(t){return arguments.length?(u=+t,e):u},velocityDecay:function(t){return arguments.length?(c=1-t,e):1-c},force:function(t,n){return arguments.length>1?(null==n?f.remove(t):f.set(t,_(n)),e):f.get(t)},find:function(e,n,r){var i,o,a,s,u,c=0,f=t.length;for(null==r?r=1/0:r*=r,c=0;c<f;++c)(a=(i=e-(s=t[c]).x)*i+(o=n-s.y)*o)<r&&(u=s,r=a);return u},on:function(t,n){return arguments.length>1?(h.on(t,n),e):h.on(t)}}},t.forceX=function(t){var e,n,r,i=o(.1);function a(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function s(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=o(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:o(+t),s(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:o(+e),s(),a):t},a},t.forceY=function(t){var e,n,r,i=o(.1);function a(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function s(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=o(null==t?0:+t)),a.initialize=function(t){e=t,s()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:o(+t),s(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:o(+e),s(),a):t},a},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-quadtree"),t("d3-collection"),t("d3-dispatch"),t("d3-timer")):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3)},{"d3-collection":6,"d3-dispatch":9,"d3-quadtree":21,"d3-timer":29}],15:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function n(t){return(t=e(Math.abs(t)))?t[1]:NaN}var r,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(t){if(!(e=i.exec(t)))throw new Error("invalid format: "+t);var e;return new a({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function a(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function s(t,n){var r=e(t,n);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}o.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var u={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,n){var i=e(t,n);if(!i)return t+"";var o=i[0],a=i[1],s=a-(r=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,u=o.length;return s===u?o:s>u?o+new Array(s-u+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+e(t,Math.max(0,n+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var f,l=Array.prototype.map,h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function d(t){var e,i,a=void 0===t.grouping||void 0===t.thousands?c:(e=l.call(t.grouping,Number),i=t.thousands+"",function(t,n){for(var r=t.length,o=[],a=0,s=e[0],u=0;r>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),o.push(t.substring(r-=s,r+s)),!((u+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(i)}),s=void 0===t.currency?"":t.currency[0]+"",f=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",p=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(l.call(t.numerals,String)),m=void 0===t.percent?"%":t.percent+"",v=void 0===t.minus?"-":t.minus+"",g=void 0===t.nan?"NaN":t.nan+"";function _(t){var e=(t=o(t)).fill,n=t.align,i=t.sign,c=t.symbol,l=t.zero,_=t.width,y=t.comma,b=t.precision,x=t.trim,w=t.type;"n"===w?(y=!0,w="g"):u[w]||(void 0===b&&(b=12),x=!0,w="g"),(l||"0"===e&&"="===n)&&(l=!0,e="0",n="=");var j="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===c?f:/[%p]/.test(w)?m:"",A=u[w],k=/[defgprs%]/.test(w);function E(t){var o,s,u,c=j,f=M;if("c"===w)f=A(t)+f,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?g:A(Math.abs(t),b),x&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==i&&(m=!1),c=(m?"("===i?i:v:"-"===i||"("===i?"":i)+c,f=("s"===w?h[8+r/3]:"")+f+(m&&"("===i?")":""),k)for(o=-1,s=t.length;++o<s;)if(48>(u=t.charCodeAt(o))||u>57){f=(46===u?d+t.slice(o+1):t.slice(o))+f,t=t.slice(0,o);break}}y&&!l&&(t=a(t,1/0));var E=c.length+t.length+f.length,z=E<_?new Array(_-E+1).join(e):"";switch(y&&l&&(t=a(z+t,z.length?_-f.length:1/0),z=""),n){case"<":t=c+t+f+z;break;case"=":t=c+z+t+f;break;case"^":t=z.slice(0,E=z.length>>1)+c+t+f+z.slice(E);break;default:t=z+c+t+f}return p(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),E.toString=function(){return t+""},E}return{format:_,formatPrefix:function(t,e){var r=_(((t=o(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(n(e)/3))),a=Math.pow(10,-i),s=h[8+i/3];return function(t){return r(a*t)+s}}}}function p(e){return f=d(e),t.format=f.format,t.formatPrefix=f.formatPrefix,f}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t.FormatSpecifier=a,t.formatDefaultLocale=p,t.formatLocale=d,t.formatSpecifier=o,t.precisionFixed=function(t){return Math.max(0,-n(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(e)/3)))-n(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,n(e)-n(t))+1},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],16:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";function n(){return new r}function r(){this.reset()}r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){o(i,t,this.t),o(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new r;function o(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var a=1e-6,s=1e-12,u=Math.PI,c=u/2,f=u/4,l=2*u,h=180/u,d=u/180,p=Math.abs,m=Math.atan,v=Math.atan2,g=Math.cos,_=Math.ceil,y=Math.exp,b=Math.log,x=Math.pow,w=Math.sin,j=Math.sign||function(t){return t>0?1:t<0?-1:0},M=Math.sqrt,A=Math.tan;function k(t){return t>1?0:t<-1?u:Math.acos(t)}function E(t){return t>1?c:t<-1?-c:Math.asin(t)}function z(t){return(t=w(t/2))*t}function T(){}function S(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var N={Feature:function(t,e){S(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)S(n[r].geometry,e)}},O={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){C(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)C(n[r],e,0)},Polygon:function(t,e){P(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)P(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)S(n[r],e)}};function C(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function P(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)C(t[n],e,1);e.polygonEnd()}function B(t,e){t&&N.hasOwnProperty(t.type)?N[t.type](t,e):S(t,e)}var R,I,D,F,L,U=n(),q=n(),Y={point:T,lineStart:T,lineEnd:T,polygonStart:function(){U.reset(),Y.lineStart=H,Y.lineEnd=V},polygonEnd:function(){var t=+U;q.add(t<0?l+t:t),this.lineStart=this.lineEnd=this.point=T},sphere:function(){q.add(l)}};function H(){Y.point=W}function V(){X(R,I)}function W(t,e){Y.point=X,R=t,I=e,D=t*=d,F=g(e=(e*=d)/2+f),L=w(e)}function X(t,e){var n=(t*=d)-D,r=n>=0?1:-1,i=r*n,o=g(e=(e*=d)/2+f),a=w(e),s=L*a,u=F*o+s*g(i),c=s*r*w(i);U.add(v(c,u)),D=t,F=o,L=a}function G(t){return[v(t[1],t[0]),E(t[2])]}function Z(t){var e=t[0],n=t[1],r=g(n);return[r*g(e),r*w(e),w(n)]}function $(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Q(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 K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function J(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function tt(t){var e=M(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var et,nt,rt,it,ot,at,st,ut,ct,ft,lt,ht,dt,pt,mt,vt,gt,_t,yt,bt,xt,wt,jt,Mt,At,kt,Et=n(),zt={point:Tt,lineStart:Nt,lineEnd:Ot,polygonStart:function(){zt.point=Ct,zt.lineStart=Pt,zt.lineEnd=Bt,Et.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),zt.point=Tt,zt.lineStart=Nt,zt.lineEnd=Ot,U<0?(et=-(rt=180),nt=-(it=90)):Et>a?it=90:Et<-a&&(nt=-90),ft[0]=et,ft[1]=rt},sphere:function(){et=-(rt=180),nt=-(it=90)}};function Tt(t,e){ct.push(ft=[et=t,rt=t]),e<nt&&(nt=e),e>it&&(it=e)}function St(t,e){var n=Z([t*d,e*d]);if(ut){var r=Q(ut,n),i=Q([r[1],-r[0],0],r);tt(i),i=G(i);var o,a=t-ot,s=a>0?1:-1,u=i[0]*h*s,c=p(a)>180;c^(s*ot<u&&u<s*t)?(o=i[1]*h)>it&&(it=o):c^(s*ot<(u=(u+360)%360-180)&&u<s*t)?(o=-i[1]*h)<nt&&(nt=o):(e<nt&&(nt=e),e>it&&(it=e)),c?t<ot?Rt(et,t)>Rt(et,rt)&&(rt=t):Rt(t,rt)>Rt(et,rt)&&(et=t):rt>=et?(t<et&&(et=t),t>rt&&(rt=t)):t>ot?Rt(et,t)>Rt(et,rt)&&(rt=t):Rt(t,rt)>Rt(et,rt)&&(et=t)}else ct.push(ft=[et=t,rt=t]);e<nt&&(nt=e),e>it&&(it=e),ut=n,ot=t}function Nt(){zt.point=St}function Ot(){ft[0]=et,ft[1]=rt,zt.point=Tt,ut=null}function Ct(t,e){if(ut){var n=t-ot;Et.add(p(n)>180?n+(n>0?360:-360):n)}else at=t,st=e;Y.point(t,e),St(t,e)}function Pt(){Y.lineStart()}function Bt(){Ct(at,st),Y.lineEnd(),p(Et)>a&&(et=-(rt=180)),ft[0]=et,ft[1]=rt,ut=null}function Rt(t,e){return(e-=t)<0?e+360:e}function It(t,e){return t[0]-e[0]}function Dt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Ft={sphere:T,point:Lt,lineStart:qt,lineEnd:Vt,polygonStart:function(){Ft.lineStart=Wt,Ft.lineEnd=Xt},polygonEnd:function(){Ft.lineStart=qt,Ft.lineEnd=Vt}};function Lt(t,e){t*=d;var n=g(e*=d);Ut(n*g(t),n*w(t),w(e))}function Ut(t,e,n){dt+=(t-dt)/++lt,pt+=(e-pt)/lt,mt+=(n-mt)/lt}function qt(){Ft.point=Yt}function Yt(t,e){t*=d;var n=g(e*=d);Mt=n*g(t),At=n*w(t),kt=w(e),Ft.point=Ht,Ut(Mt,At,kt)}function Ht(t,e){t*=d;var n=g(e*=d),r=n*g(t),i=n*w(t),o=w(e),a=v(M((a=At*o-kt*i)*a+(a=kt*r-Mt*o)*a+(a=Mt*i-At*r)*a),Mt*r+At*i+kt*o);ht+=a,vt+=a*(Mt+(Mt=r)),gt+=a*(At+(At=i)),_t+=a*(kt+(kt=o)),Ut(Mt,At,kt)}function Vt(){Ft.point=Lt}function Wt(){Ft.point=Gt}function Xt(){Zt(wt,jt),Ft.point=Lt}function Gt(t,e){wt=t,jt=e,t*=d,e*=d,Ft.point=Zt;var n=g(e);Mt=n*g(t),At=n*w(t),kt=w(e),Ut(Mt,At,kt)}function Zt(t,e){t*=d;var n=g(e*=d),r=n*g(t),i=n*w(t),o=w(e),a=At*o-kt*i,s=kt*r-Mt*o,u=Mt*i-At*r,c=M(a*a+s*s+u*u),f=E(c),l=c&&-f/c;yt+=l*a,bt+=l*s,xt+=l*u,ht+=f,vt+=f*(Mt+(Mt=r)),gt+=f*(At+(At=i)),_t+=f*(kt+(kt=o)),Ut(Mt,At,kt)}function $t(t){return function(){return t}}function Qt(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Kt(t,e){return[p(t)>u?t+Math.round(-t/l)*l:t,e]}function Jt(t,e,n){return(t%=l)?e||n?Qt(ee(t),ne(e,n)):ee(t):e||n?ne(e,n):Kt}function te(t){return function(e,n){return[(e+=t)>u?e-l:e<-u?e+l:e,n]}}function ee(t){var e=te(t);return e.invert=te(-t),e}function ne(t,e){var n=g(t),r=w(t),i=g(e),o=w(e);function a(t,e){var a=g(e),s=g(t)*a,u=w(t)*a,c=w(e),f=c*n+s*r;return[v(u*i-f*o,s*n-c*r),E(f*i+u*o)]}return a.invert=function(t,e){var a=g(e),s=g(t)*a,u=w(t)*a,c=w(e),f=c*i-u*o;return[v(u*i+c*o,s*n+f*r),E(f*n-s*r)]},a}function re(t){function e(e){return(e=t(e[0]*d,e[1]*d))[0]*=h,e[1]*=h,e}return t=Jt(t[0]*d,t[1]*d,t.length>2?t[2]*d:0),e.invert=function(e){return(e=t.invert(e[0]*d,e[1]*d))[0]*=h,e[1]*=h,e},e}function ie(t,e,n,r,i,o){if(n){var a=g(e),s=w(e),u=r*n;null==i?(i=e+r*l,o=e-u/2):(i=oe(a,i),o=oe(a,o),(r>0?i<o:i>o)&&(i+=r*l));for(var c,f=i;r>0?f>o:f<o;f-=u)c=G([a,-s*g(f),-s*w(f)]),t.point(c[0],c[1])}}function oe(t,e){(e=Z(e))[0]-=t,tt(e);var n=k(-e[1]);return((-e[2]<0?-n:n)+l-a)%l}function ae(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:T,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function se(t,e){return p(t[0]-e[0])<a&&p(t[1]-e[1])<a}function ue(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function ce(t,e,n,r,i){var o,a,s=[],u=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(se(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else s.push(n=new ue(r,t,null,!0)),u.push(n.o=new ue(r,null,n,!1)),s.push(n=new ue(a,t,null,!1)),u.push(n.o=new ue(a,null,n,!0))}}),s.length){for(u.sort(e),fe(s),fe(u),o=0,a=u.length;o<a;++o)u[o].e=n=!n;for(var c,f,l=s[0];;){for(var h=l,d=!0;h.v;)if((h=h.n)===l)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=c.length;o<a;++o)i.point((f=c[o])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;o>=0;--o)i.point((f=c[o])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function fe(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}Kt.invert=Kt;var le=n();function he(t){return p(t[0])<=u?t[0]:j(t[0])*((p(t[0])+u)%l-u)}function de(t,e){var n=he(e),r=e[1],i=w(r),o=[w(n),-g(n),0],s=0,h=0;le.reset(),1===i?r=c+a:-1===i&&(r=-c-a);for(var d=0,p=t.length;d<p;++d)if(_=(m=t[d]).length)for(var m,_,y=m[_-1],b=he(y),x=y[1]/2+f,j=w(x),M=g(x),A=0;A<_;++A,b=z,j=S,M=N,y=k){var k=m[A],z=he(k),T=k[1]/2+f,S=w(T),N=g(T),O=z-b,C=O>=0?1:-1,P=C*O,B=P>u,R=j*S;if(le.add(v(R*C*w(P),M*N+R*g(P))),s+=B?O+C*l:O,B^b>=n^z>=n){var I=Q(Z(y),Z(k));tt(I);var D=Q(o,I);tt(D);var F=(B^O>=0?-1:1)*E(D[2]);(r>F||r===F&&(I[0]||I[1]))&&(h+=B^O>=0?1:-1)}}return(s<-a||s<a&&le<-a)^1&h}function pe(t,n,r,i){return function(o){var a,s,u,c=n(o),f=ae(),l=n(f),h=!1,d={point:p,lineStart:v,lineEnd:g,polygonStart:function(){d.point=_,d.lineStart=y,d.lineEnd=b,s=[],a=[]},polygonEnd:function(){d.point=p,d.lineStart=v,d.lineEnd=g,s=e.merge(s);var t=de(a,i);s.length?(h||(o.polygonStart(),h=!0),ce(s,ve,t,r,o)):t&&(h||(o.polygonStart(),h=!0),o.lineStart(),r(null,null,1,o),o.lineEnd()),h&&(o.polygonEnd(),h=!1),s=a=null},sphere:function(){o.polygonStart(),o.lineStart(),r(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(e,n){t(e,n)&&o.point(e,n)}function m(t,e){c.point(t,e)}function v(){d.point=m,c.lineStart()}function g(){d.point=p,c.lineEnd()}function _(t,e){u.push([t,e]),l.point(t,e)}function y(){l.lineStart(),u=[]}function b(){_(u[0][0],u[0][1]),l.lineEnd();var t,e,n,r,i=l.clean(),c=f.result(),d=c.length;if(u.pop(),a.push(u),u=null,d)if(1&i){if((e=(n=c[0]).length-1)>0){for(h||(o.polygonStart(),h=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else d>1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(me))}return d}}function me(t){return t.length>1}function ve(t,e){return((t=t.x)[0]<0?t[1]-c-a:c-t[1])-((e=e.x)[0]<0?e[1]-c-a:c-e[1])}var ge=pe(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var f=o>0?u:-u,l=p(o-n);p(l-u)<a?(t.point(n,r=(r+s)/2>0?c:-c),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(f,r),t.point(o,r),e=0):i!==f&&l>=u&&(p(n-i)<a&&(n-=i*a),p(o-f)<a&&(o-=f*a),r=function(t,e,n,r){var i,o,s=w(t-n);return p(s)>a?m((w(e)*(o=g(r))*w(n)-w(r)*(i=g(e))*w(t))/(i*o*s)):(e+r)/2}(n,r,o,s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(f,r),e=0),t.point(n=o,r=s),i=f},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*c,r.point(-u,i),r.point(0,i),r.point(u,i),r.point(u,0),r.point(u,-i),r.point(0,-i),r.point(-u,-i),r.point(-u,0),r.point(-u,i);else if(p(t[0]-e[0])>a){var o=t[0]<e[0]?u:-u;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-u,-c]);function _e(t){var e=g(t),n=6*d,r=e>0,i=p(e)>a;function o(t,n){return g(t)*g(n)>e}function s(t,n,r){var i=[1,0,0],o=Q(Z(t),Z(n)),s=$(o,o),c=o[0],f=s-c*c;if(!f)return!r&&t;var l=e*s/f,h=-e*c/f,d=Q(i,o),m=J(i,l);K(m,J(o,h));var v=d,g=$(m,v),_=$(v,v),y=g*g-_*($(m,m)-1);if(!(y<0)){var b=M(y),x=J(v,(-g-b)/_);if(K(x,m),x=G(x),!r)return x;var w,j=t[0],A=n[0],k=t[1],E=n[1];A<j&&(w=j,j=A,A=w);var z=A-j,T=p(z-u)<a;if(!T&&E<k&&(w=k,k=E,E=w),T||z<a?T?k+E>0^x[1]<(p(x[0]-j)<a?k:E):k<=x[1]&&x[1]<=E:z>u^(j<=x[0]&&x[0]<=A)){var S=J(v,(-g+b)/_);return K(S,m),[x,G(S)]}}}function c(e,n){var i=r?t:u-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return pe(o,function(t){var e,n,f,l,h;return{lineStart:function(){l=f=!1,h=1},point:function(d,p){var m,v=[d,p],g=o(d,p),_=r?g?0:c(d,p):g?c(d+(d<0?u:-u),p):0;if(!e&&(l=f=g)&&t.lineStart(),g!==f&&(!(m=s(e,v))||se(e,m)||se(v,m))&&(v[0]+=a,v[1]+=a,g=o(v[0],v[1])),g!==f)h=0,g?(t.lineStart(),m=s(v,e),t.point(m[0],m[1])):(m=s(e,v),t.point(m[0],m[1]),t.lineEnd()),e=m;else if(i&&e&&r^g){var y;_&n||!(y=s(v,e,!0))||(h=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!g||e&&se(e,v)||t.point(v[0],v[1]),e=v,f=g,n=_},lineEnd:function(){f&&t.lineEnd(),e=null},clean:function(){return h|(l&&f)<<1}}},function(e,r,i,o){ie(o,t,n,i,e,r)},r?[0,-t]:[-u,t-u])}var ye=1e9,be=-ye;function xe(t,n,r,i){function o(e,o){return t<=e&&e<=r&&n<=o&&o<=i}function s(e,o,a,s){var c=0,l=0;if(null==e||(c=u(e,a))!==(l=u(o,a))||f(e,o)<0^a>0)do{s.point(0===c||3===c?t:r,c>1?i:n)}while((c=(c+a+4)%4)!==l);else s.point(o[0],o[1])}function u(e,i){return p(e[0]-t)<a?i>0?0:3:p(e[0]-r)<a?i>0?2:1:p(e[1]-n)<a?i>0?1:0:i>0?3:2}function c(t,e){return f(t.x,e.x)}function f(t,e){var n=u(t,1),r=u(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var u,f,l,h,d,p,m,v,g,_,y,b=a,x=ae(),w={point:j,lineStart:function(){w.point=M,f&&f.push(l=[]);_=!0,g=!1,m=v=NaN},lineEnd:function(){u&&(M(h,d),p&&g&&x.rejoin(),u.push(x.result()));w.point=j,g&&b.lineEnd()},polygonStart:function(){b=x,u=[],f=[],y=!0},polygonEnd:function(){var n=function(){for(var e=0,n=0,r=f.length;n<r;++n)for(var o,a,s=f[n],u=1,c=s.length,l=s[0],h=l[0],d=l[1];u<c;++u)o=h,a=d,l=s[u],h=l[0],d=l[1],a<=i?d>i&&(h-o)*(i-a)>(d-a)*(t-o)&&++e:d<=i&&(h-o)*(i-a)<(d-a)*(t-o)&&--e;return e}(),r=y&&n,o=(u=e.merge(u)).length;(r||o)&&(a.polygonStart(),r&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),o&&ce(u,c,n,s,a),a.polygonEnd());b=a,u=f=l=null}};function j(t,e){o(t,e)&&b.point(t,e)}function M(e,a){var s=o(e,a);if(f&&l.push([e,a]),_)h=e,d=a,p=s,_=!1,s&&(b.lineStart(),b.point(e,a));else if(s&&g)b.point(e,a);else{var u=[m=Math.max(be,Math.min(ye,m)),v=Math.max(be,Math.min(ye,v))],c=[e=Math.max(be,Math.min(ye,e)),a=Math.max(be,Math.min(ye,a))];!function(t,e,n,r,i,o){var a,s=t[0],u=t[1],c=0,f=1,l=e[0]-s,h=e[1]-u;if(a=n-s,l||!(a>0)){if(a/=l,l<0){if(a<c)return;a<f&&(f=a)}else if(l>0){if(a>f)return;a>c&&(c=a)}if(a=i-s,l||!(a<0)){if(a/=l,l<0){if(a>f)return;a>c&&(c=a)}else if(l>0){if(a<c)return;a<f&&(f=a)}if(a=r-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}return c>0&&(t[0]=s+c*l,t[1]=u+c*h),f<1&&(e[0]=s+f*l,e[1]=u+f*h),!0}}}}}(u,c,t,n,r,i)?s&&(b.lineStart(),b.point(e,a),y=!1):(g||(b.lineStart(),b.point(u[0],u[1])),b.point(c[0],c[1]),s||b.lineEnd(),y=!1)}m=e,v=a,g=s}return w}}var we,je,Me,Ae=n(),ke={sphere:T,point:T,lineStart:function(){ke.point=ze,ke.lineEnd=Ee},lineEnd:T,polygonStart:T,polygonEnd:T};function Ee(){ke.point=ke.lineEnd=T}function ze(t,e){we=t*=d,je=w(e*=d),Me=g(e),ke.point=Te}function Te(t,e){t*=d;var n=w(e*=d),r=g(e),i=p(t-we),o=g(i),a=r*w(i),s=Me*n-je*r*o,u=je*n+Me*r*o;Ae.add(v(M(a*a+s*s),u)),we=t,je=n,Me=r}function Se(t){return Ae.reset(),B(t,ke),+Ae}var Ne=[null,null],Oe={type:"LineString",coordinates:Ne};function Ce(t,e){return Ne[0]=t,Ne[1]=e,Se(Oe)}var Pe={Feature:function(t,e){return Re(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Re(n[r].geometry,e))return!0;return!1}},Be={Sphere:function(){return!0},Point:function(t,e){return Ie(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ie(n[r],e))return!0;return!1},LineString:function(t,e){return De(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(De(n[r],e))return!0;return!1},Polygon:function(t,e){return Fe(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Fe(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Re(n[r],e))return!0;return!1}};function Re(t,e){return!(!t||!Be.hasOwnProperty(t.type))&&Be[t.type](t,e)}function Ie(t,e){return 0===Ce(t,e)}function De(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(0===(r=Ce(t[o],e)))return!0;if(o>0&&(i=Ce(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<s*i)return!0;n=r}return!1}function Fe(t,e){return!!de(t.map(Le),Ue(e))}function Le(t){return(t=t.map(Ue)).pop(),t}function Ue(t){return[t[0]*d,t[1]*d]}function qe(t,n,r){var i=e.range(t,n-a,r).concat(n);return function(t){return i.map(function(e){return[t,e]})}}function Ye(t,n,r){var i=e.range(t,n-a,r).concat(n);return function(t){return i.map(function(e){return[e,t]})}}function He(){var t,n,r,i,o,s,u,c,f,l,h,d,m=10,v=m,g=90,y=360,b=2.5;function x(){return{type:"MultiLineString",coordinates:w()}}function w(){return e.range(_(i/g)*g,r,g).map(h).concat(e.range(_(c/y)*y,u,y).map(d)).concat(e.range(_(n/m)*m,t,m).filter(function(t){return p(t%g)>a}).map(f)).concat(e.range(_(s/v)*v,o,v).filter(function(t){return p(t%y)>a}).map(l))}return x.lines=function(){return w().map(function(t){return{type:"LineString",coordinates:t}})},x.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(d(u).slice(1),h(r).reverse().slice(1),d(c).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.extentMajor(t).extentMinor(t):x.extentMinor()},x.extentMajor=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],c=+t[0][1],u=+t[1][1],i>r&&(t=i,i=r,r=t),c>u&&(t=c,c=u,u=t),x.precision(b)):[[i,c],[r,u]]},x.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],s=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),s>o&&(e=s,s=o,o=e),x.precision(b)):[[n,s],[t,o]]},x.step=function(t){return arguments.length?x.stepMajor(t).stepMinor(t):x.stepMinor()},x.stepMajor=function(t){return arguments.length?(g=+t[0],y=+t[1],x):[g,y]},x.stepMinor=function(t){return arguments.length?(m=+t[0],v=+t[1],x):[m,v]},x.precision=function(e){return arguments.length?(b=+e,f=qe(s,o,90),l=Ye(n,t,b),h=qe(c,u,90),d=Ye(i,r,b),x):b},x.extentMajor([[-180,-90+a],[180,90-a]]).extentMinor([[-180,-80-a],[180,80+a]])}function Ve(t){return t}var We,Xe,Ge,Ze,$e=n(),Qe=n(),Ke={point:T,lineStart:T,lineEnd:T,polygonStart:function(){Ke.lineStart=Je,Ke.lineEnd=nn},polygonEnd:function(){Ke.lineStart=Ke.lineEnd=Ke.point=T,$e.add(p(Qe)),Qe.reset()},result:function(){var t=$e/2;return $e.reset(),t}};function Je(){Ke.point=tn}function tn(t,e){Ke.point=en,We=Ge=t,Xe=Ze=e}function en(t,e){Qe.add(Ze*t-Ge*e),Ge=t,Ze=e}function nn(){en(We,Xe)}var rn,on,an,sn,un=1/0,cn=un,fn=-un,ln=fn,hn={point:function(t,e){t<un&&(un=t);t>fn&&(fn=t);e<cn&&(cn=e);e>ln&&(ln=e)},lineStart:T,lineEnd:T,polygonStart:T,polygonEnd:T,result:function(){var t=[[un,cn],[fn,ln]];return fn=ln=-(cn=un=1/0),t}},dn=0,pn=0,mn=0,vn=0,gn=0,_n=0,yn=0,bn=0,xn=0,wn={point:jn,lineStart:Mn,lineEnd:En,polygonStart:function(){wn.lineStart=zn,wn.lineEnd=Tn},polygonEnd:function(){wn.point=jn,wn.lineStart=Mn,wn.lineEnd=En},result:function(){var t=xn?[yn/xn,bn/xn]:_n?[vn/_n,gn/_n]:mn?[dn/mn,pn/mn]:[NaN,NaN];return dn=pn=mn=vn=gn=_n=yn=bn=xn=0,t}};function jn(t,e){dn+=t,pn+=e,++mn}function Mn(){wn.point=An}function An(t,e){wn.point=kn,jn(an=t,sn=e)}function kn(t,e){var n=t-an,r=e-sn,i=M(n*n+r*r);vn+=i*(an+t)/2,gn+=i*(sn+e)/2,_n+=i,jn(an=t,sn=e)}function En(){wn.point=jn}function zn(){wn.point=Sn}function Tn(){Nn(rn,on)}function Sn(t,e){wn.point=Nn,jn(rn=an=t,on=sn=e)}function Nn(t,e){var n=t-an,r=e-sn,i=M(n*n+r*r);vn+=i*(an+t)/2,gn+=i*(sn+e)/2,_n+=i,yn+=(i=sn*t-an*e)*(an+t),bn+=i*(sn+e),xn+=3*i,jn(an=t,sn=e)}function On(t){this._context=t}On.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,l)}},result:T};var Cn,Pn,Bn,Rn,In,Dn=n(),Fn={point:T,lineStart:function(){Fn.point=Ln},lineEnd:function(){Cn&&Un(Pn,Bn),Fn.point=T},polygonStart:function(){Cn=!0},polygonEnd:function(){Cn=null},result:function(){var t=+Dn;return Dn.reset(),t}};function Ln(t,e){Fn.point=Un,Pn=Rn=t,Bn=In=e}function Un(t,e){Rn-=t,In-=e,Dn.add(M(Rn*Rn+In*In)),Rn=t,In=e}function qn(){this._string=[]}function Yn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Hn(t){return function(e){var n=new Vn;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Vn(){}function Wn(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),B(n,t.stream(hn)),e(hn.result()),null!=r&&t.clipExtent(r),t}function Xn(t,e,n){return Wn(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])},n)}function Gn(t,e,n){return Xn(t,[[0,0],e],n)}function Zn(t,e,n){return Wn(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function $n(t,e,n){return Wn(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}qn.prototype={_radius:4.5,_circle:Yn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Yn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Vn.prototype={constructor:Vn,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Qn=16,Kn=g(30*d);function Jn(t,e){return+e?function(t,e){function n(r,i,o,s,u,c,f,l,h,d,m,g,_,y){var b=f-r,x=l-i,w=b*b+x*x;if(w>4*e&&_--){var j=s+d,A=u+m,k=c+g,z=M(j*j+A*A+k*k),T=E(k/=z),S=p(p(k)-1)<a||p(o-h)<a?(o+h)/2:v(A,j),N=t(S,T),O=N[0],C=N[1],P=O-r,B=C-i,R=x*P-b*B;(R*R/w>e||p((b*P+x*B)/w-.5)>.3||s*d+u*m+c*g<Kn)&&(n(r,i,o,s,u,c,O,C,S,j/=z,A/=z,k,_,y),y.point(O,C),n(O,C,S,j,A,k,f,l,h,d,m,g,_,y))}}return function(e){var r,i,o,a,s,u,c,f,l,h,d,p,m={point:v,lineStart:g,lineEnd:y,polygonStart:function(){e.polygonStart(),m.lineStart=b},polygonEnd:function(){e.polygonEnd(),m.lineStart=g}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function g(){f=NaN,m.point=_,e.lineStart()}function _(r,i){var o=Z([r,i]),a=t(r,i);n(f,l,c,h,d,p,f=a[0],l=a[1],c=r,h=o[0],d=o[1],p=o[2],Qn,e),e.point(f,l)}function y(){m.point=v,e.lineEnd()}function b(){g(),m.point=x,m.lineEnd=w}function x(t,e){_(r=t,e),i=f,o=l,a=h,s=d,u=p,m.point=_}function w(){n(f,l,c,h,d,p,i,o,r,a,s,u,Qn,e),m.lineEnd=y,y()}return m}}(t,e):function(t){return Hn({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var tr=Hn({point:function(t,e){this.stream.point(t*d,e*d)}});function er(t,e,n,r,i,o){var a=g(o),s=w(o),u=a*t,c=s*t,f=a/t,l=s/t,h=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(t,o){return[u*(t*=r)-c*(o*=i)+e,n-c*t-u*o]}return p.invert=function(t,e){return[r*(f*t-l*e+h),i*(d-l*t-f*e)]},p}function nr(t){return rr(function(){return t})()}function rr(t){var e,n,r,i,o,a,s,u,c,f,l=150,p=480,m=250,v=0,g=0,_=0,y=0,b=0,x=0,w=1,j=1,A=null,k=ge,E=null,z=Ve,T=.5;function S(t){return u(t[0]*d,t[1]*d)}function N(t){return(t=u.invert(t[0],t[1]))&&[t[0]*h,t[1]*h]}function O(){var t=er(l,0,0,w,j,x).apply(null,e(v,g)),r=(x?er:function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o})(l,p-t[0],m-t[1],w,j,x);return n=Jt(_,y,b),s=Qt(e,r),u=Qt(n,s),a=Jn(s,T),C()}function C(){return c=f=null,S}return S.stream=function(t){return c&&f===t?c:c=tr(function(t){return Hn({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(a(z(f=t)))))},S.preclip=function(t){return arguments.length?(k=t,A=void 0,C()):k},S.postclip=function(t){return arguments.length?(z=t,E=r=i=o=null,C()):z},S.clipAngle=function(t){return arguments.length?(k=+t?_e(A=t*d):(A=null,ge),C()):A*h},S.clipExtent=function(t){return arguments.length?(z=null==t?(E=r=i=o=null,Ve):xe(E=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),C()):null==E?null:[[E,r],[i,o]]},S.scale=function(t){return arguments.length?(l=+t,O()):l},S.translate=function(t){return arguments.length?(p=+t[0],m=+t[1],O()):[p,m]},S.center=function(t){return arguments.length?(v=t[0]%360*d,g=t[1]%360*d,O()):[v*h,g*h]},S.rotate=function(t){return arguments.length?(_=t[0]%360*d,y=t[1]%360*d,b=t.length>2?t[2]%360*d:0,O()):[_*h,y*h,b*h]},S.angle=function(t){return arguments.length?(x=t%360*d,O()):x*h},S.reflectX=function(t){return arguments.length?(w=t?-1:1,O()):w<0},S.reflectY=function(t){return arguments.length?(j=t?-1:1,O()):j<0},S.precision=function(t){return arguments.length?(a=Jn(s,T=t*t),C()):M(T)},S.fitExtent=function(t,e){return Xn(S,t,e)},S.fitSize=function(t,e){return Gn(S,t,e)},S.fitWidth=function(t,e){return Zn(S,t,e)},S.fitHeight=function(t,e){return $n(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&N,O()}}function ir(t){var e=0,n=u/3,r=rr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*d,n=t[1]*d):[e*h,n*h]},i}function or(t,e){var n=w(t),r=(n+w(e))/2;if(p(r)<a)return function(t){var e=g(t);function n(t,n){return[t*e,w(n)/e]}return n.invert=function(t,n){return[t/e,E(n*e)]},n}(t);var i=1+n*(2*r-n),o=M(i)/r;function s(t,e){var n=M(i-2*r*w(e))/r;return[n*w(t*=r),o-n*g(t)]}return s.invert=function(t,e){var n=o-e,a=v(t,p(n))*j(n);return n*r<0&&(a-=u*j(t)*j(n)),[a/r,E((i-(t*t+n*n)*r*r)/(2*r))]},s}function ar(){return ir(or).scale(155.424).center([0,33.6442])}function sr(){return ar().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ur(t){return function(e,n){var r=g(e),i=g(n),o=t(r*i);return[o*i*w(e),o*w(n)]}}function cr(t){return function(e,n){var r=M(e*e+n*n),i=t(r),o=w(i),a=g(i);return[v(e*o,r*a),E(r&&n*o/r)]}}var fr=ur(function(t){return M(2/(1+t))});fr.invert=cr(function(t){return 2*E(t/2)});var lr=ur(function(t){return(t=k(t))&&t/w(t)});function hr(t,e){return[t,b(A((c+e)/2))]}function dr(t){var e,n,r,i=nr(t),o=i.center,a=i.scale,s=i.translate,c=i.clipExtent,f=null;function l(){var o=u*a(),s=i(re(i.rotate()).invert([0,0]));return c(null==f?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===hr?[[Math.max(s[0]-o,f),e],[Math.min(s[0]+o,n),r]]:[[f,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),l()):a()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(o(t),l()):o()},i.clipExtent=function(t){return arguments.length?(null==t?f=e=n=r=null:(f=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==f?null:[[f,e],[n,r]]},l()}function pr(t){return A((c+t)/2)}function mr(t,e){var n=g(t),r=t===e?w(t):b(n/g(e))/b(pr(e)/pr(t)),i=n*x(pr(t),r)/r;if(!r)return hr;function o(t,e){i>0?e<-c+a&&(e=-c+a):e>c-a&&(e=c-a);var n=i/x(pr(e),r);return[n*w(r*t),i-n*g(r*t)]}return o.invert=function(t,e){var n=i-e,o=j(r)*M(t*t+n*n),a=v(t,p(n))*j(n);return n*r<0&&(a-=u*j(t)*j(n)),[a/r,2*m(x(i/o,1/r))-c]},o}function vr(t,e){return[t,e]}function gr(t,e){var n=g(t),r=t===e?w(t):(n-g(e))/(e-t),i=n/r+t;if(p(r)<a)return vr;function o(t,e){var n=i-e,o=r*t;return[n*w(o),i-n*g(o)]}return o.invert=function(t,e){var n=i-e,o=v(t,p(n))*j(n);return n*r<0&&(o-=u*j(t)*j(n)),[o/r,i-j(r)*M(t*t+n*n)]},o}lr.invert=cr(function(t){return t}),hr.invert=function(t,e){return[t,2*m(y(e))-c]},vr.invert=vr;var _r=1.340264,yr=-.081106,br=893e-6,xr=.003796,wr=M(3)/2;function jr(t,e){var n=E(wr*w(e)),r=n*n,i=r*r*r;return[t*g(n)/(wr*(_r+3*yr*r+i*(7*br+9*xr*r))),n*(_r+yr*r+i*(br+xr*r))]}function Mr(t,e){var n=g(e),r=g(t)*n;return[n*w(t)/r,w(e)/r]}function Ar(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function kr(t,e){return[g(e)*w(t),w(e)]}function Er(t,e){var n=g(e),r=1+g(t)*n;return[n*w(t)/r,w(e)/r]}function zr(t,e){return[b(A((c+e)/2)),-t]}jr.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(_r+yr*i+o*(br+xr*i))-e)/(_r+3*yr*i+o*(7*br+9*xr*i)))*r)*i*i,!(p(n)<s));++a);return[wr*t*(_r+3*yr*i+o*(7*br+9*xr*i))/g(r),E(w(r)/wr)]},Mr.invert=cr(m),Ar.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,s=o*o;r-=n=(r*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(p(n)>a&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},kr.invert=cr(E),Er.invert=cr(function(t){return 2*m(t)}),zr.invert=function(t,e){return[-e,2*m(y(t))-c]},t.geoAlbers=sr,t.geoAlbersUsa=function(){var t,e,n,r,i,o,s=sr(),u=ar().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=ar().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,e){o=[t,e]}};function l(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function h(){return t=e=null,l}return l.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:s).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[s.stream(e=n),u.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(s.precision(t),u.precision(t),c.precision(t),h()):s.precision()},l.scale=function(t){return arguments.length?(s.scale(t),u.scale(.35*t),c.scale(t),l.translate(s.translate())):s.scale()},l.translate=function(t){if(!arguments.length)return s.translate();var e=s.scale(),o=+t[0],l=+t[1];return n=s.translate(t).clipExtent([[o-.455*e,l-.238*e],[o+.455*e,l+.238*e]]).stream(f),r=u.translate([o-.307*e,l+.201*e]).clipExtent([[o-.425*e+a,l+.12*e+a],[o-.214*e-a,l+.234*e-a]]).stream(f),i=c.translate([o-.205*e,l+.212*e]).clipExtent([[o-.214*e+a,l+.166*e+a],[o-.115*e-a,l+.234*e-a]]).stream(f),h()},l.fitExtent=function(t,e){return Xn(l,t,e)},l.fitSize=function(t,e){return Gn(l,t,e)},l.fitWidth=function(t,e){return Zn(l,t,e)},l.fitHeight=function(t,e){return $n(l,t,e)},l.scale(1070)},t.geoArea=function(t){return q.reset(),B(t,Y),2*q},t.geoAzimuthalEqualArea=function(){return nr(fr).scale(124.75).clipAngle(179.999)},t.geoAzimuthalEqualAreaRaw=fr,t.geoAzimuthalEquidistant=function(){return nr(lr).scale(79.4188).clipAngle(179.999)},t.geoAzimuthalEquidistantRaw=lr,t.geoBounds=function(t){var e,n,r,i,o,a,s;if(it=rt=-(et=nt=1/0),ct=[],B(t,zt),n=ct.length){for(ct.sort(It),e=1,o=[r=ct[0]];e<n;++e)Dt(r,(i=ct[e])[0])||Dt(r,i[1])?(Rt(r[0],i[1])>Rt(r[0],r[1])&&(r[1]=i[1]),Rt(i[0],r[1])>Rt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=Rt(r[1],i[0]))>a&&(a=s,et=i[0],rt=r[1])}return ct=ft=null,et===1/0||nt===1/0?[[NaN,NaN],[NaN,NaN]]:[[et,nt],[rt,it]]},t.geoCentroid=function(t){lt=ht=dt=pt=mt=vt=gt=_t=yt=bt=xt=0,B(t,Ft);var e=yt,n=bt,r=xt,i=e*e+n*n+r*r;return i<s&&(e=vt,n=gt,r=_t,ht<a&&(e=dt,n=pt,r=mt),(i=e*e+n*n+r*r)<s)?[NaN,NaN]:[v(n,e)*h,E(r/M(i))*h]},t.geoCircle=function(){var t,e,n=$t([0,0]),r=$t(90),i=$t(6),o={point:function(n,r){t.push(n=e(n,r)),n[0]*=h,n[1]*=h}};function a(){var a=n.apply(this,arguments),s=r.apply(this,arguments)*d,u=i.apply(this,arguments)*d;return t=[],e=Jt(-a[0]*d,-a[1]*d,0).invert,ie(o,s,u,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:$t([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(r="function"==typeof t?t:$t(+t),a):r},a.precision=function(t){return arguments.length?(i="function"==typeof t?t:$t(+t),a):i},a},t.geoClipAntimeridian=ge,t.geoClipCircle=_e,t.geoClipExtent=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=xe(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}},t.geoClipRectangle=xe,t.geoConicConformal=function(){return ir(mr).scale(109.5).parallels([30,30])},t.geoConicConformalRaw=mr,t.geoConicEqualArea=ar,t.geoConicEqualAreaRaw=or,t.geoConicEquidistant=function(){return ir(gr).scale(131.154).center([0,13.9389])},t.geoConicEquidistantRaw=gr,t.geoContains=function(t,e){return(t&&Pe.hasOwnProperty(t.type)?Pe[t.type]:Re)(t,e)},t.geoDistance=Ce,t.geoEqualEarth=function(){return nr(jr).scale(177.158)},t.geoEqualEarthRaw=jr,t.geoEquirectangular=function(){return nr(vr).scale(152.63)},t.geoEquirectangularRaw=vr,t.geoGnomonic=function(){return nr(Mr).scale(144.049).clipAngle(60)},t.geoGnomonicRaw=Mr,t.geoGraticule=He,t.geoGraticule10=function(){return He()()},t.geoIdentity=function(){var t,e,n,r,i,o,a,s=1,u=0,c=0,f=1,l=1,p=0,m=null,v=1,_=1,y=Hn({point:function(t,e){var n=j([t,e]);this.stream.point(n[0],n[1])}}),b=Ve;function x(){return v=s*f,_=s*l,o=a=null,j}function j(n){var r=n[0]*v,i=n[1]*_;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+u,i+c]}return j.invert=function(n){var r=n[0]-u,i=n[1]-c;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/v,i/_]},j.stream=function(t){return o&&a===t?o:o=y(b(a=t))},j.postclip=function(t){return arguments.length?(b=t,m=n=r=i=null,x()):b},j.clipExtent=function(t){return arguments.length?(b=null==t?(m=n=r=i=null,Ve):xe(m=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),x()):null==m?null:[[m,n],[r,i]]},j.scale=function(t){return arguments.length?(s=+t,x()):s},j.translate=function(t){return arguments.length?(u=+t[0],c=+t[1],x()):[u,c]},j.angle=function(n){return arguments.length?(e=w(p=n%360*d),t=g(p),x()):p*h},j.reflectX=function(t){return arguments.length?(f=t?-1:1,x()):f<0},j.reflectY=function(t){return arguments.length?(l=t?-1:1,x()):l<0},j.fitExtent=function(t,e){return Xn(j,t,e)},j.fitSize=function(t,e){return Gn(j,t,e)},j.fitWidth=function(t,e){return Zn(j,t,e)},j.fitHeight=function(t,e){return $n(j,t,e)},j},t.geoInterpolate=function(t,e){var n=t[0]*d,r=t[1]*d,i=e[0]*d,o=e[1]*d,a=g(r),s=w(r),u=g(o),c=w(o),f=a*g(n),l=a*w(n),p=u*g(i),m=u*w(i),_=2*E(M(z(o-r)+a*u*z(i-n))),y=w(_),b=_?function(t){var e=w(t*=_)/y,n=w(_-t)/y,r=n*f+e*p,i=n*l+e*m,o=n*s+e*c;return[v(i,r)*h,v(o,M(r*r+i*i))*h]}:function(){return[n*h,r*h]};return b.distance=_,b},t.geoLength=Se,t.geoMercator=function(){return dr(hr).scale(961/l)},t.geoMercatorRaw=hr,t.geoNaturalEarth1=function(){return nr(Ar).scale(175.295)},t.geoNaturalEarth1Raw=Ar,t.geoOrthographic=function(){return nr(kr).scale(249.5).clipAngle(90+a)},t.geoOrthographicRaw=kr,t.geoPath=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),B(t,n(r))),r.result()}return o.area=function(t){return B(t,n(Ke)),Ke.result()},o.measure=function(t){return B(t,n(Fn)),Fn.result()},o.bounds=function(t){return B(t,n(hn)),hn.result()},o.centroid=function(t){return B(t,n(wn)),wn.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,Ve):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new qn):new On(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},t.geoProjection=nr,t.geoProjectionMutator=rr,t.geoRotation=re,t.geoStereographic=function(){return nr(Er).scale(250).clipAngle(142)},t.geoStereographicRaw=Er,t.geoStream=B,t.geoTransform=function(t){return{stream:Hn(t)}},t.geoTransverseMercator=function(){var t=dr(zr),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=zr,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-array")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-array":2}],17:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t,e){return t.parent===e.parent?1:2}function n(t,e){return t+e.x}function r(t,e){return Math.max(t,e.y)}function i(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function o(t,e){var n,r,i,o,s,f=new c(t),l=+t.value&&(f.value=t.value),h=[f];for(null==e&&(e=a);n=h.pop();)if(l&&(n.value=+n.data.value),(i=e(n.data))&&(s=i.length))for(n.children=new Array(s),o=s-1;o>=0;--o)h.push(r=n.children[o]=new c(i[o])),r.parent=n,r.depth=n.depth+1;return f.eachBefore(u)}function a(t){return t.children}function s(t){t.data=t.data.data}function u(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=o.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return o(this).eachBefore(s)}};var f=Array.prototype.slice;function l(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(f.call(t))).length,o=[];r<i;)e=t[r],n&&p(n,e)?++r:(n=v(o=h(o,e)),r=0);return n}function h(t,e){var n,r;if(m(e,t))return[e];for(n=0;n<t.length;++n)if(d(e,t[n])&&m(g(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(d(g(t[n],t[r]),e)&&d(g(t[n],e),t[r])&&d(g(t[r],e),t[n])&&m(_(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function d(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function p(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function m(t,e){for(var n=0;n<e.length;++n)if(!p(t,e[n]))return!1;return!0}function v(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return g(t[0],t[1]);case 3:return _(t[0],t[1],t[2])}var e}function g(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,f=s-i,l=Math.sqrt(u*u+c*c);return{x:(n+o+u/l*f)/2,y:(r+a+c/l*f)/2,r:(l+i+s)/2}}function _(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,f=n.y,l=n.r,h=r-a,d=r-c,p=i-s,m=i-f,v=u-o,g=l-o,_=r*r+i*i-o*o,y=_-a*a-s*s+u*u,b=_-c*c-f*f+l*l,x=d*p-h*m,w=(p*b-m*y)/(2*x)-r,j=(m*v-p*g)/x,M=(d*y-h*b)/(2*x)-i,A=(h*g-d*v)/x,k=j*j+A*A-1,E=2*(o+w*j+M*A),z=w*w+M*M-o*o,T=-(k?(E+Math.sqrt(E*E-4*k*z))/(2*k):z/E);return{x:r+w+j*T,y:i+M+A*T,r:T}}function y(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,c=s*s+u*u;c?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function b(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function x(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function w(t){this._=t,this.next=null,this.previous=null}function j(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,c,f,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;y(n,e,r=t[2]),e=new w(e),n=new w(n),r=new w(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){y(e._,n._,r=t[s]),r=new w(r),u=n.next,c=e.previous,f=n._.r,h=e._.r;do{if(f<=h){if(b(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}f+=u._.r,u=u.next}else{if(b(c._,r._)){(e=c).next=n,n.previous=e,--s;continue t}h+=c._.r,c=c.previous}}while(u!==c.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=x(e);(r=r.next)!==n;)(a=x(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=l(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function M(t){if("function"!=typeof t)throw new Error;return t}function A(){return 0}function k(t){return function(){return t}}function E(t){return Math.sqrt(t.value)}function z(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function T(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=j(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function S(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function N(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function O(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}var C="$",P={depth:-1},B={};function R(t){return t.id}function I(t){return t.parentId}function D(t,e){return t.parent===e.parent?1:2}function F(t){var e=t.children;return e?e[0]:t.t}function L(t){var e=t.children;return e?e[e.length-1]:t.t}function U(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function q(t,e,n){return t.a.parent===e.parent?t.a:n}function Y(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function H(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}Y.prototype=Object.create(c.prototype);var V=(1+Math.sqrt(5))/2;function W(t,e,n,r,i,o){for(var a,s,u,c,f,l,h,d,p,m,v,g=[],_=e.children,y=0,b=0,x=_.length,w=e.value;y<x;){u=i-n,c=o-r;do{f=_[b++].value}while(!f&&b<x);for(l=h=f,v=f*f*(m=Math.max(c/u,u/c)/(w*t)),p=Math.max(h/v,v/l);b<x;++b){if(f+=s=_[b].value,s<l&&(l=s),s>h&&(h=s),v=f*f*m,(d=Math.max(h/v,v/l))>p){f-=s;break}p=d}g.push(a={value:f,dice:u<c,children:_.slice(y,b)}),a.dice?O(a,n,r,i,w?r+=c*f/w:o):H(a,n,r,w?n+=u*f/w:i,o),w-=f,y=b}return g}var X=function t(e){function n(t,n,r,i,o){W(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(V),G=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,u,c,f,l=-1,h=a.length,d=t.value;++l<h;){for(u=(s=a[l]).children,c=s.value=0,f=u.length;c<f;++c)s.value+=u[c].value;s.dice?O(s,n,r,i,r+=(o-r)*s.value/d):H(s,n,r,n+=(i-n)*s.value/d,o),d-=s.value}else t._squarify=a=W(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(V);t.cluster=function(){var t=e,i=1,o=1,a=!1;function s(e){var s,u=0;e.eachAfter(function(e){var i=e.children;i?(e.x=function(t){return t.reduce(n,0)/t.length}(i),e.y=function(t){return 1+t.reduce(r,0)}(i)):(e.x=s?u+=t(e,s):0,e.y=0,s=e)});var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),f=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),l=c.x-t(c,f)/2,h=f.x+t(f,c)/2;return e.eachAfter(a?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*o}:function(t){t.x=(t.x-l)/(h-l)*i,t.y=(1-(e.y?t.y/e.y:1))*o})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(a=!1,i=+t[0],o=+t[1],s):a?null:[i,o]},s.nodeSize=function(t){return arguments.length?(a=!0,i=+t[0],o=+t[1],s):a?[i,o]:null},s},t.hierarchy=o,t.pack=function(){var t=null,e=1,n=1,r=A;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(z(t)).eachAfter(T(r,.5)).eachBefore(S(1)):i.eachBefore(z(E)).eachAfter(T(A,1)).eachAfter(T(r,i.r/Math.min(e,n))).eachBefore(S(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=null==(n=e)?null:M(n),i):t;var n},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:k(+t),i):r},i},t.packEnclose=l,t.packSiblings=function(t){return j(t),t},t.partition=function(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&O(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a<i&&(i=a=(i+a)/2),s<o&&(o=s=(o+s)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=s}}(e,o)),r&&i.eachBefore(N),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},t.stratify=function(){var t=R,e=I;function n(n){var r,i,o,a,s,f,l,h=n.length,d=new Array(h),p={};for(i=0;i<h;++i)r=n[i],s=d[i]=new c(r),null!=(f=t(r,i,n))&&(f+="")&&(p[l=C+(s.id=f)]=l in p?B:s);for(i=0;i<h;++i)if(s=d[i],null!=(f=e(n[i],i,n))&&(f+="")){if(!(a=p[C+f]))throw new Error("missing: "+f);if(a===B)throw new Error("ambiguous: "+f);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=P,o.eachBefore(function(t){t.depth=t.parent.depth+1,--h}).eachBefore(u),o.parent=null,h>0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=M(e),n):t},n.parentId=function(t){return arguments.length?(e=M(t),n):e},n},t.tree=function(){var t=D,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,o,a=new Y(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new Y(r[i],i)),n.parent=e;return(a.parent=new Y(null,0)).children=[a],a}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)i.eachBefore(s);else{var c=i,f=i,l=i;i.eachBefore(function(t){t.x<c.x&&(c=t),t.x>f.x&&(f=t),t.depth>l.depth&&(l=t)});var h=c===f?1:t(c,f)/2,d=h-c.x,p=e/(f.x+h+d),m=n/(l.depth||1);i.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*m})}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],c=o.m,f=a.m,l=s.m,h=u.m;s=L(s),o=F(o),s&&o;)u=F(u),(a=L(a)).a=e,(i=s.z+l-o.z-c+t(s._,o._))>0&&(U(q(s,e,r),e,i),c+=i,f+=i),l+=s.m,c+=o.m,h+=u.m,f+=a.m;s&&!L(a)&&(a.t=s,a.m+=l-f),o&&!F(u)&&(u.t=o,u.m+=c-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},t.treemap=function(){var t=X,e=!1,n=1,r=1,i=[0],o=A,a=A,s=A,u=A,c=A;function f(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(l),i=[0],e&&t.eachBefore(N),t}function l(e){var n=i[e.depth],r=e.x0+n,f=e.y0+n,l=e.x1-n,h=e.y1-n;l<r&&(r=l=(r+l)/2),h<f&&(f=h=(f+h)/2),e.x0=r,e.y0=f,e.x1=l,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,f+=a(e)-n,(l-=s(e)-n)<r&&(r=l=(r+l)/2),(h-=u(e)-n)<f&&(f=h=(f+h)/2),t(e,r,f,l,h))}return f.round=function(t){return arguments.length?(e=!!t,f):e},f.size=function(t){return arguments.length?(n=+t[0],r=+t[1],f):[n,r]},f.tile=function(e){return arguments.length?(t=M(e),f):t},f.padding=function(t){return arguments.length?f.paddingInner(t).paddingOuter(t):f.paddingInner()},f.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:k(+t),f):o},f.paddingOuter=function(t){return arguments.length?f.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):f.paddingTop()},f.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:k(+t),f):a},f.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:k(+t),f):s},f.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:k(+t),f):u},f.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:k(+t),f):c},f},t.treemapBinary=function(t,e,n,r,i){var o,a,s=t.children,u=s.length,c=new Array(u+1);for(c[0]=a=o=0;o<u;++o)c[o+1]=a+=s[o].value;!function t(e,n,r,i,o,a,u){if(e>=n-1){var f=s[e];return f.x0=i,f.y0=o,f.x1=a,void(f.y1=u)}for(var l=c[e],h=r/2+l,d=e+1,p=n-1;d<p;){var m=d+p>>>1;c[m]<h?d=m+1:p=m}h-c[d-1]<c[d]-h&&e+1<d&&--d;var v=c[d]-l,g=r-v;if(a-i>u-o){var _=(i*g+a*v)/r;t(e,d,v,i,o,_,u),t(d,n,g,_,o,a,u)}else{var y=(o*g+u*v)/r;t(e,d,v,i,o,a,y),t(d,n,g,i,y,a,u)}}(0,u,t.value,e,n,r,i)},t.treemapDice=O,t.treemapResquarify=G,t.treemapSlice=H,t.treemapSliceDice=function(t,e,n,r,i){(1&t.depth?H:O)(t,e,n,r,i)},t.treemapSquarify=X,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],18:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";function n(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function r(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[i],a=t[i+1],s=i>0?t[i-1]:2*o-a,u=i<e-1?t[i+2]:2*a-o;return n((r-i/e)*e,s,o,a,u)}}function i(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),o=t[(i+e-1)%e],a=t[i%e],s=t[(i+1)%e],u=t[(i+2)%e];return n((r-i/e)*e,o,a,s,u)}}function o(t){return function(){return t}}function a(t,e){return function(n){return t+n*e}}function s(t,e){var n=e-t;return n?a(t,n>180||n<-180?n-360*Math.round(n/360):n):o(isNaN(t)?e:t)}function u(t){return 1==(t=+t)?c:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):o(isNaN(e)?n:e)}}function c(t,e){var n=e-t;return n?a(t,n):o(isNaN(t)?e:t)}var f=function t(n){var r=u(n);function i(t,n){var i=r((t=e.rgb(t)).r,(n=e.rgb(n)).r),o=r(t.g,n.g),a=r(t.b,n.b),s=c(t.opacity,n.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=a(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function l(t){return function(n){var r,i,o=n.length,a=new Array(o),s=new Array(o),u=new Array(o);for(r=0;r<o;++r)i=e.rgb(n[r]),a[r]=i.r||0,s[r]=i.g||0,u[r]=i.b||0;return a=t(a),s=t(s),u=t(u),i.opacity=1,function(t){return i.r=a(t),i.g=s(t),i.b=u(t),i+""}}}var h=l(r),d=l(i);function p(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function m(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function v(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=j(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function g(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function _(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function y(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=j(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var b=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,x=new RegExp(b.source,"g");function w(t,e){var n,r,i,o=b.lastIndex=x.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=b.exec(t))&&(r=x.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:_(n,r)})),o=x.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function j(t,n){var r,i=typeof n;return null==n||"boolean"===i?o(n):("number"===i?_:"string"===i?(r=e.color(n))?(n=r,f):w:n instanceof e.color?f:n instanceof Date?g:m(n)?p:Array.isArray(n)?v:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?y:_)(t,n)}var M,A,k,E,z=180/Math.PI,T={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function S(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*z,skewX:Math.atan(u)*z,scaleX:a,scaleY:s}}function N(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:_(t,i)},{i:u-2,x:_(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:_(t,n)},{i:s-2,x:_(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var O=N(function(t){return"none"===t?T:(M||(M=document.createElement("DIV"),A=document.documentElement,k=document.defaultView),M.style.transform=t,t=k.getComputedStyle(A.appendChild(M),null).getPropertyValue("transform"),A.removeChild(M),S(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),C=N(function(t){return null==t?T:(E||(E=document.createElementNS("http://www.w3.org/2000/svg","g")),E.setAttribute("transform",t),(t=E.transform.baseVal.consolidate())?S((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):T)},", ",")",")"),P=Math.SQRT2,B=2,R=4,I=1e-12;function D(t){return((t=Math.exp(t))+1/t)/2}function F(t){return function(n,r){var i=t((n=e.hsl(n)).h,(r=e.hsl(r)).h),o=c(n.s,r.s),a=c(n.l,r.l),s=c(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(t),n.opacity=s(t),n+""}}}var L=F(s),U=F(c);function q(t){return function(n,r){var i=t((n=e.hcl(n)).h,(r=e.hcl(r)).h),o=c(n.c,r.c),a=c(n.l,r.l),s=c(n.opacity,r.opacity);return function(t){return n.h=i(t),n.c=o(t),n.l=a(t),n.opacity=s(t),n+""}}}var Y=q(s),H=q(c);function V(t){return function n(r){function i(n,i){var o=t((n=e.cubehelix(n)).h,(i=e.cubehelix(i)).h),a=c(n.s,i.s),s=c(n.l,i.l),u=c(n.opacity,i.opacity);return function(t){return n.h=o(t),n.s=a(t),n.l=s(Math.pow(t,r)),n.opacity=u(t),n+""}}return r=+r,i.gamma=n,i}(1)}var W=V(s),X=V(c);t.interpolate=j,t.interpolateArray=function(t,e){return(m(e)?p:v)(t,e)},t.interpolateBasis=r,t.interpolateBasisClosed=i,t.interpolateCubehelix=W,t.interpolateCubehelixLong=X,t.interpolateDate=g,t.interpolateDiscrete=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},t.interpolateHcl=Y,t.interpolateHclLong=H,t.interpolateHsl=L,t.interpolateHslLong=U,t.interpolateHue=function(t,e){var n=s(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},t.interpolateLab=function(t,n){var r=c((t=e.lab(t)).l,(n=e.lab(n)).l),i=c(t.a,n.a),o=c(t.b,n.b),a=c(t.opacity,n.opacity);return function(e){return t.l=r(e),t.a=i(e),t.b=o(e),t.opacity=a(e),t+""}},t.interpolateNumber=_,t.interpolateNumberArray=p,t.interpolateObject=y,t.interpolateRgb=f,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=d,t.interpolateRound=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},t.interpolateString=w,t.interpolateTransformCss=O,t.interpolateTransformSvg=C,t.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],c=e[2],f=s-i,l=u-o,h=f*f+l*l;if(h<I)r=Math.log(c/a)/P,n=function(t){return[i+t*f,o+t*l,a*Math.exp(P*t*r)]};else{var d=Math.sqrt(h),p=(c*c-a*a+R*h)/(2*a*B*d),m=(c*c-a*a-R*h)/(2*c*B*d),v=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(m*m+1)-m);r=(g-v)/P,n=function(t){var e,n=t*r,s=D(v),u=a/(B*d)*(s*(e=P*n+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+u*f,o+u*l,a*s/D(P*n+v)]}}return n.duration=1e3*r,n},t.piecewise=function(t,e){for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[e](t-e)}},t.quantize=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-color")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-color":7}],19:[function(t,e,n){var r;r=this,function(t){"use strict";var e=Math.PI,n=2*e,r=n-1e-6;function i(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new i}i.prototype=o.prototype={constructor:i,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,r,i,o){t=+t,n=+n,r=+r,i=+i,o=+o;var a=this._x1,s=this._y1,u=r-t,c=i-n,f=a-t,l=s-n,h=f*f+l*l;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(h>1e-6)if(Math.abs(l*u-c*f)>1e-6&&o){var d=r-a,p=i-s,m=u*u+c*c,v=d*d+p*p,g=Math.sqrt(m),_=Math.sqrt(h),y=o*Math.tan((e-Math.acos((m+h-v)/(2*g*_)))/2),b=y/_,x=y/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*f)+","+(n+b*l)),this._+="A"+o+","+o+",0,0,"+ +(l*d>f*p)+","+(this._x1=t+x*u)+","+(this._y1=n+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,i,o,a,s,u){t=+t,i=+i,u=!!u;var c=(o=+o)*Math.cos(a),f=o*Math.sin(a),l=t+c,h=i+f,d=1^u,p=u?a-s:s-a;if(o<0)throw new Error("negative radius: "+o);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),o&&(p<0&&(p=p%n+n),p>r?this._+="A"+o+","+o+",0,1,"+d+","+(t-c)+","+(i-f)+"A"+o+","+o+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+o+","+o+",0,"+ +(p>=e)+","+d+","+(this._x1=t+o*Math.cos(s))+","+(this._y1=i+o*Math.sin(s))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},t.path=o,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],20:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t,e){return t[0]-e[0]||t[1]-e[1]}function n(t){for(var e,n,r,i=t.length,o=[0,1],a=2,s=2;s<i;++s){for(;a>1&&(e=t[o[a-2]],n=t[o[a-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}t.polygonArea=function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[1]*i[0]-e[0]*i[1];return o/2},t.polygonCentroid=function(t){for(var e,n,r=-1,i=t.length,o=0,a=0,s=t[i-1],u=0;++r<i;)e=s,s=t[r],u+=n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o/(u*=3),a/u]},t.polygonContains=function(t,e){for(var n,r,i=t.length,o=t[i-1],a=e[0],s=e[1],u=o[0],c=o[1],f=!1,l=0;l<i;++l)n=(o=t[l])[0],(r=o[1])>s!=c>s&&a<(u-n)*(s-r)/(c-r)+n&&(f=!f),u=n,c=r;return f},t.polygonHull=function(t){if((i=t.length)<3)return null;var r,i,o=new Array(i),a=new Array(i);for(r=0;r<i;++r)o[r]=[+t[r][0],+t[r][1],r];for(o.sort(e),r=0;r<i;++r)a[r]=[o[r][0],-o[r][1]];var s=n(o),u=n(a),c=u[0]===s[0],f=u[u.length-1]===s[s.length-1],l=[];for(r=s.length-1;r>=0;--r)l.push(t[o[s[r]][2]]);for(r=+c;r<u.length-f;++r)l.push(t[o[u[r]][2]]);return l},t.polygonLength=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],s=o[1],u=0;++r<i;)e=a,n=s,e-=a=(o=t[r])[0],n-=s=o[1],u+=Math.sqrt(e*e+n*n);return u},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],21:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,c,f,l,h,d=t._root,p={data:r},m=t._x0,v=t._y0,g=t._x1,_=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(o=(m+g)/2))?m=o:g=o,(f=n>=(a=(v+_)/2))?v=a:_=a,i=d,!(d=d[l=f<<1|c]))return i[l]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(c=e>=(o=(m+g)/2))?m=o:g=o,(f=n>=(a=(v+_)/2))?v=a:_=a}while((l=f<<1|c)==(h=(u>=a)<<1|s>=o));return i[h]=d,i[l]=p,t}function n(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function r(t){return t[0]}function i(t){return t[1]}function o(t,e,n){var o=new a(null==e?r:e,null==n?i:n,NaN,NaN,NaN,NaN);return null==t?o:o.addAll(t)}function a(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function s(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var u=o.prototype=a.prototype;u.copy=function(){var t,e,n=new a(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=s(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=s(e));return n},u.add=function(t){var n=+this._x.call(null,t),r=+this._y.call(null,t);return e(this.cover(n,r),n,r,t)},u.addAll=function(t){var n,r,i,o,a=t.length,s=new Array(a),u=new Array(a),c=1/0,f=1/0,l=-1/0,h=-1/0;for(r=0;r<a;++r)isNaN(i=+this._x.call(null,n=t[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=i,u[r]=o,i<c&&(c=i),i>l&&(l=i),o<f&&(f=o),o>h&&(h=o));if(c>l||f>h)return this;for(this.cover(c,f).cover(l,h),r=0;r<a;++r)e(this,s[r],u[r],t[r]);return this},u.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,u=i-n,c=this._root;n>t||t>=i||r>e||e>=o;)switch(s=(e<r)<<1|t<n,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:i=n+u,o=r+u;break;case 1:n=i-u,o=r+u;break;case 2:i=n+u,r=o-u;break;case 3:n=i-u,r=o-u}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},u.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},u.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]]},u.find=function(t,e,r){var i,o,a,s,u,c,f,l=this._x0,h=this._y0,d=this._x1,p=this._y1,m=[],v=this._root;for(v&&m.push(new n(v,l,h,d,p)),null==r?r=1/0:(l=t-r,h=e-r,d=t+r,p=e+r,r*=r);c=m.pop();)if(!(!(v=c.node)||(o=c.x0)>d||(a=c.y0)>p||(s=c.x1)<l||(u=c.y1)<h))if(v.length){var g=(o+s)/2,_=(a+u)/2;m.push(new n(v[3],g,_,s,u),new n(v[2],o,_,g,u),new n(v[1],g,a,s,_),new n(v[0],o,a,g,_)),(f=(e>=_)<<1|t>=g)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-f],m[m.length-1-f]=c)}else{var y=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),x=y*y+b*b;if(x<r){var w=Math.sqrt(r=x);l=t-w,h=e-w,d=t+w,p=e+w,i=v.data}}return i},u.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,c,f,l,h,d=this._root,p=this._x0,m=this._y0,v=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((c=o>=(s=(p+v)/2))?p=s:v=s,(f=a>=(u=(m+g)/2))?m=u:g=u,e=d,!(d=d[l=f<<1|c]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},u.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},u.root=function(){return this._root},u.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},u.visit=function(t){var e,r,i,o,a,s,u=[],c=this._root;for(c&&u.push(new n(c,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(c=e.node,i=e.x0,o=e.y0,a=e.x1,s=e.y1)&&c.length){var f=(i+a)/2,l=(o+s)/2;(r=c[3])&&u.push(new n(r,f,l,a,s)),(r=c[2])&&u.push(new n(r,i,l,f,s)),(r=c[1])&&u.push(new n(r,f,o,a,l)),(r=c[0])&&u.push(new n(r,i,o,f,l))}return this},u.visitAfter=function(t){var e,r=[],i=[];for(this._root&&r.push(new n(this._root,this._x0,this._y0,this._x1,this._y1));e=r.pop();){var o=e.node;if(o.length){var a,s=e.x0,u=e.y0,c=e.x1,f=e.y1,l=(s+c)/2,h=(u+f)/2;(a=o[0])&&r.push(new n(a,s,u,l,h)),(a=o[1])&&r.push(new n(a,l,u,c,h)),(a=o[2])&&r.push(new n(a,s,h,l,f)),(a=o[3])&&r.push(new n(a,l,h,c,f))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},u.x=function(t){return arguments.length?(this._x=t,this):this._x},u.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=o,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],22:[function(t,e,n){var r;r=this,function(t){"use strict";function e(){return Math.random()}var n=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(e),r=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(e),i=function t(e){function n(){var t=r.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(e),o=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(e),a=function t(e){function n(t){var n=o.source(e)(t);return function(){return n()/t}}return n.source=t,n}(e),s=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(e);t.randomUniform=n,t.randomNormal=r,t.randomLogNormal=i,t.randomBates=a,t.randomIrwinHall=o,t.randomExponential=s,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:r.d3=r.d3||{})},{}],23:[function(t,e,n){var r,i;r=this,i=function(t,e,n){"use strict";function r(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}var i=r("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),o=r("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),a=r("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),s=r("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),u=r("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),c=r("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),f=r("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),l=r("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),h=r("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),d=r("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function p(t){return e.interpolateRgbBasis(t[t.length-1])}var m=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r),v=p(m),g=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r),_=p(g),y=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r),b=p(y),x=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r),w=p(x),j=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r),M=p(j),A=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r),k=p(A),E=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r),z=p(E),T=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r),S=p(T),N=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r),O=p(N),C=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r),P=p(C),B=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r),R=p(B),I=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r),D=p(I),F=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r),L=p(F),U=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r),q=p(U),Y=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r),H=p(Y),V=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r),W=p(V),X=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r),G=p(X),Z=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r),$=p(Z),Q=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r),K=p(Q),J=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r),tt=p(J),et=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r),nt=p(et),rt=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r),it=p(rt),ot=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r),at=p(ot),st=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r),ut=p(st),ct=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r),ft=p(ct),lt=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r),ht=p(lt),dt=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r),pt=p(dt),mt=e.interpolateCubehelixLong(n.cubehelix(300,.5,0),n.cubehelix(-240,.5,1)),vt=e.interpolateCubehelixLong(n.cubehelix(-100,.75,.35),n.cubehelix(80,1.5,.8)),gt=e.interpolateCubehelixLong(n.cubehelix(260,.75,.35),n.cubehelix(80,1.5,.8)),_t=n.cubehelix(),yt=n.rgb(),bt=Math.PI/3,xt=2*Math.PI/3;function wt(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var jt=wt(r("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Mt=wt(r("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),At=wt(r("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),kt=wt(r("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));t.interpolateBlues=it,t.interpolateBrBG=v,t.interpolateBuGn=P,t.interpolateBuPu=R,t.interpolateCividis=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},t.interpolateCool=gt,t.interpolateCubehelixDefault=mt,t.interpolateGnBu=D,t.interpolateGreens=at,t.interpolateGreys=ut,t.interpolateInferno=At,t.interpolateMagma=Mt,t.interpolateOrRd=L,t.interpolateOranges=pt,t.interpolatePRGn=_,t.interpolatePiYG=b,t.interpolatePlasma=kt,t.interpolatePuBu=H,t.interpolatePuBuGn=q,t.interpolatePuOr=w,t.interpolatePuRd=W,t.interpolatePurples=ft,t.interpolateRainbow=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return _t.h=360*t-100,_t.s=1.5-1.5*e,_t.l=.8-.9*e,_t+""},t.interpolateRdBu=M,t.interpolateRdGy=k,t.interpolateRdPu=G,t.interpolateRdYlBu=z,t.interpolateRdYlGn=S,t.interpolateReds=ht,t.interpolateSinebow=function(t){var e;return t=(.5-t)*Math.PI,yt.r=255*(e=Math.sin(t))*e,yt.g=255*(e=Math.sin(t+bt))*e,yt.b=255*(e=Math.sin(t+xt))*e,yt+""},t.interpolateSpectral=O,t.interpolateTurbo=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},t.interpolateViridis=jt,t.interpolateWarm=vt,t.interpolateYlGn=K,t.interpolateYlGnBu=$,t.interpolateYlOrBr=tt,t.interpolateYlOrRd=nt,t.schemeAccent=o,t.schemeBlues=rt,t.schemeBrBG=m,t.schemeBuGn=C,t.schemeBuPu=B,t.schemeCategory10=i,t.schemeDark2=a,t.schemeGnBu=I,t.schemeGreens=ot,t.schemeGreys=st,t.schemeOrRd=F,t.schemeOranges=dt,t.schemePRGn=g,t.schemePaired=s,t.schemePastel1=u,t.schemePastel2=c,t.schemePiYG=y,t.schemePuBu=Y,t.schemePuBuGn=U,t.schemePuOr=x,t.schemePuRd=V,t.schemePurples=ct,t.schemeRdBu=j,t.schemeRdGy=A,t.schemeRdPu=X,t.schemeRdYlBu=E,t.schemeRdYlGn=T,t.schemeReds=lt,t.schemeSet1=f,t.schemeSet2=l,t.schemeSet3=h,t.schemeSpectral=N,t.schemeTableau10=d,t.schemeYlGn=Q,t.schemeYlGnBu=Z,t.schemeYlOrBr=J,t.schemeYlOrRd=et,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-interpolate"),t("d3-color")):i((r=r||self).d3=r.d3||{},r.d3,r.d3)},{"d3-color":7,"d3-interpolate":18}],24:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a){"use strict";function s(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function u(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var c=Array.prototype,f=c.map,l=c.slice,h={name:"implicit"};function d(){var t=e.map(),n=[],r=[],i=h;function o(e){var o=e+"",a=t.get(o);if(!a){if(i!==h)return i;t.set(o,a=n.push(e))}return r[(a-1)%r.length]}return o.domain=function(r){if(!arguments.length)return n.slice();n=[],t=e.map();for(var i,a,s=-1,u=r.length;++s<u;)t.has(a=(i=r[s])+"")||t.set(a,n.push(i));return o},o.range=function(t){return arguments.length?(r=l.call(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return d(n,r).unknown(i)},s.apply(o,arguments),o}function p(){var t,e,r=d().unknown(void 0),i=r.domain,o=r.range,a=[0,1],u=!1,c=0,f=0,l=.5;function h(){var r=i().length,s=a[1]<a[0],h=a[s-0],d=a[1-s];t=(d-h)/Math.max(1,r-c+2*f),u&&(t=Math.floor(t)),h+=(d-h-t*(r-c))*l,e=t*(1-c),u&&(h=Math.round(h),e=Math.round(e));var p=n.range(r).map(function(e){return h+t*e});return o(s?p.reverse():p)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),h()):i()},r.range=function(t){return arguments.length?(a=[+t[0],+t[1]],h()):a.slice()},r.rangeRound=function(t){return a=[+t[0],+t[1]],u=!0,h()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(u=!!t,h()):u},r.padding=function(t){return arguments.length?(c=Math.min(1,f=+t),h()):c},r.paddingInner=function(t){return arguments.length?(c=Math.min(1,t),h()):c},r.paddingOuter=function(t){return arguments.length?(f=+t,h()):f},r.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),h()):l},r.copy=function(){return p(i(),a).round(u).paddingInner(c).paddingOuter(f).align(l)},s.apply(h(),arguments)}function m(t){return+t}var v=[0,1];function g(t){return t}function _(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function y(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function b(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=_(i,r),o=n(a,o)):(r=_(r,i),o=n(o,a)),function(t){return o(r(t))}}function x(t,e,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),a=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=_(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(e){var r=n.bisect(t,e,1,i)-1;return a[r](o[r](e))}}function w(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function j(){var t,e,n,i,o,a,s=v,u=v,c=r.interpolate,h=g;function d(){return i=Math.min(s.length,u.length)>2?x:b,o=a=null,p}function p(e){return isNaN(e=+e)?n:(o||(o=i(s.map(t),u,c)))(t(h(e)))}return p.invert=function(n){return h(e((a||(a=i(u,s.map(t),r.interpolateNumber)))(n)))},p.domain=function(t){return arguments.length?(s=f.call(t,m),h===g||(h=y(s)),d()):s.slice()},p.range=function(t){return arguments.length?(u=l.call(t),d()):u.slice()},p.rangeRound=function(t){return u=l.call(t),c=r.interpolateRound,d()},p.clamp=function(t){return arguments.length?(h=t?y(s):g,p):h!==g},p.interpolate=function(t){return arguments.length?(c=t,d()):c},p.unknown=function(t){return arguments.length?(n=t,p):n},function(n,r){return t=n,e=r,d()}}function M(t,e){return j()(t,e)}function A(t,e,r,o){var a,s=n.tickStep(t,e,r);switch((o=i.formatSpecifier(null==o?",f":o)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(e));return null!=o.precision||isNaN(a=i.precisionPrefix(s,u))||(o.precision=a),i.formatPrefix(o,u);case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN(a=i.precisionRound(s,Math.max(Math.abs(t),Math.abs(e))))||(o.precision=a-("e"===o.type));break;case"f":case"%":null!=o.precision||isNaN(a=i.precisionFixed(s))||(o.precision=a-2*("%"===o.type))}return i.format(o)}function k(t){var e=t.domain;return t.ticks=function(t){var r=e();return n.ticks(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return A(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(r){null==r&&(r=10);var i,o=e(),a=0,s=o.length-1,u=o[a],c=o[s];return c<u&&(i=u,u=c,c=i,i=a,a=s,s=i),(i=n.tickIncrement(u,c,r))>0?(u=Math.floor(u/i)*i,c=Math.ceil(c/i)*i,i=n.tickIncrement(u,c,r)):i<0&&(u=Math.ceil(u*i)/i,c=Math.floor(c*i)/i,i=n.tickIncrement(u,c,r)),i>0?(o[a]=Math.floor(u/i)*i,o[s]=Math.ceil(c/i)*i,e(o)):i<0&&(o[a]=Math.ceil(u*i)/i,o[s]=Math.floor(c*i)/i,e(o)),t},t}function E(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function z(t){return Math.log(t)}function T(t){return Math.exp(t)}function S(t){return-Math.log(-t)}function N(t){return-Math.exp(-t)}function O(t){return isFinite(t)?+("1e"+t):t<0?0:t}function C(t){return function(e){return-t(-e)}}function P(t){var e,r,o=t(z,T),a=o.domain,s=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(s),r=function(t){return 10===t?O:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(s),a()[0]<0?(e=C(e),r=C(r),t(S,N)):t(z,T),o}return o.base=function(t){return arguments.length?(s=+t,u()):s},o.domain=function(t){return arguments.length?(a(t),u()):a()},o.ticks=function(t){var i,o=a(),u=o[0],c=o[o.length-1];(i=c<u)&&(d=u,u=c,c=d);var f,l,h,d=e(u),p=e(c),m=null==t?10:+t,v=[];if(!(s%1)&&p-d<m){if(d=Math.round(d)-1,p=Math.round(p)+1,u>0){for(;d<p;++d)for(l=1,f=r(d);l<s;++l)if(!((h=f*l)<u)){if(h>c)break;v.push(h)}}else for(;d<p;++d)for(l=s-1,f=r(d);l>=1;--l)if(!((h=f*l)<u)){if(h>c)break;v.push(h)}}else v=n.ticks(d,p,Math.min(p-d,m)).map(r);return i?v.reverse():v},o.tickFormat=function(t,n){if(null==n&&(n=10===s?".0e":","),"function"!=typeof n&&(n=i.format(n)),t===1/0)return n;null==t&&(t=10);var a=Math.max(1,s*t/o.ticks().length);return function(t){var i=t/r(Math.round(e(t)));return i*s<s-.5&&(i*=s),i<=a?n(t):""}},o.nice=function(){return a(E(a(),{floor:function(t){return r(Math.floor(e(t)))},ceil:function(t){return r(Math.ceil(e(t)))}}))},o}function B(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function R(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function I(t){var e=1,n=t(B(e),R(e));return n.constant=function(n){return arguments.length?t(B(e=+n),R(e)):e},k(n)}function D(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function F(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function L(t){return t<0?-t*t:t*t}function U(t){var e=t(g,g),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(g,g):.5===n?t(F,L):t(D(n),D(1/n)):n},k(e)}function q(){var t=U(j());return t.copy=function(){return w(t,q()).exponent(t.exponent())},s.apply(t,arguments),t}var Y=1e3,H=60*Y,V=60*H,W=24*V,X=7*W,G=30*W,Z=365*W;function $(t){return new Date(t)}function Q(t){return t instanceof Date?+t:+new Date(+t)}function K(t,e,r,i,o,a,s,u,c){var l=M(g,g),h=l.invert,d=l.domain,p=c(".%L"),m=c(":%S"),v=c("%I:%M"),_=c("%I %p"),y=c("%a %d"),b=c("%b %d"),x=c("%B"),j=c("%Y"),A=[[s,1,Y],[s,5,5*Y],[s,15,15*Y],[s,30,30*Y],[a,1,H],[a,5,5*H],[a,15,15*H],[a,30,30*H],[o,1,V],[o,3,3*V],[o,6,6*V],[o,12,12*V],[i,1,W],[i,2,2*W],[r,1,X],[e,1,G],[e,3,3*G],[t,1,Z]];function k(n){return(s(n)<n?p:a(n)<n?m:o(n)<n?v:i(n)<n?_:e(n)<n?r(n)<n?y:b:t(n)<n?x:j)(n)}function z(e,r,i,o){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(i-r)/e,s=n.bisector(function(t){return t[2]}).right(A,a);s===A.length?(o=n.tickStep(r/Z,i/Z,e),e=t):s?(o=(s=A[a/A[s-1][2]<A[s][2]/a?s-1:s])[1],e=s[0]):(o=Math.max(n.tickStep(r,i,e),1),e=u)}return null==o?e:e.every(o)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?d(f.call(t,Q)):d().map($)},l.ticks=function(t,e){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=z(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?k:c(e)},l.nice=function(t,e){var n=d();return(t=z(t,n[0],n[n.length-1],e))?d(E(n,t)):l},l.copy=function(){return w(l,K(t,e,r,i,o,a,s,u,c))},l}function J(){var t,e,n,r,i,o=0,a=1,s=g,u=!1;function c(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,u?Math.max(0,Math.min(1,e)):e))}return c.domain=function(i){return arguments.length?(t=r(o=+i[0]),e=r(a=+i[1]),n=t===e?0:1/(e-t),c):[o,a]},c.clamp=function(t){return arguments.length?(u=!!t,c):u},c.interpolator=function(t){return arguments.length?(s=t,c):s},c.unknown=function(t){return arguments.length?(i=t,c):i},function(i){return r=i,t=i(o),e=i(a),n=t===e?0:1/(e-t),c}}function tt(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function et(){var t=U(J());return t.copy=function(){return tt(t,et()).exponent(t.exponent())},u.apply(t,arguments)}function nt(){var t,e,n,r,i,o,a,s=0,u=.5,c=1,f=g,l=!1;function h(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-e)*(t<e?r:i),f(l?Math.max(0,Math.min(1,t)):t))}return h.domain=function(a){return arguments.length?(t=o(s=+a[0]),e=o(u=+a[1]),n=o(c=+a[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h):[s,u,c]},h.clamp=function(t){return arguments.length?(l=!!t,h):l},h.interpolator=function(t){return arguments.length?(f=t,h):f},h.unknown=function(t){return arguments.length?(a=t,h):a},function(a){return o=a,t=a(s),e=a(u),n=a(c),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h}}function rt(){var t=U(nt());return t.copy=function(){return tt(t,rt()).exponent(t.exponent())},u.apply(t,arguments)}t.scaleBand=p,t.scalePoint=function(){return function t(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return t(n())},e}(p.apply(null,arguments).paddingInner(1))},t.scaleIdentity=function t(e){var n;function r(t){return isNaN(t=+t)?n:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(e=f.call(t,m),r):e.slice()},r.unknown=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return t(e).unknown(n)},e=arguments.length?f.call(e,m):[0,1],k(r)},t.scaleLinear=function t(){var e=M(g,g);return e.copy=function(){return w(e,t())},s.apply(e,arguments),k(e)},t.scaleLog=function t(){var e=P(j()).domain([1,10]);return e.copy=function(){return w(e,t()).base(e.base())},s.apply(e,arguments),e},t.scaleSymlog=function t(){var e=I(j());return e.copy=function(){return w(e,t()).constant(e.constant())},s.apply(e,arguments)},t.scaleOrdinal=d,t.scaleImplicit=h,t.scalePow=q,t.scaleSqrt=function(){return q.apply(null,arguments).exponent(.5)},t.scaleQuantile=function t(){var e,r=[],i=[],o=[];function a(){var t=0,e=Math.max(1,i.length);for(o=new Array(e-1);++t<e;)o[t-1]=n.quantile(r,t/e);return u}function u(t){return isNaN(t=+t)?e:i[n.bisect(o,t)]}return u.invertExtent=function(t){var e=i.indexOf(t);return e<0?[NaN,NaN]:[e>0?o[e-1]:r[0],e<o.length?o[e]:r[r.length-1]]},u.domain=function(t){if(!arguments.length)return r.slice();r=[];for(var e,i=0,o=t.length;i<o;++i)null==(e=t[i])||isNaN(e=+e)||r.push(e);return r.sort(n.ascending),a()},u.range=function(t){return arguments.length?(i=l.call(t),a()):i.slice()},u.unknown=function(t){return arguments.length?(e=t,u):e},u.quantiles=function(){return o.slice()},u.copy=function(){return t().domain(r).range(i).unknown(e)},s.apply(u,arguments)},t.scaleQuantize=function t(){var e,r=0,i=1,o=1,a=[.5],u=[0,1];function c(t){return t<=t?u[n.bisect(a,t,0,o)]:e}function f(){var t=-1;for(a=new Array(o);++t<o;)a[t]=((t+1)*i-(t-o)*r)/(o+1);return c}return c.domain=function(t){return arguments.length?(r=+t[0],i=+t[1],f()):[r,i]},c.range=function(t){return arguments.length?(o=(u=l.call(t)).length-1,f()):u.slice()},c.invertExtent=function(t){var e=u.indexOf(t);return e<0?[NaN,NaN]:e<1?[r,a[0]]:e>=o?[a[o-1],i]:[a[e-1],a[e]]},c.unknown=function(t){return arguments.length?(e=t,c):c},c.thresholds=function(){return a.slice()},c.copy=function(){return t().domain([r,i]).range(u).unknown(e)},s.apply(k(c),arguments)},t.scaleThreshold=function t(){var e,r=[.5],i=[0,1],o=1;function a(t){return t<=t?i[n.bisect(r,t,0,o)]:e}return a.domain=function(t){return arguments.length?(r=l.call(t),o=Math.min(r.length,i.length-1),a):r.slice()},a.range=function(t){return arguments.length?(i=l.call(t),o=Math.min(r.length,i.length-1),a):i.slice()},a.invertExtent=function(t){var e=i.indexOf(t);return[r[e-1],r[e]]},a.unknown=function(t){return arguments.length?(e=t,a):e},a.copy=function(){return t().domain(r).range(i).unknown(e)},s.apply(a,arguments)},t.scaleTime=function(){return s.apply(K(o.timeYear,o.timeMonth,o.timeWeek,o.timeDay,o.timeHour,o.timeMinute,o.timeSecond,o.timeMillisecond,a.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return s.apply(K(o.utcYear,o.utcMonth,o.utcWeek,o.utcDay,o.utcHour,o.utcMinute,o.utcSecond,o.utcMillisecond,a.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scaleSequential=function t(){var e=k(J()(g));return e.copy=function(){return tt(e,t())},u.apply(e,arguments)},t.scaleSequentialLog=function t(){var e=P(J()).domain([1,10]);return e.copy=function(){return tt(e,t()).base(e.base())},u.apply(e,arguments)},t.scaleSequentialPow=et,t.scaleSequentialSqrt=function(){return et.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var e=I(J());return e.copy=function(){return tt(e,t()).constant(e.constant())},u.apply(e,arguments)},t.scaleSequentialQuantile=function t(){var e=[],r=g;function i(t){if(!isNaN(t=+t))return r((n.bisect(e,t)-1)/(e.length-1))}return i.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var r,o=0,a=t.length;o<a;++o)null==(r=t[o])||isNaN(r=+r)||e.push(r);return e.sort(n.ascending),i},i.interpolator=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return t(r).domain(e)},u.apply(i,arguments)},t.scaleDiverging=function t(){var e=k(nt()(g));return e.copy=function(){return tt(e,t())},u.apply(e,arguments)},t.scaleDivergingLog=function t(){var e=P(nt()).domain([.1,1,10]);return e.copy=function(){return tt(e,t()).base(e.base())},u.apply(e,arguments)},t.scaleDivergingPow=rt,t.scaleDivergingSqrt=function(){return rt.apply(null,arguments).exponent(.5)},t.scaleDivergingSymlog=function t(){var e=I(nt());return e.copy=function(){return tt(e,t()).constant(e.constant())},u.apply(e,arguments)},t.tickFormat=A,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-collection"),t("d3-array"),t("d3-interpolate"),t("d3-format"),t("d3-time"),t("d3-time-format")):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)},{"d3-array":2,"d3-collection":6,"d3-format":15,"d3-interpolate":18,"d3-time":28,"d3-time-format":27}],25:[function(t,e,n){var r;r=this,function(t){"use strict";var e="http://www.w3.org/1999/xhtml",n={svg:"http://www.w3.org/2000/svg",xhtml:e,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function i(t){var n=r(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===e&&n.documentElement.namespaceURI===e?n.createElement(t):n.createElementNS(r,t)}})(n)}function o(){}function a(t){return null==t?o:function(){return this.querySelector(t)}}function s(){return[]}function u(t){return null==t?s:function(){return this.querySelectorAll(t)}}function c(t){return function(){return this.matches(t)}}function f(t){return new Array(t.length)}function l(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}l.prototype={constructor:l,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var h="$";function d(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new l(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function p(t,e,n,r,i,o,a){var s,u,c,f={},d=e.length,p=o.length,m=new Array(d);for(s=0;s<d;++s)(u=e[s])&&(m[s]=c=h+a.call(u,u.__data__,s,e),c in f?i[s]=u:f[c]=u);for(s=0;s<p;++s)(u=f[c=h+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],f[c]=null):n[s]=new l(t,o[s]);for(s=0;s<d;++s)(u=e[s])&&f[m[s]]===u&&(i[s]=u)}function m(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function g(t,e){return t.style.getPropertyValue(e)||v(t).getComputedStyle(t,null).getPropertyValue(e)}function _(t){return t.trim().split(/^|\s+/)}function y(t){return t.classList||new b(t)}function b(t){this._node=t,this._names=_(t.getAttribute("class")||"")}function x(t,e){for(var n=y(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function w(t,e){for(var n=y(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function j(){this.textContent=""}function M(){this.innerHTML=""}function A(){this.nextSibling&&this.parentNode.appendChild(this)}function k(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function E(){return null}function z(){var t=this.parentNode;t&&t.removeChild(this)}function T(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function S(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}b.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var N={};function O(t,e,n){return t=C(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function C(e,n,r){return function(i){var o=t.event;t.event=i;try{e.call(this,this.__data__,n,r)}finally{t.event=o}}}function P(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function B(t,e,n){var r=N.hasOwnProperty(t.type)?O:C;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var f=0,l=u.length;f<l;++f)if((s=u[f]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function R(t,e,n){var r=v(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}t.event=null,"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(N={mouseenter:"mouseover",mouseleave:"mouseout"}));var I=[null];function D(t,e){this._groups=t,this._parents=e}function F(){return new D([[document.documentElement]],I)}function L(t){return"string"==typeof t?new D([[document.querySelector(t)]],[document.documentElement]):new D([[t]],I)}D.prototype=F.prototype={constructor:D,select:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s,u=e[i],c=u.length,f=r[i]=new Array(c),l=0;l<c;++l)(o=u[l])&&(s=t.call(o,o.__data__,l,u))&&("__data__"in o&&(s.__data__=o.__data__),f[l]=s);return new D(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],c=s.length,f=0;f<c;++f)(a=s[f])&&(r.push(t.call(a,a.__data__,f,s)),i.push(a));return new D(r,i)},filter:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],f=0;f<s;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&u.push(o);return new D(r,this._parents)},data:function(t,e){if(!t)return v=new Array(this.size()),f=-1,this.each(function(t){v[++f]=t}),v;var n,r=e?p:d,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),c=new Array(a),f=0;f<a;++f){var l=i[f],h=o[f],m=h.length,v=t.call(l,l&&l.__data__,f,i),g=v.length,_=u[f]=new Array(g),y=s[f]=new Array(g);r(l,h,_,y,c[f]=new Array(m),v,e);for(var b,x,w=0,j=0;w<g;++w)if(b=_[w]){for(w>=j&&(j=w+1);!(x=y[j])&&++j<g;);b._next=x||null}}return(s=new D(s,i))._enter=u,s._exit=c,s},enter:function(){return new D(this._enter||this._groups.map(f),this._parents)},exit:function(){return new D(this._exit||this._groups.map(f),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],f=n[s],l=c.length,h=a[s]=new Array(l),d=0;d<l;++d)(u=c[d]||f[d])&&(h[d]=u);for(;s<r;++s)a[s]=e[s];return new D(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=m);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),f=0;f<u;++f)(a=s[f])&&(c[f]=a);c.sort(e)}return new D(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=r(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):g(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=_(t+"");if(arguments.length<2){for(var r=y(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?x:w)(this,t)}}:e?function(t){return function(){x(this,t)}}:function(t){return function(){w(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?j:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?M:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(A)},lower:function(){return this.each(k)},append:function(t){var e="function"==typeof t?t:i(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:i(t),r=null==e?E:"function"==typeof e?e:a(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(z)},clone:function(t){return this.select(t?S:T)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?B:P,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,f=s.length;c<f;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return R(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return R(this,t,e)}})(t,e))}};var U=0;function q(){return new Y}function Y(){this._="@"+(++U).toString(36)}function H(){for(var e,n=t.event;e=n.sourceEvent;)n=e;return n}function V(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}Y.prototype=q.prototype={constructor:Y,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},t.clientPoint=V,t.create=function(t){return L(i(t).call(document.documentElement))},t.creator=i,t.customEvent=function(e,n,r,i){var o=t.event;e.sourceEvent=t.event,t.event=e;try{return n.apply(r,i)}finally{t.event=o}},t.local=q,t.matcher=c,t.mouse=function(t){var e=H();return e.changedTouches&&(e=e.changedTouches[0]),V(t,e)},t.namespace=r,t.namespaces=n,t.select=L,t.selectAll=function(t){return"string"==typeof t?new D([document.querySelectorAll(t)],[document.documentElement]):new D([null==t?[]:t],I)},t.selection=F,t.selector=a,t.selectorAll=u,t.style=g,t.touch=function(t,e,n){arguments.length<3&&(n=e,e=H().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return V(t,r);return null},t.touches=function(t,e){null==e&&(e=H().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=V(t,e[n]);return i},t.window=v,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],26:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";function n(t){return function(){return t}}var r=Math.abs,i=Math.atan2,o=Math.cos,a=Math.max,s=Math.min,u=Math.sin,c=Math.sqrt,f=1e-12,l=Math.PI,h=l/2,d=2*l;function p(t){return t>=1?h:t<=-1?-h:Math.asin(t)}function m(t){return t.innerRadius}function v(t){return t.outerRadius}function g(t){return t.startAngle}function _(t){return t.endAngle}function y(t){return t&&t.padAngle}function b(t,e,n,r,i,o,s){var u=t-n,f=e-r,l=(s?o:-o)/c(u*u+f*f),h=l*f,d=-l*u,p=t+h,m=e+d,v=n+h,g=r+d,_=(p+v)/2,y=(m+g)/2,b=v-p,x=g-m,w=b*b+x*x,j=i-o,M=p*g-v*m,A=(x<0?-1:1)*c(a(0,j*j*w-M*M)),k=(M*x-b*A)/w,E=(-M*b-x*A)/w,z=(M*x+b*A)/w,T=(-M*b+x*A)/w,S=k-_,N=E-y,O=z-_,C=T-y;return S*S+N*N>O*O+C*C&&(k=z,E=T),{cx:k,cy:E,x01:-h,y01:-d,x11:k*(i/j-1),y11:E*(i/j-1)}}function x(t){this._context=t}function w(t){return new x(t)}function j(t){return t[0]}function M(t){return t[1]}function A(){var t=j,r=M,i=n(!0),o=null,a=w,s=null;function u(n){var u,c,f,l=n.length,h=!1;for(null==o&&(s=a(f=e.path())),u=0;u<=l;++u)!(u<l&&i(c=n[u],u,n))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(c,u,n),+r(c,u,n));if(f)return s=null,f+""||null}return u.x=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),u):t},u.y=function(t){return arguments.length?(r="function"==typeof t?t:n(+t),u):r},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:n(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function k(){var t=j,r=null,i=n(0),o=M,a=n(!0),s=null,u=w,c=null;function f(n){var f,l,h,d,p,m=n.length,v=!1,g=new Array(m),_=new Array(m);for(null==s&&(c=u(p=e.path())),f=0;f<=m;++f){if(!(f<m&&a(d=n[f],f,n))===v)if(v=!v)l=f,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),h=f-1;h>=l;--h)c.point(g[h],_[h]);c.lineEnd(),c.areaEnd()}v&&(g[f]=+t(d,f,n),_[f]=+i(d,f,n),c.point(r?+r(d,f,n):g[f],o?+o(d,f,n):_[f]))}if(p)return c=null,p+""||null}function l(){return A().defined(a).curve(u).context(s)}return f.x=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),r=null,f):t},f.x0=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),f):t},f.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:n(+t),f):r},f.y=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),o=null,f):i},f.y0=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),f):i},f.y1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:n(+t),f):o},f.lineX0=f.lineY0=function(){return l().x(t).y(i)},f.lineY1=function(){return l().x(t).y(o)},f.lineX1=function(){return l().x(r).y(i)},f.defined=function(t){return arguments.length?(a="function"==typeof t?t:n(!!t),f):a},f.curve=function(t){return arguments.length?(u=t,null!=s&&(c=u(s)),f):u},f.context=function(t){return arguments.length?(null==t?s=c=null:c=u(s=t),f):s},f}function E(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function z(t){return t}x.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var T=N(w);function S(t){this._curve=t}function N(t){function e(e){return new S(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(N(t)):e()._curve},t}function C(){return O(A().curve(T))}function P(){var t=k().curve(T),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(n())},delete t.lineX0,t.lineEndAngle=function(){return O(r())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(N(t)):e()._curve},t}function B(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}S.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var R=Array.prototype.slice;function I(t){return t.source}function D(t){return t.target}function F(t){var r=I,i=D,o=j,a=M,s=null;function u(){var n,u=R.call(arguments),c=r.apply(this,u),f=i.apply(this,u);if(s||(s=n=e.path()),t(s,+o.apply(this,(u[0]=c,u)),+a.apply(this,u),+o.apply(this,(u[0]=f,u)),+a.apply(this,u)),n)return s=null,n+""||null}return u.source=function(t){return arguments.length?(r=t,u):r},u.target=function(t){return arguments.length?(i=t,u):i},u.x=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),u):o},u.y=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function L(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function U(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function q(t,e,n,r,i){var o=B(e,n),a=B(e,n=(n+i)/2),s=B(r,n),u=B(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],s[0],s[1],u[0],u[1])}var Y={draw:function(t,e){var n=Math.sqrt(e/l);t.moveTo(n,0),t.arc(0,0,n,0,d)}},H={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},V=Math.sqrt(1/3),W=2*V,X={draw:function(t,e){var n=Math.sqrt(e/W),r=n*V;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},G=Math.sin(l/10)/Math.sin(7*l/10),Z=Math.sin(d/10)*G,$=-Math.cos(d/10)*G,Q={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Z*n,i=$*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=d*o/5,s=Math.cos(a),u=Math.sin(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},K={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},J=Math.sqrt(3),tt={draw:function(t,e){var n=-Math.sqrt(e/(3*J));t.moveTo(0,2*n),t.lineTo(-J*n,-n),t.lineTo(J*n,-n),t.closePath()}},et=-.5,nt=Math.sqrt(3)/2,rt=1/Math.sqrt(12),it=3*(rt/2+1),ot={draw:function(t,e){var n=Math.sqrt(e/it),r=n/2,i=n*rt,o=r,a=n*rt+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(et*r-nt*i,nt*r+et*i),t.lineTo(et*o-nt*a,nt*o+et*a),t.lineTo(et*s-nt*u,nt*s+et*u),t.lineTo(et*r+nt*i,et*i-nt*r),t.lineTo(et*o+nt*a,et*a-nt*o),t.lineTo(et*s+nt*u,et*u-nt*s),t.closePath()}},at=[Y,H,X,K,Q,tt,ot];function st(){}function ut(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ct(t){this._context=t}function ft(t){this._context=t}function lt(t){this._context=t}function ht(t,e){this._basis=new ct(t),this._beta=e}ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ut(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ut(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:st,areaEnd:st,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ut(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ut(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function n(t){return 1===e?new ct(t):new ht(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function pt(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:pt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:pt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function n(t){return new mt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function gt(t,e){this._context=t,this._k=(1-e)/6}gt.prototype={areaStart:st,areaEnd:st,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:pt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function n(t){return new gt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var bt=function t(e){function n(t){return new yt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xt(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>f){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>f){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function wt(t,e){this._context=t,this._alpha=e}wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:xt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var jt=function t(e){function n(t){return e?new wt(t,e):new mt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Mt(t,e){this._context=t,this._alpha=e}Mt.prototype={areaStart:st,areaEnd:st,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:xt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var At=function t(e){function n(t){return e?new Mt(t,e):new gt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function kt(t,e){this._context=t,this._alpha=e}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function n(t){return e?new kt(t,e):new yt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function zt(t){this._context=t}function Tt(t){return t<0?-1:1}function St(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Tt(o)+Tt(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Nt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ot(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Ct(t){this._context=t}function Pt(t){this._context=new Bt(t)}function Bt(t){this._context=t}function Rt(t){this._context=t}function It(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function Dt(t,e){this._context=t,this._t=e}function Ft(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Lt(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Ut(t,e){return t[e]}function qt(t){var e=t.map(Yt);return Lt(t).sort(function(t,n){return e[t]-e[n]})}function Yt(t){for(var e,n=-1,r=0,i=t.length,o=-1/0;++n<i;)(e=+t[n][1])>o&&(o=e,r=n);return r}function Ht(t){var e=t.map(Vt);return Lt(t).sort(function(t,n){return e[t]-e[n]})}function Vt(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}zt.prototype={areaStart:st,areaEnd:st,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ot(this,this._t0,Nt(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ot(this,Nt(this,n=St(this,t,e)),n);break;default:Ot(this,this._t0,n=St(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Pt.prototype=Object.create(Ct.prototype)).point=function(t,e){Ct.prototype.point.call(this,e,t)},Bt.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},Rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=It(t),i=It(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},t.arc=function(){var t=m,a=v,x=n(0),w=null,j=g,M=_,A=y,k=null;function E(){var n,m,v,g=+t.apply(this,arguments),_=+a.apply(this,arguments),y=j.apply(this,arguments)-h,E=M.apply(this,arguments)-h,z=r(E-y),T=E>y;if(k||(k=n=e.path()),_<g&&(m=_,_=g,g=m),_>f)if(z>d-f)k.moveTo(_*o(y),_*u(y)),k.arc(0,0,_,y,E,!T),g>f&&(k.moveTo(g*o(E),g*u(E)),k.arc(0,0,g,E,y,T));else{var S,N,O=y,C=E,P=y,B=E,R=z,I=z,D=A.apply(this,arguments)/2,F=D>f&&(w?+w.apply(this,arguments):c(g*g+_*_)),L=s(r(_-g)/2,+x.apply(this,arguments)),U=L,q=L;if(F>f){var Y=p(F/g*u(D)),H=p(F/_*u(D));(R-=2*Y)>f?(P+=Y*=T?1:-1,B-=Y):(R=0,P=B=(y+E)/2),(I-=2*H)>f?(O+=H*=T?1:-1,C-=H):(I=0,O=C=(y+E)/2)}var V=_*o(O),W=_*u(O),X=g*o(B),G=g*u(B);if(L>f){var Z,$=_*o(C),Q=_*u(C),K=g*o(P),J=g*u(P);if(z<l&&(Z=function(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,d=h*u-l*c;if(!(d*d<f))return[t+(d=(l*(e-o)-h*(t-i))/d)*u,e+d*c]}(V,W,K,J,$,Q,X,G))){var tt=V-Z[0],et=W-Z[1],nt=$-Z[0],rt=Q-Z[1],it=1/u(((v=(tt*nt+et*rt)/(c(tt*tt+et*et)*c(nt*nt+rt*rt)))>1?0:v<-1?l:Math.acos(v))/2),ot=c(Z[0]*Z[0]+Z[1]*Z[1]);U=s(L,(g-ot)/(it-1)),q=s(L,(_-ot)/(it+1))}}I>f?q>f?(S=b(K,J,V,W,_,q,T),N=b($,Q,X,G,_,q,T),k.moveTo(S.cx+S.x01,S.cy+S.y01),q<L?k.arc(S.cx,S.cy,q,i(S.y01,S.x01),i(N.y01,N.x01),!T):(k.arc(S.cx,S.cy,q,i(S.y01,S.x01),i(S.y11,S.x11),!T),k.arc(0,0,_,i(S.cy+S.y11,S.cx+S.x11),i(N.cy+N.y11,N.cx+N.x11),!T),k.arc(N.cx,N.cy,q,i(N.y11,N.x11),i(N.y01,N.x01),!T))):(k.moveTo(V,W),k.arc(0,0,_,O,C,!T)):k.moveTo(V,W),g>f&&R>f?U>f?(S=b(X,G,$,Q,g,-U,T),N=b(V,W,K,J,g,-U,T),k.lineTo(S.cx+S.x01,S.cy+S.y01),U<L?k.arc(S.cx,S.cy,U,i(S.y01,S.x01),i(N.y01,N.x01),!T):(k.arc(S.cx,S.cy,U,i(S.y01,S.x01),i(S.y11,S.x11),!T),k.arc(0,0,g,i(S.cy+S.y11,S.cx+S.x11),i(N.cy+N.y11,N.cx+N.x11),T),k.arc(N.cx,N.cy,U,i(N.y11,N.x11),i(N.y01,N.x01),!T))):k.arc(0,0,g,B,P,T):k.lineTo(X,G)}else k.moveTo(0,0);if(k.closePath(),n)return k=null,n+""||null}return E.centroid=function(){var e=(+t.apply(this,arguments)+ +a.apply(this,arguments))/2,n=(+j.apply(this,arguments)+ +M.apply(this,arguments))/2-l/2;return[o(n)*e,u(n)*e]},E.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),E):t},E.outerRadius=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),E):a},E.cornerRadius=function(t){return arguments.length?(x="function"==typeof t?t:n(+t),E):x},E.padRadius=function(t){return arguments.length?(w=null==t?null:"function"==typeof t?t:n(+t),E):w},E.startAngle=function(t){return arguments.length?(j="function"==typeof t?t:n(+t),E):j},E.endAngle=function(t){return arguments.length?(M="function"==typeof t?t:n(+t),E):M},E.padAngle=function(t){return arguments.length?(A="function"==typeof t?t:n(+t),E):A},E.context=function(t){return arguments.length?(k=null==t?null:t,E):k},E},t.area=k,t.areaRadial=P,t.curveBasis=function(t){return new ct(t)},t.curveBasisClosed=function(t){return new ft(t)},t.curveBasisOpen=function(t){return new lt(t)},t.curveBundle=dt,t.curveCardinal=vt,t.curveCardinalClosed=_t,t.curveCardinalOpen=bt,t.curveCatmullRom=jt,t.curveCatmullRomClosed=At,t.curveCatmullRomOpen=Et,t.curveLinear=w,t.curveLinearClosed=function(t){return new zt(t)},t.curveMonotoneX=function(t){return new Ct(t)},t.curveMonotoneY=function(t){return new Pt(t)},t.curveNatural=function(t){return new Rt(t)},t.curveStep=function(t){return new Dt(t,.5)},t.curveStepAfter=function(t){return new Dt(t,1)},t.curveStepBefore=function(t){return new Dt(t,0)},t.line=A,t.lineRadial=C,t.linkHorizontal=function(){return F(L)},t.linkRadial=function(){var t=F(q);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return F(U)},t.pie=function(){var t=z,e=E,r=null,i=n(0),o=n(d),a=n(0);function s(n){var s,u,c,f,l,h=n.length,p=0,m=new Array(h),v=new Array(h),g=+i.apply(this,arguments),_=Math.min(d,Math.max(-d,o.apply(this,arguments)-g)),y=Math.min(Math.abs(_)/h,a.apply(this,arguments)),b=y*(_<0?-1:1);for(s=0;s<h;++s)(l=v[m[s]=s]=+t(n[s],s,n))>0&&(p+=l);for(null!=e?m.sort(function(t,n){return e(v[t],v[n])}):null!=r&&m.sort(function(t,e){return r(n[t],n[e])}),s=0,c=p?(_-h*b)/p:0;s<h;++s,g=f)u=m[s],f=g+((l=v[u])>0?l*c:0)+b,v[u]={data:n[u],index:s,value:l,startAngle:g,endAngle:f,padAngle:y};return v}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),s):o},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),s):a},s},t.pointRadial=B,t.radialArea=P,t.radialLine=C,t.stack=function(){var t=n([]),e=Lt,r=Ft,i=Ut;function o(n){var o,a,s=t.apply(this,arguments),u=n.length,c=s.length,f=new Array(c);for(o=0;o<c;++o){for(var l,h=s[o],d=f[o]=new Array(u),p=0;p<u;++p)d[p]=l=[0,+i(n[p],h,p,n)],l.data=n[p];d.key=h}for(o=0,a=e(f);o<c;++o)f[a[o]].index=o;return r(f,a),f}return o.keys=function(e){return arguments.length?(t="function"==typeof e?e:n(R.call(e)),o):t},o.value=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),o):i},o.order=function(t){return arguments.length?(e=null==t?Lt:"function"==typeof t?t:n(R.call(t)),o):e},o.offset=function(t){return arguments.length?(r=null==t?Ft:t,o):r},o},t.stackOffsetDiverging=function(t,e){if((s=t.length)>0)for(var n,r,i,o,a,s,u=0,c=t[e[0]].length;u<c;++u)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},t.stackOffsetExpand=function(t,e){if((r=t.length)>0){for(var n,r,i,o=0,a=t[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=t[n][o][1]||0;if(i)for(n=0;n<r;++n)t[n][o][1]/=i}Ft(t,e)}},t.stackOffsetNone=Ft,t.stackOffsetSilhouette=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=t[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}Ft(t,e)}},t.stackOffsetWiggle=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,u=0,c=0;s<i;++s){for(var f=t[e[s]],l=f[a][1]||0,h=(l-(f[a-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];h+=(p[a][1]||0)-(p[a-1][1]||0)}u+=l,c+=h*l}n[a-1][1]+=n[a-1][0]=o,u&&(o-=c/u)}n[a-1][1]+=n[a-1][0]=o,Ft(t,e)}},t.stackOrderAppearance=qt,t.stackOrderAscending=Ht,t.stackOrderDescending=function(t){return Ht(t).reverse()},t.stackOrderInsideOut=function(t){var e,n,r=t.length,i=t.map(Vt),o=qt(t),a=0,s=0,u=[],c=[];for(e=0;e<r;++e)n=o[e],a<s?(a+=i[n],u.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(u)},t.stackOrderNone=Lt,t.stackOrderReverse=function(t){return Lt(t).reverse()},t.symbol=function(){var t=n(Y),r=n(64),i=null;function o(){var n;if(i||(i=n=e.path()),t.apply(this,arguments).draw(i,+r.apply(this,arguments)),n)return i=null,n+""||null}return o.type=function(e){return arguments.length?(t="function"==typeof e?e:n(e),o):t},o.size=function(t){return arguments.length?(r="function"==typeof t?t:n(+t),o):r},o.context=function(t){return arguments.length?(i=null==t?null:t,o):i},o},t.symbolCircle=Y,t.symbolCross=H,t.symbolDiamond=X,t.symbolSquare=K,t.symbolStar=Q,t.symbolTriangle=tt,t.symbolWye=ot,t.symbols=at,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-path")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-path":19}],27:[function(t,e,n){var r,i;r=this,i=function(t,e){"use strict";function n(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function r(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function i(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function o(t){var o=t.dateTime,a=t.date,u=t.time,c=t.periods,f=t.days,l=t.shortDays,h=t.months,_t=t.shortMonths,yt=d(c),bt=p(c),xt=d(f),wt=p(f),jt=d(l),Mt=p(l),At=d(h),kt=p(h),Et=d(_t),zt=p(_t),Tt={a:function(t){return l[t.getDay()]},A:function(t){return f[t.getDay()]},b:function(t){return _t[t.getMonth()]},B:function(t){return h[t.getMonth()]},c:null,d:B,e:B,f:L,H:R,I:I,j:D,L:F,m:U,M:q,p:function(t){return c[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:vt,s:gt,S:Y,u:H,U:V,V:W,w:X,W:G,x:null,X:null,y:Z,Y:$,Z:Q,"%":mt},St={a:function(t){return l[t.getUTCDay()]},A:function(t){return f[t.getUTCDay()]},b:function(t){return _t[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:K,e:K,f:rt,H:J,I:tt,j:et,L:nt,m:it,M:ot,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:vt,s:gt,S:at,u:st,U:ut,V:ct,w:ft,W:lt,x:null,X:null,y:ht,Y:dt,Z:pt,"%":mt},Nt={a:function(t,e,n){var r=jt.exec(e.slice(n));return r?(t.w=Mt[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=xt.exec(e.slice(n));return r?(t.w=wt[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=Et.exec(e.slice(n));return r?(t.m=zt[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=At.exec(e.slice(n));return r?(t.m=kt[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,e,n){return Pt(t,o,e,n)},d:A,e:A,f:N,H:E,I:E,j:k,L:S,m:M,M:z,p:function(t,e,n){var r=yt.exec(e.slice(n));return r?(t.p=bt[r[0].toLowerCase()],n+r[0].length):-1},q:j,Q:C,s:P,S:T,u:v,U:g,V:_,w:m,W:y,x:function(t,e,n){return Pt(t,a,e,n)},X:function(t,e,n){return Pt(t,u,e,n)},y:x,Y:b,Z:w,"%":O};function Ot(t,e){return function(n){var r,i,o,a=[],u=-1,c=0,f=t.length;for(n instanceof Date||(n=new Date(+n));++u<f;)37===t.charCodeAt(u)&&(a.push(t.slice(c,u)),null!=(i=s[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),c=u+1);return a.push(t.slice(c,u)),a.join("")}}function Ct(t,o){return function(a){var s,u,c=i(1900,void 0,1);if(Pt(c,t,a+="",0)!=a.length)return null;if("Q"in c)return new Date(c.Q);if("s"in c)return new Date(1e3*c.s+("L"in c?c.L:0));if(!o||"Z"in c||(c.Z=0),"p"in c&&(c.H=c.H%12+12*c.p),void 0===c.m&&(c.m="q"in c?c.q:0),"V"in c){if(c.V<1||c.V>53)return null;"w"in c||(c.w=1),"Z"in c?(u=(s=r(i(c.y,0,1))).getUTCDay(),s=u>4||0===u?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(u=(s=n(i(c.y,0,1))).getDay(),s=u>4||0===u?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),u="Z"in c?r(i(c.y,0,1)).getUTCDay():n(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(u+5)%7:c.w+7*c.U-(u+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,r(c)):n(c)}}function Pt(t,e,n,r){for(var i,o,a=0,u=e.length,c=n.length;a<u;){if(r>=c)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=Nt[i in s?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return Tt.x=Ot(a,Tt),Tt.X=Ot(u,Tt),Tt.c=Ot(o,Tt),St.x=Ot(a,St),St.X=Ot(u,St),St.c=Ot(o,St),{format:function(t){var e=Ot(t+="",Tt);return e.toString=function(){return t},e},parse:function(t){var e=Ct(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Ot(t+="",St);return e.toString=function(){return t},e},utcParse:function(t){var e=Ct(t+="",!0);return e.toString=function(){return t},e}}}var a,s={"-":"",_:" ",0:"0"},u=/^\s*\d+/,c=/^%/,f=/[\\^$*+?|[\]().{}]/g;function l(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function h(t){return t.replace(f,"\\$&")}function d(t){return new RegExp("^(?:"+t.map(h).join("|")+")","i")}function p(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function m(t,e,n){var r=u.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function v(t,e,n){var r=u.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function g(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function _(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function y(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function b(t,e,n){var r=u.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function x(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function w(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function j(t,e,n){var r=u.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function M(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function A(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function k(t,e,n){var r=u.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function E(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function z(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function T(t,e,n){var r=u.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function S(t,e,n){var r=u.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function N(t,e,n){var r=u.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function O(t,e,n){var r=c.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function C(t,e,n){var r=u.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function P(t,e,n){var r=u.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function B(t,e){return l(t.getDate(),e,2)}function R(t,e){return l(t.getHours(),e,2)}function I(t,e){return l(t.getHours()%12||12,e,2)}function D(t,n){return l(1+e.timeDay.count(e.timeYear(t),t),n,3)}function F(t,e){return l(t.getMilliseconds(),e,3)}function L(t,e){return F(t,e)+"000"}function U(t,e){return l(t.getMonth()+1,e,2)}function q(t,e){return l(t.getMinutes(),e,2)}function Y(t,e){return l(t.getSeconds(),e,2)}function H(t){var e=t.getDay();return 0===e?7:e}function V(t,n){return l(e.timeSunday.count(e.timeYear(t)-1,t),n,2)}function W(t,n){var r=t.getDay();return t=r>=4||0===r?e.timeThursday(t):e.timeThursday.ceil(t),l(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),n,2)}function X(t){return t.getDay()}function G(t,n){return l(e.timeMonday.count(e.timeYear(t)-1,t),n,2)}function Z(t,e){return l(t.getFullYear()%100,e,2)}function $(t,e){return l(t.getFullYear()%1e4,e,4)}function Q(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+l(e/60|0,"0",2)+l(e%60,"0",2)}function K(t,e){return l(t.getUTCDate(),e,2)}function J(t,e){return l(t.getUTCHours(),e,2)}function tt(t,e){return l(t.getUTCHours()%12||12,e,2)}function et(t,n){return l(1+e.utcDay.count(e.utcYear(t),t),n,3)}function nt(t,e){return l(t.getUTCMilliseconds(),e,3)}function rt(t,e){return nt(t,e)+"000"}function it(t,e){return l(t.getUTCMonth()+1,e,2)}function ot(t,e){return l(t.getUTCMinutes(),e,2)}function at(t,e){return l(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function ut(t,n){return l(e.utcSunday.count(e.utcYear(t)-1,t),n,2)}function ct(t,n){var r=t.getUTCDay();return t=r>=4||0===r?e.utcThursday(t):e.utcThursday.ceil(t),l(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),n,2)}function ft(t){return t.getUTCDay()}function lt(t,n){return l(e.utcMonday.count(e.utcYear(t)-1,t),n,2)}function ht(t,e){return l(t.getUTCFullYear()%100,e,2)}function dt(t,e){return l(t.getUTCFullYear()%1e4,e,4)}function pt(){return"+0000"}function mt(){return"%"}function vt(t){return+t}function gt(t){return Math.floor(+t/1e3)}function _t(e){return a=o(e),t.timeFormat=a.format,t.timeParse=a.parse,t.utcFormat=a.utcFormat,t.utcParse=a.utcParse,a}_t({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var yt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),bt=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");t.isoFormat=yt,t.isoParse=bt,t.timeFormatDefaultLocale=_t,t.timeFormatLocale=o,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-time")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-time":28}],28:[function(t,e,n){var r;r=this,function(t){"use strict";var e=new Date,n=new Date;function r(t,i,o,a){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),n=s.ceil(t);return t-e<n-t?e:n},s.offset=function(t,e){return i(t=new Date(+t),null==e?1:Math.floor(e)),t},s.range=function(e,n,r){var o,a=[];if(e=s.ceil(e),r=null==r?1:Math.floor(r),!(e<n&&r>0))return a;do{a.push(o=new Date(+e)),i(e,r),t(e)}while(o<e&&e<n);return a},s.filter=function(e){return r(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;i(t,-1),!e(t););else for(;--n>=0;)for(;i(t,1),!e(t););})},o&&(s.count=function(r,i){return e.setTime(+r),n.setTime(+i),t(e),t(n),Math.floor(o(e,n))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(a?function(e){return a(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=r(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):i:null};var o=i.range,a=6e4,s=6048e5,u=r(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+1e3*e)},function(t,e){return(e-t)/1e3},function(t){return t.getUTCSeconds()}),c=u.range,f=r(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,e){t.setTime(+t+e*a)},function(t,e){return(e-t)/a},function(t){return t.getMinutes()}),l=f.range,h=r(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*a)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getHours()}),d=h.range,p=r(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*a)/864e5},function(t){return t.getDate()-1}),m=p.range;function v(t){return r(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*a)/s})}var g=v(0),_=v(1),y=v(2),b=v(3),x=v(4),w=v(5),j=v(6),M=g.range,A=_.range,k=y.range,E=b.range,z=x.range,T=w.range,S=j.range,N=r(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),O=N.range,C=r(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});C.every=function(t){return isFinite(t=Math.floor(t))&&t>0?r(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var P=C.range,B=r(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*a)},function(t,e){return(e-t)/a},function(t){return t.getUTCMinutes()}),R=B.range,I=r(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getUTCHours()}),D=I.range,F=r(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/864e5},function(t){return t.getUTCDate()-1}),L=F.range;function U(t){return r(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/s})}var q=U(0),Y=U(1),H=U(2),V=U(3),W=U(4),X=U(5),G=U(6),Z=q.range,$=Y.range,Q=H.range,K=V.range,J=W.range,tt=X.range,et=G.range,nt=r(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),rt=nt.range,it=r(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});it.every=function(t){return isFinite(t=Math.floor(t))&&t>0?r(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var ot=it.range;t.timeDay=p,t.timeDays=m,t.timeFriday=w,t.timeFridays=T,t.timeHour=h,t.timeHours=d,t.timeInterval=r,t.timeMillisecond=i,t.timeMilliseconds=o,t.timeMinute=f,t.timeMinutes=l,t.timeMonday=_,t.timeMondays=A,t.timeMonth=N,t.timeMonths=O,t.timeSaturday=j,t.timeSaturdays=S,t.timeSecond=u,t.timeSeconds=c,t.timeSunday=g,t.timeSundays=M,t.timeThursday=x,t.timeThursdays=z,t.timeTuesday=y,t.timeTuesdays=k,t.timeWednesday=b,t.timeWednesdays=E,t.timeWeek=g,t.timeWeeks=M,t.timeYear=C,t.timeYears=P,t.utcDay=F,t.utcDays=L,t.utcFriday=X,t.utcFridays=tt,t.utcHour=I,t.utcHours=D,t.utcMillisecond=i,t.utcMilliseconds=o,t.utcMinute=B,t.utcMinutes=R,t.utcMonday=Y,t.utcMondays=$,t.utcMonth=nt,t.utcMonths=rt,t.utcSaturday=G,t.utcSaturdays=et,t.utcSecond=u,t.utcSeconds=c,t.utcSunday=q,t.utcSundays=Z,t.utcThursday=W,t.utcThursdays=J,t.utcTuesday=H,t.utcTuesdays=Q,t.utcWednesday=V,t.utcWednesdays=K,t.utcWeek=q,t.utcWeeks=Z,t.utcYear=it,t.utcYears=ot,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],29:[function(t,e,n){var r;r=this,function(t){"use strict";var e,n,r=0,i=0,o=0,a=1e3,s=0,u=0,c=0,f="object"==typeof performance&&performance.now?performance:Date,l="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function h(){return u||(l(d),u=f.now()+c)}function d(){u=0}function p(){this._call=this._time=this._next=null}function m(t,e,n){var r=new p;return r.restart(t,e,n),r}function v(){h(),++r;for(var t,n=e;n;)(t=u-n._time)>=0&&n._call.call(null,t),n=n._next;--r}function g(){u=(s=f.now())+c,r=i=0;try{v()}finally{r=0,function(){var t,r,i=e,o=1/0;for(;i;)i._call?(o>i._time&&(o=i._time),t=i,i=i._next):(r=i._next,i._next=null,i=t?t._next=r:e=r);n=t,y(o)}(),u=0}}function _(){var t=f.now(),e=t-s;e>a&&(c-=e,s=t)}function y(t){r||(i&&(i=clearTimeout(i)),t-u>24?(t<1/0&&(i=setTimeout(g,t-f.now()-c)),o&&(o=clearInterval(o))):(o||(s=f.now(),o=setInterval(_,a)),r=1,l(g)))}p.prototype=m.prototype={constructor:p,restart:function(t,r,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?h():+i)+(null==r?0:+r),this._next||n===this||(n?n._next=this:e=this,n=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,n){var r=new p,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?h():+n,r.restart(function o(a){a+=i,r.restart(o,i+=e,n),t(a)},e,n),r)},t.now=h,t.timeout=function(t,e,n){var r=new p;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},t.timer=m,t.timerFlush=v,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).d3=r.d3||{})},{}],30:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o,a){"use strict";var s=n.dispatch("start","end","cancel","interrupt"),u=[],c=0,f=1,l=2,h=3,d=4,p=5,m=6;function v(t,e,n,i,o,a){var v=t.__transition;if(v){if(n in v)return}else t.__transition={};!function(t,e,n){var i,o=t.__transition;function a(c){var p,v,g,_;if(n.state!==f)return u();for(p in o)if((_=o[p]).name===n.name){if(_.state===h)return r.timeout(a);_.state===d?(_.state=m,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete o[p]):+p<e&&(_.state=m,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete o[p])}if(r.timeout(function(){n.state===h&&(n.state=d,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=l,n.on.call("start",t,t.__data__,n.index,n.group),n.state===l){for(n.state=h,i=new Array(g=n.tween.length),p=0,v=-1;p<g;++p)(_=n.tween[p].value.call(t,t.__data__,n.index,n.group))&&(i[++v]=_);i.length=v+1}}function s(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=p,1),o=-1,a=i.length;++o<a;)i[o].call(t,r);n.state===p&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=m,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=r.timer(function(t){n.state=f,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)},0,n.time)}(t,n,{name:e,index:i,group:o,on:s,tween:u,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:c})}function g(t,e){var n=y(t,e);if(n.state>c)throw new Error("too late; already scheduled");return n}function _(t,e){var n=y(t,e);if(n.state>h)throw new Error("too late; already running");return n}function y(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function b(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>l&&n.state<p,n.state=m,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function x(t,e,n){var r=t._id;return t.each(function(){var t=_(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return y(t,r).value[e]}}function w(t,e){var n;return("number"==typeof e?i.interpolateNumber:e instanceof o.color?i.interpolateRgb:(n=o.color(e))?(e=n,i.interpolateRgb):i.interpolateString)(t,e)}var j=e.selection.prototype.constructor;function M(t){return function(){this.style.removeProperty(t)}}var A=0;function k(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function E(t){return e.selection().transition(t)}function z(){return++A}var T=e.selection.prototype;k.prototype=E.prototype={constructor:k,select:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u,c,f=i[s],l=f.length,h=a[s]=new Array(l),d=0;d<l;++d)(u=f[d])&&(c=t.call(u,u.__data__,d,f))&&("__data__"in u&&(c.__data__=u.__data__),h[d]=c,v(h[d],n,r,d,h,y(u,r)));return new k(a,this._parents,n,r)},selectAll:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selectorAll(t));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var c,f=i[u],l=f.length,h=0;h<l;++h)if(c=f[h]){for(var d,p=t.call(c,c.__data__,h,f),m=y(c,r),g=0,_=p.length;g<_;++g)(d=p[g])&&v(d,n,r,g,p,m);a.push(p),s.push(c)}return new k(a,s,n,r)},filter:function(t){"function"!=typeof t&&(t=e.matcher(t));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a,s=n[o],u=s.length,c=i[o]=[],f=0;f<u;++f)(a=s[f])&&t.call(a,a.__data__,f,s)&&c.push(a);return new k(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],f=n[s],l=c.length,h=a[s]=new Array(l),d=0;d<l;++d)(u=c[d]||f[d])&&(h[d]=u);for(;s<r;++s)a[s]=e[s];return new k(a,this._parents,this._name,this._id)},selection:function(){return new j(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=z(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var f=y(a,e);v(a,t,n,c,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new k(r,this._parents,t,n)},call:T.call,nodes:T.nodes,node:T.node,size:T.size,empty:T.empty,each:T.each,on:function(t,e){var n=this._id;return arguments.length<2?y(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?g:_;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,n){var r=e.namespace(t),o="transform"===r?i.interpolateTransformSvg:w;return this.attrTween(t,"function"==typeof n?(r.local?function(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}:function(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}})(r,o,x(this,"attr."+t,n)):null==n?(r.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(r):(r.local?function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}:function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}})(r,o,n))},attrTween:function(t,n){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;var i=e.namespace(t);return this.tween(r,(i.local?function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}:function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i})(i,n))},style:function(t,n,r){var o="transform"==(t+="")?i.interpolateTransformCss:w;return null==n?this.styleTween(t,function(t,n){var r,i,o;return function(){var a=e.style(this,t),s=(this.style.removeProperty(t),e.style(this,t));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}(t,o)).on("end.style."+t,M(t)):"function"==typeof n?this.styleTween(t,function(t,n,r){var i,o,a;return function(){var s=e.style(this,t),u=r(this),c=u+"";return null==u&&(this.style.removeProperty(t),c=u=e.style(this,t)),s===c?null:s===i&&c===o?a:(o=c,a=n(i=s,u))}}(t,o,x(this,"style."+t,n))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=_(this,t),c=u.on,f=null==u.value[a]?o||(o=M(e)):void 0;c===n&&i===f||(r=(n=c).copy()).on(s,i=f),u.on=r}}(this._id,t)):this.styleTween(t,function(t,n,r){var i,o,a=r+"";return function(){var s=e.style(this,t);return s===a?null:s===i?o:o=n(i=s,r)}}(t,o,n),r).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(x(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=y(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=_(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=_(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){g(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){g(this,t).delay=e}})(e,t)):y(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){_(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){_(this,t).duration=e}})(e,t)):y(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){_(this,t).ease=e}}(e,t)):y(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each(function(){var n=_(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})})}};var S={time:null,delay:0,duration:250,ease:a.easeCubicInOut};function N(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return S.time=r.now(),S;return n}e.selection.prototype.interrupt=function(t){return this.each(function(){b(this,t)})},e.selection.prototype.transition=function(t){var e,n;t instanceof k?(e=t._id,t=t._name):(e=z(),(n=S).time=r.now(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s,u=i[a],c=u.length,f=0;f<c;++f)(s=u[f])&&v(s,t,e,f,u,n||N(s,e));return new k(i,this._parents,t,e)};var O=[null];t.active=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>f&&n.name===e)return new k([[t]],O,e,+r);return null},t.interrupt=b,t.transition=E,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-selection"),t("d3-dispatch"),t("d3-timer"),t("d3-interpolate"),t("d3-color"),t("d3-ease")):i((r=r||self).d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)},{"d3-color":7,"d3-dispatch":9,"d3-ease":12,"d3-interpolate":18,"d3-selection":25,"d3-timer":29}],31:[function(t,e,n){var r;r=this,function(t){"use strict";function e(t){return function(){return t}}function n(t){return t[0]}function r(t){return t[1]}function i(){this._=null}function o(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function a(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function s(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function u(t){for(;t.L;)t=t.L;return t}function c(t,e,n,r){var i=[null,null],o=C.push(i)-1;return i.left=t,i.right=e,n&&l(i,t,e,n),r&&l(i,e,t,r),N[t.index].halfedges.push(o),N[e.index].halfedges.push(o),i}function f(t,e,n){var r=[e,n];return r.left=t,r}function l(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function h(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],c=a[1],f=0,l=1,h=s[0]-u,d=s[1]-c;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o<f)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>f&&(f=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>f&&(f=o)}else if(h>0){if(o<f)return;o<l&&(l=o)}if(o=n-c,d||!(o>0)){if(o/=d,d<0){if(o<f)return;o<l&&(l=o)}else if(d>0){if(o>l)return;o>f&&(f=o)}if(o=i-c,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>f&&(f=o)}else if(d>0){if(o<f)return;o<l&&(l=o)}return!(f>0||l<1)||(f>0&&(t[0]=[u+f*h,c+f*d]),l<1&&(t[1]=[u+l*h,c+l*d]),!0)}}}}}function d(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],c=t.left,f=t.right,l=c[0],h=c[1],d=f[0],p=f[1],m=(l+d)/2,v=(h+p)/2;if(p===h){if(m<e||m>=r)return;if(l>d){if(u){if(u[1]>=i)return}else u=[m,n];o=[m,i]}else{if(u){if(u[1]<n)return}else u=[m,i];o=[m,n]}}else if(s=v-(a=(l-d)/(p-h))*m,a<-1||a>1)if(l>d){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/a,i];o=[(n-s)/a,n]}else if(h<p){if(u){if(u[0]>=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]<e)return}else u=[r,a*r+s];o=[e,a*e+s]}return t[0]=u,t[1]=o,!0}function p(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function m(t,e){return e[+(e.left!==t.site)]}function v(t,e){return e[+(e.left===t.site)]}i.prototype={constructor:i,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=u(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(a(this,n),n=(t=n).U),n.C=!1,r.C=!0,s(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(s(this,n),n=(t=n).U),n.C=!1,r.C=!0,a(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,c=t.R;if(n=o?c?u(c):o:c,i?i.L===t?i.L=n:i.R=n:this._=n,o&&c?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==c?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=c,c.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,a(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,s(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,a(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,s(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,a(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,s(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var g,_=[];function y(){o(this),this.x=this.y=this.arc=this.site=this.cy=null}function b(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],s=i[1],u=r[0]-a,c=r[1]-s,f=o[0]-a,l=o[1]-s,h=2*(u*l-c*f);if(!(h>=-B)){var d=u*u+c*c,p=f*f+l*l,m=(l*d-c*p)/h,v=(u*p-f*d)/h,b=_.pop()||new y;b.arc=t,b.site=i,b.x=m+a,b.y=(b.cy=v+s)+Math.sqrt(m*m+v*v),t.circle=b;for(var x=null,w=O._;w;)if(b.y<w.y||b.y===w.y&&b.x<=w.x){if(!w.L){x=w.P;break}w=w.L}else{if(!w.R){x=w;break}w=w.R}O.insert(x,b),x||(g=b)}}}}function x(t){var e=t.circle;e&&(e.P||(g=e.N),O.remove(e),_.push(e),o(e),t.circle=null)}var w=[];function j(){o(this),this.edge=this.site=this.circle=null}function M(t){var e=w.pop()||new j;return e.site=t,e}function A(t){x(t),S.remove(t),w.push(t),o(t)}function k(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,s=[t];A(t);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<P&&Math.abs(r-u.circle.cy)<P;)o=u.P,s.unshift(u),A(u),u=o;s.unshift(u),x(u);for(var f=a;f.circle&&Math.abs(n-f.circle.x)<P&&Math.abs(r-f.circle.cy)<P;)a=f.N,s.push(f),A(f),f=a;s.push(f),x(f);var h,d=s.length;for(h=1;h<d;++h)f=s[h],u=s[h-1],l(f.edge,u.site,f.site,i);u=s[0],(f=s[d-1]).edge=c(u.site,f.site,null,i),b(u),b(f)}function E(t){for(var e,n,r,i,o=t[0],a=t[1],s=S._;s;)if((r=z(s,a)-o)>P)s=s.L;else{if(!((i=o-T(s,a))>P)){r>-P?(e=s.P,n=s):i>-P?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){N[t.index]={site:t,halfedges:[]}}(t);var u=M(t);if(S.insert(e,u),e||n){if(e===n)return x(e),n=M(e.site),S.insert(u,n),u.edge=n.edge=c(e.site,u.site),b(e),void b(n);if(n){x(e),x(n);var f=e.site,h=f[0],d=f[1],p=t[0]-h,m=t[1]-d,v=n.site,g=v[0]-h,_=v[1]-d,y=2*(p*_-m*g),w=p*p+m*m,j=g*g+_*_,A=[(_*w-m*j)/y+h,(p*j-g*w)/y+d];l(n.edge,f,v,A),u.edge=c(f,t,null,A),n.edge=c(t,v,null,A),b(e),b(n)}else u.edge=c(e.site,u.site)}}function z(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],u=n[1],c=u-e;if(!c)return s;var f=s-r,l=1/o-1/c,h=f/c;return l?(-h+Math.sqrt(h*h-2*l*(f*f/(-2*c)-u+c/2+i-o/2)))/l+r:(r+s)/2}function T(t,e){var n=t.N;if(n)return z(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var S,N,O,C,P=1e-6,B=1e-12;function R(t,e){return e[1]-t[1]||e[0]-t[0]}function I(t,e){var n,r,o,a=t.sort(R).pop();for(C=[],N=new Array(t.length),S=new i,O=new i;;)if(o=g,a&&(!o||a[1]<o.y||a[1]===o.y&&a[0]<o.x))a[0]===n&&a[1]===r||(E(a),n=a[0],r=a[1]),a=t.pop();else{if(!o)break;k(o.arc)}if(function(){for(var t,e,n,r,i=0,o=N.length;i<o;++i)if((t=N[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),s=new Array(r);for(n=0;n<r;++n)a[n]=n,s[n]=p(t,C[e[n]]);for(a.sort(function(t,e){return s[e]-s[t]}),n=0;n<r;++n)s[n]=e[a[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var s=+e[0][0],u=+e[0][1],c=+e[1][0],l=+e[1][1];!function(t,e,n,r){for(var i,o=C.length;o--;)d(i=C[o],t,e,n,r)&&h(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>P||Math.abs(i[0][1]-i[1][1])>P)||delete C[o]}(s,u,c,l),function(t,e,n,r){var i,o,a,s,u,c,l,h,d,p,g,_,y=N.length,b=!0;for(i=0;i<y;++i)if(o=N[i]){for(a=o.site,s=(u=o.halfedges).length;s--;)C[u[s]]||u.splice(s,1);for(s=0,c=u.length;s<c;)g=(p=v(o,C[u[s]]))[0],_=p[1],h=(l=m(o,C[u[++s%c]]))[0],d=l[1],(Math.abs(g-h)>P||Math.abs(_-d)>P)&&(u.splice(s,0,C.push(f(a,p,Math.abs(g-t)<P&&r-_>P?[t,Math.abs(h-t)<P?d:r]:Math.abs(_-r)<P&&n-g>P?[Math.abs(d-r)<P?h:n,r]:Math.abs(g-n)<P&&_-e>P?[n,Math.abs(h-n)<P?d:e]:Math.abs(_-e)<P&&g-t>P?[Math.abs(d-e)<P?h:t,e]:null))-1),++c);c&&(b=!1)}if(b){var x,w,j,M=1/0;for(i=0,b=null;i<y;++i)(o=N[i])&&(j=(x=(a=o.site)[0]-t)*x+(w=a[1]-e)*w)<M&&(M=j,b=o);if(b){var A=[t,e],k=[t,r],E=[n,r],z=[n,e];b.halfedges.push(C.push(f(a=b.site,A,k))-1,C.push(f(a,k,E))-1,C.push(f(a,E,z))-1,C.push(f(a,z,A))-1)}}for(i=0;i<y;++i)(o=N[i])&&(o.halfedges.length||delete N[i])}(s,u,c,l)}this.edges=C,this.cells=N,S=O=C=N=null}I.prototype={constructor:I,polygons:function(){var t=this.edges;return this.cells.map(function(e){var n=e.halfedges.map(function(n){return m(e,t[n])});return n.data=e.site.data,n})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,s,u,c,f=n.site,l=-1,h=e[i[o-1]],d=h.left===f?h.right:h.left;++l<o;)a=d,d=(h=e[i[l]]).left===f?h.right:h.left,a&&d&&r<a.index&&r<d.index&&(u=a,c=d,((s=f)[0]-c[0])*(u[1]-s[1])-(s[0]-u[0])*(c[1]-s[1])<0)&&t.push([f.data,a.data,d.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=t-i.site[0],c=e-i.site[1],f=u*u+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],c=e-s[1],l=u*u+c*c;l<f&&(f=l,a=s.index)}})}while(null!==a);return o._found=r,null==n||f<=n*n?i.site:null}},t.voronoi=function(){var t=n,i=r,o=null;function a(e){return new I(e.map(function(n,r){var o=[Math.round(t(n,r,e)/P)*P,Math.round(i(n,r,e)/P)*P];return o.index=r,o.data=n,o}),o)}return a.polygons=function(t){return a(t).polygons()},a.links=function(t){return a(t).links()},a.triangles=function(t){return a(t).triangles()},a.x=function(n){return arguments.length?(t="function"==typeof n?n:e(+n),a):t},a.y=function(t){return arguments.length?(i="function"==typeof t?t:e(+t),a):i},a.extent=function(t){return arguments.length?(o=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],a):o&&[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},a.size=function(t){return arguments.length?(o=null==t?null:[[0,0],[+t[0],+t[1]]],a):o&&[o[1][0]-o[0][0],o[1][1]-o[0][1]]},a},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:r.d3=r.d3||{})},{}],32:[function(t,e,n){var r,i;r=this,i=function(t,e,n,r,i,o){"use strict";function a(t){return function(){return t}}function s(t,e,n){this.target=t,this.type=e,this.transform=n}function u(t,e,n){this.k=t,this.x=e,this.y=n}u.prototype={constructor:u,scale:function(t){return 1===t?this:new u(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new u(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var c=new u(1,0,0);function f(t){for(;!t.__zoom;)if(!(t=t.parentNode))return c;return t.__zoom}function l(){i.event.stopImmediatePropagation()}function h(){i.event.preventDefault(),i.event.stopImmediatePropagation()}function d(){return!i.event.ctrlKey&&!i.event.button}function p(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function m(){return this.__zoom||c}function v(){return-i.event.deltaY*(1===i.event.deltaMode?.05:i.event.deltaMode?1:.002)}function g(){return navigator.maxTouchPoints||"ontouchstart"in this}function _(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}f.prototype=u.prototype,t.zoom=function(){var t,f,y=d,b=p,x=_,w=v,j=g,M=[0,1/0],A=[[-1/0,-1/0],[1/0,1/0]],k=250,E=r.interpolateZoom,z=e.dispatch("start","zoom","end"),T=500,S=150,N=0;function O(t){t.property("__zoom",m).on("wheel.zoom",F).on("mousedown.zoom",L).on("dblclick.zoom",U).filter(j).on("touchstart.zoom",q).on("touchmove.zoom",Y).on("touchend.zoom touchcancel.zoom",H).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function C(t,e){return(e=Math.max(M[0],Math.min(M[1],e)))===t.k?t:new u(e,t.x,t.y)}function P(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new u(t.k,r,i)}function B(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function R(t,e,n){t.on("start.zoom",function(){I(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).end()}).tween("zoom",function(){var t=arguments,r=I(this,t),i=b.apply(this,t),o=null==n?B(i):"function"==typeof n?n.apply(this,t):n,a=Math.max(i[1][0]-i[0][0],i[1][1]-i[0][1]),s=this.__zoom,c="function"==typeof e?e.apply(this,t):e,f=E(s.invert(o).concat(a/s.k),c.invert(o).concat(a/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=a/e[2];t=new u(n,o[0]-e[0]*n,o[1]-e[1]*n)}r.zoom(null,t)}})}function I(t,e,n){return!n&&t.__zooming||new D(t,e)}function D(t,e){this.that=t,this.args=e,this.active=0,this.extent=b.apply(t,e),this.taps=0}function F(){if(y.apply(this,arguments)){var t=I(this,arguments),e=this.__zoom,n=Math.max(M[0],Math.min(M[1],e.k*Math.pow(2,w.apply(this,arguments)))),r=i.mouse(this);if(t.wheel)t.mouse[0][0]===r[0]&&t.mouse[0][1]===r[1]||(t.mouse[1]=e.invert(t.mouse[0]=r)),clearTimeout(t.wheel);else{if(e.k===n)return;t.mouse=[r,e.invert(r)],o.interrupt(this),t.start()}h(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},S),t.zoom("mouse",x(P(C(e,n),t.mouse[0],t.mouse[1]),t.extent,A))}}function L(){if(!f&&y.apply(this,arguments)){var t=I(this,arguments,!0),e=i.select(i.event.view).on("mousemove.zoom",function(){if(h(),!t.moved){var e=i.event.clientX-a,n=i.event.clientY-s;t.moved=e*e+n*n>N}t.zoom("mouse",x(P(t.that.__zoom,t.mouse[0]=i.mouse(t.that),t.mouse[1]),t.extent,A))},!0).on("mouseup.zoom",function(){e.on("mousemove.zoom mouseup.zoom",null),n.dragEnable(i.event.view,t.moved),h(),t.end()},!0),r=i.mouse(this),a=i.event.clientX,s=i.event.clientY;n.dragDisable(i.event.view),l(),t.mouse=[r,this.__zoom.invert(r)],o.interrupt(this),t.start()}}function U(){if(y.apply(this,arguments)){var t=this.__zoom,e=i.mouse(this),n=t.invert(e),r=t.k*(i.event.shiftKey?.5:2),o=x(P(C(t,r),e,n),b.apply(this,arguments),A);h(),k>0?i.select(this).transition().duration(k).call(R,o,e):i.select(this).call(O.transform,o)}}function q(){if(y.apply(this,arguments)){var e,n,r,a,s=i.event.touches,u=s.length,c=I(this,arguments,i.event.changedTouches.length===u);for(l(),n=0;n<u;++n)r=s[n],a=[a=i.touch(this,s,r.identifier),this.__zoom.invert(a),r.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout(function(){t=null},T)),o.interrupt(this),c.start())}}function Y(){if(this.__zooming){var e,n,r,o,a=I(this,arguments),s=i.event.changedTouches,u=s.length;for(h(),t&&(t=clearTimeout(t)),a.taps=0,e=0;e<u;++e)n=s[e],r=i.touch(this,s,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var c=a.touch0[0],f=a.touch0[1],l=a.touch1[0],d=a.touch1[1],p=(p=l[0]-c[0])*p+(p=l[1]-c[1])*p,m=(m=d[0]-f[0])*m+(m=d[1]-f[1])*m;n=C(n,Math.sqrt(p/m)),r=[(c[0]+l[0])/2,(c[1]+l[1])/2],o=[(f[0]+d[0])/2,(f[1]+d[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",x(P(n,r,o),a.extent,A))}}function H(){if(this.__zooming){var t,e,n=I(this,arguments),r=i.event.changedTouches,o=r.length;for(l(),f&&clearTimeout(f),f=setTimeout(function(){f=null},T),t=0;t<o;++t)e=r[t],n.touch0&&n.touch0[2]===e.identifier?delete n.touch0:n.touch1&&n.touch1[2]===e.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),2===n.taps){var a=i.select(this).on("dblclick.zoom");a&&a.apply(this,arguments)}}}return O.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",m),t!==r?R(t,e,n):r.interrupt().each(function(){I(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},O.scaleBy=function(t,e,n){O.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},n)},O.scaleTo=function(t,e,n){O.transform(t,function(){var t=b.apply(this,arguments),r=this.__zoom,i=null==n?B(t):"function"==typeof n?n.apply(this,arguments):n,o=r.invert(i),a="function"==typeof e?e.apply(this,arguments):e;return x(P(C(r,a),i,o),t,A)},n)},O.translateBy=function(t,e,n){O.transform(t,function(){return x(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),b.apply(this,arguments),A)})},O.translateTo=function(t,e,n,r){O.transform(t,function(){var t=b.apply(this,arguments),i=this.__zoom,o=null==r?B(t):"function"==typeof r?r.apply(this,arguments):r;return x(c.translate(o[0],o[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,A)},r)},D.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){i.customEvent(new s(O,t,this.that.__zoom),z.apply,z,[t,this.that,this.args])}},O.wheelDelta=function(t){return arguments.length?(w="function"==typeof t?t:a(+t),O):w},O.filter=function(t){return arguments.length?(y="function"==typeof t?t:a(!!t),O):y},O.touchable=function(t){return arguments.length?(j="function"==typeof t?t:a(!!t),O):j},O.extent=function(t){return arguments.length?(b="function"==typeof t?t:a([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),O):b},O.scaleExtent=function(t){return arguments.length?(M[0]=+t[0],M[1]=+t[1],O):[M[0],M[1]]},O.translateExtent=function(t){return arguments.length?(A[0][0]=+t[0][0],A[1][0]=+t[1][0],A[0][1]=+t[0][1],A[1][1]=+t[1][1],O):[[A[0][0],A[0][1]],[A[1][0],A[1][1]]]},O.constrain=function(t){return arguments.length?(x=t,O):x},O.duration=function(t){return arguments.length?(k=+t,O):k},O.interpolate=function(t){return arguments.length?(E=t,O):E},O.on=function(){var t=z.on.apply(z,arguments);return t===z?O:t},O.clickDistance=function(t){return arguments.length?(N=(t=+t)*t,O):Math.sqrt(N)},O},t.zoomIdentity=c,t.zoomTransform=f,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==e?i(n,t("d3-dispatch"),t("d3-drag"),t("d3-interpolate"),t("d3-selection"),t("d3-transition")):i((r=r||self).d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3)},{"d3-dispatch":9,"d3-drag":10,"d3-interpolate":18,"d3-selection":25,"d3-transition":30}],33:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("d3-array"),i=t("d3-axis"),o=t("d3-brush"),a=t("d3-chord"),s=t("d3-collection"),u=t("d3-color"),c=t("d3-contour"),f=t("d3-dispatch"),l=t("d3-drag"),h=t("d3-dsv"),d=t("d3-ease"),p=t("d3-fetch"),m=t("d3-force"),v=t("d3-format"),g=t("d3-geo"),_=t("d3-hierarchy"),y=t("d3-interpolate"),b=t("d3-path"),x=t("d3-polygon"),w=t("d3-quadtree"),j=t("d3-random"),M=t("d3-scale"),A=t("d3-scale-chromatic"),k=t("d3-selection"),E=t("d3-shape"),z=t("d3-time"),T=t("d3-time-format"),S=t("d3-timer"),N=t("d3-transition"),O=t("d3-voronoi"),C=t("d3-zoom");Object.keys(r).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return r[t]}})}),Object.keys(i).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return i[t]}})}),Object.keys(o).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return o[t]}})}),Object.keys(a).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return a[t]}})}),Object.keys(s).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return s[t]}})}),Object.keys(u).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return u[t]}})}),Object.keys(c).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return c[t]}})}),Object.keys(f).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return f[t]}})}),Object.keys(l).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return l[t]}})}),Object.keys(h).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return h[t]}})}),Object.keys(d).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return d[t]}})}),Object.keys(p).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return p[t]}})}),Object.keys(m).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return m[t]}})}),Object.keys(v).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return v[t]}})}),Object.keys(g).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return g[t]}})}),Object.keys(_).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return _[t]}})}),Object.keys(y).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return y[t]}})}),Object.keys(b).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return b[t]}})}),Object.keys(x).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return x[t]}})}),Object.keys(w).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return w[t]}})}),Object.keys(j).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return j[t]}})}),Object.keys(M).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return M[t]}})}),Object.keys(A).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return A[t]}})}),Object.keys(k).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return k[t]}})}),Object.keys(E).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return E[t]}})}),Object.keys(z).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return z[t]}})}),Object.keys(T).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return T[t]}})}),Object.keys(S).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return S[t]}})}),Object.keys(N).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return N[t]}})}),Object.keys(O).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return O[t]}})}),Object.keys(C).forEach(function(t){"default"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return C[t]}})}),n.version="5.15.0"},{"d3-array":2,"d3-axis":3,"d3-brush":4,"d3-chord":5,"d3-collection":6,"d3-color":7,"d3-contour":8,"d3-dispatch":9,"d3-drag":10,"d3-dsv":11,"d3-ease":12,"d3-fetch":13,"d3-force":14,"d3-format":15,"d3-geo":16,"d3-hierarchy":17,"d3-interpolate":18,"d3-path":19,"d3-polygon":20,"d3-quadtree":21,"d3-random":22,"d3-scale":24,"d3-scale-chromatic":23,"d3-selection":25,"d3-shape":26,"d3-time":28,"d3-time-format":27,"d3-timer":29,"d3-transition":30,"d3-voronoi":31,"d3-zoom":32}],34:[function(t,e,n){"use strict";n.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},n.toByteArray=function(t){var e,n,r=c(t),a=r[0],s=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),f=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[f++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},n.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(f(t,a,a+16383>s?s:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],35:[function(t,e,n){(function(e){"use strict";var r=t("base64-js"),i=t("ieee754");n.Buffer=e,n.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},n.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=new Uint8Array(t);return n.__proto__=e.prototype,n}function e(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return s(t,e,n)}function s(t,n,r){if("string"==typeof t)return function(t,n){"string"==typeof n&&""!==n||(n="utf8");if(!e.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var r=0|h(t,n),i=a(r),o=i.write(t,n);o!==r&&(i=i.slice(0,o));return i}(t,n);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return function(t,n,r){if(n<0||t.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<n+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;i=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);return i.__proto__=e.prototype,i}(t,n,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return e.from(i,n,r);var o=function(t){if(e.isBuffer(t)){var n=0|l(t.length),r=a(n);return 0===r.length?r:(t.copy(r,0,0,n),r)}if(void 0!==t.length)return"number"!=typeof t.length||L(t.length)?a(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),n,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return u(t),a(t<0?0:0|l(t))}function f(t){for(var e=t.length<0?0:0|l(t.length),n=a(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function l(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function h(t,n){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var o=!1;;)switch(n){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return R(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return I(t).length;default:if(o)return i?-1:R(t).length;n=(""+n).toLowerCase(),o=!0}}function d(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function p(t,n,r,i,o){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),L(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof n&&(n=e.from(n,i)),e.isBuffer(n))return 0===n.length?-1:m(t,n,r,i,o);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,n,r):Uint8Array.prototype.lastIndexOf.call(t,n,r):m(t,[n],r,i,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function v(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(L(s))return a;t[n+a]=s}return a}function g(t,e,n,r){return D(R(e,t.length-n),t,n,r)}function _(t,e,n,r){return D(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function y(t,e,n,r){return _(t,e,n,r)}function b(t,e,n,r){return D(I(e),t,n,r)}function x(t,e,n,r){return D(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function w(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function j(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=M));return n}(r)}n.kMaxLength=o,e.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}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(t,e,n){return s(t,e,n)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,e.alloc=function(t,e,n){return function(t,e,n){return u(t),t<=0?a(t):void 0!==e?"string"==typeof n?a(t).fill(e,n):a(t).fill(e):a(t)}(t,e,n)},e.allocUnsafe=function(t){return c(t)},e.allocUnsafeSlow=function(t){return c(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,n){if(F(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),F(n,Uint8Array)&&(n=e.from(n,n.offset,n.byteLength)),!e.isBuffer(t)||!e.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;for(var r=t.length,i=n.length,o=0,a=Math.min(r,i);o<a;++o)if(t[o]!==n[o]){r=t[o],i=n[o];break}return r<i?-1:i<r?1:0},e.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);var r;if(void 0===n)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var i=e.allocUnsafe(n),o=0;for(r=0;r<t.length;++r){var a=t[r];if(F(a,Uint8Array)&&(a=e.from(a)),!e.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},e.byteLength=h,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},e.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?j(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return E(this,e,n);case"utf8":case"utf-8":return j(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return w(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},e.prototype.compare=function(t,n,r,i,o){if(F(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(this===t)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(r>>>=0)-(n>>>=0),u=Math.min(a,s),c=this.slice(i,o),f=t.slice(n,r),l=0;l<u;++l)if(c[l]!==f[l]){a=c[l],s=f[l];break}return a<s?-1:s<a?1:0},e.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},e.prototype.indexOf=function(t,e,n){return p(this,t,e,n,!0)},e.prototype.lastIndexOf=function(t,e,n){return p(this,t,e,n,!1)},e.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return g(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return y(this,t,e,n);case"base64":return b(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function E(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=B(t[o]);return i}function z(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function T(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function S(t,n,r,i,o,a){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||n<a)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function N(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(t,e,n,r,o){return e=+e,n>>>=0,o||N(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function C(t,e,n,r,o){return e=+e,n>>>=0,o||N(t,0,n,8),i.write(t,e,n,r,52,8),n+8}e.prototype.slice=function(t,n){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<t&&(n=t);var i=this.subarray(t,n);return i.__proto__=e.prototype,i},e.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},e.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},e.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},e.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},e.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||S(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},e.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||S(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},e.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||S(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||S(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||S(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||S(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},e.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||S(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},e.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},e.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},e.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||S(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||S(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||S(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||S(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},e.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||S(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},e.prototype.writeFloatLE=function(t,e,n){return O(this,t,e,!0,n)},e.prototype.writeFloatBE=function(t,e,n){return O(this,t,e,!1,n)},e.prototype.writeDoubleLE=function(t,e,n){return C(this,t,e,!0,n)},e.prototype.writeDoubleBE=function(t,e,n){return C(this,t,e,!1,n)},e.prototype.copy=function(t,n,r,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-n<i-r&&(i=t.length-n+r);var o=i-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(n,r,i);else if(this===t&&r<n&&n<i)for(var a=o-1;a>=0;--a)t[a+n]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),n);return o},e.prototype.fill=function(t,n,r,i){if("string"==typeof t){if("string"==typeof n?(i=n,n=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var o=t.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(t=o)}}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;var a;if(n>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=n;a<r;++a)this[a]=t;else{var s=e.isBuffer(t)?t:e.from(t,i),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<r-n;++a)this[a+n]=s[a%u]}return this};var P=/[^+\/0-9A-Za-z-_]/g;function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function R(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function I(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function F(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function L(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":34,buffer:35,ieee754:36}],36:[function(t,e,n){n.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?i-1:0,h=n?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*m}},{}]},{},[1])(1)});