From 6d74b22e81a31e6f37c40005af9060c992af856c Mon Sep 17 00:00:00 2001
From: Ulrich <ulrich.kerzel@rwth-aachen.de>
Date: Tue, 4 Jun 2024 12:28:54 +0200
Subject: [PATCH] add InlineProvider to EBM

---
 ...plainableAI_Classification_Adult_EBM.ipynb | 90 +++++++++++++++++--
 1 file changed, 83 insertions(+), 7 deletions(-)

diff --git a/datascienceintro/ExplainableAI_Classification_Adult_EBM.ipynb b/datascienceintro/ExplainableAI_Classification_Adult_EBM.ipynb
index 0796538..2272534 100644
--- a/datascienceintro/ExplainableAI_Classification_Adult_EBM.ipynb
+++ b/datascienceintro/ExplainableAI_Classification_Adult_EBM.ipynb
@@ -320,14 +320,53 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 6,
+      "execution_count": 7,
       "metadata": {},
       "outputs": [
         {
           "data": {
             "text/html": [
-              "<!-- http://127.0.0.1:7001/140319794450432/ -->\n",
-              "<iframe src=\"http://127.0.0.1:7001/140319794450432/\" width=100% height=800 frameBorder=\"0\"></iframe>"
+              "\n",
+              "        <script type=\"text/javascript\">\n",
+              "        console.log(\"Initializing interpret-inline (last modified: Tue Jun  4 12:25:41 2024)\");\n",
+              "        /*! For license information please see interpret-inline.js.LICENSE.txt */\n",
+              "!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(\"interpret-inline\",[],e):\"object\"==typeof exports?exports[\"interpret-inline\"]=e():t[\"interpret-inline\"]=e()}(self,(()=>(()=>{var t,e,r={8201:(t,e,r)=>{\"use strict\";r.r(e),r.d(e,{App:()=>wn,RenderApp:()=>Mn});var n=r(7294),i=r.t(n,2),a=r(3935),o=r(8660);function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e){if(t){if(\"string\"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var n,i,a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,e)||f(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function p(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var d=[\"defaultInputValue\",\"defaultMenuIsOpen\",\"defaultValue\",\"inputValue\",\"menuIsOpen\",\"onChange\",\"onInputChange\",\"onMenuClose\",\"onMenuOpen\",\"value\"];function g(){return g=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},g.apply(this,arguments)}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function x(t){return x=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},x(t)}function b(t,e){if(e&&(\"object\"===x(e)||\"function\"==typeof e))return e;if(void 0!==e)throw new TypeError(\"Derived constructors may only return object or undefined\");return function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t)}function _(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||f(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}var w=function(){function t(t){var e=this;this._insertTag=function(t){var r;r=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,r),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement(\"style\");return e.setAttribute(\"data-emotion\",t.key),void 0!==t.nonce&&e.setAttribute(\"nonce\",t.nonce),e.appendChild(document.createTextNode(\"\")),e.setAttribute(\"data-s\",\"\"),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{r.insertRule(t,r.cssRules.length)}catch(t){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),k=Math.abs,T=String.fromCharCode,M=Object.assign;function A(t){return t.trim()}function S(t,e,r){return t.replace(e,r)}function E(t,e){return t.indexOf(e)}function C(t,e){return 0|t.charCodeAt(e)}function L(t,e,r){return t.slice(e,r)}function P(t){return t.length}function O(t){return t.length}function I(t,e){return e.push(t),t}var D=1,z=1,R=0,F=0,N=0,B=\"\";function j(t,e,r,n,i,a,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:D,column:z,length:o,return:\"\"}}function U(t,e){return M(j(\"\",null,null,\"\",null,null,0),t,{length:-t.length},e)}function V(){return N=F>0?C(B,--F):0,z--,10===N&&(z=1,D--),N}function H(){return N=F<R?C(B,F++):0,z++,10===N&&(z=1,D++),N}function q(){return C(B,F)}function G(){return F}function Y(t,e){return L(B,t,e)}function W(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function X(t){return D=z=1,R=P(B=t),F=0,[]}function Z(t){return B=\"\",t}function K(t){return A(Y(F-1,Q(91===t?t+2:40===t?t+1:t)))}function J(t){for(;(N=q())&&N<33;)H();return W(t)>2||W(N)>3?\"\":\" \"}function $(t,e){for(;--e&&H()&&!(N<48||N>102||N>57&&N<65||N>70&&N<97););return Y(t,G()+(e<6&&32==q()&&32==H()))}function Q(t){for(;H();)switch(N){case t:return F;case 34:case 39:34!==t&&39!==t&&Q(N);break;case 40:41===t&&Q(t);break;case 92:H()}return F}function tt(t,e){for(;H()&&t+N!==57&&(t+N!==84||47!==q()););return\"/*\"+Y(e,F-1)+\"*\"+T(47===t?t:H())}function et(t){for(;!W(q());)H();return Y(t,F)}var rt=\"-ms-\",nt=\"-webkit-\",it=\"comm\",at=\"rule\",ot=\"decl\",st=\"@keyframes\";function lt(t,e){for(var r=\"\",n=O(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||\"\";return r}function ut(t,e,r,n){switch(t.type){case\"@import\":case ot:return t.return=t.return||t.value;case it:return\"\";case st:return t.return=t.value+\"{\"+lt(t.children,n)+\"}\";case at:t.value=t.props.join(\",\")}return P(r=lt(t.children,n))?t.return=t.value+\"{\"+r+\"}\":\"\"}function ct(t){return Z(ft(\"\",null,null,null,[\"\"],t=X(t),0,[0],t))}function ft(t,e,r,n,i,a,o,s,l){for(var u=0,c=0,f=o,h=0,p=0,d=0,g=1,v=1,m=1,y=0,x=\"\",b=i,_=a,w=n,k=x;v;)switch(d=y,y=H()){case 40:if(108!=d&&58==C(k,f-1)){-1!=E(k+=S(K(y),\"&\",\"&\\f\"),\"&\\f\")&&(m=-1);break}case 34:case 39:case 91:k+=K(y);break;case 9:case 10:case 13:case 32:k+=J(d);break;case 92:k+=$(G()-1,7);continue;case 47:switch(q()){case 42:case 47:I(pt(tt(H(),G()),e,r),l);break;default:k+=\"/\"}break;case 123*g:s[u++]=P(k)*m;case 125*g:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:p>0&&P(k)-f&&I(p>32?dt(k+\";\",n,r,f-1):dt(S(k,\" \",\"\")+\";\",n,r,f-2),l);break;case 59:k+=\";\";default:if(I(w=ht(k,e,r,u,c,i,s,x,b=[],_=[],f),a),123===y)if(0===c)ft(k,e,w,w,b,a,f,s,_);else switch(99===h&&110===C(k,3)?100:h){case 100:case 109:case 115:ft(t,w,w,n&&I(ht(t,w,w,0,0,i,s,x,i,b=[],f),_),i,_,f,s,n?b:_);break;default:ft(k,w,w,w,[\"\"],_,0,s,_)}}u=c=p=0,g=m=1,x=k=\"\",f=o;break;case 58:f=1+P(k),p=d;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==V())continue;switch(k+=T(y),y*g){case 38:m=c>0?1:(k+=\"\\f\",-1);break;case 44:s[u++]=(P(k)-1)*m,m=1;break;case 64:45===q()&&(k+=K(H())),h=q(),c=f=P(x=k+=et(G())),y++;break;case 45:45===d&&2==P(k)&&(g=0)}}return a}function ht(t,e,r,n,i,a,o,s,l,u,c){for(var f=i-1,h=0===i?a:[\"\"],p=O(h),d=0,g=0,v=0;d<n;++d)for(var m=0,y=L(t,f+1,f=k(g=o[d])),x=t;m<p;++m)(x=A(g>0?h[m]+\" \"+y:S(y,/&\\f/g,h[m])))&&(l[v++]=x);return j(t,e,r,0===i?at:s,l,u,c)}function pt(t,e,r){return j(t,e,r,it,T(N),L(t,2,-2),0)}function dt(t,e,r,n){return j(t,e,r,ot,L(t,0,n),L(t,n+1,-1),n)}var gt=function(t,e,r){for(var n=0,i=0;n=i,i=q(),38===n&&12===i&&(e[r]=1),!W(i);)H();return Y(t,F)},vt=new WeakMap,mt=function(t){if(\"rule\"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,r=t.parent,n=t.column===r.column&&t.line===r.line;\"rule\"!==r.type;)if(!(r=r.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||vt.get(r))&&!n){vt.set(t,!0);for(var i=[],a=function(t,e){return Z(function(t,e){var r=-1,n=44;do{switch(W(n)){case 0:38===n&&12===q()&&(e[r]=1),t[r]+=gt(F-1,e,r);break;case 2:t[r]+=K(n);break;case 4:if(44===n){t[++r]=58===q()?\"&\\f\":\"\",e[r]=t[r].length;break}default:t[r]+=T(n)}}while(n=H());return t}(X(t),e))}(e,i),o=r.props,s=0,l=0;s<a.length;s++)for(var u=0;u<o.length;u++,l++)t.props[l]=i[s]?a[s].replace(/&\\f/g,o[u]):o[u]+\" \"+a[s]}}},yt=function(t){if(\"decl\"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return=\"\",t.value=\"\")}};function xt(t,e){switch(function(t,e){return 45^C(t,0)?(((e<<2^C(t,0))<<2^C(t,1))<<2^C(t,2))<<2^C(t,3):0}(t,e)){case 5103:return\"-webkit-print-\"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return nt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return nt+t+\"-moz-\"+t+rt+t+t;case 6828:case 4268:return nt+t+rt+t+t;case 6165:return nt+t+rt+\"flex-\"+t+t;case 5187:return nt+t+S(t,/(\\w+).+(:[^]+)/,\"-webkit-box-$1$2-ms-flex-$1$2\")+t;case 5443:return nt+t+rt+\"flex-item-\"+S(t,/flex-|-self/,\"\")+t;case 4675:return nt+t+rt+\"flex-line-pack\"+S(t,/align-content|flex-|-self/,\"\")+t;case 5548:return nt+t+rt+S(t,\"shrink\",\"negative\")+t;case 5292:return nt+t+rt+S(t,\"basis\",\"preferred-size\")+t;case 6060:return\"-webkit-box-\"+S(t,\"-grow\",\"\")+nt+t+rt+S(t,\"grow\",\"positive\")+t;case 4554:return nt+S(t,/([^-])(transform)/g,\"$1-webkit-$2\")+t;case 6187:return S(S(S(t,/(zoom-|grab)/,\"-webkit-$1\"),/(image-set)/,\"-webkit-$1\"),t,\"\")+t;case 5495:case 3959:return S(t,/(image-set\\([^]*)/,\"-webkit-$1$`$1\");case 4968:return S(S(t,/(.+:)(flex-)?(.*)/,\"-webkit-box-pack:$3-ms-flex-pack:$3\"),/s.+-b[^;]+/,\"justify\")+nt+t+t;case 4095:case 3583:case 4068:case 2532:return S(t,/(.+)-inline(.+)/,\"-webkit-$1$2\")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(P(t)-1-e>6)switch(C(t,e+1)){case 109:if(45!==C(t,e+4))break;case 102:return S(t,/(.+:)(.+)-([^]+)/,\"$1-webkit-$2-$3$1-moz-\"+(108==C(t,e+3)?\"$3\":\"$2-$3\"))+t;case 115:return~E(t,\"stretch\")?xt(S(t,\"stretch\",\"fill-available\"),e)+t:t}break;case 4949:if(115!==C(t,e+1))break;case 6444:switch(C(t,P(t)-3-(~E(t,\"!important\")&&10))){case 107:return S(t,\":\",\":-webkit-\")+t;case 101:return S(t,/(.+:)([^;!]+)(;|!.+)?/,\"$1-webkit-\"+(45===C(t,14)?\"inline-\":\"\")+\"box$3$1-webkit-$2$3$1-ms-$2box$3\")+t}break;case 5936:switch(C(t,e+11)){case 114:return nt+t+rt+S(t,/[svh]\\w+-[tblr]{2}/,\"tb\")+t;case 108:return nt+t+rt+S(t,/[svh]\\w+-[tblr]{2}/,\"tb-rl\")+t;case 45:return nt+t+rt+S(t,/[svh]\\w+-[tblr]{2}/,\"lr\")+t}return nt+t+rt+t+t}return t}var bt=[function(t,e,r,n){if(t.length>-1&&!t.return)switch(t.type){case ot:t.return=xt(t.value,t.length);break;case st:return lt([U(t,{value:S(t.value,\"@\",\"@-webkit-\")})],n);case at:if(t.length)return function(t,e){return t.map(e).join(\"\")}(t.props,(function(e){switch(function(t,e){return(t=/(::plac\\w+|:read-\\w+)/.exec(t))?t[0]:t}(e)){case\":read-only\":case\":read-write\":return lt([U(t,{props:[S(e,/:(read-\\w+)/,\":-moz-$1\")]})],n);case\"::placeholder\":return lt([U(t,{props:[S(e,/:(plac\\w+)/,\":-webkit-input-$1\")]}),U(t,{props:[S(e,/:(plac\\w+)/,\":-moz-$1\")]}),U(t,{props:[S(e,/:(plac\\w+)/,\"-ms-input-$1\")]})],n)}return\"\"}))}}];const _t=function(t){var e=t.key;if(\"css\"===e){var r=document.querySelectorAll(\"style[data-emotion]:not([data-s])\");Array.prototype.forEach.call(r,(function(t){-1!==t.getAttribute(\"data-emotion\").indexOf(\" \")&&(document.head.appendChild(t),t.setAttribute(\"data-s\",\"\"))}))}var n,i,a=t.stylisPlugins||bt,o={},s=[];n=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^=\"'+e+' \"]'),(function(t){for(var e=t.getAttribute(\"data-emotion\").split(\" \"),r=1;r<e.length;r++)o[e[r]]=!0;s.push(t)}));var l,u,c,f,h=[ut,(f=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&f(t)})],p=(u=[mt,yt].concat(a,h),c=O(u),function(t,e,r,n){for(var i=\"\",a=0;a<c;a++)i+=u[a](t,e,r,n)||\"\";return i});i=function(t,e,r,n){l=r,function(t){lt(ct(t),p)}(t?t+\"{\"+e.styles+\"}\":e.styles),n&&(d.inserted[e.name]=!0)};var d={key:e,sheet:new w({key:e,container:n,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:i};return d.sheet.hydrate(s),d};function wt(t,e,r){var n=\"\";return r.split(\" \").forEach((function(r){void 0!==t[r]?e.push(t[r]+\";\"):n+=r+\" \"})),n}var kt=function(t,e,r){var n=t.key+\"-\"+e.name;!1===r&&void 0===t.registered[n]&&(t.registered[n]=e.styles)},Tt=function(t,e,r){kt(t,e,r);var n=t.key+\"-\"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?\".\"+n:\"\",i,t.sheet,!0),i=i.next}while(void 0!==i)}};const Mt=function(t){for(var e,r=0,n=0,i=t.length;i>=4;++n,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(n)|(255&t.charCodeAt(++n))<<8|(255&t.charCodeAt(++n))<<16|(255&t.charCodeAt(++n))<<24))+(59797*(e>>>16)<<16),r=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&t.charCodeAt(n+2))<<16;case 2:r^=(255&t.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},At={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var St=/[A-Z]|^ms/g,Et=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ct=function(t){return 45===t.charCodeAt(1)},Lt=function(t){return null!=t&&\"boolean\"!=typeof t},Pt=function(t){var e=Object.create(null);return function(t){return void 0===e[t]&&(e[t]=Ct(r=t)?r:r.replace(St,\"-$&\").toLowerCase()),e[t];var r}}(),Ot=function(t,e){switch(t){case\"animation\":case\"animationName\":if(\"string\"==typeof e)return e.replace(Et,(function(t,e,r){return Dt={name:e,styles:r,next:Dt},e}))}return 1===At[t]||Ct(t)||\"number\"!=typeof e||0===e?e:e+\"px\"};function It(t,e,r){if(null==r)return\"\";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case\"boolean\":return\"\";case\"object\":if(1===r.anim)return Dt={name:r.name,styles:r.styles,next:Dt},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)Dt={name:n.name,styles:n.styles,next:Dt},n=n.next;return r.styles+\";\"}return function(t,e,r){var n=\"\";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=It(t,e,r[i])+\";\";else for(var a in r){var o=r[a];if(\"object\"!=typeof o)null!=e&&void 0!==e[o]?n+=a+\"{\"+e[o]+\"}\":Lt(o)&&(n+=Pt(a)+\":\"+Ot(a,o)+\";\");else if(!Array.isArray(o)||\"string\"!=typeof o[0]||null!=e&&void 0!==e[o[0]]){var s=It(t,e,o);switch(a){case\"animation\":case\"animationName\":n+=Pt(a)+\":\"+s+\";\";break;default:n+=a+\"{\"+s+\"}\"}}else for(var l=0;l<o.length;l++)Lt(o[l])&&(n+=Pt(a)+\":\"+Ot(a,o[l])+\";\")}return n}(t,e,r);case\"function\":if(void 0!==t){var i=Dt,a=r(t);return Dt=i,It(t,e,a)}}if(null==e)return r;var o=e[r];return void 0!==o?o:r}var Dt,zt=/label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g,Rt=function(t,e,r){if(1===t.length&&\"object\"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var n=!0,i=\"\";Dt=void 0;var a=t[0];null==a||void 0===a.raw?(n=!1,i+=It(r,e,a)):i+=a[0];for(var o=1;o<t.length;o++)i+=It(r,e,t[o]),n&&(i+=a[o]);zt.lastIndex=0;for(var s,l=\"\";null!==(s=zt.exec(i));)l+=\"-\"+s[1];return{name:Mt(i)+l,styles:i,next:Dt}},Ft=!!i.useInsertionEffect&&i.useInsertionEffect,Nt=Ft||function(t){return t()},Bt=(Ft||n.useLayoutEffect,{}.hasOwnProperty),jt=(0,n.createContext)(\"undefined\"!=typeof HTMLElement?_t({key:\"css\"}):null);jt.Provider;var Ut=function(t){return(0,n.forwardRef)((function(e,r){var i=(0,n.useContext)(jt);return t(e,i,r)}))},Vt=(0,n.createContext)({}),Ht=\"__EMOTION_TYPE_PLEASE_DO_NOT_USE__\",qt=function(t,e){var r={};for(var n in e)Bt.call(e,n)&&(r[n]=e[n]);return r[Ht]=t,r},Gt=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return kt(e,r,n),Nt((function(){return Tt(e,r,n)})),null},Yt=Ut((function(t,e,r){var i=t.css;\"string\"==typeof i&&void 0!==e.registered[i]&&(i=e.registered[i]);var a=t[Ht],o=[i],s=\"\";\"string\"==typeof t.className?s=wt(e.registered,o,t.className):null!=t.className&&(s=t.className+\" \");var l=Rt(o,void 0,(0,n.useContext)(Vt));s+=e.key+\"-\"+l.name;var u={};for(var c in t)Bt.call(t,c)&&\"css\"!==c&&c!==Ht&&(u[c]=t[c]);return u.ref=r,u.className=s,(0,n.createElement)(n.Fragment,null,(0,n.createElement)(Gt,{cache:e,serialized:l,isStringTag:\"string\"==typeof a}),(0,n.createElement)(a,u))}));r(8679);var Wt=function(t,e){var r=arguments;if(null==e||!Bt.call(e,\"css\"))return n.createElement.apply(void 0,r);var i=r.length,a=new Array(i);a[0]=Yt,a[1]=qt(t,e);for(var o=2;o<i;o++)a[o]=r[o];return n.createElement.apply(null,a)};function Xt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Rt(e)}var Zt=function t(e){for(var r=e.length,n=0,i=\"\";n<r;n++){var a=e[n];if(null!=a){var o=void 0;switch(typeof a){case\"boolean\":break;case\"object\":if(Array.isArray(a))o=t(a);else for(var s in o=\"\",a)a[s]&&s&&(o&&(o+=\" \"),o+=s);break;default:o=a}o&&(i&&(i+=\" \"),i+=o)}}return i};function Kt(t,e,r){var n=[],i=wt(t,n,r);return n.length<2?r:i+e(n)}var Jt=function(t){var e=t.cache,r=t.serializedArr;return Nt((function(){for(var t=0;t<r.length;t++)Tt(e,r[t],!1)})),null},$t=Ut((function(t,e){var r=[],i=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var a=Rt(n,e.registered);return r.push(a),kt(e,a,!1),e.key+\"-\"+a.name},a={css:i,cx:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kt(e.registered,i,Zt(r))},theme:(0,n.useContext)(Vt)},o=t.children(a);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(Jt,{cache:e,serializedArr:r}),o)}));Math.min,Math.max;function Qt(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function te(t){if(null==t)return window;if(!Qt(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function ee(t){return Qt(t)?\"\":t?(t.nodeName||\"\").toLowerCase():\"\"}function re(t){return t instanceof te(t).HTMLElement}function ne(t){return t instanceof te(t).Element}function ie(t){return\"undefined\"!=typeof ShadowRoot&&(t instanceof te(t).ShadowRoot||t instanceof ShadowRoot)}function ae(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=function(t){return te(t).getComputedStyle(t)}(t);return/auto|scroll|overlay|hidden/.test(e+n+r)&&![\"inline\",\"contents\"].includes(i)}function oe(){return!/^((?!chrome|android).)*safari/i.test(function(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+\"/\"+t.version)).join(\" \"):navigator.userAgent}())}[\"top\",\"right\",\"bottom\",\"left\"].reduce(((t,e)=>t.concat(e,e+\"-start\",e+\"-end\")),[]),Math.min,Math.max;const se=Math.round;function le(t,e,r){var n,i,a,o;void 0===e&&(e=!1),void 0===r&&(r=!1);const s=t.getBoundingClientRect();let l=1,u=1;e&&re(t)&&(l=t.offsetWidth>0&&se(s.width)/t.offsetWidth||1,u=t.offsetHeight>0&&se(s.height)/t.offsetHeight||1);const c=ne(t)?te(t):window,f=!oe()&&r,h=(s.left+(f&&null!=(n=null==(i=c.visualViewport)?void 0:i.offsetLeft)?n:0))/l,p=(s.top+(f&&null!=(a=null==(o=c.visualViewport)?void 0:o.offsetTop)?a:0))/u,d=s.width/l,g=s.height/u;return{width:d,height:g,top:p,right:h+d,bottom:p+g,left:h,x:h,y:p}}function ue(t){if(\"html\"===ee(t))return t;const e=t.assignedSlot||t.parentNode||(ie(t)?t.host:null)||function(t){return(e=t,(e instanceof te(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}(t);return ie(e)?e.host:e}function ce(t){const e=ue(t);return function(t){return[\"html\",\"body\",\"#document\"].includes(ee(t))}(e)?t.ownerDocument.body:re(e)&&ae(e)?e:ce(e)}function fe(t,e){var r;void 0===e&&(e=[]);const n=ce(t),i=n===(null==(r=t.ownerDocument)?void 0:r.body),a=te(n),o=i?[a].concat(a.visualViewport||[],ae(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(fe(o))}const he=n.useLayoutEffect;var pe=[\"className\",\"clearValue\",\"cx\",\"getStyles\",\"getValue\",\"hasValue\",\"isMulti\",\"isRtl\",\"options\",\"selectOption\",\"selectProps\",\"setValue\",\"theme\"],de=function(){};function ge(t,e){return e?\"-\"===e[0]?t+e:t+\"__\"+e:t}function ve(t,e,r){var n=[r];if(e&&t)for(var i in e)e.hasOwnProperty(i)&&e[i]&&n.push(\"\".concat(ge(t,i)));return n.filter((function(t){return t})).map((function(t){return String(t).trim()})).join(\" \")}var me=function(t){return e=t,Array.isArray(e)?t.filter(Boolean):\"object\"===x(t)&&null!==t?[t]:[];var e},ye=function(t){return t.className,t.clearValue,t.cx,t.getStyles,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme,u({},p(t,pe))};function xe(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function be(t){return xe(t)?window.pageYOffset:t.scrollTop}function _e(t,e){xe(t)?window.scrollTo(0,e):t.scrollTop=e}function we(t,e,r,n){return r*((t=t/n-1)*t*t+1)+e}function ke(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:de,i=be(t),a=e-i,o=10,s=0;function l(){var e=we(s+=o,i,a,r);_e(t,e),s<r?window.requestAnimationFrame(l):n(t)}l()}function Te(t,e){var r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i=e.offsetHeight/3;n.bottom+i>r.bottom?_e(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):n.top-i<r.top&&_e(t,Math.max(e.offsetTop-i,0))}function Me(){try{return document.createEvent(\"TouchEvent\"),!0}catch(t){return!1}}var Ae=!1,Se={get passive(){return Ae=!0}},Ee=\"undefined\"!=typeof window?window:{};Ee.addEventListener&&Ee.removeEventListener&&(Ee.addEventListener(\"p\",de,Se),Ee.removeEventListener(\"p\",de,!1));var Ce=Ae;function Le(t){return null!=t}function Pe(t,e,r){return t?e:r}var Oe=function(t){return\"auto\"===t?\"bottom\":t},Ie=(0,n.createContext)(null),De=function(t){var e=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,a=t.menuPlacement,o=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,c=((0,n.useContext)(Ie)||{}).setPortalPlacement,f=(0,n.useRef)(null),p=h((0,n.useState)(i),2),d=p[0],g=p[1],v=h((0,n.useState)(null),2),m=v[0],y=v[1],x=l.spacing.controlHeight;return he((function(){var t=f.current;if(t){var e=\"fixed\"===o,n=function(t){var e=t.maxHeight,r=t.menuEl,n=t.minHeight,i=t.placement,a=t.shouldScroll,o=t.isFixedPosition,s=t.controlHeight,l=function(t){var e=getComputedStyle(t),r=\"absolute\"===e.position,n=/(auto|scroll)/;if(\"fixed\"===e.position)return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),(!r||\"static\"!==e.position)&&n.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}(r),u={placement:\"bottom\",maxHeight:e};if(!r||!r.offsetParent)return u;var c,f=l.getBoundingClientRect().height,h=r.getBoundingClientRect(),p=h.bottom,d=h.height,g=h.top,v=r.offsetParent.getBoundingClientRect().top,m=o||xe(c=l)?window.innerHeight:c.clientHeight,y=be(l),x=parseInt(getComputedStyle(r).marginBottom,10),b=parseInt(getComputedStyle(r).marginTop,10),_=v-b,w=m-g,k=_+y,T=f-y-g,M=p-m+y+x,A=y+g-b,S=160;switch(i){case\"auto\":case\"bottom\":if(w>=d)return{placement:\"bottom\",maxHeight:e};if(T>=d&&!o)return a&&ke(l,M,S),{placement:\"bottom\",maxHeight:e};if(!o&&T>=n||o&&w>=n)return a&&ke(l,M,S),{placement:\"bottom\",maxHeight:o?w-x:T-x};if(\"auto\"===i||o){var E=e,C=o?_:k;return C>=n&&(E=Math.min(C-x-s,e)),{placement:\"top\",maxHeight:E}}if(\"bottom\"===i)return a&&_e(l,M),{placement:\"bottom\",maxHeight:e};break;case\"top\":if(_>=d)return{placement:\"top\",maxHeight:e};if(k>=d&&!o)return a&&ke(l,A,S),{placement:\"top\",maxHeight:e};if(!o&&k>=n||o&&_>=n){var L=e;return(!o&&k>=n||o&&_>=n)&&(L=o?_-b:k-b),a&&ke(l,A,S),{placement:\"top\",maxHeight:L}}return{placement:\"bottom\",maxHeight:e};default:throw new Error('Invalid placement provided \"'.concat(i,'\".'))}return u}({maxHeight:i,menuEl:t,minHeight:r,placement:a,shouldScroll:s&&!e,isFixedPosition:e,controlHeight:x});g(n.maxHeight),y(n.placement),null==c||c(n.placement)}}),[i,a,o,s,r,c,x]),e({ref:f,placerProps:u(u({},t),{},{placement:m||Oe(a),maxHeight:d})})},ze=function(t){var e=t.theme,r=e.spacing.baseUnit;return{color:e.colors.neutral40,padding:\"\".concat(2*r,\"px \").concat(3*r,\"px\"),textAlign:\"center\"}},Re=ze,Fe=ze,Ne=function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerProps;return Wt(\"div\",g({css:i(\"noOptionsMessage\",t),className:n({\"menu-notice\":!0,\"menu-notice--no-options\":!0},r)},a),e)};Ne.defaultProps={children:\"No options\"};var Be=function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerProps;return Wt(\"div\",g({css:i(\"loadingMessage\",t),className:n({\"menu-notice\":!0,\"menu-notice--loading\":!0},r)},a),e)};Be.defaultProps={children:\"Loading...\"};var je,Ue,Ve,He=[\"size\"],qe={name:\"8mmkcg\",styles:\"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0\"},Ge=function(t){var e=t.size,r=p(t,He);return Wt(\"svg\",g({height:e,width:e,viewBox:\"0 0 20 20\",\"aria-hidden\":\"true\",focusable:\"false\",css:qe},r))},Ye=function(t){return Wt(Ge,g({size:20},t),Wt(\"path\",{d:\"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z\"}))},We=function(t){return Wt(Ge,g({size:20},t),Wt(\"path\",{d:\"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\"}))},Xe=function(t){var e=t.isFocused,r=t.theme,n=r.spacing.baseUnit,i=r.colors;return{label:\"indicatorContainer\",color:e?i.neutral60:i.neutral20,display:\"flex\",padding:2*n,transition:\"color 150ms\",\":hover\":{color:e?i.neutral80:i.neutral40}}},Ze=Xe,Ke=Xe,Je=function(){var t=Xt.apply(void 0,arguments),e=\"animation-\"+t.name;return{name:e,styles:\"@keyframes \"+e+\"{\"+t.styles+\"}\",anim:1,toString:function(){return\"_EMO_\"+this.name+\"_\"+this.styles+\"_EMO_\"}}}(je||(Ue=[\"\\n  0%, 80%, 100% { opacity: 0; }\\n  40% { opacity: 1; }\\n\"],Ve||(Ve=Ue.slice(0)),je=Object.freeze(Object.defineProperties(Ue,{raw:{value:Object.freeze(Ve)}})))),$e=function(t){var e=t.delay,r=t.offset;return Wt(\"span\",{css:Xt({animation:\"\".concat(Je,\" 1s ease-in-out \").concat(e,\"ms infinite;\"),backgroundColor:\"currentColor\",borderRadius:\"1em\",display:\"inline-block\",marginLeft:r?\"1em\":void 0,height:\"1em\",verticalAlign:\"top\",width:\"1em\"},\"\",\"\")})},Qe=function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerProps,a=t.isRtl;return Wt(\"div\",g({css:n(\"loadingIndicator\",t),className:r({indicator:!0,\"loading-indicator\":!0},e)},i),Wt($e,{delay:0,offset:a}),Wt($e,{delay:160,offset:!0}),Wt($e,{delay:320,offset:!a}))};Qe.defaultProps={size:4};var tr=[\"data\"],er=[\"innerRef\",\"isDisabled\",\"isHidden\",\"inputClassName\"],rr={gridArea:\"1 / 2\",font:\"inherit\",minWidth:\"2px\",border:0,margin:0,outline:0,padding:0},nr={flex:\"1 1 auto\",display:\"inline-grid\",gridArea:\"1 / 1 / 2 / 3\",gridTemplateColumns:\"0 min-content\",\"&:after\":u({content:'attr(data-value) \" \"',visibility:\"hidden\",whiteSpace:\"pre\"},rr)},ir=function(t){return u({label:\"input\",color:\"inherit\",background:0,opacity:t?0:1,width:\"100%\"},rr)},ar=function(t){var e=t.children,r=t.innerProps;return Wt(\"div\",r,e)},or={ClearIndicator:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerProps;return Wt(\"div\",g({css:i(\"clearIndicator\",t),className:n({indicator:!0,\"clear-indicator\":!0},r)},a),e||Wt(Ye,null))},Control:function(t){var e=t.children,r=t.cx,n=t.getStyles,i=t.className,a=t.isDisabled,o=t.isFocused,s=t.innerRef,l=t.innerProps,u=t.menuIsOpen;return Wt(\"div\",g({ref:s,css:n(\"control\",t),className:r({control:!0,\"control--is-disabled\":a,\"control--is-focused\":o,\"control--menu-is-open\":u},i)},l),e)},DropdownIndicator:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerProps;return Wt(\"div\",g({css:i(\"dropdownIndicator\",t),className:n({indicator:!0,\"dropdown-indicator\":!0},r)},a),e||Wt(We,null))},DownChevron:We,CrossIcon:Ye,Group:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.Heading,o=t.headingProps,s=t.innerProps,l=t.label,u=t.theme,c=t.selectProps;return Wt(\"div\",g({css:i(\"group\",t),className:n({group:!0},r)},s),Wt(a,g({},o,{selectProps:c,theme:u,getStyles:i,cx:n}),l),Wt(\"div\",null,e))},GroupHeading:function(t){var e=t.getStyles,r=t.cx,n=t.className,i=ye(t);i.data;var a=p(i,tr);return Wt(\"div\",g({css:e(\"groupHeading\",t),className:r({\"group-heading\":!0},n)},a))},IndicatorsContainer:function(t){var e=t.children,r=t.className,n=t.cx,i=t.innerProps,a=t.getStyles;return Wt(\"div\",g({css:a(\"indicatorsContainer\",t),className:n({indicators:!0},r)},i),e)},IndicatorSeparator:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.innerProps;return Wt(\"span\",g({},i,{css:n(\"indicatorSeparator\",t),className:r({\"indicator-separator\":!0},e)}))},Input:function(t){var e=t.className,r=t.cx,n=t.getStyles,i=t.value,a=ye(t),o=a.innerRef,s=a.isDisabled,l=a.isHidden,u=a.inputClassName,c=p(a,er);return Wt(\"div\",{className:r({\"input-container\":!0},e),css:n(\"input\",t),\"data-value\":i||\"\"},Wt(\"input\",g({className:r({input:!0},u),ref:o,style:ir(l),disabled:s},c)))},LoadingIndicator:Qe,Menu:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerRef,o=t.innerProps;return Wt(\"div\",g({css:i(\"menu\",t),className:n({menu:!0},r),ref:a},o),e)},MenuList:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerProps,o=t.innerRef,s=t.isMulti;return Wt(\"div\",g({css:i(\"menuList\",t),className:n({\"menu-list\":!0,\"menu-list--is-multi\":s},r),ref:o},a),e)},MenuPortal:function(t){var e=t.appendTo,r=t.children,i=t.className,o=t.controlElement,s=t.cx,l=t.innerProps,u=t.menuPlacement,c=t.menuPosition,f=t.getStyles,p=(0,n.useRef)(null),d=(0,n.useRef)(null),v=h((0,n.useState)(Oe(u)),2),m=v[0],y=v[1],x=(0,n.useMemo)((function(){return{setPortalPlacement:y}}),[]),b=h((0,n.useState)(null),2),_=b[0],w=b[1],k=(0,n.useCallback)((function(){if(o){var t=function(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}(o),e=\"fixed\"===c?0:window.pageYOffset,r=t[m]+e;r===(null==_?void 0:_.offset)&&t.left===(null==_?void 0:_.rect.left)&&t.width===(null==_?void 0:_.rect.width)||w({offset:r,rect:t})}}),[o,c,m,null==_?void 0:_.offset,null==_?void 0:_.rect.left,null==_?void 0:_.rect.width]);he((function(){k()}),[k]);var T=(0,n.useCallback)((function(){\"function\"==typeof d.current&&(d.current(),d.current=null),o&&p.current&&(d.current=function(t,e,r,n){void 0===n&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=!0,animationFrame:s=!1}=n,l=i&&!s,u=l||a?[...ne(t)?fe(t):t.contextElement?fe(t.contextElement):[],...fe(e)]:[];u.forEach((t=>{l&&t.addEventListener(\"scroll\",r,{passive:!0}),a&&t.addEventListener(\"resize\",r)}));let c,f=null;if(o){let n=!0;f=new ResizeObserver((()=>{n||r(),n=!1})),ne(t)&&!s&&f.observe(t),ne(t)||!t.contextElement||s||f.observe(t.contextElement),f.observe(e)}let h=s?le(t):null;return s&&function e(){const n=le(t);!h||n.x===h.x&&n.y===h.y&&n.width===h.width&&n.height===h.height||r(),h=n,c=requestAnimationFrame(e)}(),r(),()=>{var t;u.forEach((t=>{l&&t.removeEventListener(\"scroll\",r),a&&t.removeEventListener(\"resize\",r)})),null==(t=f)||t.disconnect(),f=null,s&&cancelAnimationFrame(c)}}(o,p.current,k,{elementResize:\"ResizeObserver\"in window}))}),[o,k]);he((function(){T()}),[T]);var M=(0,n.useCallback)((function(t){p.current=t,T()}),[T]);if(!e&&\"fixed\"!==c||!_)return null;var A=Wt(\"div\",g({ref:M,css:f(\"menuPortal\",{offset:_.offset,position:c,rect:_.rect}),className:s({\"menu-portal\":!0},i)},l),r);return Wt(Ie.Provider,{value:x},e?(0,a.createPortal)(A,e):A)},LoadingMessage:Be,NoOptionsMessage:Ne,MultiValue:function(t){var e=t.children,r=t.className,n=t.components,i=t.cx,a=t.data,o=t.getStyles,s=t.innerProps,l=t.isDisabled,c=t.removeProps,f=t.selectProps,h=n.Container,p=n.Label,d=n.Remove;return Wt($t,null,(function(n){var g=n.css,v=n.cx;return Wt(h,{data:a,innerProps:u({className:v(g(o(\"multiValue\",t)),i({\"multi-value\":!0,\"multi-value--is-disabled\":l},r))},s),selectProps:f},Wt(p,{data:a,innerProps:{className:v(g(o(\"multiValueLabel\",t)),i({\"multi-value__label\":!0},r))},selectProps:f},e),Wt(d,{data:a,innerProps:u({className:v(g(o(\"multiValueRemove\",t)),i({\"multi-value__remove\":!0},r)),\"aria-label\":\"Remove \".concat(e||\"option\")},c),selectProps:f}))}))},MultiValueContainer:ar,MultiValueLabel:ar,MultiValueRemove:function(t){var e=t.children,r=t.innerProps;return Wt(\"div\",g({role:\"button\"},r),e||Wt(Ye,{size:14}))},Option:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.isDisabled,o=t.isFocused,s=t.isSelected,l=t.innerRef,u=t.innerProps;return Wt(\"div\",g({css:i(\"option\",t),className:n({option:!0,\"option--is-disabled\":a,\"option--is-focused\":o,\"option--is-selected\":s},r),ref:l,\"aria-disabled\":a},u),e)},Placeholder:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerProps;return Wt(\"div\",g({css:i(\"placeholder\",t),className:n({placeholder:!0},r)},a),e)},SelectContainer:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.innerProps,o=t.isDisabled,s=t.isRtl;return Wt(\"div\",g({css:i(\"container\",t),className:n({\"--is-disabled\":o,\"--is-rtl\":s},r)},a),e)},SingleValue:function(t){var e=t.children,r=t.className,n=t.cx,i=t.getStyles,a=t.isDisabled,o=t.innerProps;return Wt(\"div\",g({css:i(\"singleValue\",t),className:n({\"single-value\":!0,\"single-value--is-disabled\":a},r)},o),e)},ValueContainer:function(t){var e=t.children,r=t.className,n=t.cx,i=t.innerProps,a=t.isMulti,o=t.getStyles,s=t.hasValue;return Wt(\"div\",g({css:o(\"valueContainer\",t),className:n({\"value-container\":!0,\"value-container--is-multi\":a,\"value-container--has-value\":s},r)},i),e)}},sr=Number.isNaN||function(t){return\"number\"==typeof t&&t!=t};function lr(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!((n=t[r])===(i=e[r])||sr(n)&&sr(i)))return!1;var n,i;return!0}for(var ur={name:\"7pg0cj-a11yText\",styles:\"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap\"},cr=function(t){return Wt(\"span\",g({css:ur},t))},fr={guidance:function(t){var e=t.isSearchable,r=t.isMulti,n=t.isDisabled,i=t.tabSelectsValue;switch(t.context){case\"menu\":return\"Use Up and Down to choose options\".concat(n?\"\":\", press Enter to select the currently focused option\",\", press Escape to exit the menu\").concat(i?\", press Tab to select the option and exit the menu\":\"\",\".\");case\"input\":return\"\".concat(t[\"aria-label\"]||\"Select\",\" is focused \").concat(e?\",type to refine list\":\"\",\", press Down to open the menu, \").concat(r?\" press left to focus selected values\":\"\");case\"value\":return\"Use left and right to toggle between focused values, press Backspace to remove the currently focused value\";default:return\"\"}},onChange:function(t){var e=t.action,r=t.label,n=void 0===r?\"\":r,i=t.labels,a=t.isDisabled;switch(e){case\"deselect-option\":case\"pop-value\":case\"remove-value\":return\"option \".concat(n,\", deselected.\");case\"clear\":return\"All selected options have been cleared.\";case\"initial-input-focus\":return\"option\".concat(i.length>1?\"s\":\"\",\" \").concat(i.join(\",\"),\", selected.\");case\"select-option\":return\"option \".concat(n,a?\" is disabled. Select another option.\":\", selected.\");default:return\"\"}},onFocus:function(t){var e=t.context,r=t.focused,n=t.options,i=t.label,a=void 0===i?\"\":i,o=t.selectValue,s=t.isDisabled,l=t.isSelected,u=function(t,e){return t&&t.length?\"\".concat(t.indexOf(e)+1,\" of \").concat(t.length):\"\"};if(\"value\"===e&&o)return\"value \".concat(a,\" focused, \").concat(u(o,r),\".\");if(\"menu\"===e){var c=s?\" disabled\":\"\",f=\"\".concat(l?\"selected\":\"focused\").concat(c);return\"option \".concat(a,\" \").concat(f,\", \").concat(u(n,r),\".\")}return\"\"},onFilter:function(t){var e=t.inputValue,r=t.resultsMessage;return\"\".concat(r).concat(e?\" for search term \"+e:\"\",\".\")}},hr=function(t){var e=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.focusableOptions,o=t.isFocused,s=t.selectValue,l=t.selectProps,c=t.id,f=l.ariaLiveMessages,h=l.getOptionLabel,p=l.inputValue,d=l.isMulti,g=l.isOptionDisabled,v=l.isSearchable,m=l.menuIsOpen,y=l.options,x=l.screenReaderStatus,b=l.tabSelectsValue,_=l[\"aria-label\"],w=l[\"aria-live\"],k=(0,n.useMemo)((function(){return u(u({},fr),f||{})}),[f]),T=(0,n.useMemo)((function(){var t,r=\"\";if(e&&k.onChange){var n=e.option,i=e.options,a=e.removedValue,o=e.removedValues,l=e.value,c=a||n||(t=l,Array.isArray(t)?null:t),f=c?h(c):\"\",p=i||o||void 0,d=p?p.map(h):[],v=u({isDisabled:c&&g(c,s),label:f,labels:d},e);r=k.onChange(v)}return r}),[e,k,g,s,h]),M=(0,n.useMemo)((function(){var t=\"\",e=r||i,n=!!(r&&s&&s.includes(r));if(e&&k.onFocus){var o={focused:e,label:h(e),isDisabled:g(e,s),isSelected:n,options:a,context:e===r?\"menu\":\"value\",selectValue:s};t=k.onFocus(o)}return t}),[r,i,h,g,k,a,s]),A=(0,n.useMemo)((function(){var t=\"\";if(m&&y.length&&k.onFilter){var e=x({count:a.length});t=k.onFilter({inputValue:p,resultsMessage:e})}return t}),[a,p,m,k,y,x]),S=(0,n.useMemo)((function(){var t=\"\";if(k.guidance){var e=i?\"value\":m?\"menu\":\"input\";t=k.guidance({\"aria-label\":_,context:e,isDisabled:r&&g(r,s),isMulti:d,isSearchable:v,tabSelectsValue:b})}return t}),[_,r,i,d,g,v,m,k,s,b]),E=\"\".concat(M,\" \").concat(A,\" \").concat(S),C=Wt(n.Fragment,null,Wt(\"span\",{id:\"aria-selection\"},T),Wt(\"span\",{id:\"aria-context\"},E)),L=\"initial-input-focus\"===(null==e?void 0:e.action);return Wt(n.Fragment,null,Wt(cr,{id:c},L&&C),Wt(cr,{\"aria-live\":w,\"aria-atomic\":\"false\",\"aria-relevant\":\"additions text\"},o&&!L&&C))},pr=[{base:\"A\",letters:\"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ\"},{base:\"AA\",letters:\"Ꜳ\"},{base:\"AE\",letters:\"ÆǼǢ\"},{base:\"AO\",letters:\"Ꜵ\"},{base:\"AU\",letters:\"Ꜷ\"},{base:\"AV\",letters:\"ꜸꜺ\"},{base:\"AY\",letters:\"Ꜽ\"},{base:\"B\",letters:\"BⒷBḂḄḆɃƂƁ\"},{base:\"C\",letters:\"CⒸCĆĈĊČÇḈƇȻꜾ\"},{base:\"D\",letters:\"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ\"},{base:\"DZ\",letters:\"DZDŽ\"},{base:\"Dz\",letters:\"DzDž\"},{base:\"E\",letters:\"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ\"},{base:\"F\",letters:\"FⒻFḞƑꝻ\"},{base:\"G\",letters:\"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ\"},{base:\"H\",letters:\"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ\"},{base:\"I\",letters:\"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ\"},{base:\"J\",letters:\"JⒿJĴɈ\"},{base:\"K\",letters:\"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ\"},{base:\"L\",letters:\"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ\"},{base:\"LJ\",letters:\"LJ\"},{base:\"Lj\",letters:\"Lj\"},{base:\"M\",letters:\"MⓂMḾṀṂⱮƜ\"},{base:\"N\",letters:\"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ\"},{base:\"NJ\",letters:\"NJ\"},{base:\"Nj\",letters:\"Nj\"},{base:\"O\",letters:\"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ\"},{base:\"OI\",letters:\"Ƣ\"},{base:\"OO\",letters:\"Ꝏ\"},{base:\"OU\",letters:\"Ȣ\"},{base:\"P\",letters:\"PⓅPṔṖƤⱣꝐꝒꝔ\"},{base:\"Q\",letters:\"QⓆQꝖꝘɊ\"},{base:\"R\",letters:\"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ\"},{base:\"S\",letters:\"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ\"},{base:\"T\",letters:\"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ\"},{base:\"TZ\",letters:\"Ꜩ\"},{base:\"U\",letters:\"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ\"},{base:\"V\",letters:\"VⓋVṼṾƲꝞɅ\"},{base:\"VY\",letters:\"Ꝡ\"},{base:\"W\",letters:\"WⓌWẀẂŴẆẄẈⱲ\"},{base:\"X\",letters:\"XⓍXẊẌ\"},{base:\"Y\",letters:\"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ\"},{base:\"Z\",letters:\"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ\"},{base:\"a\",letters:\"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ\"},{base:\"aa\",letters:\"ꜳ\"},{base:\"ae\",letters:\"æǽǣ\"},{base:\"ao\",letters:\"ꜵ\"},{base:\"au\",letters:\"ꜷ\"},{base:\"av\",letters:\"ꜹꜻ\"},{base:\"ay\",letters:\"ꜽ\"},{base:\"b\",letters:\"bⓑbḃḅḇƀƃɓ\"},{base:\"c\",letters:\"cⓒcćĉċčçḉƈȼꜿↄ\"},{base:\"d\",letters:\"dⓓdḋďḍḑḓḏđƌɖɗꝺ\"},{base:\"dz\",letters:\"dzdž\"},{base:\"e\",letters:\"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ\"},{base:\"f\",letters:\"fⓕfḟƒꝼ\"},{base:\"g\",letters:\"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ\"},{base:\"h\",letters:\"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ\"},{base:\"hv\",letters:\"ƕ\"},{base:\"i\",letters:\"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı\"},{base:\"j\",letters:\"jⓙjĵǰɉ\"},{base:\"k\",letters:\"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ\"},{base:\"l\",letters:\"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ\"},{base:\"lj\",letters:\"lj\"},{base:\"m\",letters:\"mⓜmḿṁṃɱɯ\"},{base:\"n\",letters:\"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ\"},{base:\"nj\",letters:\"nj\"},{base:\"o\",letters:\"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ\"},{base:\"oi\",letters:\"ƣ\"},{base:\"ou\",letters:\"ȣ\"},{base:\"oo\",letters:\"ꝏ\"},{base:\"p\",letters:\"pⓟpṕṗƥᵽꝑꝓꝕ\"},{base:\"q\",letters:\"qⓠqɋꝗꝙ\"},{base:\"r\",letters:\"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ\"},{base:\"s\",letters:\"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ\"},{base:\"t\",letters:\"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ\"},{base:\"tz\",letters:\"ꜩ\"},{base:\"u\",letters:\"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ\"},{base:\"v\",letters:\"vⓥvṽṿʋꝟʌ\"},{base:\"vy\",letters:\"ꝡ\"},{base:\"w\",letters:\"wⓦwẁẃŵẇẅẘẉⱳ\"},{base:\"x\",letters:\"xⓧxẋẍ\"},{base:\"y\",letters:\"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ\"},{base:\"z\",letters:\"zⓩzźẑżžẓẕƶȥɀⱬꝣ\"}],dr=new RegExp(\"[\"+pr.map((function(t){return t.letters})).join(\"\")+\"]\",\"g\"),gr={},vr=0;vr<pr.length;vr++)for(var mr=pr[vr],yr=0;yr<mr.letters.length;yr++)gr[mr.letters[yr]]=mr.base;var xr=function(t){return t.replace(dr,(function(t){return gr[t]}))},br=function(t,e){void 0===e&&(e=lr);var r=null;function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(r&&r.lastThis===this&&e(n,r.lastArgs))return r.lastResult;var a=t.apply(this,n);return r={lastResult:a,lastArgs:n,lastThis:this},a}return n.clear=function(){r=null},n}(xr),_r=function(t){return t.replace(/^\\s+|\\s+$/g,\"\")},wr=function(t){return\"\".concat(t.label,\" \").concat(t.value)},kr=[\"innerRef\"];function Tr(t){var e=t.innerRef,r=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var i=Object.entries(t).filter((function(t){var e=h(t,1)[0];return!r.includes(e)}));return i.reduce((function(t,e){var r=h(e,2),n=r[0],i=r[1];return t[n]=i,t}),{})}(p(t,kr),\"onExited\",\"in\",\"enter\",\"exit\",\"appear\");return Wt(\"input\",g({ref:e},r,{css:Xt({label:\"dummyInput\",background:0,border:0,caretColor:\"transparent\",fontSize:\"inherit\",gridArea:\"1 / 1 / 2 / 3\",outline:0,padding:0,width:1,color:\"transparent\",left:-100,opacity:0,position:\"relative\",transform:\"scale(.01)\"},\"\",\"\")}))}var Mr=[\"boxSizing\",\"height\",\"overflow\",\"paddingRight\",\"position\"],Ar={boxSizing:\"border-box\",overflow:\"hidden\",position:\"relative\",height:\"100%\"};function Sr(t){t.preventDefault()}function Er(t){t.stopPropagation()}function Cr(){var t=this.scrollTop,e=this.scrollHeight,r=t+this.offsetHeight;0===t?this.scrollTop=1:r===e&&(this.scrollTop=t-1)}function Lr(){return\"ontouchstart\"in window||navigator.maxTouchPoints}var Pr=!(\"undefined\"==typeof window||!window.document||!window.document.createElement),Or=0,Ir={capture:!1,passive:!1},Dr=function(){return document.activeElement&&document.activeElement.blur()},zr={name:\"1kfdb0e\",styles:\"position:fixed;left:0;bottom:0;right:0;top:0\"};function Rr(t){var e=t.children,r=t.lockEnabled,i=t.captureEnabled,a=function(t){var e=t.isEnabled,r=t.onBottomArrive,i=t.onBottomLeave,a=t.onTopArrive,o=t.onTopLeave,s=(0,n.useRef)(!1),l=(0,n.useRef)(!1),u=(0,n.useRef)(0),c=(0,n.useRef)(null),f=(0,n.useCallback)((function(t,e){if(null!==c.current){var n=c.current,u=n.scrollTop,f=n.scrollHeight,h=n.clientHeight,p=c.current,d=e>0,g=f-h-u,v=!1;g>e&&s.current&&(i&&i(t),s.current=!1),d&&l.current&&(o&&o(t),l.current=!1),d&&e>g?(r&&!s.current&&r(t),p.scrollTop=f,v=!0,s.current=!0):!d&&-e>u&&(a&&!l.current&&a(t),p.scrollTop=0,v=!0,l.current=!0),v&&function(t){t.preventDefault(),t.stopPropagation()}(t)}}),[r,i,a,o]),h=(0,n.useCallback)((function(t){f(t,t.deltaY)}),[f]),p=(0,n.useCallback)((function(t){u.current=t.changedTouches[0].clientY}),[]),d=(0,n.useCallback)((function(t){var e=u.current-t.changedTouches[0].clientY;f(t,e)}),[f]),g=(0,n.useCallback)((function(t){if(t){var e=!!Ce&&{passive:!1};t.addEventListener(\"wheel\",h,e),t.addEventListener(\"touchstart\",p,e),t.addEventListener(\"touchmove\",d,e)}}),[d,p,h]),v=(0,n.useCallback)((function(t){t&&(t.removeEventListener(\"wheel\",h,!1),t.removeEventListener(\"touchstart\",p,!1),t.removeEventListener(\"touchmove\",d,!1))}),[d,p,h]);return(0,n.useEffect)((function(){if(e){var t=c.current;return g(t),function(){v(t)}}}),[e,g,v]),function(t){c.current=t}}({isEnabled:void 0===i||i,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),o=function(t){var e=t.isEnabled,r=t.accountForScrollbars,i=void 0===r||r,a=(0,n.useRef)({}),o=(0,n.useRef)(null),s=(0,n.useCallback)((function(t){if(Pr){var e=document.body,r=e&&e.style;if(i&&Mr.forEach((function(t){var e=r&&r[t];a.current[t]=e})),i&&Or<1){var n=parseInt(a.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+n||0;Object.keys(Ar).forEach((function(t){var e=Ar[t];r&&(r[t]=e)})),r&&(r.paddingRight=\"\".concat(s,\"px\"))}e&&Lr()&&(e.addEventListener(\"touchmove\",Sr,Ir),t&&(t.addEventListener(\"touchstart\",Cr,Ir),t.addEventListener(\"touchmove\",Er,Ir))),Or+=1}}),[i]),l=(0,n.useCallback)((function(t){if(Pr){var e=document.body,r=e&&e.style;Or=Math.max(Or-1,0),i&&Or<1&&Mr.forEach((function(t){var e=a.current[t];r&&(r[t]=e)})),e&&Lr()&&(e.removeEventListener(\"touchmove\",Sr,Ir),t&&(t.removeEventListener(\"touchstart\",Cr,Ir),t.removeEventListener(\"touchmove\",Er,Ir)))}}),[i]);return(0,n.useEffect)((function(){if(e){var t=o.current;return s(t),function(){l(t)}}}),[e,s,l]),function(t){o.current=t}}({isEnabled:r});return Wt(n.Fragment,null,r&&Wt(\"div\",{onClick:Dr,css:zr}),e((function(t){a(t),o(t)})))}var Fr={name:\"1a0ro4n-requiredInput\",styles:\"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%\"},Nr=function(t){var e=t.name,r=t.onFocus;return Wt(\"input\",{required:!0,name:e,tabIndex:-1,onFocus:r,css:Fr,value:\"\",onChange:function(){}})},Br={clearIndicator:Ke,container:function(t){var e=t.isDisabled;return{label:\"container\",direction:t.isRtl?\"rtl\":void 0,pointerEvents:e?\"none\":void 0,position:\"relative\"}},control:function(t){var e=t.isDisabled,r=t.isFocused,n=t.theme,i=n.colors,a=n.borderRadius,o=n.spacing;return{label:\"control\",alignItems:\"center\",backgroundColor:e?i.neutral5:i.neutral0,borderColor:e?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:\"solid\",borderWidth:1,boxShadow:r?\"0 0 0 1px \".concat(i.primary):void 0,cursor:\"default\",display:\"flex\",flexWrap:\"wrap\",justifyContent:\"space-between\",minHeight:o.controlHeight,outline:\"0 !important\",position:\"relative\",transition:\"all 100ms\",\"&:hover\":{borderColor:r?i.primary:i.neutral30}}},dropdownIndicator:Ze,group:function(t){var e=t.theme.spacing;return{paddingBottom:2*e.baseUnit,paddingTop:2*e.baseUnit}},groupHeading:function(t){var e=t.theme.spacing;return{label:\"group\",color:\"#999\",cursor:\"default\",display:\"block\",fontSize:\"75%\",fontWeight:500,marginBottom:\"0.25em\",paddingLeft:3*e.baseUnit,paddingRight:3*e.baseUnit,textTransform:\"uppercase\"}},indicatorsContainer:function(){return{alignItems:\"center\",alignSelf:\"stretch\",display:\"flex\",flexShrink:0}},indicatorSeparator:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing.baseUnit,i=r.colors;return{label:\"indicatorSeparator\",alignSelf:\"stretch\",backgroundColor:e?i.neutral10:i.neutral20,marginBottom:2*n,marginTop:2*n,width:1}},input:function(t){var e=t.isDisabled,r=t.value,n=t.theme,i=n.spacing,a=n.colors;return u({margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,visibility:e?\"hidden\":\"visible\",color:a.neutral80,transform:r?\"translateZ(0)\":\"\"},nr)},loadingIndicator:function(t){var e=t.isFocused,r=t.size,n=t.theme,i=n.colors,a=n.spacing.baseUnit;return{label:\"loadingIndicator\",color:e?i.neutral60:i.neutral20,display:\"flex\",padding:2*a,transition:\"color 150ms\",alignSelf:\"center\",fontSize:r,lineHeight:1,marginRight:r,textAlign:\"center\",verticalAlign:\"middle\"}},loadingMessage:Fe,menu:function(t){var e,r=t.placement,n=t.theme,i=n.borderRadius,a=n.spacing,o=n.colors;return s(e={label:\"menu\"},function(t){return t?{bottom:\"top\",top:\"bottom\"}[t]:\"bottom\"}(r),\"100%\"),s(e,\"backgroundColor\",o.neutral0),s(e,\"borderRadius\",i),s(e,\"boxShadow\",\"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)\"),s(e,\"marginBottom\",a.menuGutter),s(e,\"marginTop\",a.menuGutter),s(e,\"position\",\"absolute\"),s(e,\"width\",\"100%\"),s(e,\"zIndex\",1),e},menuList:function(t){var e=t.maxHeight,r=t.theme.spacing.baseUnit;return{maxHeight:e,overflowY:\"auto\",paddingBottom:r,paddingTop:r,position:\"relative\",WebkitOverflowScrolling:\"touch\"}},menuPortal:function(t){var e=t.rect,r=t.offset,n=t.position;return{left:e.left,position:n,top:r,width:e.width,zIndex:1}},multiValue:function(t){var e=t.theme,r=e.spacing,n=e.borderRadius;return{label:\"multiValue\",backgroundColor:e.colors.neutral10,borderRadius:n/2,display:\"flex\",margin:r.baseUnit/2,minWidth:0}},multiValueLabel:function(t){var e=t.theme,r=e.borderRadius,n=e.colors,i=t.cropWithEllipsis;return{borderRadius:r/2,color:n.neutral80,fontSize:\"85%\",overflow:\"hidden\",padding:3,paddingLeft:6,textOverflow:i||void 0===i?\"ellipsis\":void 0,whiteSpace:\"nowrap\"}},multiValueRemove:function(t){var e=t.theme,r=e.spacing,n=e.borderRadius,i=e.colors;return{alignItems:\"center\",borderRadius:n/2,backgroundColor:t.isFocused?i.dangerLight:void 0,display:\"flex\",paddingLeft:r.baseUnit,paddingRight:r.baseUnit,\":hover\":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:Re,option:function(t){var e=t.isDisabled,r=t.isFocused,n=t.isSelected,i=t.theme,a=i.spacing,o=i.colors;return{label:\"option\",backgroundColor:n?o.primary:r?o.primary25:\"transparent\",color:e?o.neutral20:n?o.neutral0:\"inherit\",cursor:\"default\",display:\"block\",fontSize:\"inherit\",padding:\"\".concat(2*a.baseUnit,\"px \").concat(3*a.baseUnit,\"px\"),width:\"100%\",userSelect:\"none\",WebkitTapHighlightColor:\"rgba(0, 0, 0, 0)\",\":active\":{backgroundColor:e?void 0:n?o.primary:o.primary50}}},placeholder:function(t){var e=t.theme,r=e.spacing;return{label:\"placeholder\",color:e.colors.neutral50,gridArea:\"1 / 1 / 2 / 3\",marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2}},singleValue:function(t){var e=t.isDisabled,r=t.theme,n=r.spacing,i=r.colors;return{label:\"singleValue\",color:e?i.neutral40:i.neutral80,gridArea:\"1 / 1 / 2 / 3\",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,maxWidth:\"100%\",overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"}},valueContainer:function(t){var e=t.theme.spacing,r=t.isMulti,n=t.hasValue,i=t.selectProps.controlShouldRenderValue;return{alignItems:\"center\",display:r&&n&&i?\"flex\":\"grid\",flex:1,flexWrap:\"wrap\",padding:\"\".concat(e.baseUnit/2,\"px \").concat(2*e.baseUnit,\"px\"),WebkitOverflowScrolling:\"touch\",position:\"relative\",overflow:\"hidden\"}}},jr={borderRadius:4,colors:{primary:\"#2684FF\",primary75:\"#4C9AFF\",primary50:\"#B2D4FF\",primary25:\"#DEEBFF\",danger:\"#DE350B\",dangerLight:\"#FFBDAD\",neutral0:\"hsl(0, 0%, 100%)\",neutral5:\"hsl(0, 0%, 95%)\",neutral10:\"hsl(0, 0%, 90%)\",neutral20:\"hsl(0, 0%, 80%)\",neutral30:\"hsl(0, 0%, 70%)\",neutral40:\"hsl(0, 0%, 60%)\",neutral50:\"hsl(0, 0%, 50%)\",neutral60:\"hsl(0, 0%, 40%)\",neutral70:\"hsl(0, 0%, 30%)\",neutral80:\"hsl(0, 0%, 20%)\",neutral90:\"hsl(0, 0%, 10%)\"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Ur={\"aria-live\":\"polite\",backspaceRemovesValue:!0,blurInputOnSelect:Me(),captureMenuScroll:!Me(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(t,e){if(t.data.__isNew__)return!0;var r=u({ignoreCase:!0,ignoreAccents:!0,stringify:wr,trim:!0,matchFrom:\"any\"},undefined),n=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,o=r.trim,s=r.matchFrom,l=o?_r(e):e,c=o?_r(a(t)):a(t);return n&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=br(l),c=xr(c)),\"start\"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(t){return t.label},getOptionLabel:function(t){return t.label},getOptionValue:function(t){return t.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(t){return!!t.isDisabled},loadingMessage:function(){return\"Loading...\"},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:\"bottom\",menuPosition:\"absolute\",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(t){return!1}}(),noOptionsMessage:function(){return\"No options\"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:\"Select...\",screenReaderStatus:function(t){var e=t.count;return\"\".concat(e,\" result\").concat(1!==e?\"s\":\"\",\" available\")},styles:{},tabIndex:0,tabSelectsValue:!0};function Vr(t,e,r,n){return{type:\"option\",data:e,isDisabled:Xr(t,e,r),isSelected:Zr(t,e,r),label:Yr(t,e),value:Wr(t,e),index:n}}function Hr(t,e){return t.options.map((function(r,n){if(\"options\"in r){var i=r.options.map((function(r,n){return Vr(t,r,e,n)})).filter((function(e){return Gr(t,e)}));return i.length>0?{type:\"group\",data:r,options:i,index:n}:void 0}var a=Vr(t,r,e,n);return Gr(t,a)?a:void 0})).filter(Le)}function qr(t){return t.reduce((function(t,e){return\"group\"===e.type?t.push.apply(t,_(e.options.map((function(t){return t.data})))):t.push(e.data),t}),[])}function Gr(t,e){var r=t.inputValue,n=void 0===r?\"\":r,i=e.data,a=e.isSelected,o=e.label,s=e.value;return(!Jr(t)||!a)&&Kr(t,{label:o,value:s,data:i},n)}var Yr=function(t,e){return t.getOptionLabel(e)},Wr=function(t,e){return t.getOptionValue(e)};function Xr(t,e,r){return\"function\"==typeof t.isOptionDisabled&&t.isOptionDisabled(e,r)}function Zr(t,e,r){if(r.indexOf(e)>-1)return!0;if(\"function\"==typeof t.isOptionSelected)return t.isOptionSelected(e,r);var n=Wr(t,e);return r.some((function(e){return Wr(t,e)===n}))}function Kr(t,e,r){return!t.filterOption||t.filterOption(e,r)}var Jr=function(t){var e=t.hideSelectedOptions,r=t.isMulti;return void 0===e?r:e},$r=1,Qr=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,\"prototype\",{writable:!1}),e&&m(t,e)}(l,t);var e,r,i,a,o,s=(a=l,o=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(a);if(o){var r=y(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return b(this,t)});function l(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,l),(e=s.call(this,t)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},e.blockOptionHover=!1,e.isComposing=!1,e.commonProps=void 0,e.initialTouchX=0,e.initialTouchY=0,e.instancePrefix=\"\",e.openAfterFocus=!1,e.scrollToFocusedOptionOnUpdate=!1,e.userIsDragging=void 0,e.controlRef=null,e.getControlRef=function(t){e.controlRef=t},e.focusedOptionRef=null,e.getFocusedOptionRef=function(t){e.focusedOptionRef=t},e.menuListRef=null,e.getMenuListRef=function(t){e.menuListRef=t},e.inputRef=null,e.getInputRef=function(t){e.inputRef=t},e.focus=e.focusInput,e.blur=e.blurInput,e.onChange=function(t,r){var n=e.props,i=n.onChange,a=n.name;r.name=a,e.ariaOnChange(t,r),i(t,r)},e.setValue=function(t,r,n){var i=e.props,a=i.closeMenuOnSelect,o=i.isMulti,s=i.inputValue;e.onInputChange(\"\",{action:\"set-value\",prevInputValue:s}),a&&(e.setState({inputIsHiddenAfterUpdate:!o}),e.onMenuClose()),e.setState({clearFocusValueOnUpdate:!0}),e.onChange(t,{action:r,option:n})},e.selectOption=function(t){var r=e.props,n=r.blurInputOnSelect,i=r.isMulti,a=r.name,o=e.state.selectValue,s=i&&e.isOptionSelected(t,o),l=e.isOptionDisabled(t,o);if(s){var u=e.getOptionValue(t);e.setValue(o.filter((function(t){return e.getOptionValue(t)!==u})),\"deselect-option\",t)}else{if(l)return void e.ariaOnChange(t,{action:\"select-option\",option:t,name:a});i?e.setValue([].concat(_(o),[t]),\"select-option\",t):e.setValue(t,\"select-option\")}n&&e.blurInput()},e.removeValue=function(t){var r=e.props.isMulti,n=e.state.selectValue,i=e.getOptionValue(t),a=n.filter((function(t){return e.getOptionValue(t)!==i})),o=Pe(r,a,a[0]||null);e.onChange(o,{action:\"remove-value\",removedValue:t}),e.focusInput()},e.clearValue=function(){var t=e.state.selectValue;e.onChange(Pe(e.props.isMulti,[],null),{action:\"clear\",removedValues:t})},e.popValue=function(){var t=e.props.isMulti,r=e.state.selectValue,n=r[r.length-1],i=r.slice(0,r.length-1),a=Pe(t,i,i[0]||null);e.onChange(a,{action:\"pop-value\",removedValue:n})},e.getValue=function(){return e.state.selectValue},e.cx=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ve.apply(void 0,[e.props.classNamePrefix].concat(r))},e.getOptionLabel=function(t){return Yr(e.props,t)},e.getOptionValue=function(t){return Wr(e.props,t)},e.getStyles=function(t,r){var n=Br[t](r);n.boxSizing=\"border-box\";var i=e.props.styles[t];return i?i(n,r):n},e.getElementId=function(t){return\"\".concat(e.instancePrefix,\"-\").concat(t)},e.getComponents=function(){return t=e.props,u(u({},or),t.components);var t},e.buildCategorizedOptions=function(){return Hr(e.props,e.state.selectValue)},e.getCategorizedOptions=function(){return e.props.menuIsOpen?e.buildCategorizedOptions():[]},e.buildFocusableOptions=function(){return qr(e.buildCategorizedOptions())},e.getFocusableOptions=function(){return e.props.menuIsOpen?e.buildFocusableOptions():[]},e.ariaOnChange=function(t,r){e.setState({ariaSelection:u({value:t},r)})},e.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},e.onMenuMouseMove=function(t){e.blockOptionHover=!1},e.onControlMouseDown=function(t){if(!t.defaultPrevented){var r=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?\"INPUT\"!==t.target.tagName&&\"TEXTAREA\"!==t.target.tagName&&e.onMenuClose():r&&e.openMenu(\"first\"):(r&&(e.openAfterFocus=!0),e.focusInput()),\"INPUT\"!==t.target.tagName&&\"TEXTAREA\"!==t.target.tagName&&t.preventDefault()}},e.onDropdownIndicatorMouseDown=function(t){if(!(t&&\"mousedown\"===t.type&&0!==t.button||e.props.isDisabled)){var r=e.props,n=r.isMulti,i=r.menuIsOpen;e.focusInput(),i?(e.setState({inputIsHiddenAfterUpdate:!n}),e.onMenuClose()):e.openMenu(\"first\"),t.preventDefault()}},e.onClearIndicatorMouseDown=function(t){t&&\"mousedown\"===t.type&&0!==t.button||(e.clearValue(),t.preventDefault(),e.openAfterFocus=!1,\"touchend\"===t.type?e.focusInput():setTimeout((function(){return e.focusInput()})))},e.onScroll=function(t){\"boolean\"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&xe(t.target)&&e.props.onMenuClose():\"function\"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},e.onCompositionStart=function(){e.isComposing=!0},e.onCompositionEnd=function(){e.isComposing=!1},e.onTouchStart=function(t){var r=t.touches,n=r&&r.item(0);n&&(e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1)},e.onTouchMove=function(t){var r=t.touches,n=r&&r.item(0);if(n){var i=Math.abs(n.clientX-e.initialTouchX),a=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=i>5||a>5}},e.onTouchEnd=function(t){e.userIsDragging||(e.controlRef&&!e.controlRef.contains(t.target)&&e.menuListRef&&!e.menuListRef.contains(t.target)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0)},e.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},e.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},e.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},e.handleInputChange=function(t){var r=e.props.inputValue,n=t.currentTarget.value;e.setState({inputIsHiddenAfterUpdate:!1}),e.onInputChange(n,{action:\"input-change\",prevInputValue:r}),e.props.menuIsOpen||e.onMenuOpen()},e.onInputFocus=function(t){e.props.onFocus&&e.props.onFocus(t),e.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu(\"first\"),e.openAfterFocus=!1},e.onInputBlur=function(t){var r=e.props.inputValue;e.menuListRef&&e.menuListRef.contains(document.activeElement)?e.inputRef.focus():(e.props.onBlur&&e.props.onBlur(t),e.onInputChange(\"\",{action:\"input-blur\",prevInputValue:r}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1}))},e.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},e.shouldHideSelectedOptions=function(){return Jr(e.props)},e.onValueInputFocus=function(t){t.preventDefault(),t.stopPropagation(),e.focus()},e.onKeyDown=function(t){var r=e.props,n=r.isMulti,i=r.backspaceRemovesValue,a=r.escapeClearsValue,o=r.inputValue,s=r.isClearable,l=r.isDisabled,u=r.menuIsOpen,c=r.onKeyDown,f=r.tabSelectsValue,h=r.openMenuOnFocus,p=e.state,d=p.focusedOption,g=p.focusedValue,v=p.selectValue;if(!(l||\"function\"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case\"ArrowLeft\":if(!n||o)return;e.focusValue(\"previous\");break;case\"ArrowRight\":if(!n||o)return;e.focusValue(\"next\");break;case\"Delete\":case\"Backspace\":if(o)return;if(g)e.removeValue(g);else{if(!i)return;n?e.popValue():s&&e.clearValue()}break;case\"Tab\":if(e.isComposing)return;if(t.shiftKey||!u||!f||!d||h&&e.isOptionSelected(d,v))return;e.selectOption(d);break;case\"Enter\":if(229===t.keyCode)break;if(u){if(!d)return;if(e.isComposing)return;e.selectOption(d);break}return;case\"Escape\":u?(e.setState({inputIsHiddenAfterUpdate:!1}),e.onInputChange(\"\",{action:\"menu-close\",prevInputValue:o}),e.onMenuClose()):s&&a&&e.clearValue();break;case\" \":if(o)return;if(!u){e.openMenu(\"first\");break}if(!d)return;e.selectOption(d);break;case\"ArrowUp\":u?e.focusOption(\"up\"):e.openMenu(\"last\");break;case\"ArrowDown\":u?e.focusOption(\"down\"):e.openMenu(\"first\");break;case\"PageUp\":if(!u)return;e.focusOption(\"pageup\");break;case\"PageDown\":if(!u)return;e.focusOption(\"pagedown\");break;case\"Home\":if(!u)return;e.focusOption(\"first\");break;case\"End\":if(!u)return;e.focusOption(\"last\");break;default:return}t.preventDefault()}},e.instancePrefix=\"react-select-\"+(e.props.instanceId||++$r),e.state.selectValue=me(t.value),t.menuIsOpen&&e.state.selectValue.length){var r=e.buildFocusableOptions(),n=r.indexOf(e.state.selectValue[0]);e.state.focusedOption=r[n]}return e}return e=l,r=[{key:\"componentDidMount\",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener(\"scroll\",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Te(this.menuListRef,this.focusedOptionRef)}},{key:\"componentDidUpdate\",value:function(t){var e=this.props,r=e.isDisabled,n=e.menuIsOpen,i=this.state.isFocused;(i&&!r&&t.isDisabled||i&&n&&!t.menuIsOpen)&&this.focusInput(),i&&r&&!t.isDisabled?this.setState({isFocused:!1},this.onMenuClose):i||r||!t.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Te(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:\"componentWillUnmount\",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener(\"scroll\",this.onScroll,!0)}},{key:\"onMenuOpen\",value:function(){this.props.onMenuOpen()}},{key:\"onMenuClose\",value:function(){this.onInputChange(\"\",{action:\"menu-close\",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:\"onInputChange\",value:function(t,e){this.props.onInputChange(t,e)}},{key:\"focusInput\",value:function(){this.inputRef&&this.inputRef.focus()}},{key:\"blurInput\",value:function(){this.inputRef&&this.inputRef.blur()}},{key:\"openMenu\",value:function(t){var e=this,r=this.state,n=r.selectValue,i=r.isFocused,a=this.buildFocusableOptions(),o=\"first\"===t?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(n[0]);s>-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[o]},(function(){return e.onMenuOpen()}))}},{key:\"focusValue\",value:function(t){var e=this.state,r=e.selectValue,n=e.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=r.indexOf(n);n||(i=-1);var a=r.length-1,o=-1;if(r.length){switch(t){case\"previous\":o=0===i?0:-1===i?a:i-1;break;case\"next\":i>-1&&i<a&&(o=i+1)}this.setState({inputIsHidden:-1!==o,focusedValue:r[o]})}}}},{key:\"focusOption\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"first\",e=this.props.pageSize,r=this.state.focusedOption,n=this.getFocusableOptions();if(n.length){var i=0,a=n.indexOf(r);r||(a=-1),\"up\"===t?i=a>0?a-1:n.length-1:\"down\"===t?i=(a+1)%n.length:\"pageup\"===t?(i=a-e)<0&&(i=0):\"pagedown\"===t?(i=a+e)>n.length-1&&(i=n.length-1):\"last\"===t&&(i=n.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:n[i],focusedValue:null})}}},{key:\"getTheme\",value:function(){return this.props.theme?\"function\"==typeof this.props.theme?this.props.theme(jr):u(u({},jr),this.props.theme):jr}},{key:\"getCommonProps\",value:function(){var t=this.clearValue,e=this.cx,r=this.getStyles,n=this.getValue,i=this.selectOption,a=this.setValue,o=this.props,s=o.isMulti,l=o.isRtl,u=o.options;return{clearValue:t,cx:e,getStyles:r,getValue:n,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:u,selectOption:i,selectProps:o,setValue:a,theme:this.getTheme()}}},{key:\"hasValue\",value:function(){return this.state.selectValue.length>0}},{key:\"hasOptions\",value:function(){return!!this.getFocusableOptions().length}},{key:\"isClearable\",value:function(){var t=this.props,e=t.isClearable,r=t.isMulti;return void 0===e?r:e}},{key:\"isOptionDisabled\",value:function(t,e){return Xr(this.props,t,e)}},{key:\"isOptionSelected\",value:function(t,e){return Zr(this.props,t,e)}},{key:\"filterOption\",value:function(t,e){return Kr(this.props,t,e)}},{key:\"formatOptionLabel\",value:function(t,e){if(\"function\"==typeof this.props.formatOptionLabel){var r=this.props.inputValue,n=this.state.selectValue;return this.props.formatOptionLabel(t,{context:e,inputValue:r,selectValue:n})}return this.getOptionLabel(t)}},{key:\"formatGroupLabel\",value:function(t){return this.props.formatGroupLabel(t)}},{key:\"startListeningComposition\",value:function(){document&&document.addEventListener&&(document.addEventListener(\"compositionstart\",this.onCompositionStart,!1),document.addEventListener(\"compositionend\",this.onCompositionEnd,!1))}},{key:\"stopListeningComposition\",value:function(){document&&document.removeEventListener&&(document.removeEventListener(\"compositionstart\",this.onCompositionStart),document.removeEventListener(\"compositionend\",this.onCompositionEnd))}},{key:\"startListeningToTouch\",value:function(){document&&document.addEventListener&&(document.addEventListener(\"touchstart\",this.onTouchStart,!1),document.addEventListener(\"touchmove\",this.onTouchMove,!1),document.addEventListener(\"touchend\",this.onTouchEnd,!1))}},{key:\"stopListeningToTouch\",value:function(){document&&document.removeEventListener&&(document.removeEventListener(\"touchstart\",this.onTouchStart),document.removeEventListener(\"touchmove\",this.onTouchMove),document.removeEventListener(\"touchend\",this.onTouchEnd))}},{key:\"renderInput\",value:function(){var t=this.props,e=t.isDisabled,r=t.isSearchable,i=t.inputId,a=t.inputValue,o=t.tabIndex,s=t.form,l=t.menuIsOpen,c=t.required,f=this.getComponents().Input,h=this.state,p=h.inputIsHidden,d=h.ariaSelection,v=this.commonProps,m=i||this.getElementId(\"input\"),y=u(u(u({\"aria-autocomplete\":\"list\",\"aria-expanded\":l,\"aria-haspopup\":!0,\"aria-errormessage\":this.props[\"aria-errormessage\"],\"aria-invalid\":this.props[\"aria-invalid\"],\"aria-label\":this.props[\"aria-label\"],\"aria-labelledby\":this.props[\"aria-labelledby\"],\"aria-required\":c,role:\"combobox\"},l&&{\"aria-controls\":this.getElementId(\"listbox\"),\"aria-owns\":this.getElementId(\"listbox\")}),!r&&{\"aria-readonly\":!0}),this.hasValue()?\"initial-input-focus\"===(null==d?void 0:d.action)&&{\"aria-describedby\":this.getElementId(\"live-region\")}:{\"aria-describedby\":this.getElementId(\"placeholder\")});return r?n.createElement(f,g({},v,{autoCapitalize:\"none\",autoComplete:\"off\",autoCorrect:\"off\",id:m,innerRef:this.getInputRef,isDisabled:e,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:\"false\",tabIndex:o,form:s,type:\"text\",value:a},y)):n.createElement(Tr,g({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:de,onFocus:this.onInputFocus,disabled:e,tabIndex:o,inputMode:\"none\",form:s,value:\"\"},y))}},{key:\"renderPlaceholderOrValue\",value:function(){var t=this,e=this.getComponents(),r=e.MultiValue,i=e.MultiValueContainer,a=e.MultiValueLabel,o=e.MultiValueRemove,s=e.SingleValue,l=e.Placeholder,u=this.commonProps,c=this.props,f=c.controlShouldRenderValue,h=c.isDisabled,p=c.isMulti,d=c.inputValue,v=c.placeholder,m=this.state,y=m.selectValue,x=m.focusedValue,b=m.isFocused;if(!this.hasValue()||!f)return d?null:n.createElement(l,g({},u,{key:\"placeholder\",isDisabled:h,isFocused:b,innerProps:{id:this.getElementId(\"placeholder\")}}),v);if(p)return y.map((function(e,s){var l=e===x,c=\"\".concat(t.getOptionLabel(e),\"-\").concat(t.getOptionValue(e));return n.createElement(r,g({},u,{components:{Container:i,Label:a,Remove:o},isFocused:l,isDisabled:h,key:c,index:s,removeProps:{onClick:function(){return t.removeValue(e)},onTouchEnd:function(){return t.removeValue(e)},onMouseDown:function(t){t.preventDefault()}},data:e}),t.formatOptionLabel(e,\"value\"))}));if(d)return null;var _=y[0];return n.createElement(s,g({},u,{data:_,isDisabled:h}),this.formatOptionLabel(_,\"value\"))}},{key:\"renderClearIndicator\",value:function(){var t=this.getComponents().ClearIndicator,e=this.commonProps,r=this.props,i=r.isDisabled,a=r.isLoading,o=this.state.isFocused;if(!this.isClearable()||!t||i||!this.hasValue()||a)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,\"aria-hidden\":\"true\"};return n.createElement(t,g({},e,{innerProps:s,isFocused:o}))}},{key:\"renderLoadingIndicator\",value:function(){var t=this.getComponents().LoadingIndicator,e=this.commonProps,r=this.props,i=r.isDisabled,a=r.isLoading,o=this.state.isFocused;return t&&a?n.createElement(t,g({},e,{innerProps:{\"aria-hidden\":\"true\"},isDisabled:i,isFocused:o})):null}},{key:\"renderIndicatorSeparator\",value:function(){var t=this.getComponents(),e=t.DropdownIndicator,r=t.IndicatorSeparator;if(!e||!r)return null;var i=this.commonProps,a=this.props.isDisabled,o=this.state.isFocused;return n.createElement(r,g({},i,{isDisabled:a,isFocused:o}))}},{key:\"renderDropdownIndicator\",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var e=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,\"aria-hidden\":\"true\"};return n.createElement(t,g({},e,{innerProps:a,isDisabled:r,isFocused:i}))}},{key:\"renderMenu\",value:function(){var t=this,e=this.getComponents(),r=e.Group,i=e.GroupHeading,a=e.Menu,o=e.MenuList,s=e.MenuPortal,l=e.LoadingMessage,u=e.NoOptionsMessage,c=e.Option,f=this.commonProps,h=this.state.focusedOption,p=this.props,d=p.captureMenuScroll,v=p.inputValue,m=p.isLoading,y=p.loadingMessage,x=p.minMenuHeight,b=p.maxMenuHeight,_=p.menuIsOpen,w=p.menuPlacement,k=p.menuPosition,T=p.menuPortalTarget,M=p.menuShouldBlockScroll,A=p.menuShouldScrollIntoView,S=p.noOptionsMessage,E=p.onMenuScrollToTop,C=p.onMenuScrollToBottom;if(!_)return null;var L,P=function(e,r){var i=e.type,a=e.data,o=e.isDisabled,s=e.isSelected,l=e.label,u=e.value,p=h===a,d=o?void 0:function(){return t.onOptionHover(a)},v=o?void 0:function(){return t.selectOption(a)},m=\"\".concat(t.getElementId(\"option\"),\"-\").concat(r),y={id:m,onClick:v,onMouseMove:d,onMouseOver:d,tabIndex:-1};return n.createElement(c,g({},f,{innerProps:y,data:a,isDisabled:o,isSelected:s,key:m,label:l,type:i,value:u,isFocused:p,innerRef:p?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(e.data,\"menu\"))};if(this.hasOptions())L=this.getCategorizedOptions().map((function(e){if(\"group\"===e.type){var a=e.data,o=e.options,s=e.index,l=\"\".concat(t.getElementId(\"group\"),\"-\").concat(s),u=\"\".concat(l,\"-heading\");return n.createElement(r,g({},f,{key:l,data:a,options:o,Heading:i,headingProps:{id:u,data:e.data},label:t.formatGroupLabel(e.data)}),e.options.map((function(t){return P(t,\"\".concat(s,\"-\").concat(t.index))})))}if(\"option\"===e.type)return P(e,\"\".concat(e.index))}));else if(m){var O=y({inputValue:v});if(null===O)return null;L=n.createElement(l,f,O)}else{var I=S({inputValue:v});if(null===I)return null;L=n.createElement(u,f,I)}var D={minMenuHeight:x,maxMenuHeight:b,menuPlacement:w,menuPosition:k,menuShouldScrollIntoView:A},z=n.createElement(De,g({},f,D),(function(e){var r=e.ref,i=e.placerProps,s=i.placement,l=i.maxHeight;return n.createElement(a,g({},f,D,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove,id:t.getElementId(\"listbox\")},isLoading:m,placement:s}),n.createElement(Rr,{captureEnabled:d,onTopArrive:E,onBottomArrive:C,lockEnabled:M},(function(e){return n.createElement(o,g({},f,{innerRef:function(r){t.getMenuListRef(r),e(r)},isLoading:m,maxHeight:l,focusedOption:h}),L)})))}));return T||\"fixed\"===k?n.createElement(s,g({},f,{appendTo:T,controlElement:this.controlRef,menuPlacement:w,menuPosition:k}),z):z}},{key:\"renderFormField\",value:function(){var t=this,e=this.props,r=e.delimiter,i=e.isDisabled,a=e.isMulti,o=e.name,s=e.required,l=this.state.selectValue;if(o&&!i){if(s&&!this.hasValue())return n.createElement(Nr,{name:o,onFocus:this.onValueInputFocus});if(a){if(r){var u=l.map((function(e){return t.getOptionValue(e)})).join(r);return n.createElement(\"input\",{name:o,type:\"hidden\",value:u})}var c=l.length>0?l.map((function(e,r){return n.createElement(\"input\",{key:\"i-\".concat(r),name:o,type:\"hidden\",value:t.getOptionValue(e)})})):n.createElement(\"input\",{name:o,type:\"hidden\",value:\"\"});return n.createElement(\"div\",null,c)}var f=l[0]?this.getOptionValue(l[0]):\"\";return n.createElement(\"input\",{name:o,type:\"hidden\",value:f})}}},{key:\"renderLiveRegion\",value:function(){var t=this.commonProps,e=this.state,r=e.ariaSelection,i=e.focusedOption,a=e.focusedValue,o=e.isFocused,s=e.selectValue,l=this.getFocusableOptions();return n.createElement(hr,g({},t,{id:this.getElementId(\"live-region\"),ariaSelection:r,focusedOption:i,focusedValue:a,isFocused:o,selectValue:s,focusableOptions:l}))}},{key:\"render\",value:function(){var t=this.getComponents(),e=t.Control,r=t.IndicatorsContainer,i=t.SelectContainer,a=t.ValueContainer,o=this.props,s=o.className,l=o.id,u=o.isDisabled,c=o.menuIsOpen,f=this.state.isFocused,h=this.commonProps=this.getCommonProps();return n.createElement(i,g({},h,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:f}),this.renderLiveRegion(),n.createElement(e,g({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:f,menuIsOpen:c}),n.createElement(a,g({},h,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),n.createElement(r,g({},h,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],i=[{key:\"getDerivedStateFromProps\",value:function(t,e){var r=e.prevProps,n=e.clearFocusValueOnUpdate,i=e.inputIsHiddenAfterUpdate,a=e.ariaSelection,o=e.isFocused,s=e.prevWasFocused,l=t.options,c=t.value,f=t.menuIsOpen,h=t.inputValue,p=t.isMulti,d=me(c),g={};if(r&&(c!==r.value||l!==r.options||f!==r.menuIsOpen||h!==r.inputValue)){var v=f?function(t,e){return qr(Hr(t,e))}(t,d):[],m=n?function(t,e){var r=t.focusedValue,n=t.selectValue.indexOf(r);if(n>-1){if(e.indexOf(r)>-1)return r;if(n<e.length)return e[n]}return null}(e,d):null,y=function(t,e){var r=t.focusedOption;return r&&e.indexOf(r)>-1?r:e[0]}(e,v);g={selectValue:d,focusedOption:y,focusedValue:m,clearFocusValueOnUpdate:!1}}var x=null!=i&&t!==r?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},b=a,_=o&&s;return o&&!_&&(b={value:Pe(p,d,d[0]||null),options:d,action:\"initial-input-focus\"},_=!s),\"initial-input-focus\"===(null==a?void 0:a.action)&&(b=null),u(u(u({},g),x),{},{prevProps:t,ariaSelection:b,prevWasFocused:_})}}],r&&v(e.prototype,r),i&&v(e,i),Object.defineProperty(e,\"prototype\",{writable:!1}),l}(n.Component);Qr.defaultProps=Ur;var tn=(0,n.forwardRef)((function(t,e){var r=function(t){var e=t.defaultInputValue,r=void 0===e?\"\":e,i=t.defaultMenuIsOpen,a=void 0!==i&&i,o=t.defaultValue,s=void 0===o?null:o,l=t.inputValue,c=t.menuIsOpen,f=t.onChange,g=t.onInputChange,v=t.onMenuClose,m=t.onMenuOpen,y=t.value,x=p(t,d),b=h((0,n.useState)(void 0!==l?l:r),2),_=b[0],w=b[1],k=h((0,n.useState)(void 0!==c?c:a),2),T=k[0],M=k[1],A=h((0,n.useState)(void 0!==y?y:s),2),S=A[0],E=A[1],C=(0,n.useCallback)((function(t,e){\"function\"==typeof f&&f(t,e),E(t)}),[f]),L=(0,n.useCallback)((function(t,e){var r;\"function\"==typeof g&&(r=g(t,e)),w(void 0!==r?r:t)}),[g]),P=(0,n.useCallback)((function(){\"function\"==typeof m&&m(),M(!0)}),[m]),O=(0,n.useCallback)((function(){\"function\"==typeof v&&v(),M(!1)}),[v]),I=void 0!==l?l:_,D=void 0!==c?c:T,z=void 0!==y?y:S;return u(u({},x),{},{inputValue:I,menuIsOpen:D,onChange:C,onInputChange:L,onMenuClose:O,onMenuOpen:P,value:z})}(t);return n.createElement(Qr,g({ref:e},r))}));const en=tn;var rn,nn=r(9459),an=r.n(nn),on=r(3379),sn=r.n(on),ln=r(7795),un=r.n(ln),cn=r(569),fn=r.n(cn),hn=r(3565),pn=r.n(hn),dn=r(9216),gn=r.n(dn),vn=r(4589),mn=r.n(vn),yn=r(8099),xn={};function bn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}xn.styleTagTransform=mn(),xn.setAttributes=pn(),xn.insert=fn().bind(null,\"head\"),xn.domAPI=un(),xn.insertStyleElement=gn(),sn()(yn.Z,xn),yn.Z&&yn.Z.locals&&yn.Z.locals,t=r.hmd(t),(rn=\"undefined\"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&rn(t);var _n=\"undefined\"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(t){return t},wn=function(t){var e,r,i=(e=(0,n.useState)(t.defaultSelectValue),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var n,i,a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(e,r)||function(t,e){if(t){if(\"string\"==typeof t)return bn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bn(t,e):void 0}}(e,r)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()),a=i[0],s=i[1],l=function(t){s(t.value)};_n(l,\"useSelectedOption{}\",(function(){return[s]}));var u=function(t){var e=[];e.push({value:-1,label:\"Summary\"});for(var r=function(r){var n=t.columns.slice(0,3).map((function(e){return\"\".concat(e,\" (\").concat(t.data[r][e],\")\")})).join(\" | \"),i=\"\".concat(r,\" : \").concat(n),a={value:r,label:i};e.push(a)},n=0;n<t.data.length;n++)r(n);return e}(t.explanations.selector),c=n.createElement(en,{onChange:l,options:u,defaultValue:u[t.defaultSelectValue+1]}),f=n.createElement(\"div\",{className:\"iml-empty-space\"}),h=null,p=\"\";if(null!==a){p=t.explanations.name;var d=null,g=null,v=null;if(-1===a){var m=t.explanations.overall;d=m.figure,g=m.type,v=m.help}else{var y=t.explanations.specific[a];d=y.figure,g=y.type,v=y.help}if(\"none\"===g)f=n.createElement(\"div\",{className:\"iml-center-no-graph\"},n.createElement(\"h1\",null,\"No Overall Graph\"));else if(\"plotly\"===g){var x=d.data,b=JSON.parse(JSON.stringify(d.layout));if(b.autosize=!0,f=n.createElement(o.Z,{data:x,layout:b,style:{width:\"100%\",height:\"100%\"},useResizeHandler:!0}),v&&Object.keys(v).length>0){var _=null,w=v.text.trim();v.link&&(w+=\" \",_=n.createElement(\"a\",{href:v.link},\"Learn more\")),h=n.createElement(\"div\",{className:\"iml-card-help\"},w,_)}}else if(\"html\"===g)f=n.createElement(\"iframe\",{src:d,referrerPolicy:\"no-referrer\",sandbox:\"allow-same-origin allow-scripts\",className:\"iml-renderable-frame\"});else if(\"cytoscape\"===g){var k=JSON.parse(d);f=n.createElement(an(),{elements:k.elements,style:k.style,stylesheet:k.stylesheet,layout:k.layout})}else console.log(\"Type \".concat(g,\" not renderable.\"))}return n.createElement(\"div\",{className:\"iml-root\"},n.createElement(\"div\",{className:\"iml-card\"},n.createElement(\"div\",{className:\"iml-card-header\"},n.createElement(\"div\",{className:\"iml-card-title\"},\"Select Component to Graph\")),n.createElement(\"div\",{className:\"iml-card-body\"},c)),n.createElement(\"div\",{className:\"iml-card\"},n.createElement(\"div\",{className:\"iml-card-header\"},n.createElement(\"div\",{className:\"iml-card-title\"},p)),n.createElement(\"div\",{className:\"iml-card-body iml-card-renderable\"},f),h))};_n(wn,\"useState{[selectedOption, useSelectedOption](props.defaultSelectValue)}\");var kn,Tn,Mn=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=document.getElementById(t);a.render(n.createElement(wn,{explanations:e,defaultSelectValue:r}),i)};(kn=\"undefined\"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(kn.register(wn,\"App\",\"/home/vsts/work/1/s/python/interpret-core/js/src/index.js\"),kn.register(Mn,\"RenderApp\",\"/home/vsts/work/1/s/python/interpret-core/js/src/index.js\")),(Tn=\"undefined\"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&Tn(t)},8099:(t,e,r)=>{\"use strict\";r.d(e,{Z:()=>s});var n=r(8081),i=r.n(n),a=r(3645),o=r.n(a)()(i());o.push([t.id,'.iml-center-no-graph{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.iml-center-no-graph h1{padding:0;margin:0}.iml-renderable-frame{border:0;height:390px;width:100%}.iml-root{height:700px;width:100%;font-size:62.5%;line-height:1.6;font-weight:400;font-family:\"Open Sans\", \"HelveticaNeue\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;color:#323232}.iml-empty-space{width:100%;height:100%;min-height:450px}.iml-card{border-radius:3px;background-color:white;box-shadow:0 2px 6px rgba(0,0,0,0.08);border:1px solid #d1d6e6;margin:30px 20px;font-size:1.5em}.iml-card-header{padding:12px 20px;position:relative;line-height:1;border-bottom:1px solid #eaeff2;background-color:rgba(20,100,130,0.78)}.iml-card-body{position:relative;padding:30px 20px}.iml-card-title{display:inline-block;margin:0;color:#ffffff}.iml-card-renderable{height:450px}.iml-card-help{padding:0px 30px 20px 30px;position:relative;top:-20px}\\n',\"\"]);const s=o},3645:t=>{\"use strict\";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=\"\",n=void 0!==e[5];return e[4]&&(r+=\"@supports (\".concat(e[4],\") {\")),e[2]&&(r+=\"@media \".concat(e[2],\" {\")),n&&(r+=\"@layer\".concat(e[5].length>0?\" \".concat(e[5]):\"\",\" {\")),r+=t(e),n&&(r+=\"}\"),e[2]&&(r+=\"}\"),e[4]&&(r+=\"}\"),r})).join(\"\")},e.i=function(t,r,n,i,a){\"string\"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var u=0;u<t.length;u++){var c=[].concat(t[u]);n&&o[c[0]]||(void 0!==a&&(void 0===c[5]||(c[1]=\"@layer\".concat(c[5].length>0?\" \".concat(c[5]):\"\",\" {\").concat(c[1],\"}\")),c[5]=a),r&&(c[2]?(c[1]=\"@media \".concat(c[2],\" {\").concat(c[1],\"}\"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]=\"@supports (\".concat(c[4],\") {\").concat(c[1],\"}\"),c[4]=i):c[4]=\"\".concat(i)),e.push(c))}},e}},8081:t=>{\"use strict\";t.exports=function(t){return t[1]}},9058:(t,e,r)=>{\"use strict\";var n=r(3279),i=r(4485),a=r(7361),o=r(6968),s=r(84);function l(t){return t&&\"object\"==typeof t&&\"default\"in t?t:{default:t}}var u=l(n),c=l(i),f=l(a),h=l(o),p=l(s);function d(t){return d=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},d(t)}function g(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e,r){return e&&v(t.prototype,e),r&&v(t,r),Object.defineProperty(t,\"prototype\",{writable:!1}),t}function y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var n,i,a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,e)||function(t,e){if(t){if(\"string\"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(t,e):void 0}}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var _=\"undefined\"==typeof window?null:window,w=_?_.navigator:null;_&&_.document;var k=d(\"\"),T=d({}),M=d((function(){})),A=\"undefined\"==typeof HTMLElement?\"undefined\":d(HTMLElement),S=function(t){return t&&t.instanceString&&C(t.instanceString)?t.instanceString():null},E=function(t){return null!=t&&d(t)==k},C=function(t){return null!=t&&d(t)===M},L=function(t){return!D(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},P=function(t){return null!=t&&d(t)===T&&!L(t)&&t.constructor===Object},O=function(t){return null!=t&&d(t)===d(1)&&!isNaN(t)},I=function(t){return\"undefined\"===A?void 0:null!=t&&t instanceof HTMLElement},D=function(t){return z(t)||R(t)},z=function(t){return\"collection\"===S(t)&&t._private.single},R=function(t){return\"collection\"===S(t)&&!t._private.single},F=function(t){return\"core\"===S(t)},N=function(t){return\"stylesheet\"===S(t)},B=function(t){return null==t||!(\"\"!==t&&!t.match(/^\\s+$/))},j=function(t){return function(t){return null!=t&&d(t)===T}(t)&&C(t.then)},U=function(t,e){e||(e=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return\"undefined\";for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return t.join(\"$\")});var r=function r(){var n,i=this,a=arguments,o=e.apply(i,a),s=r.cache;return(n=s[o])||(n=s[o]=t.apply(i,a)),n};return r.cache={},r},V=U((function(t){return t.replace(/([A-Z])/g,(function(t){return\"-\"+t.toLowerCase()}))})),H=U((function(t){return t.replace(/(-\\w)/g,(function(t){return t[1].toUpperCase()}))})),q=U((function(t,e){return t+e[0].toUpperCase()+e.substring(1)}),(function(t,e){return t+\"$\"+e})),G=function(t){return B(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},Y=\"(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))\",W=function(t,e){return t<e?-1:t>e?1:0},X=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(null!=n)for(var i=Object.keys(n),a=0;a<i.length;a++){var o=i[a];t[o]=n[o]}}return t},Z={transparent:[0,0,0,0],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],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],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],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]},K=function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(P(a))throw Error(\"Tried to set map with object key\");i<r.length-1?(null==e[a]&&(e[a]={}),e=e[a]):e[a]=t.value}},J=function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(P(a))throw Error(\"Tried to get map with object key\");if(null==(e=e[a]))return e}return e},$=_?_.performance:null,Q=$&&$.now?function(){return $.now()}:function(){return Date.now()},tt=function(){if(_){if(_.requestAnimationFrame)return function(t){_.requestAnimationFrame(t)};if(_.mozRequestAnimationFrame)return function(t){_.mozRequestAnimationFrame(t)};if(_.webkitRequestAnimationFrame)return function(t){_.webkitRequestAnimationFrame(t)};if(_.msRequestAnimationFrame)return function(t){_.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout((function(){t(Q())}),1e3/60)}}(),et=function(t){return tt(t)},rt=Q,nt=9261,it=65599,at=5381,ot=function(t){for(var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt,n=r;!(e=t.next()).done;)n=n*it+e.value|0;return n},st=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;return e*it+t|0},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:at;return(e<<5)+e+t|0},ut=function(t){return 2097152*t[0]+t[1]},ct=function(t,e){return[st(t[0],e[0]),lt(t[1],e[1])]},ft=function(t,e){var r={value:0,done:!1},n=0,i=t.length;return ot({next:function(){return n<i?r.value=t.charCodeAt(n++):r.done=!0,r}},e)},ht=function(){return pt(arguments)},pt=function(t){for(var e,r=0;r<t.length;r++){var n=t[r];e=0===r?ft(n):ft(n,e)}return e},dt=!0,gt=null!=console.warn,vt=null!=console.trace,mt=Number.MAX_SAFE_INTEGER||9007199254740991,yt=function(){return!0},xt=function(){return!1},bt=function(){return 0},_t=function(){},wt=function(t){throw new Error(t)},kt=function(t){if(void 0===t)return dt;dt=!!t},Tt=function(t){kt()&&(gt?console.warn(t):(console.log(t),vt&&console.trace()))},Mt=function(t){return null==t?t:L(t)?t.slice():P(t)?function(t){return X({},t)}(t):t},At=function(t,e){for(e=t=\"\";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):\"-\");return e},St={},Et=function(){return St},Ct=function(t){var e=Object.keys(t);return function(r){for(var n={},i=0;i<e.length;i++){var a=e[i],o=null==r?void 0:r[a];n[a]=void 0===o?t[a]:o}return n}},Lt=function(t,e,r){for(var n=t.length-1;n>=0&&(t[n]!==e||(t.splice(n,1),!r));n--);},Pt=function(t){t.splice(0,t.length)},Ot=function(t,e,r){return r&&(e=q(r,e)),t[e]},It=function(t,e,r,n){r&&(e=q(r,e)),t[e]=n},Dt=\"undefined\"!=typeof Map?Map:function(){function t(){g(this,t),this._obj={}}return m(t,[{key:\"set\",value:function(t,e){return this._obj[t]=e,this}},{key:\"delete\",value:function(t){return this._obj[t]=void 0,this}},{key:\"clear\",value:function(){this._obj={}}},{key:\"has\",value:function(t){return void 0!==this._obj[t]}},{key:\"get\",value:function(t){return this._obj[t]}}]),t}(),zt=function(){function t(e){if(g(this,t),this._obj=Object.create(null),this.size=0,null!=e){var r;r=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var n=0;n<r.length;n++)this.add(r[n])}}return m(t,[{key:\"instanceString\",value:function(){return\"set\"}},{key:\"add\",value:function(t){var e=this._obj;1!==e[t]&&(e[t]=1,this.size++)}},{key:\"delete\",value:function(t){var e=this._obj;1===e[t]&&(e[t]=0,this.size--)}},{key:\"clear\",value:function(){this._obj=Object.create(null)}},{key:\"has\",value:function(t){return 1===this._obj[t]}},{key:\"toArray\",value:function(){var t=this;return Object.keys(this._obj).filter((function(e){return t.has(e)}))}},{key:\"forEach\",value:function(t,e){return this.toArray().forEach(t,e)}}]),t}(),Rt=\"undefined\"!==(\"undefined\"==typeof Set?\"undefined\":d(Set))?Set:zt,Ft=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&F(t)){var n=e.group;if(null==n&&(n=e.data&&null!=e.data.source&&null!=e.data.target?\"edges\":\"nodes\"),\"nodes\"===n||\"edges\"===n){this.length=1,this[0]=this;var i=this._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?\"edges\"===n:!!e.pannable,active:!1,classes:new Rt,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,\"mid-source\":null,\"mid-target\":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),e.renderedPosition){var a=e.renderedPosition,o=t.pan(),s=t.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];L(e.classes)?l=e.classes:E(e.classes)&&(l=e.classes.split(/\\s+/));for(var u=0,c=l.length;u<c;u++){var f=l[u];f&&\"\"!==f&&i.classes.add(f)}this.createEmitter();var h=e.style||e.css;h&&(Tt(\"Setting a `style` bypass at element creation should be done only when absolutely necessary.  Try to use the stylesheet instead.\"),this.style(h)),(void 0===r||r)&&this.restore()}else wt(\"An element must be of type `nodes` or `edges`; you specified `\"+n+\"`\")}else wt(\"An element must have a core reference and parameters set\")},Nt=function(t){return t={bfs:t.bfs||!t.dfs,dfs:t.dfs||!t.bfs},function(e,r,n){var i;P(e)&&!D(e)&&(e=(i=e).roots||i.root,r=i.visit,n=i.directed),n=2!==arguments.length||C(r)?n:r,r=C(r)?r:function(){};for(var a,o=this._private.cy,s=e=E(e)?this.filter(e):e,l=[],u=[],c={},f={},h={},p=0,d=this.byGroup(),g=d.nodes,v=d.edges,m=0;m<s.length;m++){var y=s[m],x=y.id();y.isNode()&&(l.unshift(y),t.bfs&&(h[x]=!0,u.push(y)),f[x]=0)}for(var b=function(){var e=t.bfs?l.shift():l.pop(),i=e.id();if(t.dfs){if(h[i])return\"continue\";h[i]=!0,u.push(e)}var o,s=f[i],d=c[i],m=null!=d?d.source():null,y=null!=d?d.target():null,x=null==d?void 0:e.same(m)?y[0]:m[0];if(!0===(o=r(e,d,x,p++,s)))return a=e,\"break\";if(!1===o)return\"break\";for(var b=e.connectedEdges().filter((function(t){return(!n||t.source().same(e))&&v.has(t)})),_=0;_<b.length;_++){var w=b[_],k=w.connectedNodes().filter((function(t){return!t.same(e)&&g.has(t)})),T=k.id();0===k.length||h[T]||(k=k[0],l.push(k),t.bfs&&(h[T]=!0,u.push(k)),c[T]=w,f[T]=f[i]+1)}};0!==l.length;){var _=b();if(\"continue\"!==_&&\"break\"===_)break}for(var w=o.collection(),k=0;k<u.length;k++){var T=u[k],M=c[T.id()];null!=M&&w.push(M),w.push(T)}return{path:o.collection(w),found:o.collection(a)}}},Bt={breadthFirstSearch:Nt({bfs:!0}),depthFirstSearch:Nt({dfs:!0})};Bt.bfs=Bt.breadthFirstSearch,Bt.dfs=Bt.depthFirstSearch;var jt=Ct({root:null,weight:function(t){return 1},directed:!1}),Ut={dijkstra:function(t){if(!P(t)){var e=arguments;t={root:e[0],weight:e[1],directed:e[2]}}var r=jt(t),n=r.root,i=r.weight,a=r.directed,o=this,s=i,l=E(n)?this.filter(n)[0]:n[0],u={},f={},h={},p=this.byGroup(),d=p.nodes,g=p.edges;g.unmergeBy((function(t){return t.isLoop()}));for(var v=function(t){return u[t.id()]},m=function(t,e){u[t.id()]=e,y.updateItem(t)},y=new c.default((function(t,e){return v(t)-v(e)})),x=0;x<d.length;x++){var b=d[x];u[b.id()]=b.same(l)?0:1/0,y.push(b)}for(var _=function(t,e){for(var r,n=(a?t.edgesTo(e):t.edgesWith(e)).intersect(g),i=1/0,o=0;o<n.length;o++){var l=n[o],u=s(l);(u<i||!r)&&(i=u,r=l)}return{edge:r,dist:i}};y.size()>0;){var w=y.pop(),k=v(w),T=w.id();if(h[T]=k,k!==1/0)for(var M=w.neighborhood().intersect(d),A=0;A<M.length;A++){var S=M[A],C=S.id(),L=_(w,S),O=k+L.dist;O<v(S)&&(m(S,O),f[C]={node:w,edge:L.edge})}}return{distanceTo:function(t){var e=E(t)?d.filter(t)[0]:t[0];return h[e.id()]},pathTo:function(t){var e=E(t)?d.filter(t)[0]:t[0],r=[],n=e,i=n.id();if(e.length>0)for(r.unshift(e);f[i];){var a=f[i];r.unshift(a.edge),r.unshift(a.node),i=(n=a.node).id()}return o.spawn(r)}}}},Vt={kruskal:function(t){t=t||function(t){return 1};for(var e=this.byGroup(),r=e.nodes,n=e.edges,i=r.length,a=new Array(i),o=r,s=function(t){for(var e=0;e<a.length;e++)if(a[e].has(t))return e},l=0;l<i;l++)a[l]=this.spawn(r[l]);for(var u=n.sort((function(e,r){return t(e)-t(r)})),c=0;c<u.length;c++){var f=u[c],h=f.source()[0],p=f.target()[0],d=s(h),g=s(p),v=a[d],m=a[g];d!==g&&(o.merge(f),v.merge(m),a.splice(g,1))}return o}},Ht=Ct({root:null,goal:null,weight:function(t){return 1},heuristic:function(t){return 0},directed:!1}),qt={aStar:function(t){var e=this.cy(),r=Ht(t),n=r.root,i=r.goal,a=r.heuristic,o=r.directed,s=r.weight;n=e.collection(n)[0],i=e.collection(i)[0];var l,u,f=n.id(),h=i.id(),p={},d={},g={},v=new c.default((function(t,e){return d[t.id()]-d[e.id()]})),m=new Rt,y={},x={},b=function(t,e){v.push(t),m.add(e)};b(n,f),p[f]=0,d[f]=a(n);for(var _,w=0;v.size()>0;){if(u=(l=v.pop()).id(),m.delete(u),w++,u===h){for(var k=[],T=i,M=h,A=x[M];k.unshift(T),null!=A&&k.unshift(A),null!=(T=y[M]);)A=x[M=T.id()];return{found:!0,distance:p[u],path:this.spawn(k),steps:w}}g[u]=!0;for(var S=l._private.edges,E=0;E<S.length;E++){var C=S[E];if(this.hasElementWithId(C.id())&&(!o||C.data(\"source\")===u)){var L=C.source(),P=C.target(),O=L.id()!==u?L:P,I=O.id();if(this.hasElementWithId(I)&&!g[I]){var D=p[u]+s(C);_=I,m.has(_)?D<p[I]&&(p[I]=D,d[I]=D+a(O),y[I]=l,x[I]=C):(p[I]=D,d[I]=D+a(O),b(O,I),y[I]=l,x[I]=C)}}}}return{found:!1,distance:void 0,path:void 0,steps:w}}},Gt=Ct({weight:function(t){return 1},directed:!1}),Yt={floydWarshall:function(t){for(var e=this.cy(),r=Gt(t),n=r.weight,i=r.directed,a=n,o=this.byGroup(),s=o.nodes,l=o.edges,u=s.length,c=u*u,f=function(t){return s.indexOf(t)},h=function(t){return s[t]},p=new Array(c),d=0;d<c;d++){var g=d%u,v=(d-g)/u;p[d]=v===g?0:1/0}for(var m=new Array(c),y=new Array(c),x=0;x<l.length;x++){var b=l[x],_=b.source()[0],w=b.target()[0];if(_!==w){var k=f(_),T=f(w),M=k*u+T,A=a(b);if(p[M]>A&&(p[M]=A,m[M]=T,y[M]=b),!i){var S=T*u+k;!i&&p[S]>A&&(p[S]=A,m[S]=k,y[S]=b)}}}for(var C=0;C<u;C++)for(var L=0;L<u;L++)for(var P=L*u+C,O=0;O<u;O++){var I=L*u+O,D=C*u+O;p[P]+p[D]<p[I]&&(p[I]=p[P]+p[D],m[I]=m[P])}var z=function(t){return f(function(t){return(E(t)?e.filter(t):t)[0]}(t))},R={distance:function(t,e){var r=z(t),n=z(e);return p[r*u+n]},path:function(t,r){var n=z(t),i=z(r),a=h(n);if(n===i)return a.collection();if(null==m[n*u+i])return e.collection();var o,s=e.collection(),l=n;for(s.merge(a);n!==i;)l=n,n=m[n*u+i],o=y[l*u+n],s.merge(o),s.merge(h(n));return s}};return R}},Wt=Ct({weight:function(t){return 1},directed:!1,root:null}),Xt={bellmanFord:function(t){var e=this,r=Wt(t),n=r.weight,i=r.directed,a=r.root,o=n,s=this,l=this.cy(),u=this.byGroup(),c=u.edges,f=u.nodes,h=f.length,p=new Dt,d=!1,g=[];a=l.collection(a)[0],c.unmergeBy((function(t){return t.isLoop()}));for(var v=c.length,m=function(t){var e=p.get(t.id());return e||(e={},p.set(t.id(),e)),e},y=function(t){return(E(t)?l.$(t):t)[0]},x=0;x<h;x++){var b=f[x],_=m(b);b.same(a)?_.dist=0:_.dist=1/0,_.pred=null,_.edge=null}for(var w=!1,k=function(t,e,r,n,i,a){var o=n.dist+a;o<i.dist&&!r.same(n.edge)&&(i.dist=o,i.pred=t,i.edge=r,w=!0)},T=1;T<h;T++){w=!1;for(var M=0;M<v;M++){var A=c[M],S=A.source(),C=A.target(),L=o(A),P=m(S),O=m(C);k(S,0,A,P,O,L),i||k(C,0,A,O,P,L)}if(!w)break}if(w)for(var I=[],D=0;D<v;D++){var z=c[D],R=z.source(),F=z.target(),N=o(z),B=m(R).dist,j=m(F).dist;if(B+N<j||!i&&j+N<B){if(d||(Tt(\"Graph contains a negative weight cycle for Bellman-Ford\"),d=!0),!1===t.findNegativeWeightCycles)break;var U=[];B+N<j&&U.push(R),!i&&j+N<B&&U.push(F);for(var V=U.length,H=0;H<V;H++){var q=U[H],G=[q];G.push(m(q).edge);for(var Y=m(q).pred;-1===G.indexOf(Y);)G.push(Y),G.push(m(Y).edge),Y=m(Y).pred;for(var W=(G=G.slice(G.indexOf(Y)))[0].id(),X=0,Z=2;Z<G.length;Z+=2)G[Z].id()<W&&(W=G[Z].id(),X=Z);(G=G.slice(X).concat(G.slice(0,X))).push(G[0]);var K=G.map((function(t){return t.id()})).join(\",\");-1===I.indexOf(K)&&(g.push(s.spawn(G)),I.push(K))}}}return{distanceTo:function(t){return m(y(t)).dist},pathTo:function(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=y(t),i=[],o=n;;){if(null==o)return e.spawn();var l=m(o),u=l.edge,c=l.pred;if(i.unshift(o[0]),o.same(r)&&i.length>0)break;null!=u&&i.unshift(u),o=c}return s.spawn(i)},hasNegativeWeightCycle:d,negativeWeightCycles:g}}},Zt=Math.sqrt(2),Kt=function(t,e,r){0===r.length&&wt(\"Karger-Stein must be run on a connected (sub)graph\");for(var n=r[t],i=n[1],a=n[2],o=e[i],s=e[a],l=r,u=l.length-1;u>=0;u--){var c=l[u],f=c[1],h=c[2];(e[f]===o&&e[h]===s||e[f]===s&&e[h]===o)&&l.splice(u,1)}for(var p=0;p<l.length;p++){var d=l[p];d[1]===s?(l[p]=d.slice(),l[p][1]=o):d[2]===s&&(l[p]=d.slice(),l[p][2]=o)}for(var g=0;g<e.length;g++)e[g]===s&&(e[g]=o);return l},Jt=function(t,e,r,n){for(;r>n;){var i=Math.floor(Math.random()*e.length);e=Kt(i,t,e),r--}return e},$t={kargerStein:function(){var t=this,e=this.byGroup(),r=e.nodes,n=e.edges;n.unmergeBy((function(t){return t.isLoop()}));var i=r.length,a=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/Zt);if(!(i<2)){for(var l=[],u=0;u<a;u++){var c=n[u];l.push([u,r.indexOf(c.source()),r.indexOf(c.target())])}for(var f=1/0,h=[],p=new Array(i),d=new Array(i),g=new Array(i),v=function(t,e){for(var r=0;r<i;r++)e[r]=t[r]},m=0;m<=o;m++){for(var y=0;y<i;y++)d[y]=y;var x=Jt(d,l.slice(),i,s),b=x.slice();v(d,g);var _=Jt(d,x,s,2),w=Jt(g,b,s,2);_.length<=w.length&&_.length<f?(f=_.length,h=_,v(d,p)):w.length<=_.length&&w.length<f&&(f=w.length,h=w,v(g,p))}for(var k=this.spawn(h.map((function(t){return n[t[0]]}))),T=this.spawn(),M=this.spawn(),A=p[0],S=0;S<p.length;S++){var E=p[S],C=r[S];E===A?T.merge(C):M.merge(C)}var L=function(e){var r=t.spawn();return e.forEach((function(e){r.merge(e),e.connectedEdges().forEach((function(e){t.contains(e)&&!k.contains(e)&&r.merge(e)}))})),r},P=[L(T),L(M)];return{cut:k,components:P,partition1:T,partition2:M}}wt(\"At least 2 nodes are required for Karger-Stein algorithm\")}},Qt=function(t,e,r){return{x:t.x*e+r.x,y:t.y*e+r.y}},te=function(t,e,r){return{x:(t.x-r.x)/e,y:(t.y-r.y)/e}},ee=function(t){return{x:t[0],y:t[1]}},re=function(t,e){return Math.atan2(e,t)-Math.PI/2},ne=Math.log2||function(t){return Math.log(t)/Math.log(2)},ie=function(t){return t>0?1:t<0?-1:0},ae=function(t,e){return Math.sqrt(oe(t,e))},oe=function(t,e){var r=e.x-t.x,n=e.y-t.y;return r*r+n*n},se=function(t){for(var e=t.length,r=0,n=0;n<e;n++)r+=t[n];for(var i=0;i<e;i++)t[i]=t[i]/r;return t},le=function(t,e,r,n){return(1-n)*(1-n)*t+2*(1-n)*n*e+n*n*r},ue=function(t,e,r,n){return{x:le(t.x,e.x,r.x,n),y:le(t.y,e.y,r.y,n)}},ce=function(t,e,r){return Math.max(t,Math.min(r,e))},fe=function(t){if(null==t)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=t.x1&&null!=t.y1){if(null!=t.x2&&null!=t.y2&&t.x2>=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},he=function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},pe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},de=function(t){var e,r,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)e=r=n=i=a[0];else if(2===a.length)e=n=a[0],i=r=a[1];else if(4===a.length){var o=x(a,4);e=o[0],r=o[1],n=o[2],i=o[3]}return t.x1-=i,t.x2+=r,t.y1-=e,t.y2+=n,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},ge=function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},ve=function(t,e){return!(t.x1>e.x2||e.x1>t.x2||t.x2<e.x1||e.x2<t.x1||t.y2<e.y1||e.y2<t.y1||t.y1>e.y2||e.y1>t.y2)},me=function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},ye=function(t,e){return me(t,e.x1,e.y1)&&me(t,e.x2,e.y2)},xe=function(t,e,r,n,i,a,o){var s,l=Fe(i,a),u=i/2,c=a/2,f=n-c-o;if((s=Pe(t,e,r,n,r-u+l-o,f,r+u-l+o,f,!1)).length>0)return s;var h=r+u+o;if((s=Pe(t,e,r,n,h,n-c+l-o,h,n+c-l+o,!1)).length>0)return s;var p=n+c+o;if((s=Pe(t,e,r,n,r-u+l-o,p,r+u-l+o,p,!1)).length>0)return s;var d,g=r-u-o;if((s=Pe(t,e,r,n,g,n-c+l-o,g,n+c-l+o,!1)).length>0)return s;var v=r-u+l,m=n-c+l;if((d=Ce(t,e,r,n,v,m,l+o)).length>0&&d[0]<=v&&d[1]<=m)return[d[0],d[1]];var y=r+u-l,x=n-c+l;if((d=Ce(t,e,r,n,y,x,l+o)).length>0&&d[0]>=y&&d[1]<=x)return[d[0],d[1]];var b=r+u-l,_=n+c-l;if((d=Ce(t,e,r,n,b,_,l+o)).length>0&&d[0]>=b&&d[1]>=_)return[d[0],d[1]];var w=r-u+l,k=n+c-l;return(d=Ce(t,e,r,n,w,k,l+o)).length>0&&d[0]<=w&&d[1]>=k?[d[0],d[1]]:[]},be=function(t,e,r,n,i,a,o){var s=o,l=Math.min(r,i),u=Math.max(r,i),c=Math.min(n,a),f=Math.max(n,a);return l-s<=t&&t<=u+s&&c-s<=e&&e<=f+s},_e=function(t,e,r,n,i,a,o,s,l){var u=Math.min(r,o,i)-l,c=Math.max(r,o,i)+l,f=Math.min(n,s,a)-l,h=Math.max(n,s,a)+l;return!(t<u||t>c||e<f||e>h)},we=function(t,e,r,n,i,a,o,s){var l,u,c,f,h,p,d,g,v,m,y,x,b,_=[];u=9*r*i-3*r*r-3*r*o-6*i*i+3*i*o+9*n*a-3*n*n-3*n*s-6*a*a+3*a*s,c=3*r*r-6*r*i+r*o-r*t+2*i*i+2*i*t-o*t+3*n*n-6*n*a+n*s-n*e+2*a*a+2*a*e-s*e,f=1*r*i-r*r+r*t-i*t+n*a-n*n+n*e-a*e,0===(l=1*r*r-4*r*i+2*r*o+4*i*i-4*i*o+o*o+n*n-4*n*a+2*n*s+4*a*a-4*a*s+s*s)&&(l=1e-5),g=-27*(f/=l)+(u/=l)*(9*(c/=l)-u*u*2),p=(d=(3*c-u*u)/9)*d*d+(g/=54)*g,(h=_)[1]=0,x=u/3,p>0?(m=(m=g+Math.sqrt(p))<0?-Math.pow(-m,1/3):Math.pow(m,1/3),y=(y=g-Math.sqrt(p))<0?-Math.pow(-y,1/3):Math.pow(y,1/3),h[0]=-x+m+y,x+=(m+y)/2,h[4]=h[2]=-x,x=Math.sqrt(3)*(-y+m)/2,h[3]=x,h[5]=-x):(h[5]=h[3]=0,0===p?(b=g<0?-Math.pow(-g,1/3):Math.pow(g,1/3),h[0]=2*b-x,h[4]=h[2]=-(b+x)):(v=(d=-d)*d*d,v=Math.acos(g/Math.sqrt(v)),b=2*Math.sqrt(d),h[0]=-x+b*Math.cos(v/3),h[2]=-x+b*Math.cos((v+2*Math.PI)/3),h[4]=-x+b*Math.cos((v+4*Math.PI)/3)));for(var w=[],k=0;k<6;k+=2)Math.abs(_[k+1])<1e-7&&_[k]>=0&&_[k]<=1&&w.push(_[k]);w.push(1),w.push(0);for(var T,M,A,S=-1,E=0;E<w.length;E++)T=Math.pow(1-w[E],2)*r+2*(1-w[E])*w[E]*i+w[E]*w[E]*o,M=Math.pow(1-w[E],2)*n+2*(1-w[E])*w[E]*a+w[E]*w[E]*s,A=Math.pow(T-t,2)+Math.pow(M-e,2),S>=0?A<S&&(S=A):S=A;return S},ke=function(t,e,r,n,i,a){var o=[t-r,e-n],s=[i-r,a-n],l=s[0]*s[0]+s[1]*s[1],u=o[0]*o[0]+o[1]*o[1],c=o[0]*s[0]+o[1]*s[1],f=c*c/l;return c<0?u:f>l?(t-i)*(t-i)+(e-a)*(e-a):u-f},Te=function(t,e,r){for(var n,i,a,o,s=0,l=0;l<r.length/2;l++)if(n=r[2*l],i=r[2*l+1],l+1<r.length/2?(a=r[2*(l+1)],o=r[2*(l+1)+1]):(a=r[2*(l+1-r.length/2)],o=r[2*(l+1-r.length/2)+1]),n==t&&a==t);else{if(!(n>=t&&t>=a||n<=t&&t<=a))continue;(t-n)/(a-n)*(o-i)+i>e&&s++}return s%2!=0},Me=function(t,e,r,n,i,a,o,s,l){var u,c=new Array(r.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var f,h=Math.cos(-u),p=Math.sin(-u),d=0;d<c.length/2;d++)c[2*d]=a/2*(r[2*d]*h-r[2*d+1]*p),c[2*d+1]=o/2*(r[2*d+1]*h+r[2*d]*p),c[2*d]+=n,c[2*d+1]+=i;if(l>0){var g=Se(c,-l);f=Ae(g)}else f=c;return Te(t,e,f)},Ae=function(t){for(var e,r,n,i,a,o,s,l,u=new Array(t.length/2),c=0;c<t.length/4;c++){e=t[4*c],r=t[4*c+1],n=t[4*c+2],i=t[4*c+3],c<t.length/4-1?(a=t[4*(c+1)],o=t[4*(c+1)+1],s=t[4*(c+1)+2],l=t[4*(c+1)+3]):(a=t[0],o=t[1],s=t[2],l=t[3]);var f=Pe(e,r,n,i,a,o,s,l,!0);u[2*c]=f[0],u[2*c+1]=f[1]}return u},Se=function(t,e){for(var r,n,i,a,o=new Array(2*t.length),s=0;s<t.length/2;s++){r=t[2*s],n=t[2*s+1],s<t.length/2-1?(i=t[2*(s+1)],a=t[2*(s+1)+1]):(i=t[0],a=t[1]);var l=a-n,u=-(i-r),c=Math.sqrt(l*l+u*u),f=l/c,h=u/c;o[4*s]=r+f*e,o[4*s+1]=n+h*e,o[4*s+2]=i+f*e,o[4*s+3]=a+h*e}return o},Ee=function(t,e,r,n,i,a,o){return t-=i,e-=a,(t/=r/2+o)*t+(e/=n/2+o)*e<=1},Ce=function(t,e,r,n,i,a,o){var s=[r-t,n-e],l=[t-i,e-a],u=s[0]*s[0]+s[1]*s[1],c=2*(l[0]*s[0]+l[1]*s[1]),f=c*c-4*u*(l[0]*l[0]+l[1]*l[1]-o*o);if(f<0)return[];var h=(-c+Math.sqrt(f))/(2*u),p=(-c-Math.sqrt(f))/(2*u),d=Math.min(h,p),g=Math.max(h,p),v=[];if(d>=0&&d<=1&&v.push(d),g>=0&&g<=1&&v.push(g),0===v.length)return[];var m=v[0]*s[0]+t,y=v[0]*s[1]+e;return v.length>1?v[0]==v[1]?[m,y]:[m,y,v[1]*s[0]+t,v[1]*s[1]+e]:[m,y]},Le=function(t,e,r){return e<=t&&t<=r||r<=t&&t<=e?t:t<=e&&e<=r||r<=e&&e<=t?e:r},Pe=function(t,e,r,n,i,a,o,s,l){var u=t-i,c=r-t,f=o-i,h=e-a,p=n-e,d=s-a,g=f*h-d*u,v=c*h-p*u,m=d*c-f*p;if(0!==m){var y=g/m,x=v/m,b=-.001;return b<=y&&y<=1.001&&b<=x&&x<=1.001||l?[t+y*c,e+y*p]:[]}return 0===g||0===v?Le(t,r,o)===o?[o,s]:Le(t,r,i)===i?[i,a]:Le(i,o,r)===r?[r,n]:[]:[]},Oe=function(t,e,r,n,i,a,o,s){var l,u,c,f,h,p,d=[],g=new Array(r.length),v=!0;if(null==a&&(v=!1),v){for(var m=0;m<g.length/2;m++)g[2*m]=r[2*m]*a+n,g[2*m+1]=r[2*m+1]*o+i;if(s>0){var y=Se(g,-s);u=Ae(y)}else u=g}else u=r;for(var x=0;x<u.length/2;x++)c=u[2*x],f=u[2*x+1],x<u.length/2-1?(h=u[2*(x+1)],p=u[2*(x+1)+1]):(h=u[0],p=u[1]),0!==(l=Pe(t,e,n,i,c,f,h,p)).length&&d.push(l[0],l[1]);return d},Ie=function(t,e,r){var n=[t[0]-e[0],t[1]-e[1]],i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),a=(i-r)/i;return a<0&&(a=1e-5),[e[0]+a*n[0],e[1]+a*n[1]]},De=function(t,e){var r=Re(t,e);return ze(r)},ze=function(t){for(var e,r,n=t.length/2,i=1/0,a=1/0,o=-1/0,s=-1/0,l=0;l<n;l++)e=t[2*l],r=t[2*l+1],i=Math.min(i,e),o=Math.max(o,e),a=Math.min(a,r),s=Math.max(s,r);for(var u=2/(o-i),c=2/(s-a),f=0;f<n;f++)e=t[2*f]=t[2*f]*u,r=t[2*f+1]=t[2*f+1]*c,i=Math.min(i,e),o=Math.max(o,e),a=Math.min(a,r),s=Math.max(s,r);if(a<-1)for(var h=0;h<n;h++)r=t[2*h+1]=t[2*h+1]+(-1-a);return t},Re=function(t,e){var r=1/t*2*Math.PI,n=t%2==0?Math.PI/2+r/2:Math.PI/2;n+=e;for(var i,a=new Array(2*t),o=0;o<t;o++)i=o*r+n,a[2*o]=Math.cos(i),a[2*o+1]=Math.sin(-i);return a},Fe=function(t,e){return Math.min(t/4,e/4,8)},Ne=function(t,e){return Math.min(t/10,e/10,8)},Be=function(t,e){return{heightOffset:Math.min(15,.05*e),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}},je=Ct({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(t){return 1}}),Ue={pageRank:function(t){for(var e=je(t),r=e.dampingFactor,n=e.precision,i=e.iterations,a=e.weight,o=this._private.cy,s=this.byGroup(),l=s.nodes,u=s.edges,c=l.length,f=c*c,h=u.length,p=new Array(f),d=new Array(c),g=(1-r)/c,v=0;v<c;v++){for(var m=0;m<c;m++)p[v*c+m]=0;d[v]=0}for(var y=0;y<h;y++){var x=u[y],b=x.data(\"source\"),_=x.data(\"target\");if(b!==_){var w=l.indexOfId(b),k=l.indexOfId(_),T=a(x);p[k*c+w]+=T,d[w]+=T}}for(var M=1/c+g,A=0;A<c;A++)if(0===d[A])for(var S=0;S<c;S++)p[S*c+A]=M;else for(var E=0;E<c;E++){var C=E*c+A;p[C]=p[C]/d[A]+g}for(var L,P=new Array(c),O=new Array(c),I=0;I<c;I++)P[I]=1;for(var D=0;D<i;D++){for(var z=0;z<c;z++)O[z]=0;for(var R=0;R<c;R++)for(var F=0;F<c;F++){var N=R*c+F;O[R]+=p[N]*P[F]}se(O),L=P,P=O,O=L;for(var B=0,j=0;j<c;j++){var U=L[j]-P[j];B+=U*U}if(B<n)break}return{rank:function(t){return t=o.collection(t)[0],P[l.indexOf(t)]}}}},Ve=Ct({root:null,weight:function(t){return 1},directed:!1,alpha:0}),He={degreeCentralityNormalized:function(t){t=Ve(t);var e=this.cy(),r=this.nodes(),n=r.length;if(t.directed){for(var i={},a={},o=0,s=0,l=0;l<n;l++){var u=r[l],c=u.id();t.root=u;var f=this.degreeCentrality(t);o<f.indegree&&(o=f.indegree),s<f.outdegree&&(s=f.outdegree),i[c]=f.indegree,a[c]=f.outdegree}return{indegree:function(t){return 0==o?0:(E(t)&&(t=e.filter(t)),i[t.id()]/o)},outdegree:function(t){return 0===s?0:(E(t)&&(t=e.filter(t)),a[t.id()]/s)}}}for(var h={},p=0,d=0;d<n;d++){var g=r[d];t.root=g;var v=this.degreeCentrality(t);p<v.degree&&(p=v.degree),h[g.id()]=v.degree}return{degree:function(t){return 0===p?0:(E(t)&&(t=e.filter(t)),h[t.id()]/p)}}},degreeCentrality:function(t){t=Ve(t);var e=this.cy(),r=this,n=t,i=n.root,a=n.weight,o=n.directed,s=n.alpha;if(i=e.collection(i)[0],o){for(var l=i.connectedEdges(),u=l.filter((function(t){return t.target().same(i)&&r.has(t)})),c=l.filter((function(t){return t.source().same(i)&&r.has(t)})),f=u.length,h=c.length,p=0,d=0,g=0;g<u.length;g++)p+=a(u[g]);for(var v=0;v<c.length;v++)d+=a(c[v]);return{indegree:Math.pow(f,1-s)*Math.pow(p,s),outdegree:Math.pow(h,1-s)*Math.pow(d,s)}}for(var m=i.connectedEdges().intersection(r),y=m.length,x=0,b=0;b<m.length;b++)x+=a(m[b]);return{degree:Math.pow(y,1-s)*Math.pow(x,s)}}};He.dc=He.degreeCentrality,He.dcn=He.degreeCentralityNormalised=He.degreeCentralityNormalized;var qe=Ct({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Ge={closenessCentralityNormalized:function(t){for(var e=qe(t),r=e.harmonic,n=e.weight,i=e.directed,a=this.cy(),o={},s=0,l=this.nodes(),u=this.floydWarshall({weight:n,directed:i}),c=0;c<l.length;c++){for(var f=0,h=l[c],p=0;p<l.length;p++)if(c!==p){var d=u.distance(h,l[p]);f+=r?1/d:d}r||(f=1/f),s<f&&(s=f),o[h.id()]=f}return{closeness:function(t){return 0==s?0:(t=E(t)?a.filter(t)[0].id():t.id(),o[t]/s)}}},closenessCentrality:function(t){var e=qe(t),r=e.root,n=e.weight,i=e.directed,a=e.harmonic;r=this.filter(r)[0];for(var o=this.dijkstra({root:r,weight:n,directed:i}),s=0,l=this.nodes(),u=0;u<l.length;u++){var c=l[u];if(!c.same(r)){var f=o.distanceTo(c);s+=a?1/f:f}}return a?s:1/s}};Ge.cc=Ge.closenessCentrality,Ge.ccn=Ge.closenessCentralityNormalised=Ge.closenessCentralityNormalized;var Ye=Ct({weight:null,directed:!1}),We={betweennessCentrality:function(t){for(var e=Ye(t),r=e.directed,n=e.weight,i=null!=n,a=this.cy(),o=this.nodes(),s={},l={},u=0,f=function(t,e){l[t]=e,e>u&&(u=e)},h=function(t){return l[t]},p=0;p<o.length;p++){var d=o[p],g=d.id();s[g]=r?d.outgoers().nodes():d.openNeighborhood().nodes(),f(g,0)}for(var v=function(t){for(var e=o[t].id(),r=[],l={},u={},p={},d=new c.default((function(t,e){return p[t]-p[e]})),g=0;g<o.length;g++){var v=o[g].id();l[v]=[],u[v]=0,p[v]=1/0}for(u[e]=1,p[e]=0,d.push(e);!d.empty();){var m=d.pop();if(r.push(m),i)for(var y=0;y<s[m].length;y++){var x,b=s[m][y],_=a.getElementById(m);x=_.edgesTo(b).length>0?_.edgesTo(b)[0]:b.edgesTo(_)[0];var w=n(x);b=b.id(),p[b]>p[m]+w&&(p[b]=p[m]+w,d.nodes.indexOf(b)<0?d.push(b):d.updateItem(b),u[b]=0,l[b]=[]),p[b]==p[m]+w&&(u[b]=u[b]+u[m],l[b].push(m))}else for(var k=0;k<s[m].length;k++){var T=s[m][k].id();p[T]==1/0&&(d.push(T),p[T]=p[m]+1),p[T]==p[m]+1&&(u[T]=u[T]+u[m],l[T].push(m))}}for(var M={},A=0;A<o.length;A++)M[o[A].id()]=0;for(;r.length>0;){for(var S=r.pop(),E=0;E<l[S].length;E++){var C=l[S][E];M[C]=M[C]+u[C]/u[S]*(1+M[S])}S!=o[t].id()&&f(S,h(S)+M[S])}},m=0;m<o.length;m++)v(m);var y={betweenness:function(t){var e=a.collection(t).id();return h(e)},betweennessNormalized:function(t){if(0==u)return 0;var e=a.collection(t).id();return h(e)/u}};return y.betweennessNormalised=y.betweennessNormalized,y}};We.bc=We.betweennessCentrality;var Xe=Ct({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),Ze=function(t,e){for(var r=0,n=0;n<e.length;n++)r+=e[n](t);return r},Ke=function(t,e){for(var r,n=0;n<e;n++){r=0;for(var i=0;i<e;i++)r+=t[i*e+n];for(var a=0;a<e;a++)t[a*e+n]=t[a*e+n]/r}},Je=function(t,e,r){for(var n=new Array(r*r),i=0;i<r;i++){for(var a=0;a<r;a++)n[i*r+a]=0;for(var o=0;o<r;o++)for(var s=0;s<r;s++)n[i*r+s]+=t[i*r+o]*e[o*r+s]}return n},$e=function(t,e,r){for(var n=t.slice(0),i=1;i<r;i++)t=Je(t,n,e);return t},Qe=function(t,e,r){for(var n=new Array(e*e),i=0;i<e*e;i++)n[i]=Math.pow(t[i],r);return Ke(n,e),n},tr=function(t,e,r,n){for(var i=0;i<r;i++)if(Math.round(t[i]*Math.pow(10,n))/Math.pow(10,n)!=Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n))return!1;return!0},er=function(t,e){for(var r=0;r<t.length;r++)if(!e[r]||t[r].id()!==e[r].id())return!1;return!0},rr=function(t){for(var e=this.nodes(),r=this.edges(),n=this.cy(),i=function(t){return Xe(t)}(t),a={},o=0;o<e.length;o++)a[e[o].id()]=o;for(var s,l=e.length,u=l*l,c=new Array(u),f=0;f<u;f++)c[f]=0;for(var h=0;h<r.length;h++){var p=r[h],d=a[p.source().id()],g=a[p.target().id()],v=Ze(p,i.attributes);c[d*l+g]+=v,c[g*l+d]+=v}!function(t,e,r){for(var n=0;n<e;n++)t[n*e+n]=r}(c,l,i.multFactor),Ke(c,l);for(var m=!0,y=0;m&&y<i.maxIterations;)m=!1,s=$e(c,l,i.expandFactor),c=Qe(s,l,i.inflateFactor),tr(c,s,u,4)||(m=!0),y++;var x=function(t,e,r,n){for(var i=[],a=0;a<e;a++){for(var o=[],s=0;s<e;s++)Math.round(1e3*t[a*e+s])/1e3>0&&o.push(r[s]);0!==o.length&&i.push(n.collection(o))}return i}(c,l,e,n);return x=function(t){for(var e=0;e<t.length;e++)for(var r=0;r<t.length;r++)e!=r&&er(t[e],t[r])&&t.splice(r,1);return t}(x),x},nr={markovClustering:rr,mcl:rr},ir=function(t){return t},ar=function(t,e){return Math.abs(e-t)},or=function(t,e,r){return t+ar(e,r)},sr=function(t,e,r){return t+Math.pow(r-e,2)},lr=function(t){return Math.sqrt(t)},ur=function(t,e,r){return Math.max(t,ar(e,r))},cr=function(t,e,r,n,i){for(var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:ir,o=n,s=0;s<t;s++)o=i(o,e(s),r(s));return a(o)},fr={euclidean:function(t,e,r){return t>=2?cr(t,e,r,0,sr,lr):cr(t,e,r,0,or)},squaredEuclidean:function(t,e,r){return cr(t,e,r,0,sr)},manhattan:function(t,e,r){return cr(t,e,r,0,or)},max:function(t,e,r){return cr(t,e,r,-1/0,ur)}};function hr(t,e,r,n,i,a){var o;return o=C(t)?t:fr[t]||fr.euclidean,0===e&&C(t)?o(i,a):o(e,r,n,i,a)}fr[\"squared-euclidean\"]=fr.squaredEuclidean,fr.squaredeuclidean=fr.squaredEuclidean;var pr=Ct({k:2,m:2,sensitivityThreshold:1e-4,distance:\"euclidean\",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),dr=function(t){return pr(t)},gr=function(t,e,r,n,i){var a=\"kMedoids\"!==i?function(t){return r[t]}:function(t){return n[t](r)},o=r,s=e;return hr(t,n.length,a,(function(t){return n[t](e)}),o,s)},vr=function(t,e,r){for(var n=r.length,i=new Array(n),a=new Array(n),o=new Array(e),s=null,l=0;l<n;l++)i[l]=t.min(r[l]).value,a[l]=t.max(r[l]).value;for(var u=0;u<e;u++){s=[];for(var c=0;c<n;c++)s[c]=Math.random()*(a[c]-i[c])+i[c];o[u]=s}return o},mr=function(t,e,r,n,i){for(var a=1/0,o=0,s=0;s<e.length;s++){var l=gr(r,t,e[s],n,i);l<a&&(a=l,o=s)}return o},yr=function(t,e,r){for(var n=[],i=null,a=0;a<e.length;a++)r[(i=e[a]).id()]===t&&n.push(i);return n},xr=function(t,e,r){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)if(Math.abs(t[n][i]-e[n][i])>r)return!1;return!0},br=function(t,e,r){for(var n=0;n<r;n++)if(t===e[n])return!0;return!1},_r=function(t,e){var r=new Array(e);if(t.length<50)for(var n=0;n<e;n++){for(var i=t[Math.floor(Math.random()*t.length)];br(i,r,n);)i=t[Math.floor(Math.random()*t.length)];r[n]=i}else for(var a=0;a<e;a++)r[a]=t[Math.floor(Math.random()*t.length)];return r},wr=function(t,e,r){for(var n=0,i=0;i<e.length;i++)n+=gr(\"manhattan\",e[i],t,r,\"kMedoids\");return n},kr=function(t,e,r,n,i){for(var a,o,s=0;s<e.length;s++)for(var l=0;l<t.length;l++)n[s][l]=Math.pow(r[s][l],i.m);for(var u=0;u<t.length;u++)for(var c=0;c<i.attributes.length;c++){a=0,o=0;for(var f=0;f<e.length;f++)a+=n[f][u]*i.attributes[c](e[f]),o+=n[f][u];t[u][c]=a/o}},Tr=function(t,e,r,n,i){for(var a=0;a<t.length;a++)e[a]=t[a].slice();for(var o,s,l,u=2/(i.m-1),c=0;c<r.length;c++)for(var f=0;f<n.length;f++){o=0;for(var h=0;h<r.length;h++)s=gr(i.distance,n[f],r[c],i.attributes,\"cmeans\"),l=gr(i.distance,n[f],r[h],i.attributes,\"cmeans\"),o+=Math.pow(s/l,u);t[f][c]=1/o}},Mr=function(t){var e,r,n,i,a,o=this.cy(),s=this.nodes(),l=dr(t);i=new Array(s.length);for(var u=0;u<s.length;u++)i[u]=new Array(l.k);n=new Array(s.length);for(var c=0;c<s.length;c++)n[c]=new Array(l.k);for(var f=0;f<s.length;f++){for(var h=0,p=0;p<l.k;p++)n[f][p]=Math.random(),h+=n[f][p];for(var d=0;d<l.k;d++)n[f][d]=n[f][d]/h}r=new Array(l.k);for(var g=0;g<l.k;g++)r[g]=new Array(l.attributes.length);a=new Array(s.length);for(var v=0;v<s.length;v++)a[v]=new Array(l.k);for(var m=!0,y=0;m&&y<l.maxIterations;)m=!1,kr(r,s,n,a,l),Tr(n,i,r,s,l),xr(n,i,l.sensitivityThreshold)||(m=!0),y++;return e=function(t,e,r,n){for(var i,a,o=new Array(r.k),s=0;s<o.length;s++)o[s]=[];for(var l=0;l<e.length;l++){i=-1/0,a=-1;for(var u=0;u<e[0].length;u++)e[l][u]>i&&(i=e[l][u],a=u);o[a].push(t[l])}for(var c=0;c<o.length;c++)o[c]=n.collection(o[c]);return o}(s,n,l,o),{clusters:e,degreeOfMembership:n}},Ar={kMeans:function(t){var e,r=this.cy(),n=this.nodes(),i=null,a=dr(t),o=new Array(a.k),s={};a.testMode?\"number\"==typeof a.testCentroids?(a.testCentroids,e=vr(n,a.k,a.attributes)):e=\"object\"===d(a.testCentroids)?a.testCentroids:vr(n,a.k,a.attributes):e=vr(n,a.k,a.attributes);for(var l,u,c,f=!0,h=0;f&&h<a.maxIterations;){for(var p=0;p<n.length;p++)s[(i=n[p]).id()]=mr(i,e,a.distance,a.attributes,\"kMeans\");f=!1;for(var g=0;g<a.k;g++){var v=yr(g,n,s);if(0!==v.length){for(var m=a.attributes.length,y=e[g],x=new Array(m),b=new Array(m),_=0;_<m;_++){b[_]=0;for(var w=0;w<v.length;w++)i=v[w],b[_]+=a.attributes[_](i);x[_]=b[_]/v.length,l=x[_],u=y[_],c=a.sensitivityThreshold,Math.abs(u-l)<=c||(f=!0)}e[g]=x,o[g]=r.collection(v)}}h++}return o},kMedoids:function(t){var e,r,n=this.cy(),i=this.nodes(),a=null,o=dr(t),s=new Array(o.k),l={},u=new Array(o.k);o.testMode?\"number\"==typeof o.testCentroids||(e=\"object\"===d(o.testCentroids)?o.testCentroids:_r(i,o.k)):e=_r(i,o.k);for(var c=!0,f=0;c&&f<o.maxIterations;){for(var h=0;h<i.length;h++)l[(a=i[h]).id()]=mr(a,e,o.distance,o.attributes,\"kMedoids\");c=!1;for(var p=0;p<e.length;p++){var g=yr(p,i,l);if(0!==g.length){u[p]=wr(e[p],g,o.attributes);for(var v=0;v<g.length;v++)(r=wr(g[v],g,o.attributes))<u[p]&&(u[p]=r,e[p]=g[v],c=!0);s[p]=n.collection(g)}}f++}return s},fuzzyCMeans:Mr,fcm:Mr},Sr=Ct({distance:\"euclidean\",linkage:\"min\",mode:\"threshold\",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),Er={single:\"min\",complete:\"max\"},Cr=function(t,e,r,n,i){for(var a,o=0,s=1/0,l=i.attributes,u=function(t,e){return hr(i.distance,l.length,(function(e){return l[e](t)}),(function(t){return l[t](e)}),t,e)},c=0;c<t.length;c++){var f=t[c].key,h=r[f][n[f]];h<s&&(o=f,s=h)}if(\"threshold\"===i.mode&&s>=i.threshold||\"dendrogram\"===i.mode&&1===t.length)return!1;var p,d=e[o],g=e[n[o]];p=\"dendrogram\"===i.mode?{left:d,right:g,key:d.key}:{value:d.value.concat(g.value),key:d.key},t[d.index]=p,t.splice(g.index,1),e[d.key]=p;for(var v=0;v<t.length;v++){var m=t[v];d.key===m.key?a=1/0:\"min\"===i.linkage?(a=r[d.key][m.key],r[d.key][m.key]>r[g.key][m.key]&&(a=r[g.key][m.key])):\"max\"===i.linkage?(a=r[d.key][m.key],r[d.key][m.key]<r[g.key][m.key]&&(a=r[g.key][m.key])):a=\"mean\"===i.linkage?(r[d.key][m.key]*d.size+r[g.key][m.key]*g.size)/(d.size+g.size):\"dendrogram\"===i.mode?u(m.value,d.value):u(m.value[0],d.value[0]),r[d.key][m.key]=r[m.key][d.key]=a}for(var y=0;y<t.length;y++){var x=t[y].key;if(n[x]===d.key||n[x]===g.key){for(var b=x,_=0;_<t.length;_++){var w=t[_].key;r[x][w]<r[x][b]&&(b=w)}n[x]=b}t[y].index=y}return d.key=g.key=d.index=g.index=null,!0},Lr=function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},Pr=function t(e,r){if(!e)return\"\";if(e.left&&e.right){var n=t(e.left,r),i=t(e.right,r),a=r.add({group:\"nodes\",data:{id:n+\",\"+i}});return r.add({group:\"edges\",data:{source:n,target:a.id()}}),r.add({group:\"edges\",data:{source:i,target:a.id()}}),a.id()}return e.value?e.value.id():void 0},Or=function t(e,r,n){if(!e)return[];var i=[],a=[],o=[];return 0===r?(e.left&&Lr(e.left,i),e.right&&Lr(e.right,a),o=i.concat(a),[n.collection(o)]):1===r?e.value?[n.collection(e.value)]:(e.left&&Lr(e.left,i),e.right&&Lr(e.right,a),[n.collection(i),n.collection(a)]):e.value?[n.collection(e.value)]:(e.left&&(i=t(e.left,r-1,n)),e.right&&(a=t(e.right,r-1,n)),i.concat(a))},Ir=function(t){for(var e=this.cy(),r=this.nodes(),n=function(t){var e=Sr(t),r=Er[e.linkage];return null!=r&&(e.linkage=r),e}(t),i=n.attributes,a=function(t,e){return hr(n.distance,i.length,(function(e){return i[e](t)}),(function(t){return i[t](e)}),t,e)},o=[],s=[],l=[],u=[],c=0;c<r.length;c++){var f={value:\"dendrogram\"===n.mode?r[c]:[r[c]],key:c,index:c};o[c]=f,u[c]=f,s[c]=[],l[c]=0}for(var h=0;h<o.length;h++)for(var p=0;p<=h;p++){var d;d=\"dendrogram\"===n.mode?h===p?1/0:a(o[h].value,o[p].value):h===p?1/0:a(o[h].value[0],o[p].value[0]),s[h][p]=d,s[p][h]=d,d<s[h][l[h]]&&(l[h]=p)}for(var g,v=Cr(o,u,s,l,n);v;)v=Cr(o,u,s,l,n);return\"dendrogram\"===n.mode?(g=Or(o[0],n.dendrogramDepth,e),n.addDendrogram&&Pr(o[0],e)):(g=new Array(o.length),o.forEach((function(t,r){t.key=t.index=null,g[r]=e.collection(t.value)}))),g},Dr={hierarchicalClustering:Ir,hca:Ir},zr=Ct({distance:\"euclidean\",preference:\"median\",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Rr=function(t,e,r,n){var i=function(t,e){return n[e](t)};return-hr(t,n.length,(function(t){return i(e,t)}),(function(t){return i(r,t)}),e,r)},Fr=function(t,e,r){for(var n=[],i=0;i<t;i++){for(var a=-1,o=-1/0,s=0;s<r.length;s++){var l=r[s];e[i*t+l]>o&&(a=l,o=e[i*t+l])}a>0&&n.push(a)}for(var u=0;u<r.length;u++)n[r[u]]=r[u];return n},Nr=function(t){for(var e,r,n,i,a,o,s=this.cy(),l=this.nodes(),u=function(t){var e=t.damping,r=t.preference;.5<=e&&e<1||wt(\"Damping must range on [0.5, 1).  Got: \".concat(e));var n=[\"median\",\"mean\",\"min\",\"max\"];return n.some((function(t){return t===r}))||O(r)||wt(\"Preference must be one of [\".concat(n.map((function(t){return\"'\".concat(t,\"'\")})).join(\", \"),\"] or a number.  Got: \").concat(r)),zr(t)}(t),c={},f=0;f<l.length;f++)c[l[f].id()]=f;r=(e=l.length)*e,n=new Array(r);for(var h=0;h<r;h++)n[h]=-1/0;for(var p=0;p<e;p++)for(var d=0;d<e;d++)p!==d&&(n[p*e+d]=Rr(u.distance,l[p],l[d],u.attributes));i=function(t,e){var r;return r=\"median\"===e?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(r<t.length&&t.splice(r,t.length-r),e>0&&t.splice(0,e)):t=t.slice(e,r);for(var a=0,o=t.length-1;o>=0;o--){var s=t[o];i?isFinite(s)||(t[o]=-1/0,a++):t.splice(o,1)}n&&t.sort((function(t,e){return t-e}));var l=t.length,u=Math.floor(l/2);return l%2!=0?t[u+1+a]:(t[u-1+a]+t[u+a])/2}(t):\"mean\"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=0,i=0,a=e;a<r;a++){var o=t[a];isFinite(o)&&(n+=o,i++)}return n/i}(t):\"min\"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.min(a,n))}return n}(t):\"max\"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=-1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.max(a,n))}return n}(t):e,r}(n,u.preference);for(var g=0;g<e;g++)n[g*e+g]=i;a=new Array(r);for(var v=0;v<r;v++)a[v]=0;o=new Array(r);for(var m=0;m<r;m++)o[m]=0;for(var y=new Array(e),x=new Array(e),b=new Array(e),_=0;_<e;_++)y[_]=0,x[_]=0,b[_]=0;for(var w,k=new Array(e*u.minIterations),T=0;T<k.length;T++)k[T]=0;for(w=0;w<u.maxIterations;w++){for(var M=0;M<e;M++){for(var A=-1/0,S=-1/0,E=-1,C=0,L=0;L<e;L++)y[L]=a[M*e+L],(C=o[M*e+L]+n[M*e+L])>=A?(S=A,A=C,E=L):C>S&&(S=C);for(var P=0;P<e;P++)a[M*e+P]=(1-u.damping)*(n[M*e+P]-A)+u.damping*y[P];a[M*e+E]=(1-u.damping)*(n[M*e+E]-S)+u.damping*y[E]}for(var I=0;I<e;I++){for(var D=0,z=0;z<e;z++)y[z]=o[z*e+I],x[z]=Math.max(0,a[z*e+I]),D+=x[z];D-=x[I],x[I]=a[I*e+I],D+=x[I];for(var R=0;R<e;R++)o[R*e+I]=(1-u.damping)*Math.min(0,D-x[R])+u.damping*y[R];o[I*e+I]=(1-u.damping)*(D-x[I])+u.damping*y[I]}for(var F=0,N=0;N<e;N++){var B=o[N*e+N]+a[N*e+N]>0?1:0;k[w%u.minIterations*e+N]=B,F+=B}if(F>0&&(w>=u.minIterations-1||w==u.maxIterations-1)){for(var j=0,U=0;U<e;U++){b[U]=0;for(var V=0;V<u.minIterations;V++)b[U]+=k[V*e+U];0!==b[U]&&b[U]!==u.minIterations||j++}if(j===e)break}}for(var H=function(t,e,r){for(var n=[],i=0;i<t;i++)e[i*t+i]+r[i*t+i]>0&&n.push(i);return n}(e,a,o),q=function(t,e,r){for(var n=Fr(t,e,r),i=0;i<r.length;i++){for(var a=[],o=0;o<n.length;o++)n[o]===r[i]&&a.push(o);for(var s=-1,l=-1/0,u=0;u<a.length;u++){for(var c=0,f=0;f<a.length;f++)c+=e[a[f]*t+a[u]];c>l&&(s=u,l=c)}r[i]=a[s]}return Fr(t,e,r)}(e,n,H),G={},Y=0;Y<H.length;Y++)G[H[Y]]=[];for(var W=0;W<l.length;W++){var X=q[c[l[W].id()]];null!=X&&G[X].push(l[W])}for(var Z=new Array(H.length),K=0;K<H.length;K++)Z[K]=s.collection(G[H[K]]);return Z},Br={affinityPropagation:Nr,ap:Nr},jr=Ct({root:void 0,directed:!1}),Ur=function(){var t=this,e={},r=0,n=0,i=[],a=[],o={},s=function s(l,u,c){l===c&&(n+=1),e[u]={id:r,low:r++,cutVertex:!1};var f,h,p,d,g=t.getElementById(u).connectedEdges().intersection(t);0===g.size()?i.push(t.spawn(t.getElementById(u))):g.forEach((function(r){f=r.source().id(),h=r.target().id(),(p=f===u?h:f)!==c&&(d=r.id(),o[d]||(o[d]=!0,a.push({x:u,y:p,edge:r})),p in e?e[u].low=Math.min(e[u].low,e[p].id):(s(l,p,u),e[u].low=Math.min(e[u].low,e[p].low),e[u].id<=e[p].low&&(e[u].cutVertex=!0,function(r,n){for(var o=a.length-1,s=[],l=t.spawn();a[o].x!=r||a[o].y!=n;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach((function(r){var n=r.connectedNodes().intersection(t);l.merge(r),n.forEach((function(r){var n=r.id(),i=r.connectedEdges().intersection(t);l.merge(r),e[n].cutVertex?l.merge(i.filter((function(t){return t.isLoop()}))):l.merge(i)}))})),i.push(l)}(u,p))))}))};t.forEach((function(t){if(t.isNode()){var r=t.id();r in e||(n=0,s(r,r),e[r].cutVertex=n>1)}}));var l=Object.keys(e).filter((function(t){return e[t].cutVertex})).map((function(e){return t.getElementById(e)}));return{cut:t.spawn(l),components:i}},Vr=function(){var t=this,e={},r=0,n=[],i=[],a=t.spawn(t),o=function o(s){if(i.push(s),e[s]={index:r,low:r++,explored:!1},t.getElementById(s).connectedEdges().intersection(t).forEach((function(t){var r=t.target().id();r!==s&&(r in e||o(r),e[r].explored||(e[s].low=Math.min(e[s].low,e[r].low)))})),e[s].index===e[s].low){for(var l=t.spawn();;){var u=i.pop();if(l.merge(t.getElementById(u)),e[u].low=e[s].index,e[u].explored=!0,u===s)break}var c=l.edgesWith(l),f=l.merge(c);n.push(f),a=a.difference(f)}};return t.forEach((function(t){if(t.isNode()){var r=t.id();r in e||o(r)}})),{cut:a,components:n}},Hr={};[Bt,Ut,Vt,qt,Yt,Xt,$t,Ue,He,Ge,We,nr,Ar,Dr,Br,{hierholzer:function(t){if(!P(t)){var e=arguments;t={root:e[0],directed:e[1]}}var r,n,i,a=jr(t),o=a.root,s=a.directed,l=this,u=!1;o&&(i=E(o)?this.filter(o)[0].id():o[0].id());var c={},f={};s?l.forEach((function(t){var e=t.id();if(t.isNode()){var i=t.indegree(!0),a=t.outdegree(!0),o=i-a,s=a-i;1==o?r?u=!0:r=e:1==s?n?u=!0:n=e:(s>1||o>1)&&(u=!0),c[e]=[],t.outgoers().forEach((function(t){t.isEdge()&&c[e].push(t.id())}))}else f[e]=[void 0,t.target().id()]})):l.forEach((function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(r?n?u=!0:n=e:r=e),c[e]=[],t.connectedEdges().forEach((function(t){return c[e].push(t.id())}))):f[e]=[t.source().id(),t.target().id()]}));var h={found:!1,trail:void 0};if(u)return h;if(n&&r)if(s){if(i&&n!=i)return h;i=n}else{if(i&&n!=i&&r!=i)return h;i||(i=n)}else i||(i=l[0].id());var p=function(t){for(var e,r,n,i=t,a=[t];c[i].length;)e=c[i].shift(),r=f[e][0],i!=(n=f[e][1])?(c[n]=c[n].filter((function(t){return t!=e})),i=n):s||i==r||(c[r]=c[r].filter((function(t){return t!=e})),i=r),a.unshift(e),a.unshift(i);return a},d=[],g=[];for(g=p(i);1!=g.length;)0==c[g[0]].length?(d.unshift(l.getElementById(g.shift())),d.unshift(l.getElementById(g.shift()))):g=p(g.shift()).concat(g);for(var v in d.unshift(l.getElementById(g.shift())),c)if(c[v].length)return h;return h.found=!0,h.trail=this.spawn(d,!0),h}},{hopcroftTarjanBiconnected:Ur,htbc:Ur,htb:Ur,hopcroftTarjanBiconnectedComponents:Ur},{tarjanStronglyConnected:Vr,tsc:Vr,tscc:Vr,tarjanStronglyConnectedComponents:Vr}].forEach((function(t){X(Hr,t)}));var qr=function t(e){if(!(this instanceof t))return new t(e);this.id=\"Thenable/1.0.7\",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},\"function\"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};qr.prototype={fulfill:function(t){return Gr(this,1,\"fulfillValue\",t)},reject:function(t){return Gr(this,2,\"rejectReason\",t)},then:function(t,e){var r=this,n=new qr;return r.onFulfilled.push(Xr(t,n,\"fulfill\")),r.onRejected.push(Xr(e,n,\"reject\")),Yr(r),n.proxy}};var Gr=function(t,e,r,n){return 0===t.state&&(t.state=e,t[r]=n,Yr(t)),t},Yr=function(t){1===t.state?Wr(t,\"onFulfilled\",t.fulfillValue):2===t.state&&Wr(t,\"onRejected\",t.rejectReason)},Wr=function(t,e,r){if(0!==t[e].length){var n=t[e];t[e]=[];var i=function(){for(var t=0;t<n.length;t++)n[t](r)};\"function\"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},Xr=function(t,e,r){return function(n){if(\"function\"!=typeof t)e[r].call(e,n);else{var i;try{i=t(n)}catch(t){return void e.reject(t)}Zr(e,i)}}},Zr=function t(e,r){if(e!==r&&e.proxy!==r){var n;if(\"object\"===d(r)&&null!==r||\"function\"==typeof r)try{n=r.then}catch(t){return void e.reject(t)}if(\"function\"!=typeof n)e.fulfill(r);else{var i=!1;try{n.call(r,(function(n){i||(i=!0,n===r?e.reject(new TypeError(\"circular thenable chain\")):t(e,n))}),(function(t){i||(i=!0,e.reject(t))}))}catch(t){i||e.reject(t)}}}else e.reject(new TypeError(\"cannot resolve promise with itself\"))};qr.all=function(t){return new qr((function(e,r){for(var n=new Array(t.length),i=0,a=function(r,a){n[r]=a,++i===t.length&&e(n)},o=0;o<t.length;o++)!function(e){var n=t[e];null!=n&&null!=n.then?n.then((function(t){a(e,t)}),(function(t){r(t)})):a(e,n)}(o)}))},qr.resolve=function(t){return new qr((function(e,r){e(t)}))},qr.reject=function(t){return new qr((function(e,r){r(t)}))};var Kr=\"undefined\"!=typeof Promise?Promise:qr,Jr=function(t,e,r){var n=F(t),i=!n,a=this._private=X({duration:1e3},e,r);if(a.target=t,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&C(a.complete)&&a.completes.push(a.complete),i){var o=t.position();a.startPosition=a.startPosition||{x:o.x,y:o.y},a.startStyle=a.startStyle||t.cy().style().getAnimationStartStyle(t,a.style)}if(n){var s=t.pan();a.startPan={x:s.x,y:s.y},a.startZoom=t.zoom()}this.length=1,this[0]=this},$r=Jr.prototype;X($r,{instanceString:function(){return\"animation\"},hook:function(){var t=this._private;if(!t.hooked){var e=t.target._private.animation;(t.queue?e.queue:e.current).push(this),D(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0}return this},play:function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var t=this._private;return t.playing=!1,t.started=!1,this},stop:function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},progress:function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var t=this._private,e=t.playing;e&&this.pause(),t.progress=1-t.progress,t.started=!1;var r=function(e,r){var n=t[e];null!=n&&(t[e]=t[r],t[r]=n)};if(r(\"zoom\",\"startZoom\"),r(\"pan\",\"startPan\"),r(\"position\",\"startPosition\"),t.style)for(var n=0;n<t.style.length;n++){var i=t.style[n],a=i.name,o=t.startStyle[a];t.startStyle[a]=i,t.style[n]=o}return e&&this.play(),this},promise:function(t){var e,r=this._private;return e=\"frame\"===t?r.frames:r.completes,new Kr((function(t,r){e.push((function(){t()}))}))}}),$r.complete=$r.completed,$r.run=$r.play,$r.running=$r.playing;var Qr={animated:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return!1;var r=e[0];return r?r._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var r=0;r<e.length;r++)e[r]._private.animation.queue=[];return this}},delay:function(){return function(t,e){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:e}):this}},delayAnimation:function(){return function(t,e){return(this._private.cy||this).styleEnabled()?this.animation({delay:t,duration:t,complete:e}):this}},animation:function(){return function(t,e){var r=this,n=void 0!==r.length,i=n?r:[r],a=this._private.cy||this,o=!n,s=!o;if(!a.styleEnabled())return this;var l=a.style();if(t=X({},t,e),0===Object.keys(t).length)return new Jr(i[0],t);switch(void 0===t.duration&&(t.duration=400),t.duration){case\"slow\":t.duration=600;break;case\"fast\":t.duration=200}if(s&&(t.style=l.getPropsList(t.style||t.css),t.css=void 0),s&&null!=t.renderedPosition){var u=t.renderedPosition,c=a.pan(),f=a.zoom();t.position=te(u,f,c)}if(o&&null!=t.panBy){var h=t.panBy,p=a.pan();t.pan={x:p.x+h.x,y:p.y+h.y}}var d=t.center||t.centre;if(o&&null!=d){var g=a.getCenterPan(d.eles,t.zoom);null!=g&&(t.pan=g)}if(o&&null!=t.fit){var v=t.fit,m=a.getFitViewport(v.eles||v.boundingBox,v.padding);null!=m&&(t.pan=m.pan,t.zoom=m.zoom)}if(o&&P(t.zoom)){var y=a.getZoomedViewport(t.zoom);null!=y?(y.zoomed&&(t.zoom=y.zoom),y.panned&&(t.pan=y.pan)):t.zoom=null}return new Jr(i[0],t)}},animate:function(){return function(t,e){var r=this,n=void 0!==r.length?r:[r];if(!(this._private.cy||this).styleEnabled())return this;e&&(t=X({},t,e));for(var i=0;i<n.length;i++){var a=n[i],o=a.animated()&&(void 0===t.queue||t.queue);a.animation(t,o?{queue:!0}:void 0).play()}return this}},stop:function(){return function(t,e){var r=this,n=void 0!==r.length?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var a=0;a<n.length;a++){for(var o=n[a]._private,s=o.animation.current,l=0;l<s.length;l++){var u=s[l]._private;e&&(u.duration=0)}t&&(o.animation.queue=[]),e||(o.animation.current=[])}return i.notify(\"draw\"),this}}},tn={data:function(t){return t=X({},{field:\"data\",bindingEvent:\"data\",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:\"data\",settingTriggersEvent:!1,triggerFnName:\"trigger\",immutableKeys:{},updateStyle:!1,beforeGet:function(t){},beforeSet:function(t,e){},onSet:function(t){},canSet:function(t){return!0}},t),function(e,r){var n=t,i=this,a=void 0!==i.length,o=a?i:[i],s=a?i[0]:i;if(E(e)){var l,u=-1!==e.indexOf(\".\")&&p.default(e);if(n.allowGetting&&void 0===r)return s&&(n.beforeGet(s),l=u&&void 0===s._private[n.field][e]?f.default(s._private[n.field],u):s._private[n.field][e]),l;if(n.allowSetting&&void 0!==r&&!n.immutableKeys[e]){var c=y({},e,r);n.beforeSet(i,c);for(var d=0,g=o.length;d<g;d++){var v=o[d];n.canSet(v)&&(u&&void 0===s._private[n.field][e]?h.default(v._private[n.field],u,r):v._private[n.field][e]=r)}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}}else if(n.allowSetting&&P(e)){var m,x,b=e,_=Object.keys(b);n.beforeSet(i,b);for(var w=0;w<_.length;w++)if(x=b[m=_[w]],!n.immutableKeys[m])for(var k=0;k<o.length;k++){var T=o[k];n.canSet(T)&&(T._private[n.field][m]=x)}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}else if(n.allowBinding&&C(e)){var M=e;i.on(n.bindingEvent,M)}else if(n.allowGetting&&void 0===e){var A;return s&&(n.beforeGet(s),A=s._private[n.field]),A}return i}},removeData:function(t){return t=X({},{field:\"data\",event:\"data\",triggerFnName:\"trigger\",triggerEvent:!1,immutableKeys:{}},t),function(e){var r=t,n=this,i=void 0!==n.length?n:[n];if(E(e)){for(var a=e.split(/\\s+/),o=a.length,s=0;s<o;s++){var l=a[s];if(!B(l)&&!r.immutableKeys[l])for(var u=0,c=i.length;u<c;u++)i[u]._private[r.field][l]=void 0}r.triggerEvent&&n[r.triggerFnName](r.event)}else if(void 0===e){for(var f=0,h=i.length;f<h;f++)for(var p=i[f]._private[r.field],d=Object.keys(p),g=0;g<d.length;g++){var v=d[g];!r.immutableKeys[v]&&(p[v]=void 0)}r.triggerEvent&&n[r.triggerFnName](r.event)}return n}}},en={eventAliasesOn:function(t){var e=t;e.addListener=e.listen=e.bind=e.on,e.unlisten=e.unbind=e.off=e.removeListener,e.trigger=e.emit,e.pon=e.promiseOn=function(t,e){var r=this,n=Array.prototype.slice.call(arguments,0);return new Kr((function(t,e){var i=n.concat([function(e){r.off.apply(r,a),t(e)}]),a=i.concat([]);r.on.apply(r,i)}))}}},rn={};[Qr,tn,en].forEach((function(t){X(rn,t)}));var nn={animate:rn.animate(),animation:rn.animation(),animated:rn.animated(),clearQueue:rn.clearQueue(),delay:rn.delay(),delayAnimation:rn.delayAnimation(),stop:rn.stop()},an={classes:function(t){var e=this;if(void 0===t){var r=[];return e[0]._private.classes.forEach((function(t){return r.push(t)})),r}L(t)||(t=(t||\"\").match(/\\S+/g)||[]);for(var n=[],i=new Rt(t),a=0;a<e.length;a++){for(var o=e[a],s=o._private,l=s.classes,u=!1,c=0;c<t.length;c++){var f=t[c];if(!l.has(f)){u=!0;break}}u||(u=l.size!==t.length),u&&(s.classes=i,n.push(o))}return n.length>0&&this.spawn(n).updateStyle().emit(\"class\"),e},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},toggleClass:function(t,e){L(t)||(t=t.match(/\\S+/g)||[]);for(var r=this,n=void 0===e,i=[],a=0,o=r.length;a<o;a++)for(var s=r[a],l=s._private.classes,u=!1,c=0;c<t.length;c++){var f=t[c],h=l.has(f),p=!1;e||n&&!h?(l.add(f),p=!0):(!e||n&&h)&&(l.delete(f),p=!0),!u&&p&&(i.push(s),u=!0)}return i.length>0&&this.spawn(i).updateStyle().emit(\"class\"),r},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,e){var r=this;if(null==e)e=250;else if(0===e)return r;return r.addClass(t),setTimeout((function(){r.removeClass(t)}),e),r}};an.className=an.classNames=an.classes;var on={metaChar:\"[\\\\!\\\\\\\"\\\\#\\\\$\\\\%\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\.\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\]\\\\^\\\\`\\\\{\\\\|\\\\}\\\\~]\",comparatorOp:\"=|\\\\!=|>|>=|<|<=|\\\\$=|\\\\^=|\\\\*=\",boolOp:\"\\\\?|\\\\!|\\\\^\",string:\"\\\"(?:\\\\\\\\\\\"|[^\\\"])*\\\"|'(?:\\\\\\\\'|[^'])*'\",number:Y,meta:\"degree|indegree|outdegree\",separator:\"\\\\s*,\\\\s*\",descendant:\"\\\\s+\",child:\"\\\\s+>\\\\s+\",subject:\"\\\\$\",group:\"node|edge|\\\\*\",directedEdge:\"\\\\s+->\\\\s+\",undirectedEdge:\"\\\\s+<->\\\\s+\"};on.variable=\"(?:[\\\\w-.]|(?:\\\\\\\\\"+on.metaChar+\"))+\",on.className=\"(?:[\\\\w-]|(?:\\\\\\\\\"+on.metaChar+\"))+\",on.value=on.string+\"|\"+on.number,on.id=on.variable,function(){var t,e,r;for(t=on.comparatorOp.split(\"|\"),r=0;r<t.length;r++)e=t[r],on.comparatorOp+=\"|@\"+e;for(t=on.comparatorOp.split(\"|\"),r=0;r<t.length;r++)(e=t[r]).indexOf(\"!\")>=0||\"=\"!==e&&(on.comparatorOp+=\"|\\\\!\"+e)}();var sn=20,ln=[{selector:\":selected\",matches:function(t){return t.selected()}},{selector:\":unselected\",matches:function(t){return!t.selected()}},{selector:\":selectable\",matches:function(t){return t.selectable()}},{selector:\":unselectable\",matches:function(t){return!t.selectable()}},{selector:\":locked\",matches:function(t){return t.locked()}},{selector:\":unlocked\",matches:function(t){return!t.locked()}},{selector:\":visible\",matches:function(t){return t.visible()}},{selector:\":hidden\",matches:function(t){return!t.visible()}},{selector:\":transparent\",matches:function(t){return t.transparent()}},{selector:\":grabbed\",matches:function(t){return t.grabbed()}},{selector:\":free\",matches:function(t){return!t.grabbed()}},{selector:\":removed\",matches:function(t){return t.removed()}},{selector:\":inside\",matches:function(t){return!t.removed()}},{selector:\":grabbable\",matches:function(t){return t.grabbable()}},{selector:\":ungrabbable\",matches:function(t){return!t.grabbable()}},{selector:\":animated\",matches:function(t){return t.animated()}},{selector:\":unanimated\",matches:function(t){return!t.animated()}},{selector:\":parent\",matches:function(t){return t.isParent()}},{selector:\":childless\",matches:function(t){return t.isChildless()}},{selector:\":child\",matches:function(t){return t.isChild()}},{selector:\":orphan\",matches:function(t){return t.isOrphan()}},{selector:\":nonorphan\",matches:function(t){return t.isChild()}},{selector:\":compound\",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:\":loop\",matches:function(t){return t.isLoop()}},{selector:\":simple\",matches:function(t){return t.isSimple()}},{selector:\":active\",matches:function(t){return t.active()}},{selector:\":inactive\",matches:function(t){return!t.active()}},{selector:\":backgrounding\",matches:function(t){return t.backgrounding()}},{selector:\":nonbackgrounding\",matches:function(t){return!t.backgrounding()}}].sort((function(t,e){return function(t,e){return-1*W(t,e)}(t.selector,e.selector)})),un=function(){for(var t,e={},r=0;r<ln.length;r++)e[(t=ln[r]).selector]=t.matches;return e}(),cn=\"(\"+ln.map((function(t){return t.selector})).join(\"|\")+\")\",fn=function(t){return t.replace(new RegExp(\"\\\\\\\\(\"+on.metaChar+\")\",\"g\"),(function(t,e){return e}))},hn=function(t,e,r){t[t.length-1]=r},pn=[{name:\"group\",query:!0,regex:\"(\"+on.group+\")\",populate:function(t,e,r){var n=x(r,1)[0];e.checks.push({type:0,value:\"*\"===n?n:n+\"s\"})}},{name:\"state\",query:!0,regex:cn,populate:function(t,e,r){var n=x(r,1)[0];e.checks.push({type:7,value:n})}},{name:\"id\",query:!0,regex:\"\\\\#(\"+on.id+\")\",populate:function(t,e,r){var n=x(r,1)[0];e.checks.push({type:8,value:fn(n)})}},{name:\"className\",query:!0,regex:\"\\\\.(\"+on.className+\")\",populate:function(t,e,r){var n=x(r,1)[0];e.checks.push({type:9,value:fn(n)})}},{name:\"dataExists\",query:!0,regex:\"\\\\[\\\\s*(\"+on.variable+\")\\\\s*\\\\]\",populate:function(t,e,r){var n=x(r,1)[0];e.checks.push({type:4,field:fn(n)})}},{name:\"dataCompare\",query:!0,regex:\"\\\\[\\\\s*(\"+on.variable+\")\\\\s*(\"+on.comparatorOp+\")\\\\s*(\"+on.value+\")\\\\s*\\\\]\",populate:function(t,e,r){var n=x(r,3),i=n[0],a=n[1],o=n[2];o=null!=new RegExp(\"^\"+on.string+\"$\").exec(o)?o.substring(1,o.length-1):parseFloat(o),e.checks.push({type:3,field:fn(i),operator:a,value:o})}},{name:\"dataBool\",query:!0,regex:\"\\\\[\\\\s*(\"+on.boolOp+\")\\\\s*(\"+on.variable+\")\\\\s*\\\\]\",populate:function(t,e,r){var n=x(r,2),i=n[0],a=n[1];e.checks.push({type:5,field:fn(a),operator:i})}},{name:\"metaCompare\",query:!0,regex:\"\\\\[\\\\[\\\\s*(\"+on.meta+\")\\\\s*(\"+on.comparatorOp+\")\\\\s*(\"+on.number+\")\\\\s*\\\\]\\\\]\",populate:function(t,e,r){var n=x(r,3),i=n[0],a=n[1],o=n[2];e.checks.push({type:6,field:fn(i),operator:a,value:parseFloat(o)})}},{name:\"nextQuery\",separator:!0,regex:on.separator,populate:function(t,e){var r=t.currentSubject,n=t.edgeCount,i=t.compoundCount,a=t[t.length-1];return null!=r&&(a.subject=r,t.currentSubject=null),a.edgeCount=n,a.compoundCount=i,t.edgeCount=0,t.compoundCount=0,t[t.length++]={checks:[]}}},{name:\"directedEdge\",separator:!0,regex:on.directedEdge,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n=e,i={checks:[]};return r.checks.push({type:11,source:n,target:i}),hn(t,0,r),t.edgeCount++,i}var a={checks:[]},o=e,s={checks:[]};return a.checks.push({type:12,source:o,target:s}),hn(t,0,a),t.edgeCount++,s}},{name:\"undirectedEdge\",separator:!0,regex:on.undirectedEdge,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n=e,i={checks:[]};return r.checks.push({type:10,nodes:[n,i]}),hn(t,0,r),t.edgeCount++,i}var a={checks:[]},o=e,s={checks:[]};return a.checks.push({type:14,node:o,neighbor:s}),hn(t,0,a),s}},{name:\"child\",separator:!0,regex:on.child,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n={checks:[]},i=t[t.length-1];return r.checks.push({type:15,parent:i,child:n}),hn(t,0,r),t.compoundCount++,n}if(t.currentSubject===e){var a={checks:[]},o=t[t.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return a.checks.push({type:19,left:o,right:s,subject:l}),l.checks=e.checks,e.checks=[{type:sn}],c.checks.push({type:sn}),s.checks.push({type:17,parent:c,child:u}),hn(t,0,a),t.currentSubject=l,t.compoundCount++,u}var f={checks:[]},h={checks:[]},p=[{type:17,parent:f,child:h}];return f.checks=e.checks,e.checks=p,t.compoundCount++,h}},{name:\"descendant\",separator:!0,regex:on.descendant,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n={checks:[]},i=t[t.length-1];return r.checks.push({type:16,ancestor:i,descendant:n}),hn(t,0,r),t.compoundCount++,n}if(t.currentSubject===e){var a={checks:[]},o=t[t.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return a.checks.push({type:19,left:o,right:s,subject:l}),l.checks=e.checks,e.checks=[{type:sn}],c.checks.push({type:sn}),s.checks.push({type:18,ancestor:c,descendant:u}),hn(t,0,a),t.currentSubject=l,t.compoundCount++,u}var f={checks:[]},h={checks:[]},p=[{type:18,ancestor:f,descendant:h}];return f.checks=e.checks,e.checks=p,t.compoundCount++,h}},{name:\"subject\",modifier:!0,regex:on.subject,populate:function(t,e){if(null!=t.currentSubject&&t.currentSubject!==e)return Tt(\"Redefinition of subject in selector `\"+t.toString()+\"`\"),!1;t.currentSubject=e;var r=t[t.length-1].checks[0],n=null==r?null:r.type;11===n?r.type=13:10===n&&(r.type=14,r.node=r.nodes[1],r.neighbor=r.nodes[0],r.nodes=null)}}];pn.forEach((function(t){return t.regexObj=new RegExp(\"^\"+t.regex)}));var dn=function(t){for(var e,r,n,i=0;i<pn.length;i++){var a=pn[i],o=a.name,s=t.match(a.regexObj);if(null!=s){r=s,e=a,n=o;var l=s[0];t=t.substring(l.length);break}}return{expr:e,match:r,name:n,remaining:t}},gn={parse:function(t){var e=this,r=e.inputText=t,n=e[0]={checks:[]};for(e.length=1,r=function(t){var e=t.match(/^\\s+/);if(e){var r=e[0];t=t.substring(r.length)}return t}(r);;){var i=dn(r);if(null==i.expr)return Tt(\"The selector `\"+t+\"`is invalid\"),!1;var a=i.match.slice(1),o=i.expr.populate(e,n,a);if(!1===o)return!1;if(null!=o&&(n=o),(r=i.remaining).match(/^\\s*$/))break}var s=e[e.length-1];null!=e.currentSubject&&(s.subject=e.currentSubject),s.edgeCount=e.edgeCount,s.compoundCount=e.compoundCount;for(var l=0;l<e.length;l++){var u=e[l];if(u.compoundCount>0&&u.edgeCount>0)return Tt(\"The selector `\"+t+\"` is invalid because it uses both a compound selector and an edge selector\"),!1;if(u.edgeCount>1)return Tt(\"The selector `\"+t+\"` is invalid because it uses multiple edge selectors\"),!1;1===u.edgeCount&&Tt(\"The selector `\"+t+\"` is deprecated.  Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons.  Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.\")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var t=function(t){return null==t?\"\":t},e=function(e){return E(e)?'\"'+e+'\"':t(e)},r=function(t){return\" \"+t+\" \"},n=function(i,a){return i.checks.reduce((function(o,s,l){return o+(a===i&&0===l?\"$\":\"\")+function(i,a){var o=i.type,s=i.value;switch(o){case 0:var l=t(s);return l.substring(0,l.length-1);case 3:var u=i.field,c=i.operator;return\"[\"+u+r(t(c))+e(s)+\"]\";case 5:var f=i.operator,h=i.field;return\"[\"+t(f)+h+\"]\";case 4:return\"[\"+i.field+\"]\";case 6:var p=i.operator;return\"[[\"+i.field+r(t(p))+e(s)+\"]]\";case 7:return s;case 8:return\"#\"+s;case 9:return\".\"+s;case 17:case 15:return n(i.parent,a)+r(\">\")+n(i.child,a);case 18:case 16:return n(i.ancestor,a)+\" \"+n(i.descendant,a);case 19:var d=n(i.left,a),g=n(i.subject,a),v=n(i.right,a);return d+(d.length>0?\" \":\"\")+g+v;case sn:return\"\"}}(s,a)}),\"\")},i=\"\",a=0;a<this.length;a++){var o=this[a];i+=n(o,o.subject),this.length>1&&a<this.length-1&&(i+=\", \")}return this.toStringCache=i,i}},vn=function(t,e,r){var n,i,a,o=E(t),s=O(t),l=E(r),u=!1,c=!1,f=!1;switch(e.indexOf(\"!\")>=0&&(e=e.replace(\"!\",\"\"),c=!0),e.indexOf(\"@\")>=0&&(e=e.replace(\"@\",\"\"),u=!0),(o||l||u)&&(i=o||s?\"\"+t:\"\",a=\"\"+r),u&&(t=i=i.toLowerCase(),r=a=a.toLowerCase()),e){case\"*=\":n=i.indexOf(a)>=0;break;case\"$=\":n=i.indexOf(a,i.length-a.length)>=0;break;case\"^=\":n=0===i.indexOf(a);break;case\"=\":n=t===r;break;case\">\":f=!0,n=t>r;break;case\">=\":f=!0,n=t>=r;break;case\"<\":f=!0,n=t<r;break;case\"<=\":f=!0,n=t<=r;break;default:n=!1}return!c||null==t&&f||(n=!n),n},mn=function(t,e){return t.data(e)},yn=[],xn=function(t,e){return t.checks.every((function(t){return yn[t.type](t,e)}))};yn[0]=function(t,e){var r=t.value;return\"*\"===r||r===e.group()},yn[7]=function(t,e){return function(t,e){return un[t](e)}(t.value,e)},yn[8]=function(t,e){var r=t.value;return e.id()===r},yn[9]=function(t,e){var r=t.value;return e.hasClass(r)},yn[6]=function(t,e){var r=t.field,n=t.operator,i=t.value;return vn(function(t,e){return t[e]()}(e,r),n,i)},yn[3]=function(t,e){var r=t.field,n=t.operator,i=t.value;return vn(mn(e,r),n,i)},yn[5]=function(t,e){var r=t.field,n=t.operator;return function(t,e){switch(e){case\"?\":return!!t;case\"!\":return!t;case\"^\":return void 0===t}}(mn(e,r),n)},yn[4]=function(t,e){var r=t.field;return t.operator,void 0!==mn(e,r)},yn[10]=function(t,e){var r=t.nodes[0],n=t.nodes[1],i=e.source(),a=e.target();return xn(r,i)&&xn(n,a)||xn(n,i)&&xn(r,a)},yn[14]=function(t,e){return xn(t.node,e)&&e.neighborhood().some((function(e){return e.isNode()&&xn(t.neighbor,e)}))},yn[11]=function(t,e){return xn(t.source,e.source())&&xn(t.target,e.target())},yn[12]=function(t,e){return xn(t.source,e)&&e.outgoers().some((function(e){return e.isNode()&&xn(t.target,e)}))},yn[13]=function(t,e){return xn(t.target,e)&&e.incomers().some((function(e){return e.isNode()&&xn(t.source,e)}))},yn[15]=function(t,e){return xn(t.child,e)&&xn(t.parent,e.parent())},yn[17]=function(t,e){return xn(t.parent,e)&&e.children().some((function(e){return xn(t.child,e)}))},yn[16]=function(t,e){return xn(t.descendant,e)&&e.ancestors().some((function(e){return xn(t.ancestor,e)}))},yn[18]=function(t,e){return xn(t.ancestor,e)&&e.descendants().some((function(e){return xn(t.descendant,e)}))},yn[19]=function(t,e){return xn(t.subject,e)&&xn(t.left,e)&&xn(t.right,e)},yn[20]=function(){return!0},yn[1]=function(t,e){return t.value.has(e)},yn[2]=function(t,e){return(0,t.value)(e)};var bn={matches:function(t){for(var e=0;e<this.length;e++){var r=this[e];if(xn(r,t))return!0}return!1},filter:function(t){var e=this;if(1===e.length&&1===e[0].checks.length&&8===e[0].checks[0].type)return t.getElementById(e[0].checks[0].value).collection();var r=function(t){for(var r=0;r<e.length;r++){var n=e[r];if(xn(n,t))return!0}return!1};return null==e.text()&&(r=function(){return!0}),t.filter(r)}},_n=function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==t||E(t)&&t.match(/^\\s*$/)||(D(t)?this.addQuery({checks:[{type:1,value:t.collection()}]}):C(t)?this.addQuery({checks:[{type:2,value:t}]}):E(t)?this.parse(t)||(this.invalid=!0):wt(\"A selector must be created from a string; found \"))},wn=_n.prototype;[gn,bn].forEach((function(t){return X(wn,t)})),wn.text=function(){return this.inputText},wn.size=function(){return this.length},wn.eq=function(t){return this[t]},wn.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},wn.addQuery=function(t){this[this.length++]=t},wn.selector=wn.toString;var kn={allAre:function(t){var e=new _n(t);return this.every((function(t){return e.matches(t)}))},is:function(t){var e=new _n(t);return this.some((function(t){return e.matches(t)}))},some:function(t,e){for(var r=0;r<this.length;r++)if(e?t.apply(e,[this[r],r,this]):t(this[r],r,this))return!0;return!1},every:function(t,e){for(var r=0;r<this.length;r++)if(!(e?t.apply(e,[this[r],r,this]):t(this[r],r,this)))return!1;return!0},same:function(t){if(this===t)return!0;t=this.cy().collection(t);var e=this.length;return e===t.length&&(1===e?this[0]===t[0]:this.every((function(e){return t.hasElementWithId(e.id())})))},anySame:function(t){return t=this.cy().collection(t),this.some((function(e){return t.hasElementWithId(e.id())}))},allAreNeighbors:function(t){t=this.cy().collection(t);var e=this.neighborhood();return t.every((function(t){return e.hasElementWithId(t.id())}))},contains:function(t){t=this.cy().collection(t);var e=this;return t.every((function(t){return e.hasElementWithId(t.id())}))}};kn.allAreNeighbours=kn.allAreNeighbors,kn.has=kn.contains,kn.equal=kn.equals=kn.same;var Tn,Mn,An=function(t,e){return function(r,n,i,a){var o,s=r,l=this;if(null==s?o=\"\":D(s)&&1===s.length&&(o=s.id()),1===l.length&&o){var u=l[0]._private,c=u.traversalCache=u.traversalCache||{},f=c[e]=c[e]||[],h=ft(o);return f[h]||(f[h]=t.call(l,r,n,i,a))}return t.call(l,r,n,i,a)}},Sn={parent:function(t){var e=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var n=0;n<this.length;n++){var i=this[n]._private.parent;i&&e.push(i)}return this.spawn(e,!0).filter(t)},parents:function(t){for(var e=[],r=this.parent();r.nonempty();){for(var n=0;n<r.length;n++){var i=r[n];e.push(i)}r=r.parent()}return this.spawn(e,!0).filter(t)},commonAncestors:function(t){for(var e,r=0;r<this.length;r++){var n=this[r].parents();e=(e=e||n).intersect(n)}return e.filter(t)},orphans:function(t){return this.stdFilter((function(t){return t.isOrphan()})).filter(t)},nonorphans:function(t){return this.stdFilter((function(t){return t.isChild()})).filter(t)},children:An((function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r]._private.children,i=0;i<n.length;i++)e.push(n[i]);return this.spawn(e,!0).filter(t)}),\"children\"),siblings:function(t){return this.parent().children().not(this).filter(t)},isParent:function(){var t=this[0];if(t)return t.isNode()&&0!==t._private.children.length},isChildless:function(){var t=this[0];if(t)return t.isNode()&&0===t._private.children.length},isChild:function(){var t=this[0];if(t)return t.isNode()&&null!=t._private.parent},isOrphan:function(){var t=this[0];if(t)return t.isNode()&&null==t._private.parent},descendants:function(t){var e=[];return function t(r){for(var n=0;n<r.length;n++){var i=r[n];e.push(i),i.children().nonempty()&&t(i.children())}}(this.children()),this.spawn(e,!0).filter(t)}};function En(t,e,r,n){for(var i=[],a=new Rt,o=t.cy().hasCompoundNodes(),s=0;s<t.length;s++){var l=t[s];r?i.push(l):o&&n(i,a,l)}for(;i.length>0;){var u=i.shift();e(u),a.add(u.id()),o&&n(i,a,u)}return t}function Cn(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];e.has(a.id())||t.push(a)}}function Ln(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}function Pn(t,e,r){Ln(t,e,r),Cn(t,e,r)}Sn.forEachDown=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return En(this,t,e,Cn)},Sn.forEachUp=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return En(this,t,e,Ln)},Sn.forEachUpAndDown=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return En(this,t,e,Pn)},Sn.ancestors=Sn.parents,(Tn=Mn={data:rn.data({field:\"data\",bindingEvent:\"data\",allowBinding:!0,allowSetting:!0,settingEvent:\"data\",settingTriggersEvent:!0,triggerFnName:\"trigger\",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:rn.removeData({field:\"data\",event:\"data\",triggerFnName:\"trigger\",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:rn.data({field:\"scratch\",bindingEvent:\"scratch\",allowBinding:!0,allowSetting:!0,settingEvent:\"scratch\",settingTriggersEvent:!0,triggerFnName:\"trigger\",allowGetting:!0,updateStyle:!0}),removeScratch:rn.removeData({field:\"scratch\",event:\"scratch\",triggerFnName:\"trigger\",triggerEvent:!0,updateStyle:!0}),rscratch:rn.data({field:\"rscratch\",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:rn.removeData({field:\"rscratch\",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}}).attr=Tn.data,Tn.removeAttr=Tn.removeData;var On,In,Dn=Mn,zn={};function Rn(t){return function(e){var r=this;if(void 0===e&&(e=!0),0!==r.length&&r.isNode()&&!r.removed()){for(var n=0,i=r[0],a=i._private.edges,o=0;o<a.length;o++){var s=a[o];!e&&s.isLoop()||(n+=t(i,s))}return n}}}function Fn(t,e){return function(r){for(var n,i=this.nodes(),a=0;a<i.length;a++){var o=i[a][t](r);void 0===o||void 0!==n&&!e(o,n)||(n=o)}return n}}X(zn,{degree:Rn((function(t,e){return e.source().same(e.target())?2:1})),indegree:Rn((function(t,e){return e.target().same(t)?1:0})),outdegree:Rn((function(t,e){return e.source().same(t)?1:0}))}),X(zn,{minDegree:Fn(\"degree\",(function(t,e){return t<e})),maxDegree:Fn(\"degree\",(function(t,e){return t>e})),minIndegree:Fn(\"indegree\",(function(t,e){return t<e})),maxIndegree:Fn(\"indegree\",(function(t,e){return t>e})),minOutdegree:Fn(\"outdegree\",(function(t,e){return t<e})),maxOutdegree:Fn(\"outdegree\",(function(t,e){return t>e}))}),X(zn,{totalDegree:function(t){for(var e=0,r=this.nodes(),n=0;n<r.length;n++)e+=r[n].degree(t);return e}});var Nn=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(!i.locked()){var a=i._private.position,o={x:null!=e.x?e.x-a.x:0,y:null!=e.y?e.y-a.y:0};!i.isParent()||0===o.x&&0===o.y||i.children().shift(o,r),i.dirtyBoundingBoxCache()}}},Bn={field:\"position\",bindingEvent:\"position\",allowBinding:!0,allowSetting:!0,settingEvent:\"position\",settingTriggersEvent:!0,triggerFnName:\"emitAndNotify\",allowGetting:!0,validKeys:[\"x\",\"y\"],beforeGet:function(t){t.updateCompoundBounds()},beforeSet:function(t,e){Nn(t,e,!1)},onSet:function(t){t.dirtyCompoundBoundsCache()},canSet:function(t){return!t.locked()}};On=In={position:rn.data(Bn),silentPosition:rn.data(X({},Bn,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(t,e){Nn(t,e,!0)},onSet:function(t){t.dirtyCompoundBoundsCache()}})),positions:function(t,e){if(P(t))e?this.silentPosition(t):this.position(t);else if(C(t)){var r=t,n=this.cy();n.startBatch();for(var i=0;i<this.length;i++){var a,o=this[i];(a=r(o,i))&&(e?o.silentPosition(a):o.position(a))}n.endBatch()}return this},silentPositions:function(t){return this.positions(t,!0)},shift:function(t,e,r){var n;if(P(t)?(n={x:O(t.x)?t.x:0,y:O(t.y)?t.y:0},r=e):E(t)&&O(e)&&((n={x:0,y:0})[t]=e),null!=n){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var o=this[a];if(!(i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var s=o.position(),l={x:s.x+n.x,y:s.y+n.y};r?o.silentPosition(l):o.position(l)}}i.endBatch()}return this},silentShift:function(t,e){return P(t)?this.shift(t,!0):E(t)&&O(e)&&this.shift(t,e,!0),this},renderedPosition:function(t,e){var r=this[0],n=this.cy(),i=n.zoom(),a=n.pan(),o=P(t)?t:void 0,s=void 0!==o||void 0!==e&&E(t);if(r&&r.isNode()){if(!s){var l=r.position();return o=Qt(l,i,a),void 0===t?o:o[t]}for(var u=0;u<this.length;u++){var c=this[u];void 0!==e?c.position(t,(e-a[t])/i):void 0!==o&&c.position(te(o,i,a))}}else if(!s)return;return this},relativePosition:function(t,e){var r=this[0],n=this.cy(),i=P(t)?t:void 0,a=void 0!==i||void 0!==e&&E(t),o=n.hasCompoundNodes();if(r&&r.isNode()){if(!a){var s=r.position(),l=o?r.parent():null,u=l&&l.length>0,c=u;u&&(l=l[0]);var f=c?l.position():{x:0,y:0};return i={x:s.x-f.x,y:s.y-f.y},void 0===t?i:i[t]}for(var h=0;h<this.length;h++){var p=this[h],d=o?p.parent():null,g=d&&d.length>0,v=g;g&&(d=d[0]);var m=v?d.position():{x:0,y:0};void 0!==e?p.position(t,e+m[t]):void 0!==i&&p.position({x:i.x+m.x,y:i.y+m.y})}}else if(!a)return;return this}},On.modelPosition=On.point=On.position,On.modelPositions=On.points=On.positions,On.renderedPoint=On.renderedPosition,On.relativePoint=On.relativePosition;var jn,Un,Vn=In;jn=Un={},Un.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,o=e.x2*n+i.x,s=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},Un.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp((function(e){if(e.isParent()){var r=e._private;r.compoundBoundsClean=!1,r.bbCache=null,t||e.emitAndNotify(\"bounds\")}})),this):this},Un.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(t){if(t.isParent()){var e=t._private,r=t.children(),n=\"include\"===t.pstyle(\"compound-sizing-wrt-labels\").value,i={width:{val:t.pstyle(\"min-width\").pfValue,left:t.pstyle(\"min-width-bias-left\"),right:t.pstyle(\"min-width-bias-right\")},height:{val:t.pstyle(\"min-height\").pfValue,top:t.pstyle(\"min-height-bias-top\"),bottom:t.pstyle(\"min-height-bias-bottom\")}},a=r.boundingBox({includeLabels:n,includeOverlays:!1,useCache:!1}),o=e.position;0!==a.w&&0!==a.h||((a={w:t.pstyle(\"width\").pfValue,h:t.pstyle(\"height\").pfValue}).x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);var s=i.width.left.value;\"px\"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var l=i.width.right.value;\"px\"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var u=i.height.top.value;\"px\"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var c=i.height.bottom.value;\"px\"===i.height.bottom.units&&i.height.val>0&&(c=100*c/i.height.val);var f=m(i.width.val-a.w,s,l),h=f.biasDiff,p=f.biasComplementDiff,d=m(i.height.val-a.h,u,c),g=d.biasDiff,v=d.biasComplementDiff;e.autoPadding=function(t,e,r,n){if(\"%\"!==r.units)return\"px\"===r.units?r.pfValue:0;switch(n){case\"width\":return t>0?r.pfValue*t:0;case\"height\":return e>0?r.pfValue*e:0;case\"average\":return t>0&&e>0?r.pfValue*(t+e)/2:0;case\"min\":return t>0&&e>0?t>e?r.pfValue*e:r.pfValue*t:0;case\"max\":return t>0&&e>0?t>e?r.pfValue*t:r.pfValue*e:0;default:return 0}}(a.w,a.h,t.pstyle(\"padding\"),t.pstyle(\"padding-relative-to\").value),e.autoWidth=Math.max(a.w,i.width.val),o.x=(-h+a.x1+a.x2+p)/2,e.autoHeight=Math.max(a.h,i.height.val),o.y=(-g+a.y1+a.y2+v)/2}function m(t,e,r){var n=0,i=0,a=e+r;return t>0&&a>0&&(n=e/a*t,i=r/a*t),{biasDiff:n,biasComplementDiff:i}}}for(var n=0;n<this.length;n++){var i=this[n],a=i._private;a.compoundBoundsClean&&!t||(r(i),e.batching()||(a.compoundBoundsClean=!0))}return this};var Hn=function(t){return t===1/0||t===-1/0?0:t},qn=function(t,e,r,n,i){n-e!=0&&i-r!=0&&null!=e&&null!=r&&null!=n&&null!=i&&(t.x1=e<t.x1?e:t.x1,t.x2=n>t.x2?n:t.x2,t.y1=r<t.y1?r:t.y1,t.y2=i>t.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},Gn=function(t,e){return null==e?t:qn(t,e.x1,e.y1,e.x2,e.y2)},Yn=function(t,e,r){return Ot(t,e,r)},Wn=function(t,e,r){if(!e.cy().headless()){var n,i,a=e._private,o=a.rstyle,s=o.arrowWidth/2;if(\"none\"!==e.pstyle(r+\"-arrow-shape\").value){\"source\"===r?(n=o.srcX,i=o.srcY):\"target\"===r?(n=o.tgtX,i=o.tgtY):(n=o.midX,i=o.midY);var l=a.arrowBounds=a.arrowBounds||{},u=l[r]=l[r]||{};u.x1=n-s,u.y1=i-s,u.x2=n+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,pe(u,1),qn(t,u.x1,u.y1,u.x2,u.y2)}}},Xn=function(t,e,r){if(!e.cy().headless()){var n;n=r?r+\"-\":\"\";var i=e._private,a=i.rstyle;if(e.pstyle(n+\"label\").strValue){var o,s,l,u,c=e.pstyle(\"text-halign\"),f=e.pstyle(\"text-valign\"),h=Yn(a,\"labelWidth\",r),p=Yn(a,\"labelHeight\",r),d=Yn(a,\"labelX\",r),g=Yn(a,\"labelY\",r),v=e.pstyle(n+\"text-margin-x\").pfValue,m=e.pstyle(n+\"text-margin-y\").pfValue,y=e.isEdge(),x=e.pstyle(n+\"text-rotation\"),b=e.pstyle(\"text-outline-width\").pfValue,_=e.pstyle(\"text-border-width\").pfValue/2,w=e.pstyle(\"text-background-padding\").pfValue,k=p,T=h,M=T/2,A=k/2;if(y)o=d-M,s=d+M,l=g-A,u=g+A;else{switch(c.value){case\"left\":o=d-T,s=d;break;case\"center\":o=d-M,s=d+M;break;case\"right\":o=d,s=d+T}switch(f.value){case\"top\":l=g-k,u=g;break;case\"center\":l=g-A,u=g+A;break;case\"bottom\":l=g,u=g+k}}o+=v-Math.max(b,_)-w-2,s+=v+Math.max(b,_)+w+2,l+=m-Math.max(b,_)-w-2,u+=m+Math.max(b,_)+w+2;var S=r||\"main\",E=i.labelBounds,C=E[S]=E[S]||{};C.x1=o,C.y1=l,C.x2=s,C.y2=u,C.w=s-o,C.h=u-l;var L=y&&\"autorotate\"===x.strValue,P=null!=x.pfValue&&0!==x.pfValue;if(L||P){var O=L?Yn(i.rstyle,\"labelAngle\",r):x.pfValue,I=Math.cos(O),D=Math.sin(O),z=(o+s)/2,R=(l+u)/2;if(!y){switch(c.value){case\"left\":z=s;break;case\"right\":z=o}switch(f.value){case\"top\":R=u;break;case\"bottom\":R=l}}var F=function(t,e){return{x:(t-=z)*I-(e-=R)*D+z,y:t*D+e*I+R}},N=F(o,l),B=F(o,u),j=F(s,l),U=F(s,u);o=Math.min(N.x,B.x,j.x,U.x),s=Math.max(N.x,B.x,j.x,U.x),l=Math.min(N.y,B.y,j.y,U.y),u=Math.max(N.y,B.y,j.y,U.y)}var V=S+\"Rot\",H=E[V]=E[V]||{};H.x1=o,H.y1=l,H.x2=s,H.y2=u,H.w=s-o,H.h=u-l,qn(t,o,l,s,u),qn(i.labelBounds.all,o,l,s,u)}return t}},Zn=function(t){var e=0,r=function(t){return(t?1:0)<<e++},n=0;return n+=r(t.incudeNodes),n+=r(t.includeEdges),n+=r(t.includeLabels),n+=r(t.includeMainLabels),n+=r(t.includeSourceLabels),(n+=r(t.includeTargetLabels))+r(t.includeOverlays)},Kn=function(t){if(t.isEdge()){var e=t.source().position(),r=t.target().position(),n=function(t){return Math.round(t)};return function(t,e){var r={value:0,done:!1},n=0,i=t.length;return ot({next:function(){return n<i?r.value=t[n++]:r.done=!0,r}},void 0)}([n(e.x),n(e.y),n(r.x),n(r.y)])}return 0},Jn=function(t,e){var r,n=t._private,i=t.isEdge(),a=(null==e?Qn:Zn(e))===Qn,o=Kn(t),s=n.bbCachePosKey===o,l=e.useCache&&s,u=function(t){return null==t._private.bbCache||t._private.styleDirty};if(!l||u(t)||i&&u(t.source())||u(t.target())?(s||t.recalculateRenderedStyle(l),r=function(t,e){var r,n,i,a,o,s,l,u=t._private.cy,c=u.styleEnabled(),f=u.headless(),h=fe(),p=t._private,d=t.isNode(),g=t.isEdge(),v=p.rstyle,m=d&&c?t.pstyle(\"bounds-expansion\").pfValue:[0],y=function(t){return\"none\"!==t.pstyle(\"display\").value},x=!c||y(t)&&(!g||y(t.source())&&y(t.target()));if(x){var b=0;c&&e.includeOverlays&&0!==t.pstyle(\"overlay-opacity\").value&&(b=t.pstyle(\"overlay-padding\").value);var _=0;c&&e.includeUnderlays&&0!==t.pstyle(\"underlay-opacity\").value&&(_=t.pstyle(\"underlay-padding\").value);var w=Math.max(b,_),k=0;if(c&&(k=t.pstyle(\"width\").pfValue/2),d&&e.includeNodes){var T=t.position();o=T.x,s=T.y;var M=t.outerWidth()/2,A=t.outerHeight()/2;qn(h,r=o-M,i=s-A,n=o+M,a=s+A)}else if(g&&e.includeEdges)if(c&&!f){var S=t.pstyle(\"curve-style\").strValue;if(r=Math.min(v.srcX,v.midX,v.tgtX),n=Math.max(v.srcX,v.midX,v.tgtX),i=Math.min(v.srcY,v.midY,v.tgtY),a=Math.max(v.srcY,v.midY,v.tgtY),qn(h,r-=k,i-=k,n+=k,a+=k),\"haystack\"===S){var E=v.haystackPts;if(E&&2===E.length){if(r=E[0].x,i=E[0].y,r>(n=E[1].x)){var C=r;r=n,n=C}if(i>(a=E[1].y)){var L=i;i=a,a=L}qn(h,r-k,i-k,n+k,a+k)}}else if(\"bezier\"===S||\"unbundled-bezier\"===S||\"segments\"===S||\"taxi\"===S){var P;switch(S){case\"bezier\":case\"unbundled-bezier\":P=v.bezierPts;break;case\"segments\":case\"taxi\":P=v.linePts}if(null!=P)for(var O=0;O<P.length;O++){var I=P[O];r=I.x-k,n=I.x+k,i=I.y-k,a=I.y+k,qn(h,r,i,n,a)}}}else{var D=t.source().position(),z=t.target().position();if((r=D.x)>(n=z.x)){var R=r;r=n,n=R}if((i=D.y)>(a=z.y)){var F=i;i=a,a=F}qn(h,r-=k,i-=k,n+=k,a+=k)}if(c&&e.includeEdges&&g&&(Wn(h,t,\"mid-source\"),Wn(h,t,\"mid-target\"),Wn(h,t,\"source\"),Wn(h,t,\"target\")),c&&\"yes\"===t.pstyle(\"ghost\").value){var N=t.pstyle(\"ghost-offset-x\").pfValue,B=t.pstyle(\"ghost-offset-y\").pfValue;qn(h,h.x1+N,h.y1+B,h.x2+N,h.y2+B)}var j=p.bodyBounds=p.bodyBounds||{};ge(j,h),de(j,m),pe(j,1),c&&(r=h.x1,n=h.x2,i=h.y1,a=h.y2,qn(h,r-w,i-w,n+w,a+w));var U=p.overlayBounds=p.overlayBounds||{};ge(U,h),de(U,m),pe(U,1);var V=p.labelBounds=p.labelBounds||{};null!=V.all?((l=V.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):V.all=fe(),c&&e.includeLabels&&(e.includeMainLabels&&Xn(h,t,null),g&&(e.includeSourceLabels&&Xn(h,t,\"source\"),e.includeTargetLabels&&Xn(h,t,\"target\")))}return h.x1=Hn(h.x1),h.y1=Hn(h.y1),h.x2=Hn(h.x2),h.y2=Hn(h.y2),h.w=Hn(h.x2-h.x1),h.h=Hn(h.y2-h.y1),h.w>0&&h.h>0&&x&&(de(h,m),pe(h,1)),h}(t,$n),n.bbCache=r,n.bbCachePosKey=o):r=n.bbCache,!a){var c=t.isNode();r=fe(),(e.includeNodes&&c||e.includeEdges&&!c)&&(e.includeOverlays?Gn(r,n.overlayBounds):Gn(r,n.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?Gn(r,n.labelBounds.all):(e.includeMainLabels&&Gn(r,n.labelBounds.mainRot),e.includeSourceLabels&&Gn(r,n.labelBounds.sourceRot),e.includeTargetLabels&&Gn(r,n.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1}return r},$n={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,useCache:!0},Qn=Zn($n),ti=Ct($n);Un.boundingBox=function(t){var e;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==t&&void 0!==t.useCache&&!0!==t.useCache){e=fe();var r=ti(t=t||$n),n=this;if(n.cy().styleEnabled())for(var i=0;i<n.length;i++){var a=n[i],o=a._private,s=Kn(a),l=o.bbCachePosKey===s,u=r.useCache&&l&&!o.styleDirty;a.recalculateRenderedStyle(u)}this.updateCompoundBounds(!t.useCache);for(var c=0;c<n.length;c++){var f=n[c];Gn(e,Jn(f,r))}}else t=void 0===t?$n:ti(t),e=Jn(this[0],t);return e.x1=Hn(e.x1),e.y1=Hn(e.y1),e.x2=Hn(e.x2),e.y2=Hn(e.y2),e.w=Hn(e.x2-e.x1),e.h=Hn(e.y2-e.y1),e},Un.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds[\"mid-source\"]=null,e.arrowBounds[\"mid-target\"]=null}return this.emitAndNotify(\"bounds\"),this},Un.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),i=r.collection();if(n&&(i=e.filter((function(t){return t.isParent()})),e=e.not(i)),P(t)){var a=t;t=function(){return a}}r.startBatch(),e.forEach((function(e,r){return e._private.bbAtOldPos=t(e,r)})).silentPositions(t),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var o=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}}(this.boundingBox({useCache:!1}));return e.silentPositions((function(t){return t._private.bbAtOldPos})),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),r.endBatch(),o},jn.boundingbox=jn.bb=jn.boundingBox,jn.renderedBoundingbox=jn.renderedBoundingBox;var ei,ri,ni=Un;ei=ri={};var ii=function(t){t.uppercaseName=G(t.name),t.autoName=\"auto\"+t.uppercaseName,t.labelName=\"label\"+t.uppercaseName,t.outerName=\"outer\"+t.uppercaseName,t.uppercaseOuterName=G(t.outerName),ei[t.name]=function(){var e=this[0],r=e._private,n=r.cy._private.styleEnabled;if(e){if(n){if(e.isParent())return e.updateCompoundBounds(),r[t.autoName]||0;var i=e.pstyle(t.name);return\"label\"===i.strValue?(e.recalculateRenderedStyle(),r.rstyle[t.labelName]||0):i.pfValue}return 1}},ei[\"outer\"+t.uppercaseName]=function(){var e=this[0],r=e._private.cy._private.styleEnabled;if(e)return r?e[t.name]()+e.pstyle(\"border-width\").pfValue+2*e.padding():1},ei[\"rendered\"+t.uppercaseName]=function(){var e=this[0];if(e)return e[t.name]()*this.cy().zoom()},ei[\"rendered\"+t.uppercaseOuterName]=function(){var e=this[0];if(e)return e[t.outerName]()*this.cy().zoom()}};ii({name:\"width\"}),ii({name:\"height\"}),ri.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),void 0!==e.autoPadding?e.autoPadding:t.pstyle(\"padding\").pfValue):t.pstyle(\"padding\").pfValue},ri.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},ri.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var ai=ri,oi={controlPoints:{get:function(t){return t.renderer().getControlPoints(t)},mult:!0},segmentPoints:{get:function(t){return t.renderer().getSegmentPoints(t)},mult:!0},sourceEndpoint:{get:function(t){return t.renderer().getSourceEndpoint(t)}},targetEndpoint:{get:function(t){return t.renderer().getTargetEndpoint(t)}},midpoint:{get:function(t){return t.renderer().getEdgeMidpoint(t)}}},si=Object.keys(oi).reduce((function(t,e){var r=oi[e],n=function(t){return\"rendered\"+t[0].toUpperCase()+t.substr(1)}(e);return t[e]=function(){return function(t,e){if(t.isEdge())return e(t)}(this,r.get)},r.mult?t[n]=function(){return function(t,e){if(t.isEdge()){var r=t.cy(),n=r.pan(),i=r.zoom();return e(t).map((function(t){return Qt(t,i,n)}))}}(this,r.get)}:t[n]=function(){return function(t,e){if(t.isEdge()){var r=t.cy();return Qt(e(t),r.zoom(),r.pan())}}(this,r.get)},t}),{}),li=X({},Vn,ni,ai,si),ui=function(t,e){this.recycle(t,e)};function ci(){return!1}function fi(){return!0}ui.prototype={instanceString:function(){return\"event\"},recycle:function(t,e){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=ci,null!=t&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?fi:ci):null!=t&&t.type?e=t:this.type=t,null!=e&&(this.originalEvent=e.originalEvent,this.type=null!=e.type?e.type:this.type,this.cy=e.cy,this.target=e.target,this.position=e.position,this.renderedPosition=e.renderedPosition,this.namespace=e.namespace,this.layout=e.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var r=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:r.x*n+i.x,y:r.y*n+i.y}}this.timeStamp=t&&t.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=fi;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.isPropagationStopped=fi;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=fi,this.stopPropagation()},isDefaultPrevented:ci,isPropagationStopped:ci,isImmediatePropagationStopped:ci};var hi=/^([^.]+)(\\.(?:[^.]+))?$/,pi={qualifierCompare:function(t,e){return t===e},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(t){return t},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},di=Object.keys(pi),gi={};function vi(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gi,e=arguments.length>1?arguments[1]:void 0,r=0;r<di.length;r++){var n=di[r];this[n]=t[n]||pi[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}var mi=vi.prototype,yi=function(t,e,r,n,i,a,o){C(n)&&(i=n,n=null),o&&(a=null==a?o:X({},a,o));for(var s=L(r)?r:r.split(/\\s+/),l=0;l<s.length;l++){var u=s[l];if(!B(u)){var c=u.match(hi);if(c&&!1===e(t,u,c[1],c[2]?c[2]:null,n,i,a))break}}},xi=function(t,e){return t.addEventFields(t.context,e),new ui(e.type,e)};mi.on=mi.addListener=function(t,e,r,n,i){return yi(this,(function(t,e,r,n,i,a,o){C(a)&&t.listeners.push({event:e,callback:a,type:r,namespace:n,qualifier:i,conf:o})}),t,e,r,n,i),this},mi.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})},mi.removeListener=mi.off=function(t,e,r,n){var i=this;0!==this.emitting&&(this.listeners=this.listeners.slice());for(var a=this.listeners,o=function(o){var s=a[o];yi(i,(function(e,r,n,i,l,u){if((s.type===n||\"*\"===t)&&(!i&&\".*\"!==s.namespace||s.namespace===i)&&(!l||e.qualifierCompare(s.qualifier,l))&&(!u||s.callback===u))return a.splice(o,1),!1}),t,e,r,n)},s=a.length-1;s>=0;s--)o(s);return this},mi.removeAllListeners=function(){return this.removeListener(\"*\")},mi.emit=mi.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,L(e)||(e=[e]),function(t,e,r){if(\"event\"!==S(r))if(P(r))e(t,xi(t,r));else for(var n=L(r)?r:r.split(/\\s+/),i=0;i<n.length;i++){var a=n[i];if(!B(a)){var o=a.match(hi);if(o){var s=o[1],l=o[2]?o[2]:null;e(t,xi(t,{type:s,namespace:l,target:t.context}))}}}else e(t,r)}(this,(function(t,a){null!=r&&(n=[{event:a.event,type:a.type,namespace:a.namespace,callback:r}],i=n.length);for(var o=function(r){var i=n[r];if(i.type===a.type&&(!i.namespace||i.namespace===a.namespace||\".*\"===i.namespace)&&t.eventMatches(t.context,i,a)){var o=[a];null!=e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.push(n)}}(o,e),t.beforeEmit(t.context,i,a),i.conf&&i.conf.one&&(t.listeners=t.listeners.filter((function(t){return t!==i})));var s=t.callbackContext(t.context,i,a),l=i.callback.apply(s,o);t.afterEmit(t.context,i,a),!1===l&&(a.stopPropagation(),a.preventDefault())}},s=0;s<i;s++)o(s);t.bubble(t.context)&&!a.isPropagationStopped()&&t.parent(t.context).emit(a,e)}),t),this.emitting--,this};var bi={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,r){var n=e.qualifier;return null==n||t!==r.target&&z(r.target)&&n.matches(r.target)},addEventFields:function(t,e){e.cy=t.cy(),e.target=t},callbackContext:function(t,e,r){return null!=e.qualifier?r.target:t},beforeEmit:function(t,e){e.conf&&e.conf.once&&e.conf.onceCollection.removeListener(e.event,e.qualifier,e.callback)},bubble:function(){return!0},parent:function(t){return t.isChild()?t.parent():t.cy()}},_i=function(t){return E(t)?new _n(t):t},wi={createEmitter:function(){for(var t=0;t<this.length;t++){var e=this[t],r=e._private;r.emitter||(r.emitter=new vi(bi,e))}return this},emitter:function(){return this._private.emitter},on:function(t,e,r){for(var n=_i(e),i=0;i<this.length;i++)this[i].emitter().on(t,n,r);return this},removeListener:function(t,e,r){for(var n=_i(e),i=0;i<this.length;i++)this[i].emitter().removeListener(t,n,r);return this},removeAllListeners:function(){for(var t=0;t<this.length;t++)this[t].emitter().removeAllListeners();return this},one:function(t,e,r){for(var n=_i(e),i=0;i<this.length;i++)this[i].emitter().one(t,n,r);return this},once:function(t,e,r){for(var n=_i(e),i=0;i<this.length;i++)this[i].emitter().on(t,n,r,{once:!0,onceCollection:this})},emit:function(t,e){for(var r=0;r<this.length;r++)this[r].emitter().emit(t,e);return this},emitAndNotify:function(t,e){if(0!==this.length)return this.cy().notify(t,this),this.emit(t,e),this}};rn.eventAliasesOn(wi);var ki={nodes:function(t){return this.filter((function(t){return t.isNode()})).filter(t)},edges:function(t){return this.filter((function(t){return t.isEdge()})).filter(t)},byGroup:function(){for(var t=this.spawn(),e=this.spawn(),r=0;r<this.length;r++){var n=this[r];n.isNode()?t.push(n):e.push(n)}return{nodes:t,edges:e}},filter:function(t,e){if(void 0===t)return this;if(E(t)||D(t))return new _n(t).filter(this);if(C(t)){for(var r=this.spawn(),n=this,i=0;i<n.length;i++){var a=n[i];(e?t.apply(e,[a,i,n]):t(a,i,n))&&r.push(a)}return r}return this.spawn()},not:function(t){if(t){E(t)&&(t=this.filter(t));for(var e=this.spawn(),r=0;r<this.length;r++){var n=this[r];t.has(n)||e.push(n)}return e}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(t){if(E(t)){var e=t;return this.filter(e)}for(var r=this.spawn(),n=t,i=this.length<t.length,a=i?this:n,o=i?n:this,s=0;s<a.length;s++){var l=a[s];o.has(l)&&r.push(l)}return r},xor:function(t){var e=this._private.cy;E(t)&&(t=e.$(t));var r=this.spawn(),n=t,i=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],a=i._private.data.id;e.hasElementWithId(a)||r.push(i)}};return i(this,n),i(n,this),r},diff:function(t){var e=this._private.cy;E(t)&&(t=e.$(t));var r=this.spawn(),n=this.spawn(),i=this.spawn(),a=t,o=function(t,e,r){for(var n=0;n<t.length;n++){var a=t[n],o=a._private.data.id;e.hasElementWithId(o)?i.merge(a):r.push(a)}};return o(this,a,r),o(a,this,n),{left:r,right:n,both:i}},add:function(t){var e=this._private.cy;if(!t)return this;if(E(t)){var r=t;t=e.mutableElements().filter(r)}for(var n=this.spawnSelf(),i=0;i<t.length;i++){var a=t[i];!this.has(a)&&n.push(a)}return n},merge:function(t){var e=this._private,r=e.cy;if(!t)return this;if(t&&E(t)){var n=t;t=r.mutableElements().filter(n)}for(var i=e.map,a=0;a<t.length;a++){var o=t[a],s=o._private.data.id;if(!i.has(s)){var l=this.length++;this[l]=o,i.set(s,{ele:o,index:l})}}return this},unmergeAt:function(t){var e=this[t].id(),r=this._private.map;this[t]=void 0,r.delete(e);var n=t===this.length-1;if(this.length>1&&!n){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[t]=a,r.set(o,{ele:a,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var e=this._private,r=t._private.data.id,n=e.map.get(r);if(!n)return this;var i=n.index;return this.unmergeAt(i),this},unmerge:function(t){var e=this._private.cy;if(!t)return this;if(t&&E(t)){var r=t;t=e.mutableElements().filter(r)}for(var n=0;n<t.length;n++)this.unmergeOne(t[n]);return this},unmergeBy:function(t){for(var e=this.length-1;e>=0;e--)t(this[e])&&this.unmergeAt(e);return this},map:function(t,e){for(var r=[],n=this,i=0;i<n.length;i++){var a=n[i],o=e?t.apply(e,[a,i,n]):t(a,i,n);r.push(o)}return r},reduce:function(t,e){for(var r=e,n=this,i=0;i<n.length;i++)r=t(r,n[i],i,n);return r},max:function(t,e){for(var r,n=-1/0,i=this,a=0;a<i.length;a++){var o=i[a],s=e?t.apply(e,[o,a,i]):t(o,a,i);s>n&&(n=s,r=o)}return{value:n,ele:r}},min:function(t,e){for(var r,n=1/0,i=this,a=0;a<i.length;a++){var o=i[a],s=e?t.apply(e,[o,a,i]):t(o,a,i);s<n&&(n=s,r=o)}return{value:n,ele:r}}},Ti=ki;Ti.u=Ti[\"|\"]=Ti[\"+\"]=Ti.union=Ti.or=Ti.add,Ti[\"\\\\\"]=Ti[\"!\"]=Ti[\"-\"]=Ti.difference=Ti.relativeComplement=Ti.subtract=Ti.not,Ti.n=Ti[\"&\"]=Ti[\".\"]=Ti.and=Ti.intersection=Ti.intersect,Ti[\"^\"]=Ti[\"(+)\"]=Ti[\"(-)\"]=Ti.symmetricDifference=Ti.symdiff=Ti.xor,Ti.fnFilter=Ti.filterFn=Ti.stdFilter=Ti.filter,Ti.complement=Ti.abscomp=Ti.absoluteComplement;var Mi,Ai=function(t,e){var r=t.cy().hasCompoundNodes();function n(t){var e=t.pstyle(\"z-compound-depth\");return\"auto\"===e.value?r?t.zDepth():0:\"bottom\"===e.value?-1:\"top\"===e.value?mt:0}var i=n(t)-n(e);if(0!==i)return i;function a(t){return\"auto\"===t.pstyle(\"z-index-compare\").value&&t.isNode()?1:0}var o=a(t)-a(e);if(0!==o)return o;var s=t.pstyle(\"z-index\").value-e.pstyle(\"z-index\").value;return 0!==s?s:t.poolIndex()-e.poolIndex()},Si={forEach:function(t,e){if(C(t))for(var r=this.length,n=0;n<r;n++){var i=this[n];if(!1===(e?t.apply(e,[i,n,this]):t(i,n,this)))break}return this},toArray:function(){for(var t=[],e=0;e<this.length;e++)t.push(this[e]);return t},slice:function(t,e){var r=[],n=this.length;null==e&&(e=n),null==t&&(t=0),t<0&&(t=n+t),e<0&&(e=n+e);for(var i=t;i>=0&&i<e&&i<n;i++)r.push(this[i]);return this.spawn(r)},size:function(){return this.length},eq:function(t){return this[t]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(t){if(!C(t))return this;var e=this.toArray().sort(t);return this.spawn(e)},sortByZIndex:function(){return this.sort(Ai)},zDepth:function(){var t=this[0];if(t){var e=t._private;if(\"nodes\"===e.group){var r=e.data.parent?t.parents().size():0;return t.isParent()?r:mt-1}var n=e.source,i=e.target,a=n.zDepth(),o=i.zDepth();return Math.max(a,o,0)}}};Si.each=Si.forEach,Mi=\"undefined\",(\"undefined\"==typeof Symbol?\"undefined\":d(Symbol))!=Mi&&d(Symbol.iterator)!=Mi&&(Si[Symbol.iterator]=function(){var t=this,e={value:void 0,done:!1},r=0,n=this.length;return y({next:function(){return r<n?e.value=t[r++]:(e.value=void 0,e.done=!0),e}},Symbol.iterator,(function(){return this}))});var Ei=Ct({nodeDimensionsIncludeLabels:!1}),Ci={layoutDimensions:function(t){var e;if(t=Ei(t),this.takesUpSpace())if(t.nodeDimensionsIncludeLabels){var r=this.boundingBox();e={w:r.w,h:r.h}}else e={w:this.outerWidth(),h:this.outerHeight()};else e={w:0,h:0};return 0!==e.w&&0!==e.h||(e.w=e.h=1),e},layoutPositions:function(t,e,r){var n=this.nodes().filter((function(t){return!t.isParent()})),i=this.cy(),a=e.eles,o=function(t){return t.id()},s=U(r,o);t.emit({type:\"layoutstart\",layout:t}),t.animations=[];var l=e.spacingFactor&&1!==e.spacingFactor,u=function(){if(!l)return null;for(var t=fe(),e=0;e<n.length;e++){var r=n[e],i=s(r,e);he(t,i.x,i.y)}return t}(),c=U((function(t,r){var n,i,a,o,c,f=s(t,r);return l&&(n=Math.abs(e.spacingFactor),a=f,o=(i=u).x1+i.w/2,c=i.y1+i.h/2,f={x:o+(a.x-o)*n,y:c+(a.y-c)*n}),null!=e.transform&&(f=e.transform(t,f)),f}),o);if(e.animate){for(var f=0;f<n.length;f++){var h=n[f],p=c(h,f);if(null==e.animateFilter||e.animateFilter(h,f)){var d=h.animation({position:p,duration:e.animationDuration,easing:e.animationEasing});t.animations.push(d)}else h.position(p)}if(e.fit){var g=i.animation({fit:{boundingBox:a.boundingBoxAt(c),padding:e.padding},duration:e.animationDuration,easing:e.animationEasing});t.animations.push(g)}else if(void 0!==e.zoom&&void 0!==e.pan){var v=i.animation({zoom:e.zoom,pan:e.pan,duration:e.animationDuration,easing:e.animationEasing});t.animations.push(v)}t.animations.forEach((function(t){return t.play()})),t.one(\"layoutready\",e.ready),t.emit({type:\"layoutready\",layout:t}),Kr.all(t.animations.map((function(t){return t.promise()}))).then((function(){t.one(\"layoutstop\",e.stop),t.emit({type:\"layoutstop\",layout:t})}))}else n.positions(c),e.fit&&i.fit(e.eles,e.padding),null!=e.zoom&&i.zoom(e.zoom),e.pan&&i.pan(e.pan),t.one(\"layoutready\",e.ready),t.emit({type:\"layoutready\",layout:t}),t.one(\"layoutstop\",e.stop),t.emit({type:\"layoutstop\",layout:t});return this},layout:function(t){return this.cy().makeLayout(X({},t,{eles:this}))}};function Li(t,e,r){var n,i=r._private,a=i.styleCache=i.styleCache||[];return null!=(n=a[t])?n:n=a[t]=e(r)}function Pi(t,e){return t=ft(t),function(r){return Li(t,e,r)}}function Oi(t,e){t=ft(t);var r=function(t){return e.call(t)};return function(){var e=this[0];if(e)return Li(t,r,e)}}Ci.createLayout=Ci.makeLayout=Ci.layout;var Ii={recalculateRenderedStyle:function(t){var e=this.cy(),r=e.renderer(),n=e.styleEnabled();return r&&n&&r.recalculateRenderedStyle(this,t),this},dirtyStyleCache:function(){var t,e=this.cy(),r=function(t){return t._private.styleCache=null};return e.hasCompoundNodes()?((t=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(t.connectedEdges()),t.forEach(r)):this.forEach((function(t){r(t),t.connectedEdges().forEach(r)})),this},updateStyle:function(t){var e=this._private.cy;if(!e.styleEnabled())return this;if(e.batching())return e._private.batchStyleEles.merge(this),this;var r=this;t=!(!t&&void 0!==t),e.hasCompoundNodes()&&(r=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var n=r;return t?n.emitAndNotify(\"style\"):n.emit(\"style\"),r.forEach((function(t){return t._private.styleDirty=!0})),this},cleanStyle:function(){var t=this.cy();if(t.styleEnabled())for(var e=0;e<this.length;e++){var r=this[e];r._private.styleDirty&&(r._private.styleDirty=!1,t.style().apply(r))}},parsedStyle:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this[0],n=r.cy();if(n.styleEnabled()&&r){this.cleanStyle();var i=r._private.style[t];return null!=i?i:e?n.style().getDefaultProperty(t):null}},numericStyle:function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var r=e.pstyle(t);return void 0!==r.pfValue?r.pfValue:r.value}},numericStyleUnits:function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0},renderedStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var r=this[0];return r?e.style().getRenderedStyle(r,t):void 0},style:function(t,e){var r=this.cy();if(!r.styleEnabled())return this;var n=r.style();if(P(t)){var i=t;n.applyBypass(this,i,!1),this.emitAndNotify(\"style\")}else if(E(t)){if(void 0===e){var a=this[0];return a?n.getStylePropertyValue(a,t):void 0}n.applyBypass(this,t,e,!1),this.emitAndNotify(\"style\")}else if(void 0===t){var o=this[0];return o?n.getRawStyle(o):void 0}return this},removeStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var r=e.style(),n=this;if(void 0===t)for(var i=0;i<n.length;i++){var a=n[i];r.removeAllBypasses(a,!1)}else{t=t.split(/\\s+/);for(var o=0;o<n.length;o++){var s=n[o];r.removeBypasses(s,t,!1)}}return this.emitAndNotify(\"style\"),this},show:function(){return this.css(\"display\",\"element\"),this},hide:function(){return this.css(\"display\",\"none\"),this},effectiveOpacity:function(){var t=this.cy();if(!t.styleEnabled())return 1;var e=t.hasCompoundNodes(),r=this[0];if(r){var n=r._private,i=r.pstyle(\"opacity\").value;if(!e)return i;var a=n.data.parent?r.parents():null;if(a)for(var o=0;o<a.length;o++)i*=a[o].pstyle(\"opacity\").value;return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var t=this[0],e=t.cy().hasCompoundNodes();return t?e?0===t.effectiveOpacity():0===t.pstyle(\"opacity\").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function Di(t,e){var r=t._private.data.parent?t.parents():null;if(r)for(var n=0;n<r.length;n++)if(!e(r[n]))return!1;return!0}function zi(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var t=this.cy();if(!t.styleEnabled())return!0;var i=this[0],a=t.hasCompoundNodes();if(i){var o=i._private;if(!e(i))return!1;if(i.isNode())return!a||Di(i,n);var s=o.source,l=o.target;return r(s)&&(!a||Di(s,r))&&(s===l||r(l)&&(!a||Di(l,r)))}}}var Ri=Pi(\"eleTakesUpSpace\",(function(t){return\"element\"===t.pstyle(\"display\").value&&0!==t.width()&&(!t.isNode()||0!==t.height())}));Ii.takesUpSpace=Oi(\"takesUpSpace\",zi({ok:Ri}));var Fi=Pi(\"eleInteractive\",(function(t){return\"yes\"===t.pstyle(\"events\").value&&\"visible\"===t.pstyle(\"visibility\").value&&Ri(t)})),Ni=Pi(\"parentInteractive\",(function(t){return\"visible\"===t.pstyle(\"visibility\").value&&Ri(t)}));Ii.interactive=Oi(\"interactive\",zi({ok:Fi,parentOk:Ni,edgeOkViaNode:Ri})),Ii.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var Bi=Pi(\"eleVisible\",(function(t){return\"visible\"===t.pstyle(\"visibility\").value&&0!==t.pstyle(\"opacity\").pfValue&&Ri(t)})),ji=Ri;Ii.visible=Oi(\"visible\",zi({ok:Bi,edgeOkViaNode:ji})),Ii.hidden=function(){var t=this[0];if(t)return!t.visible()},Ii.isBundledBezier=Oi(\"isBundledBezier\",(function(){return!!this.cy().styleEnabled()&&!this.removed()&&\"bezier\"===this.pstyle(\"curve-style\").value&&this.takesUpSpace()})),Ii.bypass=Ii.css=Ii.style,Ii.renderedCss=Ii.renderedStyle,Ii.removeBypass=Ii.removeCss=Ii.removeStyle,Ii.pstyle=Ii.parsedStyle;var Ui={};function Vi(t){return function(){var e=arguments,r=[];if(2===e.length){var n=e[0],i=e[1];this.on(t.event,n,i)}else if(1===e.length&&C(e[0])){var a=e[0];this.on(t.event,a)}else if(0===e.length||1===e.length&&L(e[0])){for(var o=1===e.length?e[0]:null,s=0;s<this.length;s++){var l=this[s],u=!t.ableField||l._private[t.ableField],c=l._private[t.field]!=t.value;if(t.overrideAble){var f=t.overrideAble(l);if(void 0!==f&&(u=f,!f))return this}u&&(l._private[t.field]=t.value,c&&r.push(l))}var h=this.spawn(r);h.updateStyle(),h.emit(t.event),o&&h.emit(o)}return this}}function Hi(t){Ui[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(void 0!==r)return r}return e._private[t.field]}},Ui[t.on]=Vi({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Ui[t.off]=Vi({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}Hi({field:\"locked\",overrideField:function(t){return!!t.cy().autolock()||void 0},on:\"lock\",off:\"unlock\"}),Hi({field:\"grabbable\",overrideField:function(t){return!t.cy().autoungrabify()&&!t.pannable()&&void 0},on:\"grabify\",off:\"ungrabify\"}),Hi({field:\"selected\",ableField:\"selectable\",overrideAble:function(t){return!t.cy().autounselectify()&&void 0},on:\"select\",off:\"unselect\"}),Hi({field:\"selectable\",overrideField:function(t){return!t.cy().autounselectify()&&void 0},on:\"selectify\",off:\"unselectify\"}),Ui.deselect=Ui.unselect,Ui.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},Hi({field:\"active\",on:\"activate\",off:\"unactivate\"}),Hi({field:\"pannable\",on:\"panify\",off:\"unpanify\"}),Ui.inactive=function(){var t=this[0];if(t)return!t._private.active};var qi={},Gi=function(t){return function(e){for(var r=[],n=0;n<this.length;n++){var i=this[n];if(i.isNode()){for(var a=!1,o=i.connectedEdges(),s=0;s<o.length;s++){var l=o[s],u=l.source(),c=l.target();if(t.noIncomingEdges&&c===i&&u!==i||t.noOutgoingEdges&&u===i&&c!==i){a=!0;break}}a||r.push(i)}}return this.spawn(r,!0).filter(e)}},Yi=function(t){return function(e){for(var r=[],n=0;n<this.length;n++){var i=this[n];if(i.isNode())for(var a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),u=s.target();t.outgoing&&l===i?(r.push(s),r.push(u)):t.incoming&&u===i&&(r.push(s),r.push(l))}}return this.spawn(r,!0).filter(e)}},Wi=function(t){return function(e){for(var r=this,n=[],i={};;){var a=t.outgoing?r.outgoers():r.incomers();if(0===a.length)break;for(var o=!1,s=0;s<a.length;s++){var l=a[s],u=l.id();i[u]||(i[u]=!0,n.push(l),o=!0)}if(!o)break;r=a}return this.spawn(n,!0).filter(e)}};function Xi(t){return function(e){for(var r=[],n=0;n<this.length;n++){var i=this[n]._private[t.attr];i&&r.push(i)}return this.spawn(r,!0).filter(e)}}function Zi(t){return function(e){var r=[],n=this._private.cy,i=t||{};E(e)&&(e=n.$(e));for(var a=0;a<e.length;a++)for(var o=e[a]._private.edges,s=0;s<o.length;s++){var l=o[s],u=l._private.data,c=this.hasElementWithId(u.source)&&e.hasElementWithId(u.target),f=e.hasElementWithId(u.source)&&this.hasElementWithId(u.target);if(c||f){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!c)continue;if(i.thisIsTgt&&!f)continue}r.push(l)}}return this.spawn(r,!0)}}function Ki(t){return t=X({},{codirected:!1},t),function(e){for(var r=[],n=this.edges(),i=t,a=0;a<n.length;a++)for(var o=n[a]._private,s=o.source,l=s._private.data.id,u=o.data.target,c=s._private.edges,f=0;f<c.length;f++){var h=c[f],p=h._private.data,d=p.target,g=p.source,v=d===u&&g===l,m=l===d&&u===g;(i.codirected&&v||!i.codirected&&(v||m))&&r.push(h)}return this.spawn(r,!0).filter(e)}}qi.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},X(qi,{roots:Gi({noIncomingEdges:!0}),leaves:Gi({noOutgoingEdges:!0}),outgoers:An(Yi({outgoing:!0}),\"outgoers\"),successors:Wi({outgoing:!0}),incomers:An(Yi({incoming:!0}),\"incomers\"),predecessors:Wi({incoming:!0})}),X(qi,{neighborhood:An((function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),u=s.target(),c=i===l?u:l;c.length>0&&e.push(c[0]),e.push(s[0])}return this.spawn(e,!0).filter(t)}),\"neighborhood\"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),qi.neighbourhood=qi.neighborhood,qi.closedNeighbourhood=qi.closedNeighborhood,qi.openNeighbourhood=qi.openNeighborhood,X(qi,{source:An((function(t){var e,r=this[0];return r&&(e=r._private.source||r.cy().collection()),e&&t?e.filter(t):e}),\"source\"),target:An((function(t){var e,r=this[0];return r&&(e=r._private.target||r.cy().collection()),e&&t?e.filter(t):e}),\"target\"),sources:Xi({attr:\"source\"}),targets:Xi({attr:\"target\"})}),X(qi,{edgesWith:An(Zi(),\"edgesWith\"),edgesTo:An(Zi({thisIsSrc:!0}),\"edgesTo\")}),X(qi,{connectedEdges:An((function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n._private.edges,a=0;a<i.length;a++){var o=i[a];e.push(o)}}return this.spawn(e,!0).filter(t)}),\"connectedEdges\"),connectedNodes:An((function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];n.isEdge()&&(e.push(n.source()[0]),e.push(n.target()[0]))}return this.spawn(e,!0).filter(t)}),\"connectedNodes\"),parallelEdges:An(Ki(),\"parallelEdges\"),codirectedEdges:An(Ki({codirected:!0}),\"codirectedEdges\")}),X(qi,{components:function(t){var e=this,r=e.cy(),n=r.collection(),i=null==t?e.nodes():t.nodes(),a=[];null!=t&&i.empty()&&(i=t.sources());var o=function(t,e){n.merge(t),i.unmerge(t),e.merge(t)};if(i.empty())return e.spawn();var s=function(){var t=r.collection();a.push(t);var n=i[0];o(n,t),e.bfs({directed:!1,roots:n,visit:function(e){return o(e,t)}}),t.forEach((function(r){r.connectedEdges().forEach((function(r){e.has(r)&&t.has(r.source())&&t.has(r.target())&&t.merge(r)}))}))};do{s()}while(i.length>0);return a},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),qi.componentsOf=qi.components;var Ji=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==t){var i=new Dt,a=!1;if(e){if(e.length>0&&P(e[0])&&!z(e[0])){a=!0;for(var o=[],s=new Rt,l=0,u=e.length;l<u;l++){var c=e[l];null==c.data&&(c.data={});var f=c.data;if(null==f.id)f.id=At();else if(t.hasElementWithId(f.id)||s.has(f.id))continue;var h=new Ft(t,c,!1);o.push(h),s.add(f.id)}e=o}}else e=[];this.length=0;for(var p=0,d=e.length;p<d;p++){var g=e[p][0];if(null!=g){var v=g._private.data.id;r&&i.has(v)||(r&&i.set(v,{index:this.length,ele:g}),this[this.length]=g,this.length++)}}this._private={eles:this,cy:t,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(t){this.lazyMap=t},rebuildMap:function(){for(var t=this.lazyMap=new Dt,e=this.eles,r=0;r<e.length;r++){var n=e[r];t.set(n.id(),{index:r,ele:n})}}},r&&(this._private.map=i),a&&!n&&this.restore()}else wt(\"A collection must have a reference to the core\")},$i=Ft.prototype=Ji.prototype=Object.create(Array.prototype);$i.instanceString=function(){return\"collection\"},$i.spawn=function(t,e){return new Ji(this.cy(),t,e)},$i.spawnSelf=function(){return this.spawn(this)},$i.cy=function(){return this._private.cy},$i.renderer=function(){return this._private.cy.renderer()},$i.element=function(){return this[0]},$i.collection=function(){return R(this)?this:new Ji(this._private.cy,[this])},$i.unique=function(){return new Ji(this._private.cy,this,!0)},$i.hasElementWithId=function(t){return t=\"\"+t,this._private.map.has(t)},$i.getElementById=function(t){t=\"\"+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new Ji(e)},$i.$id=$i.getElementById,$i.poolIndex=function(){var t=this._private.cy._private.elements,e=this[0]._private.data.id;return t._private.map.get(e).index},$i.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index},$i.indexOfId=function(t){return t=\"\"+t,this._private.map.get(t).index},$i.json=function(t){var e=this.element(),r=this.cy();if(null==e&&t)return this;if(null!=e){var n=e._private;if(P(t)){if(r.startBatch(),t.data){e.data(t.data);var i=n.data;if(e.isEdge()){var a=!1,o={},s=t.data.source,l=t.data.target;null!=s&&s!=i.source&&(o.source=\"\"+s,a=!0),null!=l&&l!=i.target&&(o.target=\"\"+l,a=!0),a&&(e=e.move(o))}else{var u=\"parent\"in t.data,c=t.data.parent;!u||null==c&&null==i.parent||c==i.parent||(void 0===c&&(c=null),null!=c&&(c=\"\"+c),e=e.move({parent:c}))}}t.position&&e.position(t.position);var f=function(r,i,a){var o=t[r];null!=o&&o!==n[r]&&(o?e[i]():e[a]())};return f(\"removed\",\"remove\",\"restore\"),f(\"selected\",\"select\",\"unselect\"),f(\"selectable\",\"selectify\",\"unselectify\"),f(\"locked\",\"lock\",\"unlock\"),f(\"grabbable\",\"grabify\",\"ungrabify\"),f(\"pannable\",\"panify\",\"unpanify\"),null!=t.classes&&e.classes(t.classes),r.endBatch(),this}if(void 0===t){var h={data:Mt(n.data),position:Mt(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:\"\"},p=0;return n.classes.forEach((function(t){return h.classes+=0==p++?t:\" \"+t})),h}}},$i.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e].json();t.push(r)}return t},$i.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r].json(),i=new Ft(t,n,!1);e.push(i)}return new Ji(t,e)},$i.copy=$i.clone,$i.restore=function(){for(var t,e,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),o=a._private,s=[],l=[],u=0,c=i.length;u<c;u++){var f=i[u];n&&!f.removed()||(f.isNode()?s.push(f):l.push(f))}t=s.concat(l);var h=function(){t.splice(e,1),e--};for(e=0;e<t.length;e++){var p=t[e],d=p._private,g=d.data;if(p.clearTraversalCache(),n||d.removed)if(void 0===g.id)g.id=At();else if(O(g.id))g.id=\"\"+g.id;else{if(B(g.id)||!E(g.id)){wt(\"Can not create element with invalid string ID `\"+g.id+\"`\"),h();continue}if(a.hasElementWithId(g.id)){wt(\"Can not create second element with ID `\"+g.id+\"`\"),h();continue}}var v=g.id;if(p.isNode()){var m=d.position;null==m.x&&(m.x=0),null==m.y&&(m.y=0)}if(p.isEdge()){for(var y=p,x=[\"source\",\"target\"],b=x.length,_=!1,w=0;w<b;w++){var k=x[w],T=g[k];O(T)&&(T=g[k]=\"\"+g[k]),null==T||\"\"===T?(wt(\"Can not create edge `\"+v+\"` with unspecified \"+k),_=!0):a.hasElementWithId(T)||(wt(\"Can not create edge `\"+v+\"` with nonexistant \"+k+\" `\"+T+\"`\"),_=!0)}if(_){h();continue}var M=a.getElementById(g.source),A=a.getElementById(g.target);M.same(A)?M._private.edges.push(y):(M._private.edges.push(y),A._private.edges.push(y)),y._private.source=M,y._private.target=A}d.map=new Dt,d.map.set(v,{ele:p,index:0}),d.removed=!1,n&&a.addToPool(p)}for(var S=0;S<s.length;S++){var C=s[S],L=C._private.data;O(L.parent)&&(L.parent=\"\"+L.parent);var P=L.parent,I=null!=P;if(I||C._private.parent){var D=C._private.parent?a.collection().merge(C._private.parent):a.getElementById(P);if(D.empty())L.parent=void 0;else if(D[0].removed())Tt(\"Node added with missing parent, reference to parent removed\"),L.parent=void 0,C._private.parent=null;else{for(var z=!1,R=D;!R.empty();){if(C.same(R)){z=!0,L.parent=void 0;break}R=R.parent()}z||(D[0]._private.children.push(C),C._private.parent=D[0],o.hasCompoundNodes=!0)}}}if(t.length>0){for(var F=t.length===i.length?i:new Ji(a,t),N=0;N<F.length;N++){var j=F[N];j.isNode()||(j.parallelEdges().clearTraversalCache(),j.source().clearTraversalCache(),j.target().clearTraversalCache())}(o.hasCompoundNodes?a.collection().merge(F).merge(F.connectedNodes()).merge(F.parent()):F).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r),r?F.emitAndNotify(\"add\"):n&&F.emit(\"add\")}return i},$i.removed=function(){var t=this[0];return t&&t._private.removed},$i.inside=function(){var t=this[0];return t&&!t._private.removed},$i.remove=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this,n=[],i={},a=r._private.cy;function o(t){for(var e=t._private.edges,r=0;r<e.length;r++)l(e[r])}function s(t){for(var e=t._private.children,r=0;r<e.length;r++)l(e[r])}function l(t){var r=i[t.id()];e&&t.removed()||r||(i[t.id()]=!0,t.isNode()?(n.push(t),o(t),s(t)):n.unshift(t))}for(var u=0,c=r.length;u<c;u++){var f=r[u];l(f)}function h(t,e){var r=t._private.edges;Lt(r,e),t.clearTraversalCache()}function p(t){t.clearTraversalCache()}var d=[];function g(t,e){e=e[0];var r=(t=t[0])._private.children,n=t.id();Lt(r,e),e._private.parent=null,d.ids[n]||(d.ids[n]=!0,d.push(t))}d.ids={},r.dirtyCompoundBoundsCache(),e&&a.removeFromPool(n);for(var v=0;v<n.length;v++){var m=n[v];if(m.isEdge()){var y=m.source()[0],x=m.target()[0];h(y,m),h(x,m);for(var b=m.parallelEdges(),_=0;_<b.length;_++){var w=b[_];p(w),w.isBundledBezier()&&w.dirtyBoundingBoxCache()}}else{var k=m.parent();0!==k.length&&g(k,m)}e&&(m._private.removed=!0)}var T=a._private.elements;a._private.hasCompoundNodes=!1;for(var M=0;M<T.length;M++){var A=T[M];if(A.isParent()){a._private.hasCompoundNodes=!0;break}}var S=new Ji(this.cy(),n);S.size()>0&&(t?S.emitAndNotify(\"remove\"):e&&S.emit(\"remove\"));for(var E=0;E<d.length;E++){var C=d[E];e&&C.removed()||C.updateStyle()}return S},$i.move=function(t){var e=this._private.cy,r=this,n=!1,i=!1,a=function(t){return null==t?t:\"\"+t};if(void 0!==t.source||void 0!==t.target){var o=a(t.source),s=a(t.target),l=null!=o&&e.hasElementWithId(o),u=null!=s&&e.hasElementWithId(s);(l||u)&&(e.batch((function(){r.remove(n,i),r.emitAndNotify(\"moveout\");for(var t=0;t<r.length;t++){var e=r[t],a=e._private.data;e.isEdge()&&(l&&(a.source=o),u&&(a.target=s))}r.restore(n,i)})),r.emitAndNotify(\"move\"))}else if(void 0!==t.parent){var c=a(t.parent);if(null===c||e.hasElementWithId(c)){var f=null===c?void 0:c;e.batch((function(){var t=r.remove(n,i);t.emitAndNotify(\"moveout\");for(var e=0;e<r.length;e++){var a=r[e],o=a._private.data;a.isNode()&&(o.parent=f)}t.restore(n,i)})),r.emitAndNotify(\"move\")}}return this},[Hr,nn,an,kn,Sn,Dn,zn,li,wi,ki,{isNode:function(){return\"nodes\"===this.group()},isEdge:function(){return\"edges\"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var t=this[0];if(t)return t._private.group}},Si,Ci,Ii,Ui,qi].forEach((function(t){X($i,t)}));var Qi={add:function(t){var e,r=this;if(D(t)){var n=t;if(n._private.cy===r)e=n.restore();else{for(var i=[],a=0;a<n.length;a++){var o=n[a];i.push(o.json())}e=new Ji(r,i)}}else if(L(t))e=new Ji(r,t);else if(P(t)&&(L(t.nodes)||L(t.edges))){for(var s=t,l=[],u=[\"nodes\",\"edges\"],c=0,f=u.length;c<f;c++){var h=u[c],p=s[h];if(L(p))for(var d=0,g=p.length;d<g;d++){var v=X({group:h},p[d]);l.push(v)}}e=new Ji(r,l)}else e=new Ft(r,t).collection();return e},remove:function(t){if(D(t));else if(E(t)){var e=t;t=this.$(e)}return t.remove()}},ta=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},a=e(r,.5*n,i),o=e(r,.5*n,a),s=e(r,n,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return r.x=r.x+l*n,r.v=r.v+u*n,r}return function t(e,n,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,f=1e-4;for(e=parseFloat(e)||500,n=parseFloat(n)||20,i=i||null,l.tension=e,l.friction=n,o=(a=null!==i)?(c=t(e,n))/i*.016:.016;s=r(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>f&&Math.abs(s.v)>f;);return a?function(t){return u[t*(u.length-1)|0]}:c}}(),ea=function(t,e,r,n){var i=function(t,e,r,n){var i=4,a=.001,o=1e-7,s=10,l=11,u=1/(l-1),c=\"undefined\"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var f=0;f<4;++f)if(\"number\"!=typeof arguments[f]||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var h=c?new Float32Array(l):new Array(l);function p(t,e){return 1-3*e+3*t}function d(t,e){return 3*e-6*t}function g(t){return 3*t}function v(t,e,r){return((p(e,r)*t+d(e,r))*t+g(e))*t}function m(t,e,r){return 3*p(e,r)*t*t+2*d(e,r)*t+g(e)}function y(e,n){for(var a=0;a<i;++a){var o=m(n,t,r);if(0===o)return n;n-=(v(n,t,r)-e)/o}return n}function x(){for(var e=0;e<l;++e)h[e]=v(e*u,t,r)}function b(e,n,i){var a,l,u=0;do{(a=v(l=n+(i-n)/2,t,r)-e)>0?i=l:n=l}while(Math.abs(a)>o&&++u<s);return l}function _(e){for(var n=0,i=1,o=l-1;i!==o&&h[i]<=e;++i)n+=u;--i;var s=n+(e-h[i])/(h[i+1]-h[i])*u,c=m(s,t,r);return c>=a?y(e,s):0===c?s:b(e,n,n+u)}var w=!1;function k(){w=!0,t===e&&r===n||x()}var T=function(i){return w||k(),t===e&&r===n?i:0===i?0:1===i?1:v(_(i),e,n)};T.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var M=\"generateBezier(\"+[t,e,r,n]+\")\";return T.toString=function(){return M},T}(t,e,r,n);return function(t,e,r){return t+(e-t)*i(r)}},ra={linear:function(t,e,r){return t+(e-t)*r},ease:ea(.25,.1,.25,1),\"ease-in\":ea(.42,0,1,1),\"ease-out\":ea(0,0,.58,1),\"ease-in-out\":ea(.42,0,.58,1),\"ease-in-sine\":ea(.47,0,.745,.715),\"ease-out-sine\":ea(.39,.575,.565,1),\"ease-in-out-sine\":ea(.445,.05,.55,.95),\"ease-in-quad\":ea(.55,.085,.68,.53),\"ease-out-quad\":ea(.25,.46,.45,.94),\"ease-in-out-quad\":ea(.455,.03,.515,.955),\"ease-in-cubic\":ea(.55,.055,.675,.19),\"ease-out-cubic\":ea(.215,.61,.355,1),\"ease-in-out-cubic\":ea(.645,.045,.355,1),\"ease-in-quart\":ea(.895,.03,.685,.22),\"ease-out-quart\":ea(.165,.84,.44,1),\"ease-in-out-quart\":ea(.77,0,.175,1),\"ease-in-quint\":ea(.755,.05,.855,.06),\"ease-out-quint\":ea(.23,1,.32,1),\"ease-in-out-quint\":ea(.86,0,.07,1),\"ease-in-expo\":ea(.95,.05,.795,.035),\"ease-out-expo\":ea(.19,1,.22,1),\"ease-in-out-expo\":ea(1,0,0,1),\"ease-in-circ\":ea(.6,.04,.98,.335),\"ease-out-circ\":ea(.075,.82,.165,1),\"ease-in-out-circ\":ea(.785,.135,.15,.86),spring:function(t,e,r){if(0===r)return ra.linear;var n=ta(t,e,r);return function(t,e,r){return t+(e-t)*n(r)}},\"cubic-bezier\":ea};function na(t,e,r,n,i){if(1===n)return r;if(e===r)return r;var a=i(e,r,n);return null==t||((t.roundValue||t.color)&&(a=Math.round(a)),void 0!==t.min&&(a=Math.max(a,t.min)),void 0!==t.max&&(a=Math.min(a,t.max))),a}function ia(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&\"%\"===e.type.units?t.value:t.pfValue:t}function aa(t,e,r,n,i){var a=null!=i?i.type:null;r<0?r=0:r>1&&(r=1);var o=ia(t,i),s=ia(e,i);if(O(o)&&O(s))return na(a,o,s,r,n);if(L(o)&&L(s)){for(var l=[],u=0;u<s.length;u++){var c=o[u],f=s[u];if(null!=c&&null!=f){var h=na(a,c,f,r,n);l.push(h)}else l.push(f)}return l}}function oa(t,e,r,n){var i=!n,a=t._private,o=e._private,s=o.easing,l=o.startTime,u=(n?t:t.cy()).style();if(!o.easingImpl)if(null==s)o.easingImpl=ra.linear;else{var c,f,h;c=E(s)?u.parse(\"transition-timing-function\",s).value:s,E(c)?(f=c,h=[]):(f=c[1],h=c.slice(2).map((function(t){return+t}))),h.length>0?(\"spring\"===f&&h.push(o.duration),o.easingImpl=ra[f].apply(null,h)):o.easingImpl=ra[f]}var p,d=o.easingImpl;if(p=0===o.duration?1:(r-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var g=o.startPosition,v=o.position;if(v&&i&&!t.locked()){var m={};sa(g.x,v.x)&&(m.x=aa(g.x,v.x,p,d)),sa(g.y,v.y)&&(m.y=aa(g.y,v.y,p,d)),t.position(m)}var y=o.startPan,x=o.pan,b=a.pan,_=null!=x&&n;_&&(sa(y.x,x.x)&&(b.x=aa(y.x,x.x,p,d)),sa(y.y,x.y)&&(b.y=aa(y.y,x.y,p,d)),t.emit(\"pan\"));var w=o.startZoom,k=o.zoom,T=null!=k&&n;T&&(sa(w,k)&&(a.zoom=ce(a.minZoom,aa(w,k,p,d),a.maxZoom)),t.emit(\"zoom\")),(_||T)&&t.emit(\"viewport\");var M=o.style;if(M&&M.length>0&&i){for(var A=0;A<M.length;A++){var S=M[A],C=S.name,L=S,P=o.startStyle[C],O=aa(P,L,p,d,u.properties[P.name]);u.overrideBypass(t,C,O)}t.emit(\"style\")}}return o.progress=p,p}function sa(t,e){return!!(null!=t&&null!=e&&(O(t)&&O(e)||t&&e))}function la(t,e,r,n){var i=e._private;i.started=!0,i.startTime=r-i.progress*i.duration}function ua(t,e){var r=e._private.aniEles,n=[];function i(e,r){var i=e._private,a=i.animation.current,o=i.animation.queue,s=!1;if(0===a.length){var l=o.shift();l&&a.push(l)}for(var u=function(t){for(var e=t.length-1;e>=0;e--)(0,t[e])();t.splice(0,t.length)},c=a.length-1;c>=0;c--){var f=a[c],h=f._private;h.stopped?(a.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||la(0,f,t),oa(e,f,t,r),h.applying&&(h.applying=!1),u(h.frames),null!=h.step&&h.step(t),f.completed()&&(a.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.completes)),s=!0)}return r||0!==a.length||0!==o.length||n.push(e),s}for(var a=!1,o=0;o<r.length;o++){var s=i(r[o]);a=a||s}var l=i(e,!0);(a||l)&&(r.length>0?e.notify(\"draw\",r):e.notify(\"draw\")),r.unmerge(n),e.emit(\"step\")}var ca={animate:rn.animate(),animation:rn.animation(),animated:rn.animated(),clearQueue:rn.clearQueue(),delay:rn.delay(),delayAnimation:rn.delayAnimation(),stop:rn.stop(),addToAnimationPool:function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){var e=t.renderer();e&&e.beforeRender?e.beforeRender((function(e,r){ua(r,t)}),e.beforeRenderPriorities.animations):function e(){t._private.animationsRunning&&et((function(r){ua(r,t),e()}))}()}}},fa={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,r){var n=e.qualifier;return null==n||t!==r.target&&z(r.target)&&n.matches(r.target)},addEventFields:function(t,e){e.cy=t,e.target=t},callbackContext:function(t,e,r){return null!=e.qualifier?r.target:t}},ha=function(t){return E(t)?new _n(t):t},pa={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new vi(fa,this)),this},emitter:function(){return this._private.emitter},on:function(t,e,r){return this.emitter().on(t,ha(e),r),this},removeListener:function(t,e,r){return this.emitter().removeListener(t,ha(e),r),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,e,r){return this.emitter().one(t,ha(e),r),this},once:function(t,e,r){return this.emitter().one(t,ha(e),r),this},emit:function(t,e){return this.emitter().emit(t,e),this},emitAndNotify:function(t,e){return this.emit(t),this.notify(t,e),this}};rn.eventAliasesOn(pa);var da={png:function(t){return t=t||{},this._private.renderer.png(t)},jpg:function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||\"#fff\",e.jpg(t)}};da.jpeg=da.jpg;var ga={layout:function(t){var e=this;if(null!=t)if(null!=t.name){var r,n=t.name,i=e.extension(\"layout\",n);if(null!=i)return r=E(t.eles)?e.$(t.eles):null!=t.eles?t.eles:e.$(),new i(X({},t,{cy:e,eles:r}));wt(\"No such layout `\"+n+\"` found.  Did you forget to import it and `cytoscape.use()` it?\")}else wt(\"A `name` must be specified to make a layout\");else wt(\"Layout options must be specified to make a layout\")}};ga.createLayout=ga.makeLayout=ga.layout;var va={notify:function(t,e){var r=this._private;if(this.batching()){r.batchNotifications=r.batchNotifications||{};var n=r.batchNotifications[t]=r.batchNotifications[t]||this.collection();null!=e&&n.merge(e)}else if(r.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}},notifications:function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach((function(r){var n=t.batchNotifications[r];n.empty()?e.notify(r):e.notify(r,n)}))}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var e=this;return this.batch((function(){for(var r=Object.keys(t),n=0;n<r.length;n++){var i=r[n],a=t[i];e.getElementById(i).data(a)}}))}},ma=Ct({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),ya={renderTo:function(t,e,r,n){return this._private.renderer.renderTo(t,e,r,n),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify(\"draw\"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify(\"resize\"),this},initRenderer:function(t){var e=this,r=e.extension(\"renderer\",t.name);if(null!=r){void 0!==t.wheelSensitivity&&Tt(\"You have set a custom wheel sensitivity.  This will make your app zoom unnaturally when using mainstream mice.  You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.\");var n=ma(t);n.cy=e,e._private.renderer=new r(n),this.notify(\"init\")}else wt(\"Can not initialise: No such renderer `\".concat(t.name,\"` found. Did you forget to import it and `cytoscape.use()` it?\"))},destroyRenderer:function(){var t=this;t.notify(\"destroy\");var e=t.container();if(e)for(e._cyreg=null;e.childNodes.length>0;)e.removeChild(e.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach((function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]}))},onRender:function(t){return this.on(\"render\",t)},offRender:function(t){return this.off(\"render\",t)}};ya.invalidateDimensions=ya.resize;var xa={collection:function(t,e){return E(t)?this.$(t):D(t)?t.collection():L(t)?(e||(e={}),new Ji(this,t,e.unique,e.removed)):new Ji(this)},nodes:function(t){var e=this.$((function(t){return t.isNode()}));return t?e.filter(t):e},edges:function(t){var e=this.$((function(t){return t.isEdge()}));return t?e.filter(t):e},$:function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},mutableElements:function(){return this._private.elements}};xa.elements=xa.filter=xa.$;var ba={},_a=\"t\";ba.apply=function(t){for(var e=this,r=e._private.cy.collection(),n=0;n<t.length;n++){var i=t[n],a=e.getContextMeta(i);if(!a.empty){var o=e.getContextStyle(a),s=e.applyContextStyle(a,o,i);i._private.appliedInitStyle?e.updateTransitions(i,s.diffProps):i._private.appliedInitStyle=!0,e.updateStyleHints(i)&&r.push(i)}}return r},ba.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},i=t+\"-\"+e,a=n[i];if(a)return a;for(var o=[],s={},l=0;l<r.length;l++){var u=r[l],c=t[l]===_a,f=e[l]===_a,h=c!==f,p=u.mappedProperties.length>0;if(h||f&&p){var d=void 0;h&&p||h?d=u.properties:p&&(d=u.mappedProperties);for(var g=0;g<d.length;g++){for(var v=d[g],m=v.name,y=!1,x=l+1;x<r.length;x++){var b=r[x];if(e[x]===_a&&(y=null!=b.properties[v.name]))break}s[m]||y||(s[m]=!0,o.push(m))}}}return n[i]=o,o},ba.getContextMeta=function(t){for(var e,r=this,n=\"\",i=t._private.styleCxtKey||\"\",a=0;a<r.length;a++){var o=r[a];n+=o.selector&&o.selector.matches(t)?_a:\"f\"}return e=r.getPropertiesDiff(i,n),t._private.styleCxtKey=n,{key:n,diffPropNames:e,empty:0===e.length}},ba.getContextStyle=function(t){var e=t.key,r=this._private.contextStyles=this._private.contextStyles||{};if(r[e])return r[e];for(var n={_private:{key:e}},i=0;i<this.length;i++){var a=this[i];if(e[i]===_a)for(var o=0;o<a.properties.length;o++){var s=a.properties[o];n[s.name]=s}}return r[e]=n,n},ba.applyContextStyle=function(t,e,r){for(var n=t.diffPropNames,i={},a=this.types,o=0;o<n.length;o++){var s=n[o],l=e[s],u=r.pstyle(s);if(!l){if(!u)continue;l=u.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(u!==l){if(l.mapped===a.fn&&null!=u&&null!=u.mapping&&u.mapping.value===l.value){var c=u.mapping;if((c.fnValue=l.value(r))===c.prevFnValue)continue}var f=i[s]={prev:u};this.applyParsedProperty(r,l),f.next=r.pstyle(s),f.next&&f.next.bypass&&(f.next=f.next.bypassed)}}return{diffProps:i}},ba.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,i=r.propertyGroupKeys,a=function(t,e,n){return r.getPropertiesHash(t,e,n)},o=e.styleKey;if(t.removed())return!1;var s=\"nodes\"===e.group,l=t._private.style;n=Object.keys(l);for(var u=0;u<i.length;u++){var c=i[u];e.styleKeys[c]=[nt,at]}for(var f,h=function(t,r){return e.styleKeys[r][0]=st(t,e.styleKeys[r][0])},p=function(t,r){return e.styleKeys[r][1]=lt(t,e.styleKeys[r][1])},d=function(t,e){h(t,e),p(t,e)},g=function(t,e){for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);h(n,e),p(n,e)}},v=0;v<n.length;v++){var m=n[v],y=l[m];if(null!=y){var x=this.properties[m],b=x.type,_=x.groupKey,w=void 0;null!=x.hashOverride?w=x.hashOverride(t,y):null!=y.pfValue&&(w=y.pfValue);var k=null==x.enums?y.value:null,T=null!=w,M=T||null!=k,A=y.units;b.number&&M&&!b.multiple?(d(-128<(f=T?w:k)&&f<128&&Math.floor(f)!==f?2e9-(1024*f|0):f,_),T||null==A||g(A,_)):g(y.strValue,_)}}for(var S=[nt,at],E=0;E<i.length;E++){var C=i[E],L=e.styleKeys[C];S[0]=st(L[0],S[0]),S[1]=lt(L[1],S[1])}e.styleKey=2097152*S[0]+S[1];var P=e.styleKeys;e.labelDimsKey=ut(P.labelDimensions);var O=a(t,[\"label\"],P.labelDimensions);if(e.labelKey=ut(O),e.labelStyleKey=ut(ct(P.commonLabel,O)),!s){var I=a(t,[\"source-label\"],P.labelDimensions);e.sourceLabelKey=ut(I),e.sourceLabelStyleKey=ut(ct(P.commonLabel,I));var D=a(t,[\"target-label\"],P.labelDimensions);e.targetLabelKey=ut(D),e.targetLabelStyleKey=ut(ct(P.commonLabel,D))}if(s){var z=e.styleKeys,R=z.nodeBody,F=z.nodeBorder,N=z.backgroundImage,B=z.compound,j=z.pie,U=[R,F,N,B,j].filter((function(t){return null!=t})).reduce(ct,[nt,at]);e.nodeKey=ut(U),e.hasPie=null!=j&&j[0]!==nt&&j[1]!==at}return o!==e.styleKey},ba.clearStyleHints=function(t){var e=t._private;e.styleCxtKey=\"\",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null},ba.applyParsedProperty=function(t,e){var r,n=this,i=e,a=t._private.style,o=n.types,s=n.properties[i.name].type,l=i.bypass,u=a[i.name],c=u&&u.bypass,f=t._private,h=\"mapping\",p=function(t){return null==t?null:null!=t.pfValue?t.pfValue:t.value},d=function(){var e=p(u),r=p(i);n.checkTriggers(t,i.name,e,r)};if(i&&\"pie\"===i.name.substr(0,3)&&Tt(\"The pie style properties are deprecated.  Create charts using background images instead.\"),\"curve-style\"===e.name&&t.isEdge()&&(\"bezier\"!==e.value&&t.isLoop()||\"haystack\"===e.value&&(t.source().isParent()||t.target().isParent()))&&(i=e=this.parse(e.name,\"bezier\",l)),i.delete)return a[i.name]=void 0,d(),!0;if(i.deleteBypassed)return u?!!u.bypass&&(u.bypassed=void 0,d(),!0):(d(),!0);if(i.deleteBypass)return u?!!u.bypass&&(a[i.name]=u.bypassed,d(),!0):(d(),!0);var g=function(){Tt(\"Do not assign mappings to elements without corresponding data (i.e. ele `\"+t.id()+\"` has no mapping for property `\"+i.name+\"` with data field `\"+i.field+\"`); try a `[\"+i.field+\"]` selector to limit scope to elements with `\"+i.field+\"` defined\")};switch(i.mapped){case o.mapData:for(var v,m=i.field.split(\".\"),y=f.data,x=0;x<m.length&&y;x++)y=y[m[x]];if(null==y)return g(),!1;if(!O(y))return Tt(\"Do not use continuous mappers without specifying numeric data (i.e. `\"+i.field+\": \"+y+\"` for `\"+t.id()+\"` is non-numeric)\"),!1;var b=i.fieldMax-i.fieldMin;if((v=0===b?0:(y-i.fieldMin)/b)<0?v=0:v>1&&(v=1),s.color){var _=i.valueMin[0],w=i.valueMax[0],k=i.valueMin[1],T=i.valueMax[1],M=i.valueMin[2],A=i.valueMax[2],S=null==i.valueMin[3]?1:i.valueMin[3],E=null==i.valueMax[3]?1:i.valueMax[3],C=[Math.round(_+(w-_)*v),Math.round(k+(T-k)*v),Math.round(M+(A-M)*v),Math.round(S+(E-S)*v)];r={bypass:i.bypass,name:i.name,value:C,strValue:\"rgb(\"+C[0]+\", \"+C[1]+\", \"+C[2]+\")\"}}else{if(!s.number)return!1;var L=i.valueMin+(i.valueMax-i.valueMin)*v;r=this.parse(i.name,L,i.bypass,h)}if(!r)return g(),!1;r.mapping=i,i=r;break;case o.data:for(var P=i.field.split(\".\"),I=f.data,D=0;D<P.length&&I;D++)I=I[P[D]];if(null!=I&&(r=this.parse(i.name,I,i.bypass,h)),!r)return g(),!1;r.mapping=i,i=r;break;case o.fn:var z=i.value,R=null!=i.fnValue?i.fnValue:z(t);if(i.prevFnValue=R,null==R)return Tt(\"Custom function mappers may not return null (i.e. `\"+i.name+\"` for ele `\"+t.id()+\"` is null)\"),!1;if(!(r=this.parse(i.name,R,i.bypass,h)))return Tt(\"Custom function mappers may not return invalid values for the property type (i.e. `\"+i.name+\"` for ele `\"+t.id()+\"` is invalid)\"),!1;r.mapping=Mt(i),i=r;break;case void 0:break;default:return!1}return l?(i.bypassed=c?u.bypassed:u,a[i.name]=i):c?u.bypassed=i:a[i.name]=i,d(),!0},ba.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),e)for(var i=n._private.style,a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],l=i[s];null!=l&&(l.bypass?l.bypassed=null:i[s]=null)}else n._private.style={}}},ba.update=function(){this._private.cy.mutableElements().updateStyle()},ba.updateTransitions=function(t,e){var r=this,n=t._private,i=t.pstyle(\"transition-property\").value,a=t.pstyle(\"transition-duration\").pfValue,o=t.pstyle(\"transition-delay\").pfValue;if(i.length>0&&a>0){for(var s={},l=!1,u=0;u<i.length;u++){var c=i[u],f=t.pstyle(c),h=e[c];if(h){var p=h.prev,d=null!=h.next?h.next:f,g=!1,v=void 0,m=1e-6;p&&(O(p.pfValue)&&O(d.pfValue)?(g=d.pfValue-p.pfValue,v=p.pfValue+m*g):O(p.value)&&O(d.value)?(g=d.value-p.value,v=p.value+m*g):L(p.value)&&L(d.value)&&(g=p.value[0]!==d.value[0]||p.value[1]!==d.value[1]||p.value[2]!==d.value[2],v=p.strValue),g&&(s[c]=d.strValue,this.applyBypass(t,c,v),l=!0))}}if(!l)return;n.transitioning=!0,new Kr((function(e){o>0?t.delayAnimation(o).play().promise().then(e):e()})).then((function(){return t.animation({style:s,duration:a,easing:t.pstyle(\"transition-timing-function\").value,queue:!1}).play().promise()})).then((function(){r.removeBypasses(t,i),t.emitAndNotify(\"style\"),n.transitioning=!1}))}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify(\"style\"),n.transitioning=!1)},ba.checkTrigger=function(t,e,r,n,i,a){var o=this.properties[e],s=i(o);null!=s&&s(r,n)&&a(o)},ba.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,(function(t){return t.triggersZOrder}),(function(){i._private.cy.notify(\"zorder\",t)}))},ba.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,(function(t){return t.triggersBounds}),(function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||(\"curve-style\"!==e||\"bezier\"!==r&&\"bezier\"!==n)&&(\"display\"!==e||\"none\"!==r&&\"none\"!==n)||t.parallelEdges().forEach((function(t){t.isBundledBezier()&&t.dirtyBoundingBoxCache()}))}))},ba.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)};var wa={applyBypass:function(t,e,r,n){var i=[];if(\"*\"===e||\"**\"===e){if(void 0!==r)for(var a=0;a<this.properties.length;a++){var o=this.properties[a].name,s=this.parse(o,r,!0);s&&i.push(s)}}else if(E(e)){var l=this.parse(e,r,!0);l&&i.push(l)}else{if(!P(e))return!1;var u=e;n=r;for(var c=Object.keys(u),f=0;f<c.length;f++){var h=c[f],p=u[h];if(void 0===p&&(p=u[H(h)]),void 0!==p){var d=this.parse(h,p,!0);d&&i.push(d)}}}if(0===i.length)return!1;for(var g=!1,v=0;v<t.length;v++){for(var m=t[v],y={},x=void 0,b=0;b<i.length;b++){var _=i[b];if(n){var w=m.pstyle(_.name);x=y[_.name]={prev:w}}g=this.applyParsedProperty(m,Mt(_))||g,n&&(x.next=m.pstyle(_.name))}g&&this.updateStyleHints(m),n&&this.updateTransitions(m,y,!0)}return g},overrideBypass:function(t,e,r){e=V(e);for(var n=0;n<t.length;n++){var i=t[n],a=i._private.style[e],o=this.properties[e].type,s=o.color,l=o.mutiple,u=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=r,null!=a.pfValue&&(a.pfValue=r),a.strValue=s?\"rgb(\"+r.join(\",\")+\")\":l?r.join(\" \"):\"\"+r,this.updateStyleHints(i)):this.applyBypass(i,e,r),this.checkTriggers(i,e,u,r)}},removeAllBypasses:function(t,e){return this.removeBypasses(t,this.propertyNames,e)},removeBypasses:function(t,e,r){for(var n=0;n<t.length;n++){for(var i=t[n],a={},o=0;o<e.length;o++){var s=e[o],l=this.properties[s],u=i.pstyle(l.name);if(u&&u.bypass){var c=this.parse(s,\"\",!0),f=a[l.name]={prev:u};this.applyParsedProperty(i,c),f.next=i.pstyle(l.name)}}this.updateStyleHints(i),r&&this.updateTransitions(i,a,!0)}}},ka={getEmSizeInPixels:function(){var t=this.containerCss(\"font-size\");return null!=t?parseFloat(t):1},containerCss:function(t){var e=this._private.cy.container();if(_&&e&&_.getComputedStyle)return _.getComputedStyle(e).getPropertyValue(t)}},Ta={getRenderedStyle:function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},getRawStyle:function(t,e){var r=this;if(t=t[0]){for(var n={},i=0;i<r.properties.length;i++){var a=r.properties[i],o=r.getStylePropertyValue(t,a.name,e);null!=o&&(n[a.name]=o,n[H(a.name)]=o)}return n}},getIndexedStyle:function(t,e,r,n){var i=t.pstyle(e)[r][n];return null!=i?i:t.cy().style().getDefaultProperty(e)[r][0]},getStylePropertyValue:function(t,e,r){if(t=t[0]){var n=this.properties[e];n.alias&&(n=n.pointsTo);var i=n.type,a=t.pstyle(n.name);if(a){var o=a.value,s=a.units,l=a.strValue;if(r&&i.number&&null!=o&&O(o)){var u=t.cy().zoom(),c=function(t){return t*u},f=function(t,e){return c(t)+e},h=L(o);return(h?s.every((function(t){return null!=t})):null!=s)?h?o.map((function(t,e){return f(t,s[e])})).join(\" \"):f(o,s):h?o.map((function(t){return E(t)?t:\"\"+c(t)})).join(\" \"):\"\"+c(o)}if(null!=l)return l}return null}},getAnimationStartStyle:function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n].name,a=t.pstyle(i);void 0!==a&&(a=P(a)?this.parse(i,a.strValue):this.parse(i,a)),a&&(r[i]=a)}return r},getPropsList:function(t){var e=[],r=t,n=this.properties;if(r)for(var i=Object.keys(r),a=0;a<i.length;a++){var o=i[a],s=r[o],l=n[o]||n[V(o)],u=this.parse(l.name,s);u&&e.push(u)}return e},getNonDefaultPropertiesHash:function(t,e,r){var n,i,a,o,s,l,u=r.slice();for(s=0;s<e.length;s++)if(n=e[s],null!=(i=t.pstyle(n,!1)))if(null!=i.pfValue)u[0]=st(o,u[0]),u[1]=lt(o,u[1]);else for(a=i.strValue,l=0;l<a.length;l++)o=a.charCodeAt(l),u[0]=st(o,u[0]),u[1]=lt(o,u[1]);return u}};Ta.getPropertiesHash=Ta.getNonDefaultPropertiesHash;var Ma={appendFromJson:function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],i=n.selector,a=n.style||n.css,o=Object.keys(a);e.selector(i);for(var s=0;s<o.length;s++){var l=o[s],u=a[l];e.css(l,u)}}return e},fromJson:function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e},json:function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,i=r.properties,a={},o=0;o<i.length;o++){var s=i[o];a[s.name]=s.strValue}t.push({selector:n?n.toString():\"core\",style:a})}return t}},Aa={appendFromString:function(t){var e,r,n,i=this,a=\"\"+t;function o(){a=a.length>e.length?a.substr(e.length):\"\"}function s(){r=r.length>n.length?r.substr(n.length):\"\"}for(a=a.replace(/[/][*](\\s|.)+?[*][/]/g,\"\");!a.match(/^\\s*$/);){var l=a.match(/^\\s*((?:.|\\s)+?)\\s*\\{((?:.|\\s)+?)\\}/);if(!l){Tt(\"Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: \"+a);break}e=l[0];var u=l[1];if(\"core\"!==u&&new _n(u).invalid)Tt(\"Skipping parsing of block: Invalid selector found in string stylesheet: \"+u),o();else{var c=l[2],f=!1;r=c;for(var h=[];!r.match(/^\\s*$/);){var p=r.match(/^\\s*(.+?)\\s*:\\s*(.+?)(?:\\s*;|\\s*$)/);if(!p){Tt(\"Skipping parsing of block: Invalid formatting of style property and value definitions found in:\"+c),f=!0;break}n=p[0];var d=p[1],g=p[2];this.properties[d]?i.parse(d,g)?(h.push({name:d,val:g}),s()):(Tt(\"Skipping property: Invalid property definition in: \"+n),s()):(Tt(\"Skipping property: Invalid property name in: \"+n),s())}if(f){o();break}i.selector(u);for(var v=0;v<h.length;v++){var m=h[v];i.css(m.name,m.val)}o()}}return i},fromString:function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e}},Sa={};!function(){var t=Y,e=function(t){return\"^\"+t+\"\\\\s*\\\\(\\\\s*([\\\\w\\\\.]+)\\\\s*\\\\)$\"},r=function(e){var r=t+\"|\\\\w+|rgb[a]?\\\\((?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%]?)\\\\s*,\\\\s*(?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%]?)\\\\s*,\\\\s*(?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%]?)(?:\\\\s*,\\\\s*(?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))))?\\\\)|hsl[a]?\\\\((?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?)))\\\\s*,\\\\s*(?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%])\\\\s*,\\\\s*(?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%])(?:\\\\s*,\\\\s*(?:(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))))?\\\\)|\\\\#[0-9a-fA-F]{3}|\\\\#[0-9a-fA-F]{6}\";return\"^\"+e+\"\\\\s*\\\\(([\\\\w\\\\.]+)\\\\s*\\\\,\\\\s*(\"+t+\")\\\\s*\\\\,\\\\s*(\"+t+\")\\\\s*,\\\\s*(\"+r+\")\\\\s*\\\\,\\\\s*(\"+r+\")\\\\)$\"},n=[\"^url\\\\s*\\\\(\\\\s*['\\\"]?(.+?)['\\\"]?\\\\s*\\\\)$\",\"^(none)$\",\"^(.+)$\"];Sa.types={time:{number:!0,min:0,units:\"s|ms\",implicitUnits:\"ms\"},percent:{number:!0,min:0,max:100,units:\"%\",implicitUnits:\"%\"},percentages:{number:!0,min:0,max:100,units:\"%\",implicitUnits:\"%\",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},position:{enums:[\"parent\",\"origin\"]},nodeSize:{number:!0,min:0,enums:[\"label\"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:[\"horizontal\",\"leftward\",\"rightward\",\"vertical\",\"upward\",\"downward\",\"auto\"]},paddingRelativeTo:{enums:[\"width\",\"height\",\"average\",\"min\",\"max\"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:[\"auto\"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:[\"inner\",\"include-padding\"],multiple:!0},bgRepeat:{enums:[\"repeat\",\"repeat-x\",\"repeat-y\",\"no-repeat\"],multiple:!0},bgFit:{enums:[\"none\",\"contain\",\"cover\"],multiple:!0},bgCrossOrigin:{enums:[\"anonymous\",\"use-credentials\"],multiple:!0},bgClip:{enums:[\"none\",\"node\"],multiple:!0},bgContainment:{enums:[\"inside\",\"over\"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:[\"solid\",\"linear-gradient\",\"radial-gradient\"]},bool:{enums:[\"yes\",\"no\"]},bools:{enums:[\"yes\",\"no\"],multiple:!0},lineStyle:{enums:[\"solid\",\"dotted\",\"dashed\"]},lineCap:{enums:[\"butt\",\"round\",\"square\"]},borderStyle:{enums:[\"solid\",\"dotted\",\"dashed\",\"double\"]},curveStyle:{enums:[\"bezier\",\"unbundled-bezier\",\"haystack\",\"segments\",\"straight\",\"straight-triangle\",\"taxi\"]},fontFamily:{regex:'^([\\\\w- \\\\\"]+(?:\\\\s*,\\\\s*[\\\\w- \\\\\"]+)*)$'},fontStyle:{enums:[\"italic\",\"normal\",\"oblique\"]},fontWeight:{enums:[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"800\",\"900\",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:[\"none\",\"underline\",\"overline\",\"line-through\"]},textTransform:{enums:[\"none\",\"uppercase\",\"lowercase\"]},textWrap:{enums:[\"none\",\"wrap\",\"ellipsis\"]},textOverflowWrap:{enums:[\"whitespace\",\"anywhere\"]},textBackgroundShape:{enums:[\"rectangle\",\"roundrectangle\",\"round-rectangle\"]},nodeShape:{enums:[\"rectangle\",\"roundrectangle\",\"round-rectangle\",\"cutrectangle\",\"cut-rectangle\",\"bottomroundrectangle\",\"bottom-round-rectangle\",\"barrel\",\"ellipse\",\"triangle\",\"round-triangle\",\"square\",\"pentagon\",\"round-pentagon\",\"hexagon\",\"round-hexagon\",\"concavehexagon\",\"concave-hexagon\",\"heptagon\",\"round-heptagon\",\"octagon\",\"round-octagon\",\"tag\",\"round-tag\",\"star\",\"diamond\",\"round-diamond\",\"vee\",\"rhomboid\",\"polygon\"]},overlayShape:{enums:[\"roundrectangle\",\"round-rectangle\",\"ellipse\"]},compoundIncludeLabels:{enums:[\"include\",\"exclude\"]},arrowShape:{enums:[\"tee\",\"triangle\",\"triangle-tee\",\"circle-triangle\",\"triangle-cross\",\"triangle-backcurve\",\"vee\",\"square\",\"circle\",\"diamond\",\"chevron\",\"none\"]},arrowFill:{enums:[\"filled\",\"hollow\"]},display:{enums:[\"element\",\"none\"]},visibility:{enums:[\"hidden\",\"visible\"]},zCompoundDepth:{enums:[\"bottom\",\"orphan\",\"auto\",\"top\"]},zIndexCompare:{enums:[\"auto\",\"manual\"]},valign:{enums:[\"top\",\"center\",\"bottom\"]},halign:{enums:[\"left\",\"center\",\"right\"]},justification:{enums:[\"left\",\"center\",\"right\",\"auto\"]},text:{string:!0},data:{mapping:!0,regex:e(\"data\")},layoutData:{mapping:!0,regex:e(\"layoutData\")},scratch:{mapping:!0,regex:e(\"scratch\")},mapData:{mapping:!0,regex:r(\"mapData\")},mapLayoutData:{mapping:!0,regex:r(\"mapLayoutData\")},mapScratch:{mapping:!0,regex:r(\"mapScratch\")},fn:{mapping:!0,fn:!0},url:{regexes:n,singleRegexMatchValue:!0},urls:{regexes:n,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:\"deg|rad\",implicitUnits:\"rad\"},textRotation:{number:!0,units:\"deg|rad\",implicitUnits:\"rad\",enums:[\"none\",\"autorotate\"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:[\"intersection\",\"node-position\"]},edgeEndpoint:{number:!0,multiple:!0,units:\"%|px|em|deg|rad\",implicitUnits:\"px\",enums:[\"inside-to-node\",\"outside-to-node\",\"outside-to-node-or-label\",\"outside-to-line\",\"outside-to-line-or-label\"],singleEnum:!0,validate:function(t,e){switch(t.length){case 2:return\"deg\"!==e[0]&&\"rad\"!==e[0]&&\"deg\"!==e[1]&&\"rad\"!==e[1];case 1:return E(t[0])||\"deg\"===e[0]||\"rad\"===e[0];default:return!1}}},easing:{regexes:[\"^(spring)\\\\s*\\\\(\\\\s*(\"+t+\")\\\\s*,\\\\s*(\"+t+\")\\\\s*\\\\)$\",\"^(cubic-bezier)\\\\s*\\\\(\\\\s*(\"+t+\")\\\\s*,\\\\s*(\"+t+\")\\\\s*,\\\\s*(\"+t+\")\\\\s*,\\\\s*(\"+t+\")\\\\s*\\\\)$\"],enums:[\"linear\",\"ease\",\"ease-in\",\"ease-out\",\"ease-in-out\",\"ease-in-sine\",\"ease-out-sine\",\"ease-in-out-sine\",\"ease-in-quad\",\"ease-out-quad\",\"ease-in-out-quad\",\"ease-in-cubic\",\"ease-out-cubic\",\"ease-in-out-cubic\",\"ease-in-quart\",\"ease-out-quart\",\"ease-in-out-quart\",\"ease-in-quint\",\"ease-out-quint\",\"ease-in-out-quint\",\"ease-in-expo\",\"ease-out-expo\",\"ease-in-out-expo\",\"ease-in-circ\",\"ease-out-circ\",\"ease-in-out-circ\"]},gradientDirection:{enums:[\"to-bottom\",\"to-top\",\"to-left\",\"to-right\",\"to-bottom-right\",\"to-bottom-left\",\"to-top-right\",\"to-top-left\",\"to-right-bottom\",\"to-left-bottom\",\"to-right-top\",\"to-left-top\"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(t){var e=t.length;return 1===e||2===e||4===e}}};var i={zeroNonZero:function(t,e){return(null==t||null==e)&&t!==e||0==t&&0!=e||0!=t&&0==e},any:function(t,e){return t!=e},emptyNonEmpty:function(t,e){var r=B(t),n=B(e);return r&&!n||!r&&n}},a=Sa.types,o=[{name:\"label\",type:a.text,triggersBounds:i.any,triggersZOrder:i.emptyNonEmpty},{name:\"text-rotation\",type:a.textRotation,triggersBounds:i.any},{name:\"text-margin-x\",type:a.bidirectionalSize,triggersBounds:i.any},{name:\"text-margin-y\",type:a.bidirectionalSize,triggersBounds:i.any}],s=[{name:\"source-label\",type:a.text,triggersBounds:i.any},{name:\"source-text-rotation\",type:a.textRotation,triggersBounds:i.any},{name:\"source-text-margin-x\",type:a.bidirectionalSize,triggersBounds:i.any},{name:\"source-text-margin-y\",type:a.bidirectionalSize,triggersBounds:i.any},{name:\"source-text-offset\",type:a.size,triggersBounds:i.any}],l=[{name:\"target-label\",type:a.text,triggersBounds:i.any},{name:\"target-text-rotation\",type:a.textRotation,triggersBounds:i.any},{name:\"target-text-margin-x\",type:a.bidirectionalSize,triggersBounds:i.any},{name:\"target-text-margin-y\",type:a.bidirectionalSize,triggersBounds:i.any},{name:\"target-text-offset\",type:a.size,triggersBounds:i.any}],u=[{name:\"font-family\",type:a.fontFamily,triggersBounds:i.any},{name:\"font-style\",type:a.fontStyle,triggersBounds:i.any},{name:\"font-weight\",type:a.fontWeight,triggersBounds:i.any},{name:\"font-size\",type:a.size,triggersBounds:i.any},{name:\"text-transform\",type:a.textTransform,triggersBounds:i.any},{name:\"text-wrap\",type:a.textWrap,triggersBounds:i.any},{name:\"text-overflow-wrap\",type:a.textOverflowWrap,triggersBounds:i.any},{name:\"text-max-width\",type:a.size,triggersBounds:i.any},{name:\"text-outline-width\",type:a.size,triggersBounds:i.any},{name:\"line-height\",type:a.positiveNumber,triggersBounds:i.any}],c=[{name:\"text-valign\",type:a.valign,triggersBounds:i.any},{name:\"text-halign\",type:a.halign,triggersBounds:i.any},{name:\"color\",type:a.color},{name:\"text-outline-color\",type:a.color},{name:\"text-outline-opacity\",type:a.zeroOneNumber},{name:\"text-background-color\",type:a.color},{name:\"text-background-opacity\",type:a.zeroOneNumber},{name:\"text-background-padding\",type:a.size,triggersBounds:i.any},{name:\"text-border-opacity\",type:a.zeroOneNumber},{name:\"text-border-color\",type:a.color},{name:\"text-border-width\",type:a.size,triggersBounds:i.any},{name:\"text-border-style\",type:a.borderStyle,triggersBounds:i.any},{name:\"text-background-shape\",type:a.textBackgroundShape,triggersBounds:i.any},{name:\"text-justification\",type:a.justification}],f=[{name:\"events\",type:a.bool},{name:\"text-events\",type:a.bool}],h=[{name:\"display\",type:a.display,triggersZOrder:i.any,triggersBounds:i.any,triggersBoundsOfParallelBeziers:!0},{name:\"visibility\",type:a.visibility,triggersZOrder:i.any},{name:\"opacity\",type:a.zeroOneNumber,triggersZOrder:i.zeroNonZero},{name:\"text-opacity\",type:a.zeroOneNumber},{name:\"min-zoomed-font-size\",type:a.size},{name:\"z-compound-depth\",type:a.zCompoundDepth,triggersZOrder:i.any},{name:\"z-index-compare\",type:a.zIndexCompare,triggersZOrder:i.any},{name:\"z-index\",type:a.nonNegativeInt,triggersZOrder:i.any}],p=[{name:\"overlay-padding\",type:a.size,triggersBounds:i.any},{name:\"overlay-color\",type:a.color},{name:\"overlay-opacity\",type:a.zeroOneNumber,triggersBounds:i.zeroNonZero},{name:\"overlay-shape\",type:a.overlayShape,triggersBounds:i.any}],d=[{name:\"underlay-padding\",type:a.size,triggersBounds:i.any},{name:\"underlay-color\",type:a.color},{name:\"underlay-opacity\",type:a.zeroOneNumber,triggersBounds:i.zeroNonZero},{name:\"underlay-shape\",type:a.overlayShape,triggersBounds:i.any}],g=[{name:\"transition-property\",type:a.propList},{name:\"transition-duration\",type:a.time},{name:\"transition-delay\",type:a.time},{name:\"transition-timing-function\",type:a.easing}],v=function(t,e){return\"label\"===e.value?-t.poolIndex():e.pfValue},m=[{name:\"height\",type:a.nodeSize,triggersBounds:i.any,hashOverride:v},{name:\"width\",type:a.nodeSize,triggersBounds:i.any,hashOverride:v},{name:\"shape\",type:a.nodeShape,triggersBounds:i.any},{name:\"shape-polygon-points\",type:a.polygonPointList,triggersBounds:i.any},{name:\"background-color\",type:a.color},{name:\"background-fill\",type:a.fill},{name:\"background-opacity\",type:a.zeroOneNumber},{name:\"background-blacken\",type:a.nOneOneNumber},{name:\"background-gradient-stop-colors\",type:a.colors},{name:\"background-gradient-stop-positions\",type:a.percentages},{name:\"background-gradient-direction\",type:a.gradientDirection},{name:\"padding\",type:a.sizeMaybePercent,triggersBounds:i.any},{name:\"padding-relative-to\",type:a.paddingRelativeTo,triggersBounds:i.any},{name:\"bounds-expansion\",type:a.boundsExpansion,triggersBounds:i.any}],y=[{name:\"border-color\",type:a.color},{name:\"border-opacity\",type:a.zeroOneNumber},{name:\"border-width\",type:a.size,triggersBounds:i.any},{name:\"border-style\",type:a.borderStyle}],x=[{name:\"background-image\",type:a.urls},{name:\"background-image-crossorigin\",type:a.bgCrossOrigin},{name:\"background-image-opacity\",type:a.zeroOneNumbers},{name:\"background-image-containment\",type:a.bgContainment},{name:\"background-image-smoothing\",type:a.bools},{name:\"background-position-x\",type:a.bgPos},{name:\"background-position-y\",type:a.bgPos},{name:\"background-width-relative-to\",type:a.bgRelativeTo},{name:\"background-height-relative-to\",type:a.bgRelativeTo},{name:\"background-repeat\",type:a.bgRepeat},{name:\"background-fit\",type:a.bgFit},{name:\"background-clip\",type:a.bgClip},{name:\"background-width\",type:a.bgWH},{name:\"background-height\",type:a.bgWH},{name:\"background-offset-x\",type:a.bgPos},{name:\"background-offset-y\",type:a.bgPos}],b=[{name:\"position\",type:a.position,triggersBounds:i.any},{name:\"compound-sizing-wrt-labels\",type:a.compoundIncludeLabels,triggersBounds:i.any},{name:\"min-width\",type:a.size,triggersBounds:i.any},{name:\"min-width-bias-left\",type:a.sizeMaybePercent,triggersBounds:i.any},{name:\"min-width-bias-right\",type:a.sizeMaybePercent,triggersBounds:i.any},{name:\"min-height\",type:a.size,triggersBounds:i.any},{name:\"min-height-bias-top\",type:a.sizeMaybePercent,triggersBounds:i.any},{name:\"min-height-bias-bottom\",type:a.sizeMaybePercent,triggersBounds:i.any}],_=[{name:\"line-style\",type:a.lineStyle},{name:\"line-color\",type:a.color},{name:\"line-fill\",type:a.fill},{name:\"line-cap\",type:a.lineCap},{name:\"line-opacity\",type:a.zeroOneNumber},{name:\"line-dash-pattern\",type:a.numbers},{name:\"line-dash-offset\",type:a.number},{name:\"line-gradient-stop-colors\",type:a.colors},{name:\"line-gradient-stop-positions\",type:a.percentages},{name:\"curve-style\",type:a.curveStyle,triggersBounds:i.any,triggersBoundsOfParallelBeziers:!0},{name:\"haystack-radius\",type:a.zeroOneNumber,triggersBounds:i.any},{name:\"source-endpoint\",type:a.edgeEndpoint,triggersBounds:i.any},{name:\"target-endpoint\",type:a.edgeEndpoint,triggersBounds:i.any},{name:\"control-point-step-size\",type:a.size,triggersBounds:i.any},{name:\"control-point-distances\",type:a.bidirectionalSizes,triggersBounds:i.any},{name:\"control-point-weights\",type:a.numbers,triggersBounds:i.any},{name:\"segment-distances\",type:a.bidirectionalSizes,triggersBounds:i.any},{name:\"segment-weights\",type:a.numbers,triggersBounds:i.any},{name:\"taxi-turn\",type:a.bidirectionalSizeMaybePercent,triggersBounds:i.any},{name:\"taxi-turn-min-distance\",type:a.size,triggersBounds:i.any},{name:\"taxi-direction\",type:a.axisDirection,triggersBounds:i.any},{name:\"edge-distances\",type:a.edgeDistances,triggersBounds:i.any},{name:\"arrow-scale\",type:a.positiveNumber,triggersBounds:i.any},{name:\"loop-direction\",type:a.angle,triggersBounds:i.any},{name:\"loop-sweep\",type:a.angle,triggersBounds:i.any},{name:\"source-distance-from-node\",type:a.size,triggersBounds:i.any},{name:\"target-distance-from-node\",type:a.size,triggersBounds:i.any}],w=[{name:\"ghost\",type:a.bool,triggersBounds:i.any},{name:\"ghost-offset-x\",type:a.bidirectionalSize,triggersBounds:i.any},{name:\"ghost-offset-y\",type:a.bidirectionalSize,triggersBounds:i.any},{name:\"ghost-opacity\",type:a.zeroOneNumber}],k=[{name:\"selection-box-color\",type:a.color},{name:\"selection-box-opacity\",type:a.zeroOneNumber},{name:\"selection-box-border-color\",type:a.color},{name:\"selection-box-border-width\",type:a.size},{name:\"active-bg-color\",type:a.color},{name:\"active-bg-opacity\",type:a.zeroOneNumber},{name:\"active-bg-size\",type:a.size},{name:\"outside-texture-bg-color\",type:a.color},{name:\"outside-texture-bg-opacity\",type:a.zeroOneNumber}],T=[];Sa.pieBackgroundN=16,T.push({name:\"pie-size\",type:a.sizeMaybePercent});for(var M=1;M<=Sa.pieBackgroundN;M++)T.push({name:\"pie-\"+M+\"-background-color\",type:a.color}),T.push({name:\"pie-\"+M+\"-background-size\",type:a.percent}),T.push({name:\"pie-\"+M+\"-background-opacity\",type:a.zeroOneNumber});var A=[],S=Sa.arrowPrefixes=[\"source\",\"mid-source\",\"target\",\"mid-target\"];[{name:\"arrow-shape\",type:a.arrowShape,triggersBounds:i.any},{name:\"arrow-color\",type:a.color},{name:\"arrow-fill\",type:a.arrowFill}].forEach((function(t){S.forEach((function(e){var r=e+\"-\"+t.name,n=t.type,i=t.triggersBounds;A.push({name:r,type:n,triggersBounds:i})}))}),{});var C=Sa.properties=[].concat(f,g,h,p,d,w,c,u,o,s,l,m,y,x,T,b,_,A,k),L=Sa.propertyGroups={behavior:f,transition:g,visibility:h,overlay:p,underlay:d,ghost:w,commonLabel:c,labelDimensions:u,mainLabel:o,sourceLabel:s,targetLabel:l,nodeBody:m,nodeBorder:y,backgroundImage:x,pie:T,compound:b,edgeLine:_,edgeArrow:A,core:k},P=Sa.propertyGroupNames={};(Sa.propertyGroupKeys=Object.keys(L)).forEach((function(t){P[t]=L[t].map((function(t){return t.name})),L[t].forEach((function(e){return e.groupKey=t}))}));var O=Sa.aliases=[{name:\"content\",pointsTo:\"label\"},{name:\"control-point-distance\",pointsTo:\"control-point-distances\"},{name:\"control-point-weight\",pointsTo:\"control-point-weights\"},{name:\"edge-text-rotation\",pointsTo:\"text-rotation\"},{name:\"padding-left\",pointsTo:\"padding\"},{name:\"padding-right\",pointsTo:\"padding\"},{name:\"padding-top\",pointsTo:\"padding\"},{name:\"padding-bottom\",pointsTo:\"padding\"}];Sa.propertyNames=C.map((function(t){return t.name}));for(var I=0;I<C.length;I++){var D=C[I];C[D.name]=D}for(var z=0;z<O.length;z++){var R=O[z],F=C[R.pointsTo],N={name:R.name,alias:!0,pointsTo:F};C.push(N),C[R.name]=N}}(),Sa.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},Sa.getDefaultProperties=function(){var t=this._private;if(null!=t.defaultProperties)return t.defaultProperties;for(var e=X({\"selection-box-color\":\"#ddd\",\"selection-box-opacity\":.65,\"selection-box-border-color\":\"#aaa\",\"selection-box-border-width\":1,\"active-bg-color\":\"black\",\"active-bg-opacity\":.15,\"active-bg-size\":30,\"outside-texture-bg-color\":\"#000\",\"outside-texture-bg-opacity\":.125,events:\"yes\",\"text-events\":\"no\",\"text-valign\":\"top\",\"text-halign\":\"center\",\"text-justification\":\"auto\",\"line-height\":1,color:\"#000\",\"text-outline-color\":\"#000\",\"text-outline-width\":0,\"text-outline-opacity\":1,\"text-opacity\":1,\"text-decoration\":\"none\",\"text-transform\":\"none\",\"text-wrap\":\"none\",\"text-overflow-wrap\":\"whitespace\",\"text-max-width\":9999,\"text-background-color\":\"#000\",\"text-background-opacity\":0,\"text-background-shape\":\"rectangle\",\"text-background-padding\":0,\"text-border-opacity\":0,\"text-border-width\":0,\"text-border-style\":\"solid\",\"text-border-color\":\"#000\",\"font-family\":\"Helvetica Neue, Helvetica, sans-serif\",\"font-style\":\"normal\",\"font-weight\":\"normal\",\"font-size\":16,\"min-zoomed-font-size\":0,\"text-rotation\":\"none\",\"source-text-rotation\":\"none\",\"target-text-rotation\":\"none\",visibility:\"visible\",display:\"element\",opacity:1,\"z-compound-depth\":\"auto\",\"z-index-compare\":\"auto\",\"z-index\":0,label:\"\",\"text-margin-x\":0,\"text-margin-y\":0,\"source-label\":\"\",\"source-text-offset\":0,\"source-text-margin-x\":0,\"source-text-margin-y\":0,\"target-label\":\"\",\"target-text-offset\":0,\"target-text-margin-x\":0,\"target-text-margin-y\":0,\"overlay-opacity\":0,\"overlay-color\":\"#000\",\"overlay-padding\":10,\"overlay-shape\":\"round-rectangle\",\"underlay-opacity\":0,\"underlay-color\":\"#000\",\"underlay-padding\":10,\"underlay-shape\":\"round-rectangle\",\"transition-property\":\"none\",\"transition-duration\":0,\"transition-delay\":0,\"transition-timing-function\":\"linear\",\"background-blacken\":0,\"background-color\":\"#999\",\"background-fill\":\"solid\",\"background-opacity\":1,\"background-image\":\"none\",\"background-image-crossorigin\":\"anonymous\",\"background-image-opacity\":1,\"background-image-containment\":\"inside\",\"background-image-smoothing\":\"yes\",\"background-position-x\":\"50%\",\"background-position-y\":\"50%\",\"background-offset-x\":0,\"background-offset-y\":0,\"background-width-relative-to\":\"include-padding\",\"background-height-relative-to\":\"include-padding\",\"background-repeat\":\"no-repeat\",\"background-fit\":\"none\",\"background-clip\":\"node\",\"background-width\":\"auto\",\"background-height\":\"auto\",\"border-color\":\"#000\",\"border-opacity\":1,\"border-width\":0,\"border-style\":\"solid\",height:30,width:30,shape:\"ellipse\",\"shape-polygon-points\":\"-1, -1,   1, -1,   1, 1,   -1, 1\",\"bounds-expansion\":0,\"background-gradient-direction\":\"to-bottom\",\"background-gradient-stop-colors\":\"#999\",\"background-gradient-stop-positions\":\"0%\",ghost:\"no\",\"ghost-offset-y\":0,\"ghost-offset-x\":0,\"ghost-opacity\":0,padding:0,\"padding-relative-to\":\"width\",position:\"origin\",\"compound-sizing-wrt-labels\":\"include\",\"min-width\":0,\"min-width-bias-left\":0,\"min-width-bias-right\":0,\"min-height\":0,\"min-height-bias-top\":0,\"min-height-bias-bottom\":0},{\"pie-size\":\"100%\"},[{name:\"pie-{{i}}-background-color\",value:\"black\"},{name:\"pie-{{i}}-background-size\",value:\"0%\"},{name:\"pie-{{i}}-background-opacity\",value:1}].reduce((function(t,e){for(var r=1;r<=Sa.pieBackgroundN;r++){var n=e.name.replace(\"{{i}}\",r),i=e.value;t[n]=i}return t}),{}),{\"line-style\":\"solid\",\"line-color\":\"#999\",\"line-fill\":\"solid\",\"line-cap\":\"butt\",\"line-opacity\":1,\"line-gradient-stop-colors\":\"#999\",\"line-gradient-stop-positions\":\"0%\",\"control-point-step-size\":40,\"control-point-weights\":.5,\"segment-weights\":.5,\"segment-distances\":20,\"taxi-turn\":\"50%\",\"taxi-turn-min-distance\":10,\"taxi-direction\":\"auto\",\"edge-distances\":\"intersection\",\"curve-style\":\"haystack\",\"haystack-radius\":0,\"arrow-scale\":1,\"loop-direction\":\"-45deg\",\"loop-sweep\":\"-90deg\",\"source-distance-from-node\":0,\"target-distance-from-node\":0,\"source-endpoint\":\"outside-to-node\",\"target-endpoint\":\"outside-to-node\",\"line-dash-pattern\":[6,3],\"line-dash-offset\":0},[{name:\"arrow-shape\",value:\"none\"},{name:\"arrow-color\",value:\"#999\"},{name:\"arrow-fill\",value:\"filled\"}].reduce((function(t,e){return Sa.arrowPrefixes.forEach((function(r){var n=r+\"-\"+e.name,i=e.value;t[n]=i})),t}),{})),r={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,o=e[a],s=this.parse(a,o);r[a]=s}}return t.defaultProperties=r,t.defaultProperties},Sa.addDefaultStylesheet=function(){this.selector(\":parent\").css({shape:\"rectangle\",padding:10,\"background-color\":\"#eee\",\"border-color\":\"#ccc\",\"border-width\":1}).selector(\"edge\").css({width:3}).selector(\":loop\").css({\"curve-style\":\"bezier\"}).selector(\"edge:compound\").css({\"curve-style\":\"bezier\",\"source-endpoint\":\"outside-to-line\",\"target-endpoint\":\"outside-to-line\"}).selector(\":selected\").css({\"background-color\":\"#0169D9\",\"line-color\":\"#0169D9\",\"source-arrow-color\":\"#0169D9\",\"target-arrow-color\":\"#0169D9\",\"mid-source-arrow-color\":\"#0169D9\",\"mid-target-arrow-color\":\"#0169D9\"}).selector(\":parent:selected\").css({\"background-color\":\"#CCE1F9\",\"border-color\":\"#aec8e5\"}).selector(\":active\").css({\"overlay-color\":\"black\",\"overlay-padding\":10,\"overlay-opacity\":.25}),this.defaultLength=this.length};var Ea={parse:function(t,e,r,n){var i=this;if(C(e))return i.parseImplWarn(t,e,r,n);var a,o=ht(t,\"\"+e,r?\"t\":\"f\",\"mapping\"===n||!0===n||!1===n||null==n?\"dontcare\":n),s=i.propCache=i.propCache||[];return(a=s[o])||(a=s[o]=i.parseImplWarn(t,e,r,n)),(r||\"mapping\"===n)&&(a=Mt(a))&&(a.value=Mt(a.value)),a},parseImplWarn:function(t,e,r,n){var i=this.parseImpl(t,e,r,n);return i||null==e||Tt(\"The style property `\".concat(t,\": \").concat(e,\"` is invalid\")),!i||\"width\"!==i.name&&\"height\"!==i.name||\"label\"!==e||Tt(\"The style value of `label` is deprecated for `\"+i.name+\"`\"),i}};Ea.parseImpl=function(t,e,r,n){var i=this;t=V(t);var a=i.properties[t],o=e,s=i.types;if(!a)return null;if(void 0===e)return null;a.alias&&(a=a.pointsTo,t=a.name);var l=E(e);l&&(e=e.trim());var u,c,f=a.type;if(!f)return null;if(r&&(\"\"===e||null===e))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(C(e))return{name:t,value:e,strValue:\"fn\",mapped:s.fn,bypass:r};if(!l||n||e.length<7||\"a\"!==e[1]);else{if(e.length>=7&&\"d\"===e[0]&&(u=new RegExp(s.data.regex).exec(e))){if(r)return!1;var h=s.data;return{name:t,value:u,strValue:\"\"+e,mapped:h,field:u[1],bypass:r}}if(e.length>=10&&\"m\"===e[0]&&(c=new RegExp(s.mapData.regex).exec(e))){if(r)return!1;if(f.multiple)return!1;var p=s.mapData;if(!f.color&&!f.number)return!1;var d=this.parse(t,c[4]);if(!d||d.mapped)return!1;var g=this.parse(t,c[5]);if(!g||g.mapped)return!1;if(d.pfValue===g.pfValue||d.strValue===g.strValue)return Tt(\"`\"+t+\": \"+e+\"` is not a valid mapper because the output range is zero; converting to `\"+t+\": \"+d.strValue+\"`\"),this.parse(t,d.strValue);if(f.color){var v=d.value,m=g.value;if(!(v[0]!==m[0]||v[1]!==m[1]||v[2]!==m[2]||v[3]!==m[3]&&(null!=v[3]&&1!==v[3]||null!=m[3]&&1!==m[3])))return!1}return{name:t,value:c,strValue:\"\"+e,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:d.value,valueMax:g.value,bypass:r}}}if(f.multiple&&\"multiple\"!==n){var y;if(y=l?e.split(/\\s+/):L(e)?e:[e],f.evenMultiple&&y.length%2!=0)return null;for(var x=[],b=[],_=[],w=\"\",k=!1,T=0;T<y.length;T++){var M=i.parse(t,y[T],r,\"multiple\");k=k||E(M.value),x.push(M.value),_.push(null!=M.pfValue?M.pfValue:M.value),b.push(M.units),w+=(T>0?\" \":\"\")+M.strValue}return f.validate&&!f.validate(x,b)?null:f.singleEnum&&k?1===x.length&&E(x[0])?{name:t,value:x[0],strValue:x[0],bypass:r}:null:{name:t,value:x,pfValue:_,strValue:w,bypass:r,units:b}}var A,S,P,I=function(){for(var n=0;n<f.enums.length;n++)if(f.enums[n]===e)return{name:t,value:e,strValue:\"\"+e,bypass:r};return null};if(f.number){var D,z=\"px\";if(f.units&&(D=f.units),f.implicitUnits&&(z=f.implicitUnits),!f.unitless)if(l){var R=\"px|em\"+(f.allowPercent?\"|\\\\%\":\"\");D&&(R=D);var F=e.match(\"^(\"+Y+\")(\"+R+\")?$\");F&&(e=F[1],D=F[2]||z)}else D&&!f.implicitUnits||(D=z);if(e=parseFloat(e),isNaN(e)&&void 0===f.enums)return null;if(isNaN(e)&&void 0!==f.enums)return e=o,I();if(f.integer&&(!O(S=e)||Math.floor(S)!==S))return null;if(void 0!==f.min&&(e<f.min||f.strictMin&&e===f.min)||void 0!==f.max&&(e>f.max||f.strictMax&&e===f.max))return null;var N={name:t,value:e,strValue:\"\"+e+(D||\"\"),units:D,bypass:r};return f.unitless||\"px\"!==D&&\"em\"!==D?N.pfValue=e:N.pfValue=\"px\"!==D&&D?this.getEmSizeInPixels()*e:e,\"ms\"!==D&&\"s\"!==D||(N.pfValue=\"ms\"===D?e:1e3*e),\"deg\"!==D&&\"rad\"!==D||(N.pfValue=\"rad\"===D?e:(A=e,Math.PI*A/180)),\"%\"===D&&(N.pfValue=e/100),N}if(f.propList){var B=[],j=\"\"+e;if(\"none\"===j);else{for(var U=j.split(/\\s*,\\s*|\\s+/),H=0;H<U.length;H++){var q=U[H].trim();i.properties[q]?B.push(q):Tt(\"`\"+q+\"` is not a valid property name\")}if(0===B.length)return null}return{name:t,value:B,strValue:0===B.length?\"none\":B.join(\" \"),bypass:r}}if(f.color){var G=(L(P=e)?P:null)||function(t){return Z[t.toLowerCase()]}(P)||function(t){if((4===t.length||7===t.length)&&\"#\"===t[0]){var e,r,n,i=16;return 4===t.length?(e=parseInt(t[1]+t[1],i),r=parseInt(t[2]+t[2],i),n=parseInt(t[3]+t[3],i)):(e=parseInt(t[1]+t[2],i),r=parseInt(t[3]+t[4],i),n=parseInt(t[5]+t[6],i)),[e,r,n]}}(P)||function(t){var e,r=new RegExp(\"^rgb[a]?\\\\(((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%]?)\\\\s*,\\\\s*((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%]?)\\\\s*,\\\\s*((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%]?)(?:\\\\s*,\\\\s*((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))))?\\\\)$\").exec(t);if(r){e=[];for(var n=[],i=1;i<=3;i++){var a=r[i];if(\"%\"===a[a.length-1]&&(n[i]=!0),a=parseFloat(a),n[i]&&(a=a/100*255),a<0||a>255)return;e.push(Math.floor(a))}var o=n[1]||n[2]||n[3],s=n[1]&&n[2]&&n[3];if(o&&!s)return;var l=r[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;e.push(l)}}return e}(P)||function(t){var e,r,n,i,a,o,s,l;function u(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var c=new RegExp(\"^hsl[a]?\\\\(((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?)))\\\\s*,\\\\s*((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%])\\\\s*,\\\\s*((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))[%])(?:\\\\s*,\\\\s*((?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))))?\\\\)$\").exec(t);if(c){if((r=parseInt(c[1]))<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(n=parseFloat(c[2]))<0||n>100)return;if(n/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===n)o=s=l=Math.round(255*i);else{var f=i<.5?i*(1+n):i+n-i*n,h=2*i-f;o=Math.round(255*u(h,f,r+1/3)),s=Math.round(255*u(h,f,r)),l=Math.round(255*u(h,f,r-1/3))}e=[o,s,l,a]}return e}(P);return G?{name:t,value:G,pfValue:G,strValue:\"rgb(\"+G[0]+\",\"+G[1]+\",\"+G[2]+\")\",bypass:r}:null}if(f.regex||f.regexes){if(f.enums){var W=I();if(W)return W}for(var X=f.regexes?f.regexes:[f.regex],K=0;K<X.length;K++){var J=new RegExp(X[K]).exec(e);if(J)return{name:t,value:f.singleRegexMatchValue?J[1]:J,strValue:\"\"+e,bypass:r}}return null}return f.string?{name:t,value:\"\"+e,strValue:\"\"+e,bypass:r}:f.enums?I():null};var Ca=function t(e){if(!(this instanceof t))return new t(e);F(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):wt(\"A style must have a core reference\")},La=Ca.prototype;La.instanceString=function(){return\"style\"},La.clear=function(){for(var t=this._private,e=t.cy.elements(),r=0;r<this.length;r++)this[r]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0),e.forEach((function(t){var e=t[0]._private;e.styleDirty=!0,e.appliedInitStyle=!1})),this},La.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},La.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},La.selector=function(t){var e=\"core\"===t?null:new _n(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this},La.css=function(){var t=this,e=arguments;if(1===e.length)for(var r=e[0],n=0;n<t.properties.length;n++){var i=t.properties[n],a=r[i.name];void 0===a&&(a=r[H(i.name)]),void 0!==a&&this.cssRule(i.name,a)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},La.style=La.css,La.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.mapped&&this[n].mappedProperties.push(r),!this[n].selector&&(this._private.coreStyle[r.name]=r)}return this},La.append=function(t){return N(t)?t.appendToStyle(this):L(t)?this.appendFromJson(t):E(t)&&this.appendFromString(t),this},Ca.fromJson=function(t,e){var r=new Ca(t);return r.fromJson(e),r},Ca.fromString=function(t,e){return new Ca(t).fromString(e)},[ba,wa,ka,Ta,Ma,Aa,Sa,Ea].forEach((function(t){X(La,t)})),Ca.types=La.types,Ca.properties=La.properties,Ca.propertyGroups=La.propertyGroups,Ca.propertyGroupNames=La.propertyGroupNames,Ca.propertyGroupKeys=La.propertyGroupKeys;var Pa={style:function(t){return t&&this.setStyle(t).update(),this._private.style},setStyle:function(t){var e=this._private;return N(t)?e.style=t.generateStyle(this):L(t)?e.style=Ca.fromJson(this,t):E(t)?e.style=Ca.fromString(this,t):e.style=Ca(this),e.style},updateStyle:function(){this.mutableElements().updateStyle()}},Oa={autolock:function(t){return void 0===t?this._private.autolock:(this._private.autolock=!!t,this)},autoungrabify:function(t){return void 0===t?this._private.autoungrabify:(this._private.autoungrabify=!!t,this)},autounselectify:function(t){return void 0===t?this._private.autounselectify:(this._private.autounselectify=!!t,this)},selectionType:function(t){var e=this._private;return null==e.selectionType&&(e.selectionType=\"single\"),void 0===t?e.selectionType:(\"additive\"!==t&&\"single\"!==t||(e.selectionType=t),this)},panningEnabled:function(t){return void 0===t?this._private.panningEnabled:(this._private.panningEnabled=!!t,this)},userPanningEnabled:function(t){return void 0===t?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!t,this)},zoomingEnabled:function(t){return void 0===t?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!t,this)},userZoomingEnabled:function(t){return void 0===t?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!t,this)},boxSelectionEnabled:function(t){return void 0===t?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!t,this)},pan:function(){var t,e,r,n,i,a=arguments,o=this._private.pan;switch(a.length){case 0:return o;case 1:if(E(a[0]))return o[t=a[0]];if(P(a[0])){if(!this._private.panningEnabled)return this;n=(r=a[0]).x,i=r.y,O(n)&&(o.x=n),O(i)&&(o.y=i),this.emit(\"pan viewport\")}break;case 2:if(!this._private.panningEnabled)return this;t=a[0],e=a[1],\"x\"!==t&&\"y\"!==t||!O(e)||(o[t]=e),this.emit(\"pan viewport\")}return this.notify(\"viewport\"),this},panBy:function(t,e){var r,n,i,a,o,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:P(t)&&(a=(i=s[0]).x,o=i.y,O(a)&&(l.x+=a),O(o)&&(l.y+=o),this.emit(\"pan viewport\"));break;case 2:n=e,\"x\"!==(r=t)&&\"y\"!==r||!O(n)||(l[r]+=n),this.emit(\"pan viewport\")}return this.notify(\"viewport\"),this},fit:function(t,e){var r=this.getFitViewport(t,e);if(r){var n=this._private;n.zoom=r.zoom,n.pan=r.pan,this.emit(\"pan zoom viewport\"),this.notify(\"viewport\")}return this},getFitViewport:function(t,e){if(O(t)&&void 0===e&&(e=t,t=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var r,n;if(E(t)){var i=t;t=this.$(i)}else if(P(n=t)&&O(n.x1)&&O(n.x2)&&O(n.y1)&&O(n.y2)){var a=t;(r={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1}else D(t)||(t=this.mutableElements());if(!D(t)||!t.empty()){r=r||t.boundingBox();var o,s=this.width(),l=this.height();if(e=O(e)?e:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(r.w)&&!isNaN(r.h)&&r.w>0&&r.h>0)return{zoom:o=(o=(o=Math.min((s-2*e)/r.w,(l-2*e)/r.h))>this._private.maxZoom?this._private.maxZoom:o)<this._private.minZoom?this._private.minZoom:o,pan:{x:(s-o*(r.x1+r.x2))/2,y:(l-o*(r.y1+r.y2))/2}}}}},zoomRange:function(t,e){var r=this._private;if(null==e){var n=t;t=n.min,e=n.max}return O(t)&&O(e)&&t<=e?(r.minZoom=t,r.maxZoom=e):O(t)&&void 0===e&&t<=r.maxZoom?r.minZoom=t:O(e)&&void 0===t&&e>=r.minZoom&&(r.maxZoom=e),this},minZoom:function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,o=!1;if(n.zoomingEnabled||(o=!0),O(t)?r=t:P(t)&&(r=t.level,null!=t.position?e=Qt(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||n.panningEnabled||(o=!0)),r=(r=r>n.maxZoom?n.maxZoom:r)<n.minZoom?n.minZoom:r,o||!O(r)||r===a||null!=e&&(!O(e.x)||!O(e.y)))return null;if(null!=e){var s=i,l=a,u=r;return{zoomed:!0,panned:!0,zoom:u,pan:{x:-u/l*(e.x-s.x)+e.x,y:-u/l*(e.y-s.y)+e.y}}}return{zoomed:!0,panned:!1,zoom:r,pan:i}},zoom:function(t){if(void 0===t)return this._private.zoom;var e=this.getZoomedViewport(t),r=this._private;return null!=e&&e.zoomed?(r.zoom=e.zoom,e.panned&&(r.pan.x=e.pan.x,r.pan.y=e.pan.y),this.emit(\"zoom\"+(e.panned?\" pan\":\"\")+\" viewport\"),this.notify(\"viewport\"),this):this},viewport:function(t){var e=this._private,r=!0,n=!0,i=[],a=!1,o=!1;if(!t)return this;if(O(t.zoom)||(r=!1),P(t.pan)||(n=!1),!r&&!n)return this;if(r){var s=t.zoom;s<e.minZoom||s>e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=s,i.push(\"zoom\"))}if(n&&(!a||!t.cancelOnFailedZoom)&&e.panningEnabled){var l=t.pan;O(l.x)&&(e.pan.x=l.x,o=!1),O(l.y)&&(e.pan.y=l.y,o=!1),o||i.push(\"pan\")}return i.length>0&&(i.push(\"viewport\"),this.emit(i.join(\" \")),this.notify(\"viewport\")),this},center:function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit(\"pan viewport\"),this.notify(\"viewport\")),this},getCenterPan:function(t,e){if(this._private.panningEnabled){if(E(t)){var r=t;t=this.mutableElements().filter(r)}else D(t)||(t=this.mutableElements());if(0!==t.length){var n=t.boundingBox(),i=this.width(),a=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(n.x1+n.x2))/2,y:(a-e*(n.y1+n.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t,e,r=this._private,n=r.container;return r.sizeCache=r.sizeCache||(n?(t=_.getComputedStyle(n),e=function(e){return parseFloat(t.getPropertyValue(e))},{width:n.clientWidth-e(\"padding-left\")-e(\"padding-right\"),height:n.clientHeight-e(\"padding-top\")-e(\"padding-bottom\")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,e=this._private.zoom,r=this.renderedExtent(),n={x1:(r.x1-t.x)/e,x2:(r.x2-t.x)/e,y1:(r.y1-t.y)/e,y2:(r.y2-t.y)/e};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},multiClickDebounceTime:function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime}};Oa.centre=Oa.center,Oa.autolockNodes=Oa.autolock,Oa.autoungrabifyNodes=Oa.autoungrabify;var Ia={data:rn.data({field:\"data\",bindingEvent:\"data\",allowBinding:!0,allowSetting:!0,settingEvent:\"data\",settingTriggersEvent:!0,triggerFnName:\"trigger\",allowGetting:!0,updateStyle:!0}),removeData:rn.removeData({field:\"data\",event:\"data\",triggerFnName:\"trigger\",triggerEvent:!0,updateStyle:!0}),scratch:rn.data({field:\"scratch\",bindingEvent:\"scratch\",allowBinding:!0,allowSetting:!0,settingEvent:\"scratch\",settingTriggersEvent:!0,triggerFnName:\"trigger\",allowGetting:!0,updateStyle:!0}),removeScratch:rn.removeData({field:\"scratch\",event:\"scratch\",triggerFnName:\"trigger\",triggerEvent:!0,updateStyle:!0})};Ia.attr=Ia.data,Ia.removeAttr=Ia.removeData;var Da=function(t){var e=this,r=(t=X({},t)).container;r&&!I(r)&&I(r[0])&&(r=r[0]);var n=r?r._cyreg:null;(n=n||{})&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];r&&(r._cyreg=n),n.cy=e;var a=void 0!==_&&void 0!==r&&!t.headless,o=t;o.layout=X({name:a?\"grid\":\"null\"},o.layout),o.renderer=X({name:a?\"canvas\":\"null\"},o.renderer);var s=function(t,e,r){return void 0!==e?e:void 0!==r?r:t},l=this._private={container:r,ready:!1,options:o,elements:new Ji(this),listeners:[],aniEles:new Ji(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?a:o.styleEnabled,zoom:O(o.zoom)?o.zoom:1,pan:{x:P(o.pan)&&O(o.pan.x)?o.pan.x:0,y:P(o.pan)&&O(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom}),l.styleEnabled&&e.setStyle([]);var u=X({},o,o.renderer);e.initRenderer(u),function(t,e){if(t.some(j))return Kr.all(t).then(e);e(t)}([o.style,o.elements],(function(t){var r=t[0],a=t[1];l.styleEnabled&&e.style().append(r),function(t,r,n){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(P(t)||L(t))&&e.add(t),e.one(\"layoutready\",(function(t){e.notifications(!0),e.emit(t),e.one(\"load\",r),e.emitAndNotify(\"load\")})).one(\"layoutstop\",(function(){e.one(\"done\",n),e.emit(\"done\")}));var a=X({},e._private.options.layout);a.eles=e.elements(),e.layout(a).run()}(a,(function(){e.startAnimationLoop(),l.ready=!0,C(o.ready)&&e.on(\"ready\",o.ready);for(var t=0;t<i.length;t++){var r=i[t];e.on(\"ready\",r)}n&&(n.readies=[]),e.emit(\"ready\")}),o.done)}))},za=Da.prototype;X(za,{instanceString:function(){return\"core\"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(t){return this.isReady()?this.emitter().emit(\"ready\",[],t):this.on(\"ready\",t),this},destroy:function(){var t=this;if(!t.destroyed())return t.stopAnimationLoop(),t.destroyRenderer(),this.emit(\"destroy\"),t._private.destroyed=!0,t},hasElementWithId:function(t){return this._private.elements.hasElementWithId(t)},getElementById:function(t){return this._private.elements.getElementById(t)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(t){return this._private.elements.merge(t),this},removeFromPool:function(t){return this._private.elements.unmerge(t),this},container:function(){return this._private.container||null},mount:function(t){if(null!=t){var e=this,r=e._private,n=r.options;return!I(t)&&I(t[0])&&(t=t[0]),e.stopAnimationLoop(),e.destroyRenderer(),r.container=t,r.styleEnabled=!0,e.invalidateSize(),e.initRenderer(X({},n,n.renderer,{name:\"null\"===n.renderer.name?\"canvas\":n.renderer.name})),e.startAnimationLoop(),e.style(n.style),e.emit(\"mount\"),e}},unmount:function(){var t=this;return t.stopAnimationLoop(),t.destroyRenderer(),t.initRenderer({name:\"null\"}),t.emit(\"unmount\"),t},options:function(){return Mt(this._private.options)},json:function(t){var e=this,r=e._private,n=e.mutableElements();if(P(t)){if(e.startBatch(),t.elements){var i={},a=function(t,r){for(var n=[],a=[],o=0;o<t.length;o++){var s=t[o];if(s.data.id){var l=\"\"+s.data.id,u=e.getElementById(l);i[l]=!0,0!==u.length?a.push({ele:u,json:s}):r?(s.group=r,n.push(s)):n.push(s)}else Tt(\"cy.json() cannot handle elements without an ID attribute\")}e.add(n);for(var c=0;c<a.length;c++){var f=a[c],h=f.ele,p=f.json;h.json(p)}};if(L(t.elements))a(t.elements);else for(var o=[\"nodes\",\"edges\"],s=0;s<o.length;s++){var l=o[s],u=t.elements[l];L(u)&&a(u,l)}var c=e.collection();n.filter((function(t){return!i[t.id()]})).forEach((function(t){t.isParent()?c.merge(t):t.remove()})),c.forEach((function(t){return t.children().move({parent:null})})),c.forEach((function(t){return function(t){return e.getElementById(t.id())}(t).remove()}))}t.style&&e.style(t.style),null!=t.zoom&&t.zoom!==r.zoom&&e.zoom(t.zoom),t.pan&&(t.pan.x===r.pan.x&&t.pan.y===r.pan.y||e.pan(t.pan)),t.data&&e.data(t.data);for(var f=[\"minZoom\",\"maxZoom\",\"zoomingEnabled\",\"userZoomingEnabled\",\"panningEnabled\",\"userPanningEnabled\",\"boxSelectionEnabled\",\"autolock\",\"autoungrabify\",\"autounselectify\",\"multiClickDebounceTime\"],h=0;h<f.length;h++){var p=f[h];null!=t[p]&&e[p](t[p])}return e.endBatch(),this}var d={};t?d.elements=this.elements().map((function(t){return t.json()})):(d.elements={},n.forEach((function(t){var e=t.group();d.elements[e]||(d.elements[e]=[]),d.elements[e].push(t.json())}))),this._private.styleEnabled&&(d.style=e.style().json()),d.data=Mt(e.data());var g=r.options;return d.zoomingEnabled=r.zoomingEnabled,d.userZoomingEnabled=r.userZoomingEnabled,d.zoom=r.zoom,d.minZoom=r.minZoom,d.maxZoom=r.maxZoom,d.panningEnabled=r.panningEnabled,d.userPanningEnabled=r.userPanningEnabled,d.pan=Mt(r.pan),d.boxSelectionEnabled=r.boxSelectionEnabled,d.renderer=Mt(g.renderer),d.hideEdgesOnViewport=g.hideEdgesOnViewport,d.textureOnViewport=g.textureOnViewport,d.wheelSensitivity=g.wheelSensitivity,d.motionBlur=g.motionBlur,d.multiClickDebounceTime=g.multiClickDebounceTime,d}}),za.$id=za.getElementById,[Qi,ca,pa,da,ga,va,ya,xa,Pa,Oa,Ia].forEach((function(t){X(za,t)}));var Ra={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximal:!1,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}},Fa=function(t){return t.scratch(\"breadthfirst\")},Na=function(t,e){return t.scratch(\"breadthfirst\",e)};function Ba(t){this.options=X({},Ra,t)}Ba.prototype.run=function(){var t,e=this.options,r=e,n=e.cy,i=r.eles,a=i.nodes().filter((function(t){return!t.isParent()})),o=i,s=r.directed,l=r.maximal||r.maximalAdjustments>0,u=fe(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(D(r.roots))t=r.roots;else if(L(r.roots)){for(var c=[],f=0;f<r.roots.length;f++){var h=r.roots[f],p=n.getElementById(h);c.push(p)}t=n.collection(c)}else if(E(r.roots))t=n.$(r.roots);else if(s)t=a.roots();else{var d=i.components();t=n.collection();for(var g=function(e){var r=d[e],n=r.maxDegree(!1),i=r.filter((function(t){return t.degree(!1)===n}));t=t.add(i)},v=0;v<d.length;v++)g(v)}var m=[],y={},x=function(t,e){null==m[e]&&(m[e]=[]);var r=m[e].length;m[e].push(t),Na(t,{index:r,depth:e})};o.bfs({roots:t,directed:r.directed,visit:function(t,e,r,n,i){var a=t[0],o=a.id();x(a,i),y[o]=!0}});for(var b=[],_=0;_<a.length;_++){var w=a[_];y[w.id()]||b.push(w)}var k=function(t){for(var e=m[t],r=0;r<e.length;r++){var n=e[r];null!=n?Na(n,{depth:t,index:r}):(e.splice(r,1),r--)}},T=function(){for(var t=0;t<m.length;t++)k(t)},M=function(t,e){for(var r=Fa(t),n=t.incomers().filter((function(t){return t.isNode()&&i.has(t)})),a=-1,o=t.id(),s=0;s<n.length;s++){var l=n[s],u=Fa(l);a=Math.max(a,u.depth)}return r.depth<=a&&(e[o]?null:(function(t,e){var r=Fa(t),n=r.depth,i=r.index;m[n][i]=null,x(t,e)}(t,a+1),e[o]=!0,!0))};if(s&&l){var A=[],S={},C=function(t){return A.push(t)};for(a.forEach((function(t){return A.push(t)}));A.length>0;){var P=A.shift(),O=M(P,S);if(O)P.outgoers().filter((function(t){return t.isNode()&&i.has(t)})).forEach(C);else if(null===O){Tt(\"Detected double maximal shift for node `\"+P.id()+\"`.  Bailing maximal adjustment due to cycle.  Use `options.maximal: true` only on DAGs.\");break}}}T();var I=0;if(r.avoidOverlap)for(var z=0;z<a.length;z++){var R=a[z].layoutDimensions(r),F=R.w,N=R.h;I=Math.max(I,F,N)}var B={},j=function(t){if(B[t.id()])return B[t.id()];for(var e=Fa(t).depth,r=t.neighborhood(),n=0,i=0,o=0;o<r.length;o++){var s=r[o];if(!s.isEdge()&&!s.isParent()&&a.has(s)){var l=Fa(s);if(null!=l){var u=l.index,c=l.depth;if(null!=u&&null!=c){var f=m[c].length;c<e&&(n+=u/f,i++)}}}}return n/=i=Math.max(1,i),0===i&&(n=0),B[t.id()]=n,n},U=function(t,e){var r=j(t)-j(e);return 0===r?W(t.id(),e.id()):r};void 0!==r.depthSort&&(U=r.depthSort);for(var V=0;V<m.length;V++)m[V].sort(U),k(V);for(var H=[],q=0;q<b.length;q++)H.push(b[q]);m.unshift(H),T();for(var G=0,Y=0;Y<m.length;Y++)G=Math.max(m[Y].length,G);var X=u.x1+u.w/2,Z=u.x1+u.h/2,K=m.reduce((function(t,e){return Math.max(t,e.length)}),0);return i.nodes().layoutPositions(this,r,(function(t){var e=Fa(t),n=e.depth,i=e.index,a=m[n].length,o=Math.max(u.w/((r.grid?K:a)+1),I),s=Math.max(u.h/(m.length+1),I),l=Math.min(u.w/2/m.length,u.h/2/m.length);if(l=Math.max(l,I),r.circle){var c=l*n+l-(m.length>0&&m[0].length<=3?l/2:0),f=2*Math.PI/m[n].length*i;return 0===n&&1===m[0].length&&(c=1),{x:X+c*Math.cos(f),y:Z+c*Math.sin(f)}}return{x:X+(i+1-(a+1)/2)*o,y:(n+1)*s}})),this};var ja={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Ua(t){this.options=X({},ja,t)}Ua.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,a=n.nodes().not(\":parent\");e.sort&&(a=a.sort(e.sort));for(var o,s=fe(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===e.sweep?2*Math.PI-2*Math.PI/a.length:e.sweep)/Math.max(1,a.length-1),f=0,h=0;h<a.length;h++){var p=a[h].layoutDimensions(e),d=p.w,g=p.h;f=Math.max(f,d,g)}if(o=O(e.radius)?e.radius:a.length<=1?0:Math.min(s.h,s.w)/2-f,a.length>1&&e.avoidOverlap){f*=1.75;var v=Math.cos(c)-Math.cos(0),m=Math.sin(c)-Math.sin(0),y=Math.sqrt(f*f/(v*v+m*m));o=Math.max(y,o)}return n.nodes().layoutPositions(this,e,(function(t,r){var n=e.startAngle+r*c*(i?1:-1),a=o*Math.cos(n),s=o*Math.sin(n);return{x:l+a,y:u+s}})),this};var Va,Ha={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function qa(t){this.options=X({},Ha,t)}qa.prototype.run=function(){for(var t=this.options,e=t,r=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(\":parent\"),o=fe(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,f=0;f<a.length;f++){var h,p=a[f];h=e.concentric(p),u.push({value:h,node:p}),p._private.scratch.concentric=h}a.updateStyle();for(var d=0;d<a.length;d++){var g=a[d].layoutDimensions(e);c=Math.max(c,g.w,g.h)}u.sort((function(t,e){return e.value-t.value}));for(var v=e.levelWidth(a),m=[[]],y=m[0],x=0;x<u.length;x++){var b=u[x];y.length>0&&Math.abs(y[0].value-b.value)>=v&&(y=[],m.push(y)),y.push(b)}var _=c+e.minNodeSpacing;if(!e.avoidOverlap){var w=m.length>0&&m[0].length>1,k=(Math.min(o.w,o.h)/2-_)/(m.length+w?1:0);_=Math.min(_,k)}for(var T=0,M=0;M<m.length;M++){var A=m[M],S=void 0===e.sweep?2*Math.PI-2*Math.PI/A.length:e.sweep,E=A.dTheta=S/Math.max(1,A.length-1);if(A.length>1&&e.avoidOverlap){var C=Math.cos(E)-Math.cos(0),L=Math.sin(E)-Math.sin(0),P=Math.sqrt(_*_/(C*C+L*L));T=Math.max(P,T)}A.r=T,T+=_}if(e.equidistant){for(var O=0,I=0,D=0;D<m.length;D++){var z=m[D].r-I;O=Math.max(O,z)}I=0;for(var R=0;R<m.length;R++){var F=m[R];0===R&&(I=F.r),F.r=I,I+=O}}for(var N={},B=0;B<m.length;B++)for(var j=m[B],U=j.dTheta,V=j.r,H=0;H<j.length;H++){var q=j[H],G=e.startAngle+(r?1:-1)*U*H,Y={x:s+V*Math.cos(G),y:l+V*Math.sin(G)};N[q.node.id()]=Y}return i.nodes().layoutPositions(this,e,(function(t){var e=t.id();return N[e]})),this};var Ga={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(t,e){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(t){return 2048},nodeOverlap:4,idealEdgeLength:function(t){return 32},edgeElasticity:function(t){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function Ya(t){this.options=X({},Ga,t),this.options.layout=this}Ya.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,!0!==t.animate&&!1!==t.animate||r.emit({type:\"layoutstart\",layout:r}),Va=!0===t.debug;var n=Wa(e,r,t);Va&&(void 0)(n),t.randomize&&Ka(n);var i=rt(),a=function(){$a(n,e,t),!0===t.fit&&e.fit(t.padding)},o=function(e){return!(r.stopped||e>=t.numIter||(Qa(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature<t.minTemp))},s=function(){if(!0===t.animate||!1===t.animate)a(),r.one(\"layoutstop\",t.stop),r.emit({type:\"layoutstop\",layout:r});else{var e=t.eles.nodes(),i=Ja(n,t,e);e.layoutPositions(r,t,i)}},l=0,u=!0;if(!0===t.animate)!function e(){for(var r=0;u&&r<t.refresh;)u=o(l),l++,r++;u?(rt()-i>=t.animationThreshold&&a(),et(e)):(fo(n,t),s())}();else{for(;u;)u=o(l),l++;fo(n,t),s()}return this},Ya.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit(\"layoutstop\"),this},Ya.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Wa=function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:t.width(),clientHeight:t.width(),boundingBox:fe(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()})},o=r.eles.components(),s={},l=0;l<o.length;l++)for(var u=o[l],c=0;c<u.length;c++)s[u[c].id()]=l;for(l=0;l<a.nodeSize;l++){var f=(v=i[l]).layoutDimensions(r);(I={}).isLocked=v.locked(),I.id=v.data(\"id\"),I.parentId=v.data(\"parent\"),I.cmptId=s[v.id()],I.children=[],I.positionX=v.position(\"x\"),I.positionY=v.position(\"y\"),I.offsetX=0,I.offsetY=0,I.height=f.w,I.width=f.h,I.maxX=I.positionX+I.width/2,I.minX=I.positionX-I.width/2,I.maxY=I.positionY+I.height/2,I.minY=I.positionY-I.height/2,I.padLeft=parseFloat(v.style(\"padding\")),I.padRight=parseFloat(v.style(\"padding\")),I.padTop=parseFloat(v.style(\"padding\")),I.padBottom=parseFloat(v.style(\"padding\")),I.nodeRepulsion=C(r.nodeRepulsion)?r.nodeRepulsion(v):r.nodeRepulsion,a.layoutNodes.push(I),a.idToIndex[I.id]=l}var h=[],p=0,d=-1,g=[];for(l=0;l<a.nodeSize;l++){var v,m=(v=a.layoutNodes[l]).parentId;null!=m?a.layoutNodes[a.idToIndex[m]].children.push(v.id):(h[++d]=v.id,g.push(v.id))}for(a.graphSet.push(g);p<=d;){var y=h[p++],x=a.idToIndex[y],b=a.layoutNodes[x].children;if(b.length>0)for(a.graphSet.push(b),l=0;l<b.length;l++)h[++d]=b[l]}for(l=0;l<a.graphSet.length;l++){var _=a.graphSet[l];for(c=0;c<_.length;c++){var w=a.idToIndex[_[c]];a.indexToGraph[w]=l}}for(l=0;l<a.edgeSize;l++){var k=n[l],T={};T.id=k.data(\"id\"),T.sourceId=k.data(\"source\"),T.targetId=k.data(\"target\");var M=C(r.idealEdgeLength)?r.idealEdgeLength(k):r.idealEdgeLength,A=C(r.edgeElasticity)?r.edgeElasticity(k):r.edgeElasticity,S=a.idToIndex[T.sourceId],E=a.idToIndex[T.targetId];if(a.indexToGraph[S]!=a.indexToGraph[E]){for(var L=Xa(T.sourceId,T.targetId,a),P=a.graphSet[L],O=0,I=a.layoutNodes[S];-1===P.indexOf(I.id);)I=a.layoutNodes[a.idToIndex[I.parentId]],O++;for(I=a.layoutNodes[E];-1===P.indexOf(I.id);)I=a.layoutNodes[a.idToIndex[I.parentId]],O++;M*=O*r.nestingFactor}T.idealLength=M,T.elasticity=A,a.layoutEdges.push(T)}return a},Xa=function(t,e,r){var n=Za(t,e,0,r);return 2>n.count?0:n.graph},Za=function t(e,r,n,i){var a=i.graphSet[n];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:n};for(var o=0,s=0;s<a.length;s++){var l=a[s],u=i.idToIndex[l],c=i.layoutNodes[u].children;if(0!==c.length){var f=t(e,r,i.indexToGraph[i.idToIndex[c[0]]],i);if(0!==f.count){if(1!==f.count)return f;if(2==++o)break}}}return{count:o,graph:n}},Ka=function(t,e){for(var r=t.clientWidth,n=t.clientHeight,i=0;i<t.nodeSize;i++){var a=t.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*n)}},Ja=function(t,e,r){var n=t.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return e.boundingBox&&(r.forEach((function(e){var r=t.layoutNodes[t.idToIndex[e.data(\"id\")]];i.x1=Math.min(i.x1,r.positionX),i.x2=Math.max(i.x2,r.positionX),i.y1=Math.min(i.y1,r.positionY),i.y2=Math.max(i.y2,r.positionY)})),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(r,a){var o=t.layoutNodes[t.idToIndex[r.data(\"id\")]];if(e.boundingBox){var s=(o.positionX-i.x1)/i.w,l=(o.positionY-i.y1)/i.h;return{x:n.x1+s*n.w,y:n.y1+l*n.h}}return{x:o.positionX,y:o.positionY}}},$a=function(t,e,r){var n=r.layout,i=r.eles.nodes(),a=Ja(t,r,i);i.positions(a),!0!==t.ready&&(t.ready=!0,n.one(\"layoutready\",r.ready),n.emit({type:\"layoutready\",layout:this}))},Qa=function(t,e,r){to(t,e),ao(t),oo(t,e),so(t),lo(t)},to=function(t,e){for(var r=0;r<t.graphSet.length;r++)for(var n=t.graphSet[r],i=n.length,a=0;a<i;a++)for(var o=t.layoutNodes[t.idToIndex[n[a]]],s=a+1;s<i;s++){var l=t.layoutNodes[t.idToIndex[n[s]]];ro(o,l,t,e)}},eo=function(t){return-t+2*t*Math.random()},ro=function(t,e,r,n){if(t.cmptId===e.cmptId||r.isCompound){var i=e.positionX-t.positionX,a=e.positionY-t.positionY;0===i&&0===a&&(i=eo(1),a=eo(1));var o=no(t,e,i,a);if(o>0)var s=(u=n.nodeOverlap*o)*i/(g=Math.sqrt(i*i+a*a)),l=u*a/g;else{var u,c=io(t,i,a),f=io(e,-1*i,-1*a),h=f.x-c.x,p=f.y-c.y,d=h*h+p*p,g=Math.sqrt(d);s=(u=(t.nodeRepulsion+e.nodeRepulsion)/d)*h/g,l=u*p/g}t.isLocked||(t.offsetX-=s,t.offsetY-=l),e.isLocked||(e.offsetX+=s,e.offsetY+=l)}},no=function(t,e,r,n){if(r>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(n>0)var a=t.maxY-e.minY;else a=e.maxY-t.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},io=function(t,e,r){var n=t.positionX,i=t.positionY,a=t.height||1,o=t.width||1,s=r/e,l=a/o,u={};return 0===e&&0<r||0===e&&0>r?(u.x=n,u.y=i+a/2,u):0<e&&-1*l<=s&&s<=l?(u.x=n+o/2,u.y=i+o*r/2/e,u):0>e&&-1*l<=s&&s<=l?(u.x=n-o/2,u.y=i-o*r/2/e,u):0<r&&(s<=-1*l||s>=l)?(u.x=n+a*e/2/r,u.y=i+a/2,u):0>r&&(s<=-1*l||s>=l)?(u.x=n-a*e/2/r,u.y=i-a/2,u):u},ao=function(t,e){for(var r=0;r<t.edgeSize;r++){var n=t.layoutEdges[r],i=t.idToIndex[n.sourceId],a=t.layoutNodes[i],o=t.idToIndex[n.targetId],s=t.layoutNodes[o],l=s.positionX-a.positionX,u=s.positionY-a.positionY;if(0!==l||0!==u){var c=io(a,l,u),f=io(s,-1*l,-1*u),h=f.x-c.x,p=f.y-c.y,d=Math.sqrt(h*h+p*p),g=Math.pow(n.idealLength-d,2)/n.elasticity;if(0!==d)var v=g*h/d,m=g*p/d;else v=0,m=0;a.isLocked||(a.offsetX+=v,a.offsetY+=m),s.isLocked||(s.offsetX-=v,s.offsetY-=m)}}},oo=function(t,e){if(0!==e.gravity)for(var r=0;r<t.graphSet.length;r++){var n=t.graphSet[r],i=n.length;if(0===r)var a=t.clientHeight/2,o=t.clientWidth/2;else{var s=t.layoutNodes[t.idToIndex[n[0]]],l=t.layoutNodes[t.idToIndex[s.parentId]];a=l.positionX,o=l.positionY}for(var u=0;u<i;u++){var c=t.layoutNodes[t.idToIndex[n[u]]];if(!c.isLocked){var f=a-c.positionX,h=o-c.positionY,p=Math.sqrt(f*f+h*h);if(p>1){var d=e.gravity*f/p,g=e.gravity*h/p;c.offsetX+=d,c.offsetY+=g}}}}},so=function(t,e){var r=[],n=0,i=-1;for(r.push.apply(r,t.graphSet[0]),i+=t.graphSet[0].length;n<=i;){var a=r[n++],o=t.idToIndex[a],s=t.layoutNodes[o],l=s.children;if(0<l.length&&!s.isLocked){for(var u=s.offsetX,c=s.offsetY,f=0;f<l.length;f++){var h=t.layoutNodes[t.idToIndex[l[f]]];h.offsetX+=u,h.offsetY+=c,r[++i]=l[f]}s.offsetX=0,s.offsetY=0}}},lo=function(t,e){for(var r=0;r<t.nodeSize;r++)0<(i=t.layoutNodes[r]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(r=0;r<t.nodeSize;r++)if(!(0<(i=t.layoutNodes[r]).children.length||i.isLocked)){var n=uo(i.offsetX,i.offsetY,t.temperature);i.positionX+=n.x,i.positionY+=n.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,co(i,t)}for(r=0;r<t.nodeSize;r++){var i;0<(i=t.layoutNodes[r]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},uo=function(t,e,r){var n=Math.sqrt(t*t+e*e);if(n>r)var i={x:r*t/n,y:r*e/n};else i={x:t,y:e};return i},co=function t(e,r){var n=e.parentId;if(null!=n){var i=r.layoutNodes[r.idToIndex[n]],a=!1;return(null==i.maxX||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(null==i.minX||e.minX-i.padLeft<i.minX)&&(i.minX=e.minX-i.padLeft,a=!0),(null==i.maxY||e.maxY+i.padBottom>i.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(null==i.minY||e.minY-i.padTop<i.minY)&&(i.minY=e.minY-i.padTop,a=!0),a?t(i,r):void 0}},fo=function(t,e){for(var r=t.layoutNodes,n=[],i=0;i<r.length;i++){var a=r[i],o=a.cmptId;(n[o]=n[o]||[]).push(a)}var s=0;for(i=0;i<n.length;i++)if(g=n[i]){g.x1=1/0,g.x2=-1/0,g.y1=1/0,g.y2=-1/0;for(var l=0;l<g.length;l++){var u=g[l];g.x1=Math.min(g.x1,u.positionX-u.width/2),g.x2=Math.max(g.x2,u.positionX+u.width/2),g.y1=Math.min(g.y1,u.positionY-u.height/2),g.y2=Math.max(g.y2,u.positionY+u.height/2)}g.w=g.x2-g.x1,g.h=g.y2-g.y1,s+=g.w*g.h}n.sort((function(t,e){return e.w*e.h-t.w*t.h}));var c=0,f=0,h=0,p=0,d=Math.sqrt(s)*t.clientWidth/t.clientHeight;for(i=0;i<n.length;i++){var g;if(g=n[i]){for(l=0;l<g.length;l++)(u=g[l]).isLocked||(u.positionX+=c-g.x1,u.positionY+=f-g.y1);c+=g.w+e.componentSpacing,h+=g.w+e.componentSpacing,p=Math.max(p,g.h),h>d&&(f+=p+e.componentSpacing,c=0,h=0,p=0)}}},ho={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function po(t){this.options=X({},ho,t)}po.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(\":parent\");e.sort&&(i=i.sort(e.sort));var a=fe(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(0===a.h||0===a.w)n.nodes().layoutPositions(this,e,(function(t){return{x:a.x1,y:a.y1}}));else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),c=function(t){if(null==t)return Math.min(l,u);Math.min(l,u)==l?l=t:u=t},f=function(t){if(null==t)return Math.max(l,u);Math.max(l,u)==l?l=t:u=t},h=e.rows,p=null!=e.cols?e.cols:e.columns;if(null!=h&&null!=p)l=h,u=p;else if(null!=h&&null==p)l=h,u=Math.ceil(o/l);else if(null==h&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var d=c(),g=f();(d-1)*g>=o?c(d-1):(g-1)*d>=o&&f(g-1)}else for(;u*l<o;){var v=c(),m=f();(m+1)*v>=o?f(m+1):c(v+1)}var y=a.w/u,x=a.h/l;if(e.condense&&(y=0,x=0),e.avoidOverlap)for(var b=0;b<i.length;b++){var _=i[b],w=_._private.position;null!=w.x&&null!=w.y||(w.x=0,w.y=0);var k=_.layoutDimensions(e),T=e.avoidOverlapPadding,M=k.w+T,A=k.h+T;y=Math.max(y,M),x=Math.max(x,A)}for(var S={},E=function(t,e){return!!S[\"c-\"+t+\"-\"+e]},C=function(t,e){S[\"c-\"+t+\"-\"+e]=!0},L=0,P=0,O=function(){++P>=u&&(P=0,L++)},I={},D=0;D<i.length;D++){var z=i[D],R=e.position(z);if(R&&(void 0!==R.row||void 0!==R.col)){var F={row:R.row,col:R.col};if(void 0===F.col)for(F.col=0;E(F.row,F.col);)F.col++;else if(void 0===F.row)for(F.row=0;E(F.row,F.col);)F.row++;I[z.id()]=F,C(F.row,F.col)}}i.layoutPositions(this,e,(function(t,e){var r,n;if(t.locked()||t.isParent())return!1;var i=I[t.id()];if(i)r=i.col*y+y/2+a.x1,n=i.row*x+x/2+a.y1;else{for(;E(L,P);)O();r=P*y+y/2+a.x1,n=L*x+x/2+a.y1,C(L,P),O()}return{x:r,y:n}}))}return this};var go={ready:function(){},stop:function(){}};function vo(t){this.options=X({},go,t)}vo.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit(\"layoutstart\"),e.nodes().positions((function(){return{x:0,y:0}})),r.one(\"layoutready\",t.ready),r.emit(\"layoutready\"),r.one(\"layoutstop\",t.stop),r.emit(\"layoutstop\"),this},vo.prototype.stop=function(){return this};var mo={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function yo(t){this.options=X({},mo,t)}yo.prototype.run=function(){var t=this.options,e=t.eles.nodes(),r=C(t.positions);return e.layoutPositions(this,t,(function(e,n){var i=function(e){if(null==t.positions)return function(t){return{x:t.x,y:t.y}}(e.position());if(r)return t.positions(e);var n=t.positions[e._private.data.id];return null==n?null:n}(e);return!e.locked()&&null!=i&&i})),this};var xo={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function bo(t){this.options=X({},xo,t)}bo.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=fe(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()});return r.nodes().layoutPositions(this,t,(function(t,e){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}})),this};var _o=[{name:\"breadthfirst\",impl:Ba},{name:\"circle\",impl:Ua},{name:\"concentric\",impl:qa},{name:\"cose\",impl:Ya},{name:\"grid\",impl:po},{name:\"null\",impl:vo},{name:\"preset\",impl:yo},{name:\"random\",impl:bo}];function wo(t){this.options=t,this.notifications=0}var ko=function(){},To=function(){throw new Error(\"A headless instance can not render images\")};wo.prototype={recalculateRenderedStyle:ko,notify:function(){this.notifications++},init:ko,isHeadless:function(){return!0},png:To,jpg:To};var Mo={arrowShapeWidth:.3,registerArrowShapes:function(){var t=this.arrowShapes={},e=this,r=function(t,e,r,n,i,a,o){var s=i.x-r/2-o,l=i.x+r/2+o,u=i.y-r/2-o,c=i.y+r/2+o;return s<=t&&t<=l&&u<=e&&e<=c},n=function(t,e,r,n,i){var a=t*Math.cos(n)-e*Math.sin(n),o=(t*Math.sin(n)+e*Math.cos(n))*r;return{x:a*r+i.x,y:o+i.y}},i=function(t,e,r,i){for(var a=[],o=0;o<t.length;o+=2){var s=t[o],l=t[o+1];a.push(n(s,l,e,r,i))}return a},a=function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n.x,n.y)}return e},o=function(t){return t.pstyle(\"width\").pfValue*t.pstyle(\"arrow-scale\").pfValue*2},s=function(n,s){E(s)&&(s=t[s]),t[n]=X({name:n,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(t,e,r,n,o,s){var l=a(i(this.points,r+2*s,n,o));return Te(t,e,l)},roughCollide:r,draw:function(t,r,n,a){var o=i(this.points,r,n,a);e.arrowShapeImpl(\"polygon\")(t,o)},spacing:function(t){return 0},gap:o},s)};s(\"none\",{collide:xt,roughCollide:xt,draw:_t,spacing:bt,gap:bt}),s(\"triangle\",{points:[-.15,-.3,0,0,.15,-.3]}),s(\"arrow\",\"triangle\"),s(\"triangle-backcurve\",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:function(t,r,a,o,s){var l=i(this.points,r,a,o),u=this.controlPoint,c=n(u[0],u[1],r,a,o);e.arrowShapeImpl(this.name)(t,l,c)},gap:function(t){return.8*o(t)}}),s(\"triangle-tee\",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(t,e,r,n,o,s,l){var u=a(i(this.points,r+2*l,n,o)),c=a(i(this.pointsTee,r+2*l,n,o));return Te(t,e,u)||Te(t,e,c)},draw:function(t,r,n,a,o){var s=i(this.points,r,n,a),l=i(this.pointsTee,r,n,a);e.arrowShapeImpl(this.name)(t,s,l)}}),s(\"circle-triangle\",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(t,e,r,n,o,s,l){var u=o,c=Math.pow(u.x-t,2)+Math.pow(u.y-e,2)<=Math.pow((r+2*l)*this.radius,2),f=a(i(this.points,r+2*l,n,o));return Te(t,e,f)||c},draw:function(t,r,n,a,o){var s=i(this.pointsTr,r,n,a);e.arrowShapeImpl(this.name)(t,s,a.x,a.y,this.radius*r)},spacing:function(t){return e.getArrowWidth(t.pstyle(\"width\").pfValue,t.pstyle(\"arrow-scale\").value)*this.radius}}),s(\"triangle-cross\",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(t,e){var r=this.baseCrossLinePts.slice(),n=e/t;return r[3]=r[3]-n,r[5]=r[5]-n,r},collide:function(t,e,r,n,o,s,l){var u=a(i(this.points,r+2*l,n,o)),c=a(i(this.crossLinePts(r,s),r+2*l,n,o));return Te(t,e,u)||Te(t,e,c)},draw:function(t,r,n,a,o){var s=i(this.points,r,n,a),l=i(this.crossLinePts(r,o),r,n,a);e.arrowShapeImpl(this.name)(t,s,l)}}),s(\"vee\",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(t){return.525*o(t)}}),s(\"circle\",{radius:.15,collide:function(t,e,r,n,i,a,o){var s=i;return Math.pow(s.x-t,2)+Math.pow(s.y-e,2)<=Math.pow((r+2*o)*this.radius,2)},draw:function(t,r,n,i,a){e.arrowShapeImpl(this.name)(t,i.x,i.y,this.radius*r)},spacing:function(t){return e.getArrowWidth(t.pstyle(\"width\").pfValue,t.pstyle(\"arrow-scale\").value)*this.radius}}),s(\"tee\",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(t){return 1},gap:function(t){return 1}}),s(\"square\",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s(\"diamond\",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(t){return t.pstyle(\"width\").pfValue*t.pstyle(\"arrow-scale\").value}}),s(\"chevron\",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(t){return.95*t.pstyle(\"width\").pfValue*t.pstyle(\"arrow-scale\").value}})}},Ao={projectIntoViewport:function(t,e){var r=this.cy,n=this.findContainerClientCoords(),i=n[0],a=n[1],o=n[4],s=r.pan(),l=r.zoom();return[((t-i)/o-s.x)/l,((e-a)/o-s.y)/l]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=_.getComputedStyle(t),n=function(t){return parseFloat(r.getPropertyValue(t))},i=n(\"padding-left\"),a=n(\"padding-right\"),o=n(\"padding-top\"),s=n(\"padding-bottom\"),l=n(\"border-left-width\"),u=n(\"border-right-width\"),c=n(\"border-top-width\"),f=(n(\"border-bottom-width\"),t.clientWidth),h=t.clientHeight,p=i+a,d=o+s,g=l+u,v=e.width/(f+g),m=f-p,y=h-d,x=e.left+i+l,b=e.top+o+c;return this.containerBB=[x,b,m,y,v]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]},findNearestElements:function(t,e,r,n){var i,a,o=this,s=this,l=s.getCachedZSortedEles(),u=[],c=s.cy.zoom(),f=s.cy.hasCompoundNodes(),h=(n?24:8)/c,p=(n?8:2)/c,d=(n?8:2)/c,g=1/0;function v(t,e){if(t.isNode()){if(a)return;a=t,u.push(t)}if(t.isEdge()&&(null==e||e<g))if(i){if(i.pstyle(\"z-compound-depth\").value===t.pstyle(\"z-compound-depth\").value&&i.pstyle(\"z-compound-depth\").value===t.pstyle(\"z-compound-depth\").value)for(var r=0;r<u.length;r++)if(u[r].isEdge()){u[r]=t,i=t,g=null!=e?e:g;break}}else u.push(t),i=t,g=null!=e?e:g}function m(r){var n=r.outerWidth()+2*p,i=r.outerHeight()+2*p,a=n/2,l=i/2,u=r.position();if(u.x-a<=t&&t<=u.x+a&&u.y-l<=e&&e<=u.y+l&&s.nodeShapes[o.getNodeShape(r)].checkPoint(t,e,0,n,i,u.x,u.y))return v(r,0),!0}function y(r){var n,i=r._private,a=i.rscratch,l=r.pstyle(\"width\").pfValue,c=r.pstyle(\"arrow-scale\").value,p=l/2+h,d=p*p,g=2*p,y=i.source,x=i.target;if(\"segments\"===a.edgeType||\"straight\"===a.edgeType||\"haystack\"===a.edgeType){for(var b=a.allpts,_=0;_+3<b.length;_+=2)if(be(t,e,b[_],b[_+1],b[_+2],b[_+3],g)&&d>(n=ke(t,e,b[_],b[_+1],b[_+2],b[_+3])))return v(r,n),!0}else if(\"bezier\"===a.edgeType||\"multibezier\"===a.edgeType||\"self\"===a.edgeType||\"compound\"===a.edgeType)for(b=a.allpts,_=0;_+5<a.allpts.length;_+=4)if(_e(t,e,b[_],b[_+1],b[_+2],b[_+3],b[_+4],b[_+5],g)&&d>(n=we(t,e,b[_],b[_+1],b[_+2],b[_+3],b[_+4],b[_+5])))return v(r,n),!0;y=y||i.source,x=x||i.target;var w=o.getArrowWidth(l,c),k=[{name:\"source\",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:\"target\",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:\"mid-source\",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:\"mid-target\",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(_=0;_<k.length;_++){var T=k[_],M=s.arrowShapes[r.pstyle(T.name+\"-arrow-shape\").value],A=r.pstyle(\"width\").pfValue;if(M.roughCollide(t,e,w,T.angle,{x:T.x,y:T.y},A,h)&&M.collide(t,e,w,T.angle,{x:T.x,y:T.y},A,h))return v(r),!0}f&&u.length>0&&(m(y),m(x))}function x(t,e,r){return Ot(t,e,r)}function b(r,n){var i,a=r._private,o=d;i=n?n+\"-\":\"\",r.boundingBox();var s=a.labelBounds[n||\"main\"],l=r.pstyle(i+\"label\").value;if(\"yes\"===r.pstyle(\"text-events\").strValue&&l){var u=x(a.rscratch,\"labelX\",n),c=x(a.rscratch,\"labelY\",n),f=x(a.rscratch,\"labelAngle\",n),h=r.pstyle(i+\"text-margin-x\").pfValue,p=r.pstyle(i+\"text-margin-y\").pfValue,g=s.x1-o-h,m=s.x2+o-h,y=s.y1-o-p,b=s.y2+o-p;if(f){var _=Math.cos(f),w=Math.sin(f),k=function(t,e){return{x:(t-=u)*_-(e-=c)*w+u,y:t*w+e*_+c}},T=k(g,y),M=k(g,b),A=k(m,y),S=k(m,b),E=[T.x+h,T.y+p,A.x+h,A.y+p,S.x+h,S.y+p,M.x+h,M.y+p];if(Te(t,e,E))return v(r),!0}else if(me(s,t,e))return v(r),!0}}r&&(l=l.interactive);for(var _=l.length-1;_>=0;_--){var w=l[_];w.isNode()?m(w)||b(w):y(w)||b(w)||b(w,\"source\")||b(w,\"target\")}return u},getAllInBox:function(t,e,r,n){for(var i,a,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(t,r),u=Math.max(t,r),c=Math.min(e,n),f=Math.max(e,n),h=fe({x1:t=l,y1:e=c,x2:r=u,y2:n=f}),p=0;p<o.length;p++){var d=o[p];if(d.isNode()){var g=d,v=g.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});ve(h,v)&&!ye(v,h)&&s.push(g)}else{var m=d,y=m._private,x=y.rscratch;if(null!=x.startX&&null!=x.startY&&!me(h,x.startX,x.startY))continue;if(null!=x.endX&&null!=x.endY&&!me(h,x.endX,x.endY))continue;if(\"bezier\"===x.edgeType||\"multibezier\"===x.edgeType||\"self\"===x.edgeType||\"compound\"===x.edgeType||\"segments\"===x.edgeType||\"haystack\"===x.edgeType){for(var b=y.rstyle.bezierPts||y.rstyle.linePts||y.rstyle.haystackPts,_=!0,w=0;w<b.length;w++)if(i=h,a=b[w],!me(i,a.x,a.y)){_=!1;break}_&&s.push(m)}else\"haystack\"!==x.edgeType&&\"straight\"!==x.edgeType||s.push(m)}}return s}},So={calculateArrowAngles:function(t){var e,r,n,i,a,o,s=t._private.rscratch,l=\"haystack\"===s.edgeType,u=\"bezier\"===s.edgeType,c=\"multibezier\"===s.edgeType,f=\"segments\"===s.edgeType,h=\"compound\"===s.edgeType,p=\"self\"===s.edgeType;if(l?(n=s.haystackPts[0],i=s.haystackPts[1],a=s.haystackPts[2],o=s.haystackPts[3]):(n=s.arrowStartX,i=s.arrowStartY,a=s.arrowEndX,o=s.arrowEndY),g=s.midX,v=s.midY,f)e=n-s.segpts[0],r=i-s.segpts[1];else if(c||h||p||u){var d=s.allpts;e=n-le(d[0],d[2],d[4],.1),r=i-le(d[1],d[3],d[5],.1)}else e=n-g,r=i-v;s.srcArrowAngle=re(e,r);var g=s.midX,v=s.midY;if(l&&(g=(n+a)/2,v=(i+o)/2),e=a-n,r=o-i,f)if((d=s.allpts).length/2%2==0){var m=(y=d.length/2)-2;e=d[y]-d[m],r=d[y+1]-d[m+1]}else{m=(y=d.length/2-1)-2;var y,x=y+2;e=d[y]-d[m],r=d[y+1]-d[m+1]}else if(c||h||p){var b,_,w,k;d=s.allpts;if(s.ctrlpts.length/2%2==0){var T=2+(M=2+(A=d.length/2-1));b=le(d[A],d[M],d[T],0),_=le(d[A+1],d[M+1],d[T+1],0),w=le(d[A],d[M],d[T],1e-4),k=le(d[A+1],d[M+1],d[T+1],1e-4)}else{var M,A;T=2+(M=d.length/2-1),b=le(d[A=M-2],d[M],d[T],.4999),_=le(d[A+1],d[M+1],d[T+1],.4999),w=le(d[A],d[M],d[T],.5),k=le(d[A+1],d[M+1],d[T+1],.5)}e=w-b,r=k-_}if(s.midtgtArrowAngle=re(e,r),s.midDispX=e,s.midDispY=r,e*=-1,r*=-1,f&&((d=s.allpts).length/2%2==0||(e=-(d[x=2+(y=d.length/2-1)]-d[y]),r=-(d[x+1]-d[y+1]))),s.midsrcArrowAngle=re(e,r),f)e=a-s.segpts[s.segpts.length-2],r=o-s.segpts[s.segpts.length-1];else if(c||h||p||u){var S=(d=s.allpts).length;e=a-le(d[S-6],d[S-4],d[S-2],.9),r=o-le(d[S-5],d[S-3],d[S-1],.9)}else e=a-g,r=o-v;s.tgtArrowAngle=re(e,r)}};So.getArrowWidth=So.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+\", \"+e];return n||(n=Math.max(Math.pow(13.37*t,.9),29)*e,r[t+\", \"+e]=n,n)};var Eo={};function Co(t){var e=[];if(null!=t){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];e.push({x:n,y:i})}return e}}Eo.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,i=n.rscratch;if(!i.haystack){var a=2*Math.random()*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=2*Math.random()*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)}}var o=n.source,s=n.target,l=o.position(),u=s.position(),c=o.width(),f=s.width(),h=o.height(),p=s.height(),d=r.pstyle(\"haystack-radius\").value/2;i.haystackPts=i.allpts=[i.source.x*c*d+l.x,i.source.y*h*d+l.y,i.target.x*f*d+u.x,i.target.y*p*d+u.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType=\"haystack\",i.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},Eo.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=e.posPts,i=e.intersectionPts,a=e.vectorNormInverse,o=t.pstyle(\"edge-distances\").value,s=t.pstyle(\"segment-weights\"),l=t.pstyle(\"segment-distances\"),u=Math.min(s.pfValue.length,l.pfValue.length);r.edgeType=\"segments\",r.segpts=[];for(var c=0;c<u;c++){var f=s.pfValue[c],h=l.pfValue[c],p=1-f,d=f,g=\"node-position\"===o?n:i,v={x:g.x1*p+g.x2*d,y:g.y1*p+g.y2*d};r.segpts.push(v.x+a.x*h,v.y+a.y*h)}},Eo.findLoopPoints=function(t,e,r,n){var i=t._private.rscratch,a=e.dirCounts,o=e.srcPos,s=t.pstyle(\"control-point-distances\"),l=s?s.pfValue[0]:void 0,u=t.pstyle(\"loop-direction\").pfValue,c=t.pstyle(\"loop-sweep\").pfValue,f=t.pstyle(\"control-point-step-size\").pfValue;i.edgeType=\"self\";var h=r,p=f;n&&(h=0,p=l);var d=u-Math.PI/2,g=d-c/2,v=d+c/2,m=String(u+\"_\"+c);h=void 0===a[m]?a[m]=0:++a[m],i.ctrlpts=[o.x+1.4*Math.cos(g)*p*(h/3+1),o.y+1.4*Math.sin(g)*p*(h/3+1),o.x+1.4*Math.cos(v)*p*(h/3+1),o.y+1.4*Math.sin(v)*p*(h/3+1)]},Eo.findCompoundLoopPoints=function(t,e,r,n){var i=t._private.rscratch;i.edgeType=\"compound\";var a=e.srcPos,o=e.tgtPos,s=e.srcW,l=e.srcH,u=e.tgtW,c=e.tgtH,f=t.pstyle(\"control-point-step-size\").pfValue,h=t.pstyle(\"control-point-distances\"),p=h?h.pfValue[0]:void 0,d=r,g=f;n&&(d=0,g=p);var v={x:a.x-s/2,y:a.y-l/2},m={x:o.x-u/2,y:o.y-c/2},y={x:Math.min(v.x,m.x),y:Math.min(v.y,m.y)},x=Math.max(.5,Math.log(.01*s)),b=Math.max(.5,Math.log(.01*u));i.ctrlpts=[y.x,y.y-(1+Math.pow(50,1.12)/100)*g*(d/3+1)*x,y.x-(1+Math.pow(50,1.12)/100)*g*(d/3+1)*b,y.y]},Eo.findStraightEdgePoints=function(t){t._private.rscratch.edgeType=\"straight\"},Eo.findBezierPoints=function(t,e,r,n,i){var a=t._private.rscratch,o=e.vectorNormInverse,s=e.posPts,l=e.intersectionPts,u=t.pstyle(\"edge-distances\").value,c=t.pstyle(\"control-point-step-size\").pfValue,f=t.pstyle(\"control-point-distances\"),h=t.pstyle(\"control-point-weights\"),p=f&&h?Math.min(f.value.length,h.value.length):1,d=f?f.pfValue[0]:void 0,g=h.value[0],v=n;a.edgeType=v?\"multibezier\":\"bezier\",a.ctrlpts=[];for(var m=0;m<p;m++){var y,x=(.5-e.eles.length/2+r)*c*(i?-1:1),b=ie(x);v&&(d=f?f.pfValue[m]:c,g=h.value[m]);var _=void 0!==(y=n?d:void 0!==d?b*d:void 0)?y:x,w=1-g,k=g,T=\"node-position\"===u?s:l,M={x:T.x1*w+T.x2*k,y:T.y1*w+T.y2*k};a.ctrlpts.push(M.x+o.x*_,M.y+o.y*_)}},Eo.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType=\"segments\";var n=\"vertical\",i=\"horizontal\",a=\"leftward\",o=\"rightward\",s=\"downward\",l=\"upward\",u=e.posPts,c=e.srcW,f=e.srcH,h=e.tgtW,p=e.tgtH,d=\"node-position\"!==t.pstyle(\"edge-distances\").value,g=t.pstyle(\"taxi-direction\").value,v=g,m=t.pstyle(\"taxi-turn\"),y=\"%\"===m.units,x=m.pfValue,b=x<0,_=t.pstyle(\"taxi-turn-min-distance\").pfValue,w=d?(c+h)/2:0,k=d?(f+p)/2:0,T=u.x2-u.x1,M=u.y2-u.y1,A=function(t,e){return t>0?Math.max(t-e,0):Math.min(t+e,0)},S=A(T,w),E=A(M,k),C=!1;\"auto\"===v?g=Math.abs(S)>Math.abs(E)?i:n:v===l||v===s?(g=n,C=!0):v!==a&&v!==o||(g=i,C=!0);var L,P=g===n,O=P?E:S,I=P?M:T,D=ie(I),z=!1;C&&(y||b)||!(v===s&&I<0||v===l&&I>0||v===a&&I>0||v===o&&I<0)||(O=(D*=-1)*Math.abs(O),z=!0);var R=function(t){return Math.abs(t)<_||Math.abs(t)>=Math.abs(O)},F=R(L=y?(x<0?1+x:x)*O:(x<0?O:0)+x*D),N=R(Math.abs(O)-Math.abs(L));if(!F&&!N||z)if(P){var B=u.y1+L+(d?f/2*D:0),j=u.x1,U=u.x2;r.segpts=[j,B,U,B]}else{var V=u.x1+L+(d?c/2*D:0),H=u.y1,q=u.y2;r.segpts=[V,H,V,q]}else if(P){var G=Math.abs(I)<=f/2,Y=Math.abs(T)<=h/2;if(G){var W=(u.x1+u.x2)/2,X=u.y1,Z=u.y2;r.segpts=[W,X,W,Z]}else if(Y){var K=(u.y1+u.y2)/2,J=u.x1,$=u.x2;r.segpts=[J,K,$,K]}else r.segpts=[u.x1,u.y2]}else{var Q=Math.abs(I)<=c/2,tt=Math.abs(M)<=p/2;if(Q){var et=(u.y1+u.y2)/2,rt=u.x1,nt=u.x2;r.segpts=[rt,et,nt,et]}else if(tt){var it=(u.x1+u.x2)/2,at=u.y1,ot=u.y2;r.segpts=[it,at,it,ot]}else r.segpts=[u.x2,u.y1]}},Eo.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(\"bezier\"===r.edgeType){var n=e.srcPos,i=e.tgtPos,a=e.srcW,o=e.srcH,s=e.tgtW,l=e.tgtH,u=e.srcShape,c=e.tgtShape,f=!O(r.startX)||!O(r.startY),h=!O(r.arrowStartX)||!O(r.arrowStartY),p=!O(r.endX)||!O(r.endY),d=!O(r.arrowEndX)||!O(r.arrowEndY),g=this.getArrowWidth(t.pstyle(\"width\").pfValue,t.pstyle(\"arrow-scale\").value)*this.arrowShapeWidth*3,v=ae({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),m=v<g,y=ae({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),x=y<g,b=!1;if(f||h||m){b=!0;var _={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},w=Math.sqrt(_.x*_.x+_.y*_.y),k={x:_.x/w,y:_.y/w},T=Math.max(a,o),M={x:r.ctrlpts[0]+2*k.x*T,y:r.ctrlpts[1]+2*k.y*T},A=u.intersectLine(n.x,n.y,a,o,M.x,M.y,0);m?(r.ctrlpts[0]=r.ctrlpts[0]+k.x*(g-v),r.ctrlpts[1]=r.ctrlpts[1]+k.y*(g-v)):(r.ctrlpts[0]=A[0]+k.x*g,r.ctrlpts[1]=A[1]+k.y*g)}if(p||d||x){b=!0;var S={x:r.ctrlpts[0]-i.x,y:r.ctrlpts[1]-i.y},E=Math.sqrt(S.x*S.x+S.y*S.y),C={x:S.x/E,y:S.y/E},L=Math.max(a,o),P={x:r.ctrlpts[0]+2*C.x*L,y:r.ctrlpts[1]+2*C.y*L},I=c.intersectLine(i.x,i.y,s,l,P.x,P.y,0);x?(r.ctrlpts[0]=r.ctrlpts[0]+C.x*(g-y),r.ctrlpts[1]=r.ctrlpts[1]+C.y*(g-y)):(r.ctrlpts[0]=I[0]+C.x*g,r.ctrlpts[1]=I[1]+C.y*g)}b&&this.findEndpoints(t)}},Eo.storeAllpts=function(t){var e=t._private.rscratch;if(\"multibezier\"===e.edgeType||\"bezier\"===e.edgeType||\"self\"===e.edgeType||\"compound\"===e.edgeType){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);var n;e.allpts.push(e.endX,e.endY),e.ctrlpts.length/2%2==0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,e.midX=le(e.allpts[n],e.allpts[n+2],e.allpts[n+4],.5),e.midY=le(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],.5))}else if(\"straight\"===e.edgeType)e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(\"segments\"===e.edgeType)if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.segpts.length%4==0){var i=e.segpts.length/2,a=i-2;e.midX=(e.segpts[a]+e.segpts[i])/2,e.midY=(e.segpts[a+1]+e.segpts[i+1])/2}else{var o=e.segpts.length/2-1;e.midX=e.segpts[o],e.midY=e.segpts[o+1]}},Eo.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||O(e.startX)&&O(e.startY)&&O(e.endX)&&O(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Tt(\"Edge `\"+t.id()+\"` has invalid endpoints and so it is impossible to draw.  Adjust your edge style (e.g. control points) accordingly or use an alternative edge type.  This is expected behaviour when the source node and the target node overlap.\"))},Eo.findEdgeControlPoints=function(t){var e=this;if(t&&0!==t.length){for(var r=this,n=r.cy.hasCompoundNodes(),i={map:new Dt,get:function(t){var e=this.map.get(t[0]);return null!=e?e.get(t[1]):null},set:function(t,e){var r=this.map.get(t[0]);null==r&&(r=new Dt,this.map.set(t[0],r)),r.set(t[1],e)}},a=[],o=[],s=0;s<t.length;s++){var l=t[s],u=l._private,c=l.pstyle(\"curve-style\").value;if(!l.removed()&&l.takesUpSpace())if(\"haystack\"!==c){var f=\"unbundled-bezier\"===c||\"segments\"===c||\"straight\"===c||\"straight-triangle\"===c||\"taxi\"===c,h=\"unbundled-bezier\"===c||\"bezier\"===c,p=u.source,d=u.target,g=[p.poolIndex(),d.poolIndex()].sort(),v=i.get(g);null==v&&(v={eles:[]},i.set(g,v),a.push(g)),v.eles.push(l),f&&(v.hasUnbundled=!0),h&&(v.hasBezier=!0)}else o.push(l)}for(var m=function(t){var o=a[t],s=i.get(o),l=void 0;if(!s.hasUnbundled){var u=s.eles[0].parallelEdges().filter((function(t){return t.isBundledBezier()}));Pt(s.eles),u.forEach((function(t){return s.eles.push(t)})),s.eles.sort((function(t,e){return t.poolIndex()-e.poolIndex()}))}var c=s.eles[0],f=c.source(),h=c.target();if(f.poolIndex()>h.poolIndex()){var p=f;f=h,h=p}var d=s.srcPos=f.position(),g=s.tgtPos=h.position(),v=s.srcW=f.outerWidth(),m=s.srcH=f.outerHeight(),y=s.tgtW=h.outerWidth(),x=s.tgtH=h.outerHeight(),b=s.srcShape=r.nodeShapes[e.getNodeShape(f)],_=s.tgtShape=r.nodeShapes[e.getNodeShape(h)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var w=0;w<s.eles.length;w++){var k=s.eles[w],T=k[0]._private.rscratch,M=k.pstyle(\"curve-style\").value,A=\"unbundled-bezier\"===M||\"segments\"===M||\"taxi\"===M,S=!f.same(k.source());if(!s.calculatedIntersection&&f!==h&&(s.hasBezier||s.hasUnbundled)){s.calculatedIntersection=!0;var E=b.intersectLine(d.x,d.y,v,m,g.x,g.y,0),C=s.srcIntn=E,L=_.intersectLine(g.x,g.y,y,x,d.x,d.y,0),P=s.tgtIntn=L,I=s.intersectionPts={x1:E[0],x2:L[0],y1:E[1],y2:L[1]},D=s.posPts={x1:d.x,x2:g.x,y1:d.y,y2:g.y},z=L[1]-E[1],R=L[0]-E[0],F=Math.sqrt(R*R+z*z),N=s.vector={x:R,y:z},B=s.vectorNorm={x:N.x/F,y:N.y/F},j={x:-B.y,y:B.x};s.nodesOverlap=!O(F)||_.checkPoint(E[0],E[1],0,y,x,g.x,g.y)||b.checkPoint(L[0],L[1],0,v,m,d.x,d.y),s.vectorNormInverse=j,l={nodesOverlap:s.nodesOverlap,dirCounts:s.dirCounts,calculatedIntersection:!0,hasBezier:s.hasBezier,hasUnbundled:s.hasUnbundled,eles:s.eles,srcPos:g,tgtPos:d,srcW:y,srcH:x,tgtW:v,tgtH:m,srcIntn:P,tgtIntn:C,srcShape:_,tgtShape:b,posPts:{x1:D.x2,y1:D.y2,x2:D.x1,y2:D.y1},intersectionPts:{x1:I.x2,y1:I.y2,x2:I.x1,y2:I.y1},vector:{x:-N.x,y:-N.y},vectorNorm:{x:-B.x,y:-B.y},vectorNormInverse:{x:-j.x,y:-j.y}}}var U=S?l:s;T.nodesOverlap=U.nodesOverlap,T.srcIntn=U.srcIntn,T.tgtIntn=U.tgtIntn,n&&(f.isParent()||f.isChild()||h.isParent()||h.isChild())&&(f.parents().anySame(h)||h.parents().anySame(f)||f.same(h)&&f.isParent())?e.findCompoundLoopPoints(k,U,w,A):f===h?e.findLoopPoints(k,U,w,A):\"segments\"===M?e.findSegmentsPoints(k,U):\"taxi\"===M?e.findTaxiPoints(k,U):\"straight\"===M||!A&&s.eles.length%2==1&&w===Math.floor(s.eles.length/2)?e.findStraightEdgePoints(k):e.findBezierPoints(k,U,w,A,S),e.findEndpoints(k),e.tryToCorrectInvalidPoints(k,U),e.checkForInvalidEdgeWarning(k),e.storeAllpts(k),e.storeEdgeProjections(k),e.calculateArrowAngles(k),e.recalculateEdgeLabelProjections(k),e.calculateLabelAngles(k)}},y=0;y<a.length;y++)m(y);this.findHaystackPoints(o)}},Eo.getSegmentPoints=function(t){var e=t[0]._private.rscratch;if(\"segments\"===e.edgeType)return this.recalculateRenderedStyle(t),Co(e.segpts)},Eo.getControlPoints=function(t){var e=t[0]._private.rscratch,r=e.edgeType;if(\"bezier\"===r||\"multibezier\"===r||\"self\"===r||\"compound\"===r)return this.recalculateRenderedStyle(t),Co(e.ctrlpts)},Eo.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var Lo={manualEndptToPx:function(t,e){var r=t.position(),n=t.outerWidth(),i=t.outerHeight();if(2===e.value.length){var a=[e.pfValue[0],e.pfValue[1]];return\"%\"===e.units[0]&&(a[0]=a[0]*n),\"%\"===e.units[1]&&(a[1]=a[1]*i),a[0]+=r.x,a[1]+=r.y,a}var o=e.pfValue[0];o=-Math.PI/2+o;var s=2*Math.max(n,i),l=[r.x+Math.cos(o)*s,r.y+Math.sin(o)*s];return this.nodeShapes[this.getNodeShape(t)].intersectLine(r.x,r.y,n,i,l[0],l[1],0)},findEndpoints:function(t){var e,r,n,i,a,o=this,s=t.source()[0],l=t.target()[0],u=s.position(),c=l.position(),f=t.pstyle(\"target-arrow-shape\").value,h=t.pstyle(\"source-arrow-shape\").value,p=t.pstyle(\"target-distance-from-node\").pfValue,d=t.pstyle(\"source-distance-from-node\").pfValue,g=t.pstyle(\"curve-style\").value,v=t._private.rscratch,m=v.edgeType,y=\"self\"===m||\"compound\"===m,x=\"bezier\"===m||\"multibezier\"===m||y,b=\"bezier\"!==m,_=\"straight\"===m||\"segments\"===m,w=\"segments\"===m,k=x||b||_,T=y||\"taxi\"===g,M=t.pstyle(\"source-endpoint\"),A=T?\"outside-to-node\":M.value,S=t.pstyle(\"target-endpoint\"),E=T?\"outside-to-node\":S.value;if(v.srcManEndpt=M,v.tgtManEndpt=S,x){var C=[v.ctrlpts[0],v.ctrlpts[1]];r=b?[v.ctrlpts[v.ctrlpts.length-2],v.ctrlpts[v.ctrlpts.length-1]]:C,n=C}else if(_){var L=w?v.segpts.slice(0,2):[c.x,c.y];r=w?v.segpts.slice(v.segpts.length-2):[u.x,u.y],n=L}if(\"inside-to-node\"===E)e=[c.x,c.y];else if(S.units)e=this.manualEndptToPx(l,S);else if(\"outside-to-line\"===E)e=v.tgtIntn;else if(\"outside-to-node\"===E||\"outside-to-node-or-label\"===E?i=r:\"outside-to-line\"!==E&&\"outside-to-line-or-label\"!==E||(i=[u.x,u.y]),e=o.nodeShapes[this.getNodeShape(l)].intersectLine(c.x,c.y,l.outerWidth(),l.outerHeight(),i[0],i[1],0),\"outside-to-node-or-label\"===E||\"outside-to-line-or-label\"===E){var P=l._private.rscratch,I=P.labelWidth,D=P.labelHeight,z=P.labelX,R=P.labelY,F=I/2,N=D/2,B=l.pstyle(\"text-valign\").value;\"top\"===B?R-=N:\"bottom\"===B&&(R+=N);var j=l.pstyle(\"text-halign\").value;\"left\"===j?z-=F:\"right\"===j&&(z+=F);var U=Oe(i[0],i[1],[z-F,R-N,z+F,R-N,z+F,R+N,z-F,R+N],c.x,c.y);if(U.length>0){var V=u,H=oe(V,ee(e)),q=oe(V,ee(U)),G=H;q<H&&(e=U,G=q),U.length>2&&oe(V,{x:U[2],y:U[3]})<G&&(e=[U[2],U[3]])}}var Y=Ie(e,r,o.arrowShapes[f].spacing(t)+p),W=Ie(e,r,o.arrowShapes[f].gap(t)+p);if(v.endX=W[0],v.endY=W[1],v.arrowEndX=Y[0],v.arrowEndY=Y[1],\"inside-to-node\"===A)e=[u.x,u.y];else if(M.units)e=this.manualEndptToPx(s,M);else if(\"outside-to-line\"===A)e=v.srcIntn;else if(\"outside-to-node\"===A||\"outside-to-node-or-label\"===A?a=n:\"outside-to-line\"!==A&&\"outside-to-line-or-label\"!==A||(a=[c.x,c.y]),e=o.nodeShapes[this.getNodeShape(s)].intersectLine(u.x,u.y,s.outerWidth(),s.outerHeight(),a[0],a[1],0),\"outside-to-node-or-label\"===A||\"outside-to-line-or-label\"===A){var X=s._private.rscratch,Z=X.labelWidth,K=X.labelHeight,J=X.labelX,$=X.labelY,Q=Z/2,tt=K/2,et=s.pstyle(\"text-valign\").value;\"top\"===et?$-=tt:\"bottom\"===et&&($+=tt);var rt=s.pstyle(\"text-halign\").value;\"left\"===rt?J-=Q:\"right\"===rt&&(J+=Q);var nt=Oe(a[0],a[1],[J-Q,$-tt,J+Q,$-tt,J+Q,$+tt,J-Q,$+tt],u.x,u.y);if(nt.length>0){var it=c,at=oe(it,ee(e)),ot=oe(it,ee(nt)),st=at;ot<at&&(e=[nt[0],nt[1]],st=ot),nt.length>2&&oe(it,{x:nt[2],y:nt[3]})<st&&(e=[nt[2],nt[3]])}}var lt=Ie(e,n,o.arrowShapes[h].spacing(t)+d),ut=Ie(e,n,o.arrowShapes[h].gap(t)+d);v.startX=ut[0],v.startY=ut[1],v.arrowStartX=lt[0],v.arrowStartY=lt[1],k&&(O(v.startX)&&O(v.startY)&&O(v.endX)&&O(v.endY)?v.badLine=!1:v.badLine=!0)},getSourceEndpoint:function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),\"haystack\"===e.edgeType?{x:e.haystackPts[0],y:e.haystackPts[1]}:{x:e.arrowStartX,y:e.arrowStartY}},getTargetEndpoint:function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),\"haystack\"===e.edgeType?{x:e.haystackPts[2],y:e.haystackPts[3]}:{x:e.arrowEndX,y:e.arrowEndY}}},Po={};function Oo(t,e,r){for(var n=function(t,e,r,n){return le(t,e,r,n)},i=e._private.rstyle.bezierPts,a=0;a<t.bezierProjPcts.length;a++){var o=t.bezierProjPcts[a];i.push({x:n(r[0],r[2],r[4],o),y:n(r[1],r[3],r[5],o)})}}Po.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,\"multibezier\"===n||\"bezier\"===n||\"self\"===n||\"compound\"===n){e.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)Oo(this,t,r.allpts.slice(i,i+6))}else if(\"segments\"===n){var a=e.rstyle.linePts=[];for(i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]})}else if(\"haystack\"===n){var o=r.haystackPts;e.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle(\"width\").pfValue,t.pstyle(\"arrow-scale\").value)*this.arrowShapeWidth},Po.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var Io={recalculateNodeLabelProjection:function(t){var e=t.pstyle(\"label\").strValue;if(!B(e)){var r,n,i=t._private,a=t.width(),o=t.height(),s=t.padding(),l=t.position(),u=t.pstyle(\"text-halign\").strValue,c=t.pstyle(\"text-valign\").strValue,f=i.rscratch,h=i.rstyle;switch(u){case\"left\":r=l.x-a/2-s;break;case\"right\":r=l.x+a/2+s;break;default:r=l.x}switch(c){case\"top\":n=l.y-o/2-s;break;case\"bottom\":n=l.y+o/2+s;break;default:n=l.y}f.labelX=r,f.labelY=n,h.labelX=r,h.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}}},Do=function(t,e){var r=Math.atan(e/t);return 0===t&&r<0&&(r*=-1),r},zo=function(t,e){var r=e.x-t.x,n=e.y-t.y;return Do(r,n)};Io.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,i=this,a={mid:t.pstyle(\"label\").strValue,source:t.pstyle(\"source-label\").strValue,target:t.pstyle(\"target-label\").strValue};if(a.mid||a.source||a.target){e={x:n.midX,y:n.midY};var o=function(t,e,n){It(r.rscratch,t,e,n),It(r.rstyle,t,e,n)};o(\"labelX\",null,e.x),o(\"labelY\",null,e.y);var s=Do(n.midDispX,n.midDispY);o(\"labelAutoAngle\",null,s);var l=function t(){if(t.cache)return t.cache;for(var e=[],a=0;a+5<n.allpts.length;a+=4){var o={x:n.allpts[a],y:n.allpts[a+1]},s={x:n.allpts[a+2],y:n.allpts[a+3]},l={x:n.allpts[a+4],y:n.allpts[a+5]};e.push({p0:o,p1:s,p2:l,startDist:0,length:0,segments:[]})}var u=r.rstyle.bezierPts,c=i.bezierProjPcts.length;function f(t,e,r,n,i){var a=ae(e,r),o=t.segments[t.segments.length-1],s={p0:e,p1:r,t0:n,t1:i,startDist:o?o.startDist+o.length:0,length:a};t.segments.push(s),t.length+=a}for(var h=0;h<e.length;h++){var p=e[h],d=e[h-1];d&&(p.startDist=d.startDist+d.length),f(p,p.p0,u[h*c],0,i.bezierProjPcts[0]);for(var g=0;g<c-1;g++)f(p,u[h*c+g],u[h*c+g+1],i.bezierProjPcts[g],i.bezierProjPcts[g+1]);f(p,u[h*c+c-1],p.p2,i.bezierProjPcts[c-1],1)}return t.cache=e},u=function(r){var i,s=\"source\"===r;if(a[r]){var u=t.pstyle(r+\"-text-offset\").pfValue;switch(n.edgeType){case\"self\":case\"compound\":case\"bezier\":case\"multibezier\":for(var c,f=l(),h=0,p=0,d=0;d<f.length;d++){for(var g=f[s?d:f.length-1-d],v=0;v<g.segments.length;v++){var m=g.segments[s?v:g.segments.length-1-v],y=d===f.length-1&&v===g.segments.length-1;if(h=p,(p+=m.length)>=u||y){c={cp:g,segment:m};break}}if(c)break}var x=c.cp,b=c.segment,_=(u-h)/b.length,w=b.t1-b.t0,k=s?b.t0+w*_:b.t1-w*_;k=ce(0,k,1),e=ue(x.p0,x.p1,x.p2,k),i=function(t,e,r,n){var i=ce(0,n-.001,1),a=ce(0,n+.001,1),o=ue(t,e,r,i),s=ue(t,e,r,a);return zo(o,s)}(x.p0,x.p1,x.p2,k);break;case\"straight\":case\"segments\":case\"haystack\":for(var T,M,A,S,E=0,C=n.allpts.length,L=0;L+3<C&&(s?(A={x:n.allpts[L],y:n.allpts[L+1]},S={x:n.allpts[L+2],y:n.allpts[L+3]}):(A={x:n.allpts[C-2-L],y:n.allpts[C-1-L]},S={x:n.allpts[C-4-L],y:n.allpts[C-3-L]}),M=E,!((E+=T=ae(A,S))>=u));L+=2);var P=(u-M)/T;P=ce(0,P,1),e=function(t,e,r,n){var i=e.x-t.x,a=e.y-t.y,o=ae(t,e),s=i/o,l=a/o;return r=null==r?0:r,n=null!=n?n:r*o,{x:t.x+s*n,y:t.y+l*n}}(A,S,P),i=zo(A,S)}o(\"labelX\",r,e.x),o(\"labelY\",r,e.y),o(\"labelAutoAngle\",r,i)}};u(\"source\"),u(\"target\"),this.applyLabelDimensions(t)}},Io.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,\"source\"),this.applyPrefixedLabelDimensions(t,\"target\"))},Io.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,n),a=t.pstyle(\"line-height\").pfValue,o=t.pstyle(\"text-wrap\").strValue,s=Ot(r.rscratch,\"labelWrapCachedLines\",e)||[],l=\"wrap\"!==o?1:Math.max(s.length,1),u=i.height/l,c=u*a,f=i.width,h=i.height+(l-1)*(a-1)*u;It(r.rstyle,\"labelWidth\",e,f),It(r.rscratch,\"labelWidth\",e,f),It(r.rstyle,\"labelHeight\",e,h),It(r.rscratch,\"labelHeight\",e,h),It(r.rscratch,\"labelLineHeight\",e,c)},Io.getLabelText=function(t,e){var r=t._private,n=e?e+\"-\":\"\",i=t.pstyle(n+\"label\").strValue,a=t.pstyle(\"text-transform\").value,o=function(t,n){return n?(It(r.rscratch,t,e,n),n):Ot(r.rscratch,t,e)};if(!i)return\"\";\"none\"==a||(\"uppercase\"==a?i=i.toUpperCase():\"lowercase\"==a&&(i=i.toLowerCase()));var s=t.pstyle(\"text-wrap\").value;if(\"wrap\"===s){var l=o(\"labelKey\");if(null!=l&&o(\"labelWrapKey\")===l)return o(\"labelWrapCachedText\");for(var u=i.split(\"\\n\"),c=t.pstyle(\"text-max-width\").pfValue,f=\"anywhere\"===t.pstyle(\"text-overflow-wrap\").value,h=[],p=/[\\s\\u200b]+/,d=f?\"\":\" \",g=0;g<u.length;g++){var v=u[g],m=this.calculateLabelDimensions(t,v).width;if(f){var y=v.split(\"\").join(\"​\");v=y}if(m>c){for(var x=v.split(p),b=\"\",_=0;_<x.length;_++){var w=x[_],k=0===b.length?w:b+d+w;this.calculateLabelDimensions(t,k).width<=c?b+=w+d:(b&&h.push(b),b=w+d)}b.match(/^[\\s\\u200b]+$/)||h.push(b)}else h.push(v)}o(\"labelWrapCachedLines\",h),i=o(\"labelWrapCachedText\",h.join(\"\\n\")),o(\"labelWrapKey\",l)}else if(\"ellipsis\"===s){var T=t.pstyle(\"text-max-width\").pfValue,M=\"\",A=!1;if(this.calculateLabelDimensions(t,i).width<T)return i;for(var S=0;S<i.length&&!(this.calculateLabelDimensions(t,M+i[S]+\"…\").width>T);S++)M+=i[S],S===i.length-1&&(A=!0);return A||(M+=\"…\"),M}return i},Io.getLabelJustification=function(t){var e=t.pstyle(\"text-justification\").strValue,r=t.pstyle(\"text-halign\").strValue;if(\"auto\"!==e)return e;if(!t.isNode())return\"center\";switch(r){case\"left\":return\"right\";case\"right\":return\"left\";default:return\"center\"}},Io.calculateLabelDimensions=function(t,e){var r=ft(e,t._private.labelDimsKey),n=this.labelDimCache||(this.labelDimCache=[]),i=n[r];if(null!=i)return i;var a=t.pstyle(\"font-style\").strValue,o=t.pstyle(\"font-size\").pfValue,s=t.pstyle(\"font-family\").strValue,l=t.pstyle(\"font-weight\").strValue,u=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=document.createElement(\"canvas\"),c=this.labelCalcCanvasContext=u.getContext(\"2d\");var f=u.style;f.position=\"absolute\",f.left=\"-9999px\",f.top=\"-9999px\",f.zIndex=\"-1\",f.visibility=\"hidden\",f.pointerEvents=\"none\"}c.font=\"\".concat(a,\" \").concat(l,\" \").concat(o,\"px \").concat(s);for(var h=0,p=0,d=e.split(\"\\n\"),g=0;g<d.length;g++){var v=d[g],m=c.measureText(v),y=Math.ceil(m.width),x=o;h=Math.max(y,h),p+=x}return h+=0,p+=0,n[r]={width:h,height:p}},Io.calculateLabelAngle=function(t,e){var r=t._private.rscratch,n=t.isEdge(),i=e?e+\"-\":\"\",a=t.pstyle(i+\"text-rotation\"),o=a.strValue;return\"none\"===o?0:n&&\"autorotate\"===o?r.labelAutoAngle:\"autorotate\"===o?0:a.pfValue},Io.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private.rscratch;n.labelAngle=e.calculateLabelAngle(t),r&&(n.sourceLabelAngle=e.calculateLabelAngle(t,\"source\"),n.targetLabelAngle=e.calculateLabelAngle(t,\"target\"))};var Ro={},Fo=!1;Ro.getNodeShape=function(t){var e=t.pstyle(\"shape\").value;if(\"cutrectangle\"===e&&(t.width()<28||t.height()<28))return Fo||(Tt(\"The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead\"),Fo=!0),\"rectangle\";if(t.isParent())return\"rectangle\"===e||\"roundrectangle\"===e||\"round-rectangle\"===e||\"cutrectangle\"===e||\"cut-rectangle\"===e||\"barrel\"===e?e:\"rectangle\";if(\"polygon\"===e){var r=t.pstyle(\"shape-polygon-points\").value;return this.nodeShapes.makePolygon(r).name}return e};var No={updateCachedGrabbedEles:function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=(i=t[r])._private.rscratch;i.grabbed()&&!i.isParent()?e.push(i):n.inDragLayer?t.drag.push(i):t.nondrag.push(i)}for(r=0;r<e.length;r++){var i=e[r];t.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(Ai),e.interactive=e.filter((function(t){return t.interactive()})),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e}},Bo={};[Ao,So,Eo,Lo,Po,Io,Ro,{registerCalculationListeners:function(){var t=this.cy,e=t.collection(),r=this,n=function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),r)for(var n=0;n<t.length;n++){var i=t[n],a=i._private,o=a.rstyle;o.clean=!1,o.cleanConnected=!1}};r.binder(t).on(\"bounds.* dirty.*\",(function(t){var e=t.target;n(e)})).on(\"style.* background.*\",(function(t){var e=t.target;n(e,!1)}));var i=function(i){if(i){var a=r.onUpdateEleCalcsFns;e.cleanStyle();for(var o=0;o<e.length;o++){var s=e[o],l=s._private.rstyle;s.isNode()&&!l.cleanConnected&&(n(s.connectedEdges()),l.cleanConnected=!0)}if(a)for(var u=0;u<a.length;u++)(0,a[u])(i,e);r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){i(!0)},r.beforeRender(i,r.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(t){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(t)},recalculateRenderedStyle:function(t,e){var r=function(t){return t._private.rstyle.cleanConnected},n=[],i=[];if(!this.destroyed){void 0===e&&(e=!0);for(var a=0;a<t.length;a++){var o=t[a],s=o._private,l=s.rstyle;!o.isEdge()||r(o.source())&&r(o.target())||(l.clean=!1),e&&l.clean||o.removed()||\"none\"!==o.pstyle(\"display\").value&&(\"nodes\"===s.group?i.push(o):n.push(o),l.clean=!0)}for(var u=0;u<i.length;u++){var c=i[u],f=c._private.rstyle,h=c.position();this.recalculateNodeLabelProjection(c),f.nodeX=h.x,f.nodeY=h.y,f.nodeW=c.pstyle(\"width\").pfValue,f.nodeH=c.pstyle(\"height\").pfValue}this.recalculateEdgeProjections(n);for(var p=0;p<n.length;p++){var d=n[p]._private,g=d.rstyle,v=d.rscratch;g.srcX=v.arrowStartX,g.srcY=v.arrowStartY,g.tgtX=v.arrowEndX,g.tgtY=v.arrowEndY,g.midX=v.midX,g.midY=v.midY,g.labelAngle=v.labelAngle,g.sourceLabelAngle=v.sourceLabelAngle,g.targetLabelAngle=v.targetLabelAngle}}}},No].forEach((function(t){X(Bo,t)}));var jo={getCachedImage:function(t,e,r){var n=this.imageCache=this.imageCache||{},i=n[t];if(i)return i.image.complete||i.image.addEventListener(\"load\",r),i.image;var a=(i=n[t]=n[t]||{}).image=new Image;a.addEventListener(\"load\",r),a.addEventListener(\"error\",(function(){a.error=!0}));var o=\"data:\";return t.substring(0,o.length).toLowerCase()===o||(a.crossOrigin=e),a.src=t,a}},Uo={registerBinding:function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]),a=this.binder(t);return a.on.apply(a,i)},binder:function(t){var e=this,r=t===window||t===document||t===document.body||\"undefined\"!=typeof HTMLElement&&t instanceof HTMLElement;if(null==e.supportsPassiveEvents){var n=!1;try{var i=Object.defineProperty({},\"passive\",{get:function(){return n=!0,!0}});window.addEventListener(\"test\",null,i)}catch(t){}e.supportsPassiveEvents=n}var a=function(n,i,a){var o=Array.prototype.slice.call(arguments);return r&&e.supportsPassiveEvents&&(o[2]={capture:null!=a&&a,passive:!1,once:!1}),e.bindings.push({target:t,args:o}),(t.addEventListener||t.on).apply(t,o),this};return{on:a,addEventListener:a,addListener:a,bind:a}},nodeIsDraggable:function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},nodeIsGrabbable:function(t){return this.nodeIsDraggable(t)&&t.interactive()}};Uo.load=function(){var t=this,e=function(t){return t.selected()},r=function(e,r,n,i){null==e&&(e=t.cy);for(var a=0;a<r.length;a++){var o=r[a];e.emit({originalEvent:n,type:o,position:i})}},n=function(t){return t.shiftKey||t.metaKey||t.ctrlKey},i=function(e,r){var n=!0;if(t.cy.hasCompoundNodes()&&e&&e.pannable()){for(var i=0;r&&i<r.length;i++)if((e=r[i]).isNode()&&e.isParent()&&!e.pannable()){n=!1;break}}else n=!0;return n},a=function(t){t[0]._private.rscratch.inDragLayer=!0},o=function(t){t[0]._private.rscratch.isGrabTarget=!0},s=function(t,e){var r=e.addToList;r.has(t)||!t.grabbable()||t.locked()||(r.merge(t),function(t){t[0]._private.grabbed=!0}(t))},l=function(e,r){r=r||{};var n=e.cy().hasCompoundNodes();r.inDragLayer&&(e.forEach(a),e.neighborhood().stdFilter((function(t){return!n||t.isEdge()})).forEach(a)),r.addToList&&e.forEach((function(t){s(t,r)})),function(t,e){if(t.cy().hasCompoundNodes()&&(null!=e.inDragLayer||null!=e.addToList)){var r=t.descendants();e.inDragLayer&&(r.forEach(a),r.connectedEdges().forEach(a)),e.addToList&&s(r,e)}}(e,r),h(e,{inDragLayer:r.inDragLayer}),t.updateCachedGrabbedEles()},c=l,f=function(e){e&&(t.getCachedZSortedEles().forEach((function(t){!function(t){t[0]._private.grabbed=!1}(t),function(t){t[0]._private.rscratch.inDragLayer=!1}(t),function(t){t[0]._private.rscratch.isGrabTarget=!1}(t)})),t.updateCachedGrabbedEles())},h=function(t,e){if((null!=e.inDragLayer||null!=e.addToList)&&t.cy().hasCompoundNodes()){var r=t.ancestors().orphans();if(!r.same(t)){var n=r.descendants().spawnSelf().merge(r).unmerge(t).unmerge(t.descendants()),i=n.connectedEdges();e.inDragLayer&&(i.forEach(a),n.forEach(a)),e.addToList&&n.forEach((function(t){s(t,e)}))}}},p=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},d=\"undefined\"!=typeof MutationObserver,g=\"undefined\"!=typeof ResizeObserver;d?(t.removeObserver=new MutationObserver((function(e){for(var r=0;r<e.length;r++){var n=e[r].removedNodes;if(n)for(var i=0;i<n.length;i++)if(n[i]===t.container){t.destroy();break}}})),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,\"DOMNodeRemoved\",(function(e){t.destroy()}));var v=u.default((function(){t.cy.resize()}),100);d&&(t.styleObserver=new MutationObserver(v),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(window,\"resize\",v),g&&(t.resizeObserver=new ResizeObserver(v),t.resizeObserver.observe(t.container));var m=function(){t.invalidateContainerClientCoordsCache()};!function(t,e){for(;null!=t;)e(t),t=t.parentNode}(t.container,(function(e){t.registerBinding(e,\"transitionend\",m),t.registerBinding(e,\"animationend\",m),t.registerBinding(e,\"scroll\",m)})),t.registerBinding(t.container,\"contextmenu\",(function(t){t.preventDefault()}));var y,x,b,_=function(e){for(var r=t.findContainerClientCoords(),n=r[0],i=r[1],a=r[2],o=r[3],s=e.touches?e.touches:[e],l=!1,u=0;u<s.length;u++){var c=s[u];if(n<=c.clientX&&c.clientX<=n+a&&i<=c.clientY&&c.clientY<=i+o){l=!0;break}}if(!l)return!1;for(var f=t.container,h=e.target.parentNode,p=!1;h;){if(h===f){p=!0;break}h=h.parentNode}return!!p};t.registerBinding(t.container,\"mousedown\",(function(e){if(_(e)){e.preventDefault(),p(),t.hoverData.capture=!0,t.hoverData.which=e.which;var n=t.cy,i=[e.clientX,e.clientY],a=t.projectIntoViewport(i[0],i[1]),s=t.selection,u=t.findNearestElements(a[0],a[1],!0,!1),f=u[0],h=t.dragData.possibleDragElements;if(t.hoverData.mdownPos=a,t.hoverData.mdownGPos=i,3==e.which){t.hoverData.cxtStarted=!0;var d={originalEvent:e,type:\"cxttapstart\",position:{x:a[0],y:a[1]}};f?(f.activate(),f.emit(d),t.hoverData.down=f):n.emit(d),t.hoverData.downTime=(new Date).getTime(),t.hoverData.cxtDragged=!1}else if(1==e.which){if(f&&f.activate(),null!=f&&t.nodeIsGrabbable(f)){var g=function(t){return{originalEvent:e,type:t,position:{x:a[0],y:a[1]}}};if(o(f),f.selected()){h=t.dragData.possibleDragElements=n.collection();var v=n.$((function(e){return e.isNode()&&e.selected()&&t.nodeIsGrabbable(e)}));l(v,{addToList:h}),f.emit(g(\"grabon\")),v.forEach((function(t){t.emit(g(\"grab\"))}))}else h=t.dragData.possibleDragElements=n.collection(),c(f,{addToList:h}),f.emit(g(\"grabon\")).emit(g(\"grab\"));t.redrawHint(\"eles\",!0),t.redrawHint(\"drag\",!0)}t.hoverData.down=f,t.hoverData.downs=u,t.hoverData.downTime=(new Date).getTime(),r(f,[\"mousedown\",\"tapstart\",\"vmousedown\"],e,{x:a[0],y:a[1]}),null==f?(s[4]=1,t.data.bgActivePosistion={x:a[0],y:a[1]},t.redrawHint(\"select\",!0),t.redraw()):f.pannable()&&(s[4]=1),t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout((function(){if(!t.hoverData.tapholdCancelled){var r=t.hoverData.down;r?r.emit({originalEvent:e,type:\"taphold\",position:{x:a[0],y:a[1]}}):n.emit({originalEvent:e,type:\"taphold\",position:{x:a[0],y:a[1]}})}}),t.tapholdDuration)}s[0]=s[2]=a[0],s[1]=s[3]=a[1]}}),!1),t.registerBinding(window,\"mousemove\",(function(e){if(t.hoverData.capture||_(e)){var a=!1,o=t.cy,s=o.zoom(),u=[e.clientX,e.clientY],c=t.projectIntoViewport(u[0],u[1]),h=t.hoverData.mdownPos,p=t.hoverData.mdownGPos,d=t.selection,g=null;t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.selecting||(g=t.findNearestElement(c[0],c[1],!0,!1));var v,m=t.hoverData.last,y=t.hoverData.down,x=[c[0]-d[2],c[1]-d[3]],b=t.dragData.possibleDragElements;if(p){var w=u[0]-p[0],k=w*w,T=u[1]-p[1],M=k+T*T;t.hoverData.isOverThresholdDrag=v=M>=t.desktopTapThreshold2}var A=n(e);v&&(t.hoverData.tapholdCancelled=!0),a=!0,r(g,[\"mousemove\",\"vmousemove\",\"tapdrag\"],e,{x:c[0],y:c[1]});var S=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||o.emit({originalEvent:e,type:\"boxstart\",position:{x:c[0],y:c[1]}}),d[4]=1,t.hoverData.selecting=!0,t.redrawHint(\"select\",!0),t.redraw()};if(3===t.hoverData.which){if(v){var E={originalEvent:e,type:\"cxtdrag\",position:{x:c[0],y:c[1]}};y?y.emit(E):o.emit(E),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&g===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:e,type:\"cxtdragout\",position:{x:c[0],y:c[1]}}),t.hoverData.cxtOver=g,g&&g.emit({originalEvent:e,type:\"cxtdragover\",position:{x:c[0],y:c[1]}}))}}else if(t.hoverData.dragging){if(a=!0,o.panningEnabled()&&o.userPanningEnabled()){var C;if(t.hoverData.justStartedPan){var L=t.hoverData.mdownPos;C={x:(c[0]-L[0])*s,y:(c[1]-L[1])*s},t.hoverData.justStartedPan=!1}else C={x:x[0]*s,y:x[1]*s};o.panBy(C),o.emit(\"dragpan\"),t.hoverData.dragged=!0}c=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=d[4]||null!=y&&!y.pannable()){if(y&&y.pannable()&&y.active()&&y.unactivate(),y&&y.grabbed()||g==m||(m&&r(m,[\"mouseout\",\"tapdragout\"],e,{x:c[0],y:c[1]}),g&&r(g,[\"mouseover\",\"tapdragover\"],e,{x:c[0],y:c[1]}),t.hoverData.last=g),y)if(v){if(o.boxSelectionEnabled()&&A)y&&y.grabbed()&&(f(b),y.emit(\"freeon\"),b.emit(\"free\"),t.dragData.didDrag&&(y.emit(\"dragfreeon\"),b.emit(\"dragfree\"))),S();else if(y&&y.grabbed()&&t.nodeIsDraggable(y)){var P=!t.dragData.didDrag;P&&t.redrawHint(\"eles\",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||l(b,{inDragLayer:!0});var I={x:0,y:0};if(O(x[0])&&O(x[1])&&(I.x+=x[0],I.y+=x[1],P)){var D=t.hoverData.dragDelta;D&&O(D[0])&&O(D[1])&&(I.x+=D[0],I.y+=D[1])}t.hoverData.draggingEles=!0,b.silentShift(I).emit(\"position drag\"),t.redrawHint(\"drag\",!0),t.redraw()}}else!function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];0===e.length?(e.push(x[0]),e.push(x[1])):(e[0]+=x[0],e[1]+=x[1])}();a=!0}else v&&(t.hoverData.dragging||!o.boxSelectionEnabled()||!A&&o.panningEnabled()&&o.userPanningEnabled()?!t.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()&&i(y,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,d[4]=0,t.data.bgActivePosistion=ee(h),t.redrawHint(\"select\",!0),t.redraw()):S(),y&&y.pannable()&&y.active()&&y.unactivate());return d[2]=c[0],d[3]=c[1],a?(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1):void 0}}),!1),t.registerBinding(window,\"mouseup\",(function(i){if(t.hoverData.capture){t.hoverData.capture=!1;var a=t.cy,o=t.projectIntoViewport(i.clientX,i.clientY),s=t.selection,l=t.findNearestElement(o[0],o[1],!0,!1),u=t.dragData.possibleDragElements,c=t.hoverData.down,h=n(i);if(t.data.bgActivePosistion&&(t.redrawHint(\"select\",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,c&&c.unactivate(),3===t.hoverData.which){var p={originalEvent:i,type:\"cxttapend\",position:{x:o[0],y:o[1]}};if(c?c.emit(p):a.emit(p),!t.hoverData.cxtDragged){var d={originalEvent:i,type:\"cxttap\",position:{x:o[0],y:o[1]}};c?c.emit(d):a.emit(d)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(1===t.hoverData.which){if(r(l,[\"mouseup\",\"tapend\",\"vmouseup\"],i,{x:o[0],y:o[1]}),t.dragData.didDrag||t.hoverData.dragged||t.hoverData.selecting||t.hoverData.isOverThresholdDrag||(r(c,[\"click\",\"tap\",\"vclick\"],i,{x:o[0],y:o[1]}),x=!1,i.timeStamp-b<=a.multiClickDebounceTime()?(y&&clearTimeout(y),x=!0,b=null,r(c,[\"dblclick\",\"dbltap\",\"vdblclick\"],i,{x:o[0],y:o[1]})):(y=setTimeout((function(){x||r(c,[\"oneclick\",\"onetap\",\"voneclick\"],i,{x:o[0],y:o[1]})}),a.multiClickDebounceTime()),b=i.timeStamp)),null!=c||t.dragData.didDrag||t.hoverData.selecting||t.hoverData.dragged||n(i)||(a.$(e).unselect([\"tapunselect\"]),u.length>0&&t.redrawHint(\"eles\",!0),t.dragData.possibleDragElements=u=a.collection()),l!=c||t.dragData.didDrag||t.hoverData.selecting||null!=l&&l._private.selectable&&(t.hoverData.dragging||(\"additive\"===a.selectionType()||h?l.selected()?l.unselect([\"tapunselect\"]):l.select([\"tapselect\"]):h||(a.$(e).unmerge(l).unselect([\"tapunselect\"]),l.select([\"tapselect\"]))),t.redrawHint(\"eles\",!0)),t.hoverData.selecting){var g=a.collection(t.getAllInBox(s[0],s[1],s[2],s[3]));t.redrawHint(\"select\",!0),g.length>0&&t.redrawHint(\"eles\",!0),a.emit({type:\"boxend\",originalEvent:i,position:{x:o[0],y:o[1]}});\"additive\"===a.selectionType()||h||a.$(e).unmerge(g).unselect(),g.emit(\"box\").stdFilter((function(t){return t.selectable()&&!t.selected()})).select().emit(\"boxselect\"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint(\"select\",!0),t.redrawHint(\"eles\",!0),t.redraw()),!s[4]){t.redrawHint(\"drag\",!0),t.redrawHint(\"eles\",!0);var v=c&&c.grabbed();f(u),v&&(c.emit(\"freeon\"),u.emit(\"free\"),t.dragData.didDrag&&(c.emit(\"dragfreeon\"),u.emit(\"dragfree\")))}}s[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null}}),!1);var w,k,T,M,A,S,E,C,L,P,I,D,z,R=function(e){if(!t.scrollingPage){var r=t.cy,n=r.zoom(),i=r.pan(),a=t.projectIntoViewport(e.clientX,e.clientY),o=[a[0]*n+i.x,a[1]*n+i.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||0!==t.selection[4])e.preventDefault();else if(r.panningEnabled()&&r.userPanningEnabled()&&r.zoomingEnabled()&&r.userZoomingEnabled()){var s;e.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout((function(){t.data.wheelZooming=!1,t.redrawHint(\"eles\",!0),t.redraw()}),150),s=null!=e.deltaY?e.deltaY/-250:null!=e.wheelDeltaY?e.wheelDeltaY/1e3:e.wheelDelta/1e3,s*=t.wheelSensitivity,1===e.deltaMode&&(s*=33);var l=r.zoom()*Math.pow(10,s);\"gesturechange\"===e.type&&(l=t.gestureStartZoom*e.scale),r.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),r.emit(\"gesturechange\"===e.type?\"pinchzoom\":\"scrollzoom\")}}};t.registerBinding(t.container,\"wheel\",R,!0),t.registerBinding(window,\"scroll\",(function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout((function(){t.scrollingPage=!1}),250)}),!0),t.registerBinding(t.container,\"gesturestart\",(function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()}),!0),t.registerBinding(t.container,\"gesturechange\",(function(e){t.hasTouchStarted||R(e)}),!0),t.registerBinding(t.container,\"mouseout\",(function(e){var r=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:\"mouseout\",position:{x:r[0],y:r[1]}})}),!1),t.registerBinding(t.container,\"mouseover\",(function(e){var r=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:\"mouseover\",position:{x:r[0],y:r[1]}})}),!1);var F,N,B,j,U,V,H,q=function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))},G=function(t,e,r,n){return(r-t)*(r-t)+(n-e)*(n-e)};if(t.registerBinding(t.container,\"touchstart\",F=function(e){if(t.hasTouchStarted=!0,_(e)){p(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var n=t.cy,i=t.touchData.now,a=t.touchData.earlier;if(e.touches[0]){var s=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(e.touches[1]&&(s=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),i[2]=s[0],i[3]=s[1]),e.touches[2]&&(s=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),i[4]=s[0],i[5]=s[1]),e.touches[1]){t.touchData.singleTouchMoved=!0,f(t.dragData.touchDragEles);var u=t.findContainerClientCoords();L=u[0],P=u[1],I=u[2],D=u[3],w=e.touches[0].clientX-L,k=e.touches[0].clientY-P,T=e.touches[1].clientX-L,M=e.touches[1].clientY-P,z=0<=w&&w<=I&&0<=T&&T<=I&&0<=k&&k<=D&&0<=M&&M<=D;var h=n.pan(),d=n.zoom();if(A=q(w,k,T,M),S=G(w,k,T,M),C=[((E=[(w+T)/2,(k+M)/2])[0]-h.x)/d,(E[1]-h.y)/d],S<4e4&&!e.touches[2]){var g=t.findNearestElement(i[0],i[1],!0,!0),v=t.findNearestElement(i[2],i[3],!0,!0);return g&&g.isNode()?(g.activate().emit({originalEvent:e,type:\"cxttapstart\",position:{x:i[0],y:i[1]}}),t.touchData.start=g):v&&v.isNode()?(v.activate().emit({originalEvent:e,type:\"cxttapstart\",position:{x:i[0],y:i[1]}}),t.touchData.start=v):n.emit({originalEvent:e,type:\"cxttapstart\",position:{x:i[0],y:i[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])n.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var m=t.findNearestElements(i[0],i[1],!0,!0),y=m[0];if(null!=y&&(y.activate(),t.touchData.start=y,t.touchData.starts=m,t.nodeIsGrabbable(y))){var x=t.dragData.touchDragEles=n.collection(),b=null;t.redrawHint(\"eles\",!0),t.redrawHint(\"drag\",!0),y.selected()?(b=n.$((function(e){return e.selected()&&t.nodeIsGrabbable(e)})),l(b,{addToList:x})):c(y,{addToList:x}),o(y);var O=function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}};y.emit(O(\"grabon\")),b?b.forEach((function(t){t.emit(O(\"grab\"))})):y.emit(O(\"grab\"))}r(y,[\"touchstart\",\"tapstart\",\"vmousedown\"],e,{x:i[0],y:i[1]}),null==y&&(t.data.bgActivePosistion={x:s[0],y:s[1]},t.redrawHint(\"select\",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout((function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||r(t.touchData.start,[\"taphold\"],e,{x:i[0],y:i[1]})}),t.tapholdDuration)}if(e.touches.length>=1){for(var R=t.touchData.startPosition=[],F=0;F<i.length;F++)R[F]=a[F]=i[F];var N=e.touches[0];t.touchData.startGPosition=[N.clientX,N.clientY]}}},!1),t.registerBinding(window,\"touchmove\",N=function(e){var n=t.touchData.capture;if(n||_(e)){var a=t.selection,o=t.cy,s=t.touchData.now,u=t.touchData.earlier,c=o.zoom();if(e.touches[0]){var h=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);s[0]=h[0],s[1]=h[1]}e.touches[1]&&(h=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),s[2]=h[0],s[3]=h[1]),e.touches[2]&&(h=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),s[4]=h[0],s[5]=h[1]);var p,d=t.touchData.startGPosition;if(n&&e.touches[0]&&d){for(var g=[],v=0;v<s.length;v++)g[v]=s[v]-u[v];var m=e.touches[0].clientX-d[0],y=m*m,x=e.touches[0].clientY-d[1];p=y+x*x>=t.touchTapThreshold2}if(n&&t.touchData.cxt){e.preventDefault();var b=e.touches[0].clientX-L,E=e.touches[0].clientY-P,I=e.touches[1].clientX-L,D=e.touches[1].clientY-P,R=G(b,E,I,D);if(R/S>=2.25||R>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint(\"select\",!0);var F={originalEvent:e,type:\"cxttapend\",position:{x:s[0],y:s[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(F),t.touchData.start=null):o.emit(F)}}if(n&&t.touchData.cxt){F={originalEvent:e,type:\"cxtdrag\",position:{x:s[0],y:s[1]}},t.data.bgActivePosistion=void 0,t.redrawHint(\"select\",!0),t.touchData.start?t.touchData.start.emit(F):o.emit(F),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var N=t.findNearestElement(s[0],s[1],!0,!0);t.touchData.cxtOver&&N===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:e,type:\"cxtdragout\",position:{x:s[0],y:s[1]}}),t.touchData.cxtOver=N,N&&N.emit({originalEvent:e,type:\"cxtdragover\",position:{x:s[0],y:s[1]}}))}else if(n&&e.touches[2]&&o.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||o.emit({originalEvent:e,type:\"boxstart\",position:{x:s[0],y:s[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),t.redrawHint(\"select\",!0),t.redraw();else if(n&&e.touches[1]&&!t.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint(\"select\",!0),tt=t.dragData.touchDragEles){t.redrawHint(\"drag\",!0);for(var B=0;B<tt.length;B++){var j=tt[B]._private;j.grabbed=!1,j.rscratch.inDragLayer=!1}}var U=t.touchData.start,V=(b=e.touches[0].clientX-L,E=e.touches[0].clientY-P,I=e.touches[1].clientX-L,D=e.touches[1].clientY-P,q(b,E,I,D)),H=V/A;if(z){var Y=(b-w+(I-T))/2,W=(E-k+(D-M))/2,X=o.zoom(),Z=X*H,K=o.pan(),J=C[0]*X+K.x,$=C[1]*X+K.y,Q={x:-Z/X*(J-K.x-Y)+J,y:-Z/X*($-K.y-W)+$};if(U&&U.active()){var tt=t.dragData.touchDragEles;f(tt),t.redrawHint(\"drag\",!0),t.redrawHint(\"eles\",!0),U.unactivate().emit(\"freeon\"),tt.emit(\"free\"),t.dragData.didDrag&&(U.emit(\"dragfreeon\"),tt.emit(\"dragfree\"))}o.viewport({zoom:Z,pan:Q,cancelOnFailedZoom:!0}),o.emit(\"pinchzoom\"),A=V,w=b,k=E,T=I,M=D,t.pinching=!0}e.touches[0]&&(h=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),s[0]=h[0],s[1]=h[1]),e.touches[1]&&(h=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY),s[2]=h[0],s[3]=h[1]),e.touches[2]&&(h=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY),s[4]=h[0],s[5]=h[1])}else if(e.touches[0]&&!t.touchData.didSelect){var et=t.touchData.start,rt=t.touchData.last;if(t.hoverData.draggingEles||t.swipePanning||(N=t.findNearestElement(s[0],s[1],!0,!0)),n&&null!=et&&e.preventDefault(),n&&null!=et&&t.nodeIsDraggable(et))if(p){tt=t.dragData.touchDragEles;var nt=!t.dragData.didDrag;nt&&l(tt,{inDragLayer:!0}),t.dragData.didDrag=!0;var it={x:0,y:0};O(g[0])&&O(g[1])&&(it.x+=g[0],it.y+=g[1],nt&&(t.redrawHint(\"eles\",!0),(at=t.touchData.dragDelta)&&O(at[0])&&O(at[1])&&(it.x+=at[0],it.y+=at[1]))),t.hoverData.draggingEles=!0,tt.silentShift(it).emit(\"position drag\"),t.redrawHint(\"drag\",!0),t.touchData.startPosition[0]==u[0]&&t.touchData.startPosition[1]==u[1]&&t.redrawHint(\"eles\",!0),t.redraw()}else{var at;0===(at=t.touchData.dragDelta=t.touchData.dragDelta||[]).length?(at.push(g[0]),at.push(g[1])):(at[0]+=g[0],at[1]+=g[1])}if(r(et||N,[\"touchmove\",\"tapdrag\",\"vmousemove\"],e,{x:s[0],y:s[1]}),et&&et.grabbed()||N==rt||(rt&&rt.emit({originalEvent:e,type:\"tapdragout\",position:{x:s[0],y:s[1]}}),N&&N.emit({originalEvent:e,type:\"tapdragover\",position:{x:s[0],y:s[1]}})),t.touchData.last=N,n)for(B=0;B<s.length;B++)s[B]&&t.touchData.startPosition[B]&&p&&(t.touchData.singleTouchMoved=!0);n&&(null==et||et.pannable())&&o.panningEnabled()&&o.userPanningEnabled()&&(i(et,t.touchData.starts)&&(e.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=ee(t.touchData.startPosition)),t.swipePanning?(o.panBy({x:g[0]*c,y:g[1]*c}),o.emit(\"dragpan\")):p&&(t.swipePanning=!0,o.panBy({x:m*c,y:x*c}),o.emit(\"dragpan\"),et&&(et.unactivate(),t.redrawHint(\"select\",!0),t.touchData.start=null))),h=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY),s[0]=h[0],s[1]=h[1])}for(v=0;v<s.length;v++)u[v]=s[v];n&&e.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint(\"select\",!0),t.redraw())}},!1),t.registerBinding(window,\"touchcancel\",B=function(e){var r=t.touchData.start;t.touchData.capture=!1,r&&r.unactivate()}),t.registerBinding(window,\"touchend\",j=function(n){var i=t.touchData.start;if(t.touchData.capture){0===n.touches.length&&(t.touchData.capture=!1),n.preventDefault();var a=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var o,s=t.cy,l=s.zoom(),u=t.touchData.now,c=t.touchData.earlier;if(n.touches[0]){var h=t.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);u[0]=h[0],u[1]=h[1]}if(n.touches[1]&&(h=t.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),u[2]=h[0],u[3]=h[1]),n.touches[2]&&(h=t.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),u[4]=h[0],u[5]=h[1]),i&&i.unactivate(),t.touchData.cxt){if(o={originalEvent:n,type:\"cxttapend\",position:{x:u[0],y:u[1]}},i?i.emit(o):s.emit(o),!t.touchData.cxtDragged){var p={originalEvent:n,type:\"cxttap\",position:{x:u[0],y:u[1]}};i?i.emit(p):s.emit(p)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!n.touches[2]&&s.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var d=s.collection(t.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,t.redrawHint(\"select\",!0),s.emit({type:\"boxend\",originalEvent:n,position:{x:u[0],y:u[1]}}),d.emit(\"box\").stdFilter((function(t){return t.selectable()&&!t.selected()})).select().emit(\"boxselect\"),d.nonempty()&&t.redrawHint(\"eles\",!0),t.redraw()}if(null!=i&&i.unactivate(),n.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint(\"select\",!0);else if(n.touches[1]);else if(n.touches[0]);else if(!n.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint(\"select\",!0);var g=t.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;f(g),t.redrawHint(\"drag\",!0),t.redrawHint(\"eles\",!0),v&&(i.emit(\"freeon\"),g.emit(\"free\"),t.dragData.didDrag&&(i.emit(\"dragfreeon\"),g.emit(\"dragfree\"))),r(i,[\"touchend\",\"tapend\",\"vmouseup\",\"tapdragout\"],n,{x:u[0],y:u[1]}),i.unactivate(),t.touchData.start=null}else{var m=t.findNearestElement(u[0],u[1],!0,!0);r(m,[\"touchend\",\"tapend\",\"vmouseup\",\"tapdragout\"],n,{x:u[0],y:u[1]})}var y=t.touchData.startPosition[0]-u[0],x=y*y,b=t.touchData.startPosition[1]-u[1],_=(x+b*b)*l*l;t.touchData.singleTouchMoved||(i||s.$(\":selected\").unselect([\"tapunselect\"]),r(i,[\"tap\",\"vclick\"],n,{x:u[0],y:u[1]}),U=!1,n.timeStamp-H<=s.multiClickDebounceTime()?(V&&clearTimeout(V),U=!0,H=null,r(i,[\"dbltap\",\"vdblclick\"],n,{x:u[0],y:u[1]})):(V=setTimeout((function(){U||r(i,[\"onetap\",\"voneclick\"],n,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),H=n.timeStamp)),null!=i&&!t.dragData.didDrag&&i._private.selectable&&_<t.touchTapThreshold2&&!t.pinching&&(\"single\"===s.selectionType()?(s.$(e).unmerge(i).unselect([\"tapunselect\"]),i.select([\"tapselect\"])):i.selected()?i.unselect([\"tapunselect\"]):i.select([\"tapselect\"]),t.redrawHint(\"eles\",!0)),t.touchData.singleTouchMoved=!0}for(var w=0;w<u.length;w++)c[w]=u[w];t.dragData.didDrag=!1,0===n.touches.length&&(t.touchData.dragDelta=[],t.touchData.startPosition=null,t.touchData.startGPosition=null,t.touchData.didSelect=!1),n.touches.length<2&&(1===n.touches.length&&(t.touchData.startGPosition=[n.touches[0].clientX,n.touches[0].clientY]),t.pinching=!1,t.redrawHint(\"eles\",!0),t.redraw())}},!1),\"undefined\"==typeof TouchEvent){var Y=[],W=function(t){return{clientX:t.clientX,clientY:t.clientY,force:1,identifier:t.pointerId,pageX:t.pageX,pageY:t.pageY,radiusX:t.width/2,radiusY:t.height/2,screenX:t.screenX,screenY:t.screenY,target:t.target}},X=function(t){for(var e=0;e<Y.length;e++)if(Y[e].event.pointerId===t.pointerId)return void Y.splice(e,1)},Z=function(t){t.touches=Y.map((function(t){return t.touch}))},K=function(t){return\"mouse\"===t.pointerType||4===t.pointerType};t.registerBinding(t.container,\"pointerdown\",(function(t){K(t)||(t.preventDefault(),function(t){Y.push(function(t){return{event:t,touch:W(t)}}(t))}(t),Z(t),F(t))})),t.registerBinding(t.container,\"pointerup\",(function(t){K(t)||(X(t),Z(t),j(t))})),t.registerBinding(t.container,\"pointercancel\",(function(t){K(t)||(X(t),Z(t),B())})),t.registerBinding(t.container,\"pointermove\",(function(t){K(t)||(t.preventDefault(),function(t){var e=Y.filter((function(e){return e.event.pointerId===t.pointerId}))[0];e.event=t,e.touch=W(t)}(t),Z(t),N(t))}))}};var Vo={generatePolygon:function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:function(t,e,r,n,i){this.renderer.nodeShapeImpl(\"polygon\",t,e,r,n,i,this.points)},intersectLine:function(t,e,r,n,i,a,o){return Oe(i,a,this.points,t,e,r/2,n/2,o)},checkPoint:function(t,e,r,n,i,a,o){return Me(t,e,this.points,a,o,n,i,[0,-1],r)}}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:\"ellipse\",draw:function(t,e,r,n,i){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},intersectLine:function(t,e,r,n,i,a,o){return function(t,e,r,n,i,a){var o=r-t,s=n-e;o/=i,s/=a;var l=Math.sqrt(o*o+s*s),u=l-1;if(u<0)return[];var c=u/l;return[(r-t)*c+t,(n-e)*c+e]}(i,a,t,e,r/2+o,n/2+o)},checkPoint:function(t,e,r,n,i,a,o){return Ee(t,e,n,i,a,o,r)}}},generateRoundPolygon:function(t,e){for(var r=new Array(2*e.length),n=0;n<e.length/2;n++){var i,a=2*n;i=n<e.length/2-1?2*(n+1):0,r[4*n]=e[a],r[4*n+1]=e[a+1];var o=e[i]-e[a],s=e[i+1]-e[a+1],l=Math.sqrt(o*o+s*s);r[4*n+2]=o/l,r[4*n+3]=s/l}return this.nodeShapes[t]={renderer:this,name:t,points:r,draw:function(t,e,r,n,i){this.renderer.nodeShapeImpl(\"round-polygon\",t,e,r,n,i,this.points)},intersectLine:function(t,e,r,n,i,a,o){return function(t,e,r,n,i,a,o,s){for(var l,u=[],c=new Array(r.length),f=a/2,h=o/2,p=Ne(a,o),d=0;d<r.length/4;d++){var g,v;v=0===d?r.length-2:4*d-2,g=4*d+2;var m=n+f*r[4*d],y=i+h*r[4*d+1],x=-r[v]*r[g]-r[v+1]*r[g+1],b=p/Math.tan(Math.acos(x)/2),_=m-b*r[v],w=y-b*r[v+1],k=m+b*r[g],T=y+b*r[g+1];0===d?(c[r.length-2]=_,c[r.length-1]=w):(c[4*d-2]=_,c[4*d-1]=w),c[4*d]=k,c[4*d+1]=T;var M=r[v+1],A=-r[v];M*r[g]+A*r[g+1]<0&&(M*=-1,A*=-1),0!==(l=Ce(t,e,n,i,_+M*p,w+A*p,p)).length&&u.push(l[0],l[1])}for(var S=0;S<c.length/4;S++)0!==(l=Pe(t,e,n,i,c[4*S],c[4*S+1],c[4*S+2],c[4*S+3],!1)).length&&u.push(l[0],l[1]);if(u.length>2){for(var E=[u[0],u[1]],C=Math.pow(E[0]-t,2)+Math.pow(E[1]-e,2),L=1;L<u.length/2;L++){var P=Math.pow(u[2*L]-t,2)+Math.pow(u[2*L+1]-e,2);P<=C&&(E[0]=u[2*L],E[1]=u[2*L+1],C=P)}return E}return u}(i,a,this.points,t,e,r,n)},checkPoint:function(t,e,r,n,i,a,o){return function(t,e,r,n,i,a,o){for(var s=new Array(r.length),l=a/2,u=o/2,c=Ne(a,o),f=c*c,h=0;h<r.length/4;h++){var p,d;d=0===h?r.length-2:4*h-2,p=4*h+2;var g=n+l*r[4*h],v=i+u*r[4*h+1],m=-r[d]*r[p]-r[d+1]*r[p+1],y=c/Math.tan(Math.acos(m)/2),x=g-y*r[d],b=v-y*r[d+1],_=g+y*r[p],w=v+y*r[p+1];s[4*h]=x,s[4*h+1]=b,s[4*h+2]=_,s[4*h+3]=w;var k=r[d+1],T=-r[d];k*r[p]+T*r[p+1]<0&&(k*=-1,T*=-1);var M=x+k*c,A=b+T*c;if(Math.pow(M-t,2)+Math.pow(A-e,2)<=f)return!0}return Te(t,e,s)}(t,e,this.points,a,o,n,i)}}},generateRoundRectangle:function(){return this.nodeShapes[\"round-rectangle\"]=this.nodeShapes.roundrectangle={renderer:this,name:\"round-rectangle\",points:De(4,0),draw:function(t,e,r,n,i){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},intersectLine:function(t,e,r,n,i,a,o){return xe(i,a,t,e,r,n,o)},checkPoint:function(t,e,r,n,i,a,o){var s=Fe(n,i),l=2*s;return!!(Me(t,e,this.points,a,o,n,i-l,[0,-1],r)||Me(t,e,this.points,a,o,n-l,i,[0,-1],r)||Ee(t,e,l,l,a-n/2+s,o-i/2+s,r)||Ee(t,e,l,l,a+n/2-s,o-i/2+s,r)||Ee(t,e,l,l,a+n/2-s,o+i/2-s,r)||Ee(t,e,l,l,a-n/2+s,o+i/2-s,r))}}},generateCutRectangle:function(){return this.nodeShapes[\"cut-rectangle\"]=this.nodeShapes.cutrectangle={renderer:this,name:\"cut-rectangle\",cornerLength:8,points:De(4,0),draw:function(t,e,r,n,i){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},generateCutTrianglePts:function(t,e,r,n){var i=this.cornerLength,a=e/2,o=t/2,s=r-o,l=r+o,u=n-a,c=n+a;return{topLeft:[s,u+i,s+i,u,s+i,u+i],topRight:[l-i,u,l,u+i,l-i,u+i],bottomRight:[l,c-i,l-i,c,l-i,c-i],bottomLeft:[s+i,c,s,c-i,s+i,c-i]}},intersectLine:function(t,e,r,n,i,a,o){var s=this.generateCutTrianglePts(r+2*o,n+2*o,t,e),l=[].concat.apply([],[s.topLeft.splice(0,4),s.topRight.splice(0,4),s.bottomRight.splice(0,4),s.bottomLeft.splice(0,4)]);return Oe(i,a,l,t,e)},checkPoint:function(t,e,r,n,i,a,o){if(Me(t,e,this.points,a,o,n,i-2*this.cornerLength,[0,-1],r))return!0;if(Me(t,e,this.points,a,o,n-2*this.cornerLength,i,[0,-1],r))return!0;var s=this.generateCutTrianglePts(n,i,a,o);return Te(t,e,s.topLeft)||Te(t,e,s.topRight)||Te(t,e,s.bottomRight)||Te(t,e,s.bottomLeft)}}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:\"barrel\",points:De(4,0),draw:function(t,e,r,n,i){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},intersectLine:function(t,e,r,n,i,a,o){var s=this.generateBarrelBezierPts(r+2*o,n+2*o,t,e),l=function(t){var e=ue({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.15),r=ue({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.5),n=ue({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.85);return[t[0],t[1],e.x,e.y,r.x,r.y,n.x,n.y,t[4],t[5]]},u=[].concat(l(s.topLeft),l(s.topRight),l(s.bottomRight),l(s.bottomLeft));return Oe(i,a,u,t,e)},generateBarrelBezierPts:function(t,e,r,n){var i=e/2,a=t/2,o=r-a,s=r+a,l=n-i,u=n+i,c=Be(t,e),f=c.heightOffset,h=c.widthOffset,p=c.ctrlPtOffsetPct*t,d={topLeft:[o,l+f,o+p,l,o+h,l],topRight:[s-h,l,s-p,l,s,l+f],bottomRight:[s,u-f,s-p,u,s-h,u],bottomLeft:[o+h,u,o+p,u,o,u-f]};return d.topLeft.isTop=!0,d.topRight.isTop=!0,d.bottomLeft.isBottom=!0,d.bottomRight.isBottom=!0,d},checkPoint:function(t,e,r,n,i,a,o){var s=Be(n,i),l=s.heightOffset,u=s.widthOffset;if(Me(t,e,this.points,a,o,n,i-2*l,[0,-1],r))return!0;if(Me(t,e,this.points,a,o,n-2*u,i,[0,-1],r))return!0;for(var c=this.generateBarrelBezierPts(n,i,a,o),f=function(t,e,r){var n,i,a=r[4],o=r[2],s=r[0],l=r[5],u=r[1],c=Math.min(a,s),f=Math.max(a,s),h=Math.min(l,u),p=Math.max(l,u);if(c<=t&&t<=f&&h<=e&&e<=p){var d=[(n=a)-2*(i=o)+s,2*(i-n),n],g=function(t,e,r,n){var i=e*e-4*t*(r-=n);if(i<0)return[];var a=Math.sqrt(i),o=2*t;return[(-e+a)/o,(-e-a)/o]}(d[0],d[1],d[2],t).filter((function(t){return 0<=t&&t<=1}));if(g.length>0)return g[0]}return null},h=Object.keys(c),p=0;p<h.length;p++){var d=c[h[p]],g=f(t,e,d);if(null!=g){var v=d[5],m=d[3],y=d[1],x=le(v,m,y,g);if(d.isTop&&x<=e)return!0;if(d.isBottom&&e<=x)return!0}}return!1}}},generateBottomRoundrectangle:function(){return this.nodeShapes[\"bottom-round-rectangle\"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:\"bottom-round-rectangle\",points:De(4,0),draw:function(t,e,r,n,i){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},intersectLine:function(t,e,r,n,i,a,o){var s=e-(n/2+o),l=Pe(i,a,t,e,t-(r/2+o),s,t+(r/2+o),s,!1);return l.length>0?l:xe(i,a,t,e,r,n,o)},checkPoint:function(t,e,r,n,i,a,o){var s=Fe(n,i),l=2*s;if(Me(t,e,this.points,a,o,n,i-l,[0,-1],r))return!0;if(Me(t,e,this.points,a,o,n-l,i,[0,-1],r))return!0;var u=n/2+2*r,c=i/2+2*r;return!!Te(t,e,[a-u,o-c,a-u,o,a+u,o,a+u,o-c])||!!Ee(t,e,l,l,a+n/2-s,o+i/2-s,r)||!!Ee(t,e,l,l,a-n/2+s,o+i/2-s,r)}}},registerNodeShapes:function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon(\"triangle\",De(3,0)),this.generateRoundPolygon(\"round-triangle\",De(3,0)),this.generatePolygon(\"rectangle\",De(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon(\"diamond\",r),this.generateRoundPolygon(\"round-diamond\",r),this.generatePolygon(\"pentagon\",De(5,0)),this.generateRoundPolygon(\"round-pentagon\",De(5,0)),this.generatePolygon(\"hexagon\",De(6,0)),this.generateRoundPolygon(\"round-hexagon\",De(6,0)),this.generatePolygon(\"heptagon\",De(7,0)),this.generateRoundPolygon(\"round-heptagon\",De(7,0)),this.generatePolygon(\"octagon\",De(8,0)),this.generateRoundPolygon(\"round-octagon\",De(8,0));var n=new Array(20),i=Re(5,0),a=Re(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s<a.length/2;s++)a[2*s]*=o,a[2*s+1]*=o;for(s=0;s<5;s++)n[4*s]=i[2*s],n[4*s+1]=i[2*s+1],n[4*s+2]=a[2*s],n[4*s+3]=a[2*s+1];n=ze(n),this.generatePolygon(\"star\",n),this.generatePolygon(\"vee\",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon(\"rhomboid\",[-1,-1,.333,-1,1,1,-.333,1]),this.nodeShapes.concavehexagon=this.generatePolygon(\"concave-hexagon\",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon(\"tag\",l),this.generateRoundPolygon(\"round-tag\",l),t.makePolygon=function(t){var r,n=\"polygon-\"+t.join(\"$\");return(r=this[n])?r:e.generatePolygon(n,t)}}},Ho={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(t){t=t||Et();var e=this;void 0===e.averageRedrawTime&&(e.averageRedrawTime=0),void 0===e.lastRedrawTime&&(e.lastRedrawTime=0),void 0===e.lastDrawTime&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t},beforeRender:function(t,e){if(!this.destroyed){null==e&&wt(\"Priority is not optional for beforeRender\");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort((function(t,e){return e.priority-t.priority}))}}},qo=function(t,e,r){for(var n=t.beforeRenderCallbacks,i=0;i<n.length;i++)n[i].fn(e,r)};Ho.startRenderLoop=function(){var t=this,e=t.cy;t.renderLoopStarted||(t.renderLoopStarted=!0,et((function r(n){if(!t.destroyed){if(e.batching());else if(t.requestedFrame&&!t.skipFrame){qo(t,!0,n);var i=rt();t.render(t.renderOptions);var a=t.lastDrawTime=rt();void 0===t.averageRedrawTime&&(t.averageRedrawTime=a-i),void 0===t.redrawCount&&(t.redrawCount=0),t.redrawCount++,void 0===t.redrawTotalTime&&(t.redrawTotalTime=0);var o=a-i;t.redrawTotalTime+=o,t.lastRedrawTime=o,t.averageRedrawTime=t.averageRedrawTime/2+o/2,t.requestedFrame=!1}else qo(t,!1,n);t.skipFrame=!1,et(r)}})))};var Go=function(t){this.init(t)},Yo=Go.prototype;Yo.clientFunctions=[\"redrawHint\",\"render\",\"renderTo\",\"matchCanvasSize\",\"nodeShapeImpl\",\"arrowShapeImpl\"],Yo.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container();if(_){var n=_.document,i=n.head,a=\"__________cytoscape_stylesheet\",o=\"__________cytoscape_container\",s=null!=n.getElementById(a);if(r.className.indexOf(o)<0&&(r.className=(r.className||\"\")+\" \"+o),!s){var l=n.createElement(\"style\");l.id=a,l.innerHTML=\".\"+o+\" { position: relative; }\",i.insertBefore(l,i.children[0])}\"static\"===_.getComputedStyle(r).getPropertyValue(\"position\")&&Tt(\"A Cytoscape container has style position:static and so can not use UI extensions properly\")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=O(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()},Yo.notify=function(t,e){var r=this,n=r.cy;this.destroyed||(\"init\"!==t?\"destroy\"!==t?((\"add\"===t||\"remove\"===t||\"move\"===t&&n.hasCompoundNodes()||\"load\"===t||\"zorder\"===t||\"mount\"===t)&&r.invalidateCachedZSortedEles(),\"viewport\"===t&&r.redrawHint(\"select\",!0),\"load\"!==t&&\"resize\"!==t&&\"mount\"!==t||(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint(\"eles\",!0),r.redrawHint(\"drag\",!0),this.startRenderLoop(),this.redraw()):r.destroy():r.load())},Yo.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r.target;(n.off||n.removeEventListener).apply(n,r.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch(t){}},Yo.isHeadless=function(){return!1},[Mo,Bo,jo,Uo,Vo,Ho].forEach((function(t){X(Yo,t)}));var Wo=1e3/60,Xo=function(t){return function(){var e=this,r=this.renderer;if(!e.dequeueingSetup){e.dequeueingSetup=!0;var n=u.default((function(){r.redrawHint(\"eles\",!0),r.redrawHint(\"drag\",!0),r.redraw()}),t.deqRedrawThreshold),i=t.priority||_t;r.beforeRender((function(i,a){var o=rt(),s=r.averageRedrawTime,l=r.lastRedrawTime,u=[],c=r.cy.extent(),f=r.getPixelRatio();for(i||r.flushRenderedStyleQueue();;){var h=rt(),p=h-o,d=h-a;if(l<Wo){var g=Wo-(i?s:0);if(d>=t.deqFastCost*g)break}else if(i){if(p>=t.deqCost*l||p>=t.deqAvgCost*s)break}else if(d>=t.deqNoDrawCost*Wo)break;var v=t.deq(e,f,c);if(!(v.length>0))break;for(var m=0;m<v.length;m++)u.push(v[m])}u.length>0&&(t.onDeqd(e,u),!i&&t.shouldRedraw(e,u,f,c)&&n())}),i(e))}}},Zo=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xt;g(this,t),this.idsByKey=new Dt,this.keyForId=new Dt,this.cachesByLvl=new Dt,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return m(t,[{key:\"getIdsFor\",value:function(t){null==t&&wt(\"Can not get id list for null key\");var e=this.idsByKey,r=this.idsByKey.get(t);return r||(r=new Rt,e.set(t,r)),r}},{key:\"addIdForKey\",value:function(t,e){null!=t&&this.getIdsFor(t).add(e)}},{key:\"deleteIdForKey\",value:function(t,e){null!=t&&this.getIdsFor(t).delete(e)}},{key:\"getNumberOfIdsForKey\",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:\"updateKeyMappingFor\",value:function(t){var e=t.id(),r=this.keyForId.get(e),n=this.getKey(t);this.deleteIdForKey(r,e),this.addIdForKey(n,e),this.keyForId.set(e,n)}},{key:\"deleteKeyMappingFor\",value:function(t){var e=t.id(),r=this.keyForId.get(e);this.deleteIdForKey(r,e),this.keyForId.delete(e)}},{key:\"keyHasChangedFor\",value:function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}},{key:\"isInvalid\",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:\"getCachesAt\",value:function(t){var e=this.cachesByLvl,r=this.lvls,n=e.get(t);return n||(n=new Dt,e.set(t,n),r.push(t)),n}},{key:\"getCache\",value:function(t,e){return this.getCachesAt(e).get(t)}},{key:\"get\",value:function(t,e){var r=this.getKey(t),n=this.getCache(r,e);return null!=n&&this.updateKeyMappingFor(t),n}},{key:\"getForCachedKey\",value:function(t,e){var r=this.keyForId.get(t.id());return this.getCache(r,e)}},{key:\"hasCache\",value:function(t,e){return this.getCachesAt(e).has(t)}},{key:\"has\",value:function(t,e){var r=this.getKey(t);return this.hasCache(r,e)}},{key:\"setCache\",value:function(t,e,r){r.key=t,this.getCachesAt(e).set(t,r)}},{key:\"set\",value:function(t,e,r){var n=this.getKey(t);this.setCache(n,e,r),this.updateKeyMappingFor(t)}},{key:\"deleteCache\",value:function(t,e){this.getCachesAt(e).delete(t)}},{key:\"delete\",value:function(t,e){var r=this.getKey(t);this.deleteCache(r,e)}},{key:\"invalidateKey\",value:function(t){var e=this;this.lvls.forEach((function(r){return e.deleteCache(t,r)}))}},{key:\"invalidate\",value:function(t){var e=t.id(),r=this.keyForId.get(e);this.deleteKeyMappingFor(t);var n=this.doesEleInvalidateKey(t);return n&&this.invalidateKey(r),n||0===this.getNumberOfIdsForKey(r)}}]),t}(),Ko={dequeue:\"dequeue\",downscale:\"downscale\",highQuality:\"highQuality\"},Jo=Ct({getKey:null,doesEleInvalidateKey:xt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:yt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),$o=function(t,e){var r=this;r.renderer=t,r.onDequeues=[];var n=Jo(e);X(r,n),r.lookup=new Zo(n.getKey,n.doesEleInvalidateKey),r.setupDequeueing()},Qo=$o.prototype;Qo.reasons=Ko,Qo.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},Qo.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},Qo.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new c.default((function(t,e){return e.reqs-t.reqs}))},Qo.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Qo.getElement=function(t,e,r,n,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed())return null;if(!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(null==n&&(n=Math.ceil(ne(s*r))),n<-4)n=-4;else if(s>=7.99||n>3)return null;var u=Math.pow(2,n),c=e.h*u,f=e.w*u,h=o.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,h))return null;var p,d=l.get(t,n);if(d&&d.invalidated&&(d.invalidated=!1,d.texture.invalidatedWidth-=d.width),d)return d;if(p=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||f>1024)return null;var g=a.getTextureQueue(p),v=g[g.length-2],m=function(){return a.recycleTexture(p,f)||a.addTexture(p,f)};v||(v=g[g.length-1]),v||(v=m()),v.width-v.usedWidth<f&&(v=m());for(var y,x=function(t){return t&&t.scaledLabelShown===h},b=i&&i===Ko.dequeue,_=i&&i===Ko.highQuality,w=i&&i===Ko.downscale,k=n+1;k<=3;k++){var T=l.get(t,k);if(T){y=T;break}}var M=y&&y.level===n+1?y:null,A=function(){v.context.drawImage(M.texture.canvas,M.x,0,M.width,M.height,v.usedWidth,0,f,c)};if(v.context.setTransform(1,0,0,1,0,0),v.context.clearRect(v.usedWidth,0,f,p),x(M))A();else if(x(y)){if(!_)return a.queueElement(t,y.level-1),y;for(var S=y.level;S>n;S--)M=a.getElement(t,e,r,S,Ko.downscale);A()}else{var E;if(!b&&!_&&!w)for(var C=n-1;C>=-4;C--){var L=l.get(t,C);if(L){E=L;break}}if(x(E))return a.queueElement(t,n),E;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,t,e,h,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return d={x:v.usedWidth,texture:v,level:n,scale:u,width:f,height:c,scaledLabelShown:h},v.usedWidth+=Math.ceil(f+8),v.eleCaches.push(d),l.set(t,n,d),a.checkTextureFullness(v),d},Qo.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},Qo.invalidateElement=function(t){var e=this,r=e.lookup,n=[];if(r.isInvalid(t)){for(var i=-4;i<=3;i++){var a=r.getForCachedKey(t,i);a&&n.push(a)}if(r.invalidate(t))for(var o=0;o<n.length;o++){var s=n[o],l=s.texture;l.invalidatedWidth+=s.width,s.invalidated=!0,e.checkTextureUtility(l)}e.removeFromQueue(t)}},Qo.checkTextureUtility=function(t){t.invalidatedWidth>=.2*t.width&&this.retireTexture(t)},Qo.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?Lt(e,t):t.fullnessChecks++},Qo.retireTexture=function(t){var e=t.height,r=this.getTextureQueue(e),n=this.lookup;Lt(r,t),t.retired=!0;for(var i=t.eleCaches,a=0;a<i.length;a++){var o=i[a];n.deleteCache(o.key,o.level)}Pt(i),this.getRetiredTextureQueue(e).push(t)},Qo.addTexture=function(t,e){var r={};return this.getTextureQueue(t).push(r),r.eleCaches=[],r.height=t,r.width=Math.max(1024,e),r.usedWidth=0,r.invalidatedWidth=0,r.fullnessChecks=0,r.canvas=this.renderer.makeOffscreenCanvas(r.width,r.height),r.context=r.canvas.getContext(\"2d\"),r},Qo.recycleTexture=function(t,e){for(var r=this.getTextureQueue(t),n=this.getRetiredTextureQueue(t),i=0;i<n.length;i++){var a=n[i];if(a.width>=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,Pt(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),Lt(n,a),r.push(a),a}},Qo.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];if(a)a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};r.push(o),n[i]=o}},Qo.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,o=0;o<1&&r.size()>0;o++){var s=r.pop(),l=s.key,u=s.eles[0],c=a.hasCache(u,s.level);if(n[l]=null,!c){i.push(s);var f=e.getBoundingBox(u);e.getElement(u,f,t,s.level,Ko.dequeue)}}return i},Qo.removeFromQueue=function(t){var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=this.getKey(t),i=r[n];null!=i&&(1===i.eles.length?(i.reqs=mt,e.updateItem(i),e.pop(),r[n]=null):i.eles.unmerge(t))},Qo.onDequeue=function(t){this.onDequeues.push(t)},Qo.offDequeue=function(t){Lt(this.onDequeues,t)},Qo.setupDequeueing=Xo({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e,r){return t.dequeue(e,r)},onDeqd:function(t,e){for(var r=0;r<t.onDequeues.length;r++)(0,t.onDequeues[r])(e)},shouldRedraw:function(t,e,r,n){for(var i=0;i<e.length;i++)for(var a=e[i].eles,o=0;o<a.length;o++){var s=a[o].boundingBox();if(ve(s,n))return!0}return!1},priority:function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq}});var ts=function(t){var e=this,r=e.renderer=t,n=r.cy;e.layersByLevel={},e.firstGet=!0,e.lastInvalidationTime=rt()-500,e.skipping=!1,e.eleTxrDeqs=n.collection(),e.scheduleElementRefinement=u.default((function(){e.refineElementTextures(e.eleTxrDeqs),e.eleTxrDeqs.unmerge(e.eleTxrDeqs)}),50),r.beforeRender((function(t,r){r-e.lastInvalidationTime<=250?e.skipping=!0:e.skipping=!1}),r.beforeRenderPriorities.lyrTxrSkip),e.layersQueue=new c.default((function(t,e){return e.reqs-t.reqs})),e.setupDequeueing()},es=ts.prototype,rs=0,ns=Math.pow(2,53)-1;es.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),i=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(n,i),o={id:rs=++rs%ns,bb:t,level:e,width:n,height:i,canvas:a,context:a.getContext(\"2d\"),eles:[],elesQueue:[],reqs:0},s=o.context,l=-o.bb.x1,u=-o.bb.y1;return s.scale(r,r),s.translate(l,u),o},es.getLayers=function(t,e,r){var n=this,i=n.renderer.cy.zoom(),a=n.firstGet;if(n.firstGet=!1,null==r)if((r=Math.ceil(ne(i*e)))<-4)r=-4;else if(i>=3.99||r>2)return null;n.validateLayersElesOrdering(r,t);var o,s,l=n.layersByLevel,u=Math.pow(2,r),c=l[r]=l[r]||[];if(n.levelIsComplete(r,t))return c;!function(){var e=function(e){if(n.validateLayersElesOrdering(e,t),n.levelIsComplete(e,t))return s=l[e],!0},i=function(t){if(!s)for(var n=r+t;-4<=n&&n<=2&&!e(n);n+=t);};i(1),i(-1);for(var a=c.length-1;a>=0;a--){var o=c[a];o.invalid&&Lt(c,o)}}();var f=function(e){var i=(e=e||{}).after;if(function(){if(!o){o=fe();for(var e=0;e<t.length;e++)r=o,n=t[e].boundingBox(),r.x1=Math.min(r.x1,n.x1),r.x2=Math.max(r.x2,n.x2),r.w=r.x2-r.x1,r.y1=Math.min(r.y1,n.y1),r.y2=Math.max(r.y2,n.y2),r.h=r.y2-r.y1}var r,n}(),o.w*u*(o.h*u)>16e6)return null;var a=n.makeLayer(o,r);if(null!=i){var s=c.indexOf(i)+1;c.splice(s,0,a)}else(void 0===e.insert||e.insert)&&c.unshift(a);return a};if(n.skipping&&!a)return null;for(var h=null,p=t.length/1,d=!a,g=0;g<t.length;g++){var v=t[g],m=v._private.rscratch,y=m.imgLayerCaches=m.imgLayerCaches||{},x=y[r];if(x)h=x;else{if((!h||h.eles.length>=p||!ye(h.bb,v.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;s||d?n.queueLayer(h,v):n.drawEleInLayer(h,v,r,e),h.eles.push(v),y[r]=h}}return s||(d?null:c)},es.getEleLevelForLayerLevel=function(t,e){return t},es.drawEleInLayer=function(t,e,r,n){var i=this.renderer,a=t.context,o=e.boundingBox();0!==o.w&&0!==o.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(a,!1),i.drawCachedElement(a,e,null,null,r,!0),i.setImgSmoothing(a,!0))},es.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;i<r.length;i++){var a=r[i];if(a.reqs>0)return!1;if(a.invalid)return!1;n+=a.eles.length}return n===e.length},es.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,o=0;o<e.length;o++)if(i.eles[0]===e[o]){a=o;break}if(a<0)this.invalidateLayer(i);else{var s=a;for(o=0;o<i.eles.length;o++)if(i.eles[o]!==e[s+o]){this.invalidateLayer(i);break}}}},es.updateElementsInLayers=function(t,e){for(var r=z(t[0]),n=0;n<t.length;n++)for(var i=r?null:t[n],a=r?t[n]:t[n].ele,o=a._private.rscratch,s=o.imgLayerCaches=o.imgLayerCaches||{},l=-4;l<=2;l++){var u=s[l];u&&(i&&this.getEleLevelForLayerLevel(u.level)!==i.level||e(u,a,i))}},es.haveLayers=function(){for(var t=!1,e=-4;e<=2;e++){var r=this.layersByLevel[e];if(r&&r.length>0){t=!0;break}}return t},es.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=rt(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,(function(t,r,n){e.invalidateLayer(t)})))},es.invalidateLayer=function(t){if(this.lastInvalidationTime=rt(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];Lt(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}},es.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,(function(t,r,n){var i=t.replacement;if(i||((i=t.replacement=e.makeLayer(t.bb,t.level)).replaces=t,i.eles=t.eles),!i.reqs)for(var a=0;a<i.eles.length;a++)e.queueLayer(i,i.eles[a])}))},es.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},es.queueLayer=function(t,e){var r=this.layersQueue,n=t.elesQueue,i=n.hasId=n.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;n.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,r.updateItem(t)):(t.reqs=1,r.push(t))}},es.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],i=0;i<1&&0!==r.size();){var a=r.peek();if(a.replacement)r.pop();else if(a.replaces&&a!==a.replaces.replacement)r.pop();else if(a.invalid)r.pop();else{var o=a.elesQueue.shift();o&&(e.drawEleInLayer(a,o,a.level,t),i++),0===n.length&&n.push(!0),0===a.elesQueue.length&&(r.pop(),a.reqs=0,a.replaces&&e.applyLayerReplacement(a),e.requestRedraw())}}return n},es.applyLayerReplacement=function(t){var e=this.layersByLevel[t.level],r=t.replaces,n=e.indexOf(r);if(!(n<0||r.invalid)){e[n]=t;for(var i=0;i<t.eles.length;i++){var a=t.eles[i]._private,o=a.imgLayerCaches=a.imgLayerCaches||{};o&&(o[t.level]=t)}this.requestRedraw()}},es.requestRedraw=u.default((function(){var t=this.renderer;t.redrawHint(\"eles\",!0),t.redrawHint(\"drag\",!0),t.redraw()}),100),es.setupDequeueing=Xo({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e){return t.dequeue(e)},onDeqd:_t,shouldRedraw:yt,priority:function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq}});var is,as={};function os(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function ss(t,e,r){for(var n,i=0;i<e.length;i++){var a=e[i];0===i&&(n=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function ls(t,e,r){t.beginPath&&t.beginPath();for(var n=e,i=0;i<n.length;i++){var a=n[i];t.lineTo(a.x,a.y)}var o=r,s=r[0];for(t.moveTo(s.x,s.y),i=1;i<o.length;i++)a=o[i],t.lineTo(a.x,a.y);t.closePath&&t.closePath()}function us(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,2*Math.PI,!1);var a=e,o=a[0];t.moveTo(o.x,o.y);for(var s=0;s<a.length;s++){var l=a[s];t.lineTo(l.x,l.y)}t.closePath&&t.closePath()}function cs(t,e,r,n){t.arc(e,r,n,0,2*Math.PI,!1)}as.arrowShapeImpl=function(t){return(is||(is={polygon:os,\"triangle-backcurve\":ss,\"triangle-tee\":ls,\"circle-triangle\":us,\"triangle-cross\":ls,circle:cs}))[t]};var fs={drawElement:function(t,e,r,n,i,a){e.isNode()?this.drawNode(t,e,r,n,i,a):this.drawEdge(t,e,r,n,i,a)},drawElementOverlay:function(t,e){e.isNode()?this.drawNodeOverlay(t,e):this.drawEdgeOverlay(t,e)},drawElementUnderlay:function(t,e){e.isNode()?this.drawNodeUnderlay(t,e):this.drawEdgeUnderlay(t,e)},drawCachedElementPortion:function(t,e,r,n,i,a,o,s){var l=this,u=r.getBoundingBox(e);if(0!==u.w&&0!==u.h){var c=r.getElement(e,u,n,i,a);if(null!=c){var f=s(l,e);if(0===f)return;var h,p,d,g,v,m,y=o(l,e),x=u.x1,b=u.y1,_=u.w,w=u.h;if(0!==y){var k=r.getRotationPoint(e);d=k.x,g=k.y,t.translate(d,g),t.rotate(y),(v=l.getImgSmoothing(t))||l.setImgSmoothing(t,!0);var T=r.getRotationOffset(e);h=T.x,p=T.y}else h=x,p=b;1!==f&&(m=t.globalAlpha,t.globalAlpha=m*f),t.drawImage(c.texture.canvas,c.x,0,c.width,c.height,h,p,_,w),1!==f&&(t.globalAlpha=m),0!==y&&(t.rotate(-y),t.translate(-d,-g),v||l.setImgSmoothing(t,!1))}else r.drawElement(t,e)}}},hs=function(){return 0},ps=function(t,e){return t.getTextAngle(e,null)},ds=function(t,e){return t.getTextAngle(e,\"source\")},gs=function(t,e){return t.getTextAngle(e,\"target\")},vs=function(t,e){return e.effectiveOpacity()},ms=function(t,e){return e.pstyle(\"text-opacity\").pfValue*e.effectiveOpacity()};fs.drawCachedElement=function(t,e,r,n,i,a){var o=this,s=o.data,l=s.eleTxrCache,u=s.lblTxrCache,c=s.slbTxrCache,f=s.tlbTxrCache,h=e.boundingBox(),p=!0===a?l.reasons.highQuality:null;if(0!==h.w&&0!==h.h&&e.visible()&&(!n||ve(h,n))){var d=e.isEdge(),g=e.element()._private.rscratch.badLine;o.drawElementUnderlay(t,e),o.drawCachedElementPortion(t,e,l,r,i,p,hs,vs),d&&g||o.drawCachedElementPortion(t,e,u,r,i,p,ps,ms),d&&!g&&(o.drawCachedElementPortion(t,e,c,r,i,p,ds,ms),o.drawCachedElementPortion(t,e,f,r,i,p,gs,ms)),o.drawElementOverlay(t,e)}},fs.drawElements=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];this.drawElement(t,n)}},fs.drawCachedElements=function(t,e,r,n){for(var i=0;i<e.length;i++){var a=e[i];this.drawCachedElement(t,a,r,n)}},fs.drawCachedNodes=function(t,e,r,n){for(var i=0;i<e.length;i++){var a=e[i];a.isNode()&&this.drawCachedElement(t,a,r,n)}},fs.drawLayeredElements=function(t,e,r,n){var i=this.data.lyrTxrCache.getLayers(e,r);if(i)for(var a=0;a<i.length;a++){var o=i[a],s=o.bb;0!==s.w&&0!==s.h&&t.drawImage(o.canvas,s.x1,s.y1,s.w,s.h)}else this.drawCachedElements(t,e,r,n)};var ys={drawEdge:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=e._private.rscratch;if((!a||e.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=a?e.pstyle(\"opacity\").value:1,c=a?e.pstyle(\"line-opacity\").value:1,f=e.pstyle(\"curve-style\").value,h=e.pstyle(\"line-style\").value,p=e.pstyle(\"width\").pfValue,d=e.pstyle(\"line-cap\").value,g=u*c,v=u*c,m=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;\"straight-triangle\"===f?(o.eleStrokeStyle(t,e,r),o.drawEdgeTrianglePath(e,t,s.allpts)):(t.lineWidth=p,t.lineCap=d,o.eleStrokeStyle(t,e,r),o.drawEdgePath(e,t,s.allpts,h),t.lineCap=\"butt\")},y=function(){i&&o.drawEdgeOverlay(t,e)},x=function(){i&&o.drawEdgeUnderlay(t,e)},b=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;o.drawArrowheads(t,e,r)},_=function(){o.drawElementText(t,e,null,n)};t.lineJoin=\"round\";var w=\"yes\"===e.pstyle(\"ghost\").value;if(w){var k=e.pstyle(\"ghost-offset-x\").pfValue,T=e.pstyle(\"ghost-offset-y\").pfValue,M=e.pstyle(\"ghost-opacity\").value,A=g*M;t.translate(k,T),m(A),b(A),t.translate(-k,-T)}x(),m(),b(),y(),_(),r&&t.translate(l.x1,l.y1)}}},xs=function(t){if(![\"overlay\",\"underlay\"].includes(t))throw new Error(\"Invalid state\");return function(e,r){if(r.visible()){var n=r.pstyle(\"\".concat(t,\"-opacity\")).value;if(0!==n){var i=this,a=i.usePaths(),o=r._private.rscratch,s=2*r.pstyle(\"\".concat(t,\"-padding\")).pfValue,l=r.pstyle(\"\".concat(t,\"-color\")).value;e.lineWidth=s,\"self\"!==o.edgeType||a?e.lineCap=\"round\":e.lineCap=\"butt\",i.colorStrokeStyle(e,l[0],l[1],l[2],n),i.drawEdgePath(r,e,o.allpts,\"solid\")}}}};ys.drawEdgeOverlay=xs(\"overlay\"),ys.drawEdgeUnderlay=xs(\"underlay\"),ys.drawEdgePath=function(t,e,r,n){var i,a=t._private.rscratch,o=e,s=!1,l=this.usePaths(),u=t.pstyle(\"line-dash-pattern\").pfValue,c=t.pstyle(\"line-dash-offset\").pfValue;if(l){var f=r.join(\"$\");a.pathCacheKey&&a.pathCacheKey===f?(i=e=a.pathCache,s=!0):(i=e=new Path2D,a.pathCacheKey=f,a.pathCache=i)}if(o.setLineDash)switch(n){case\"dotted\":o.setLineDash([1,1]);break;case\"dashed\":o.setLineDash(u),o.lineDashOffset=c;break;case\"solid\":o.setLineDash([])}if(!s&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case\"bezier\":case\"self\":case\"compound\":case\"multibezier\":for(var h=2;h+3<r.length;h+=4)e.quadraticCurveTo(r[h],r[h+1],r[h+2],r[h+3]);break;case\"straight\":case\"segments\":case\"haystack\":for(var p=2;p+1<r.length;p+=2)e.lineTo(r[p],r[p+1])}e=o,l?e.stroke(i):e.stroke(),e.setLineDash&&e.setLineDash([])},ys.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle(\"width\").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[a[1]/o,-a[0]/o],l=[s[0]*n/2,s[1]*n/2];e.beginPath(),e.moveTo(r[i]-l[0],r[i+1]-l[1]),e.lineTo(r[i]+l[0],r[i+1]+l[1]),e.lineTo(r[i+2],r[i+3]),e.closePath(),e.fill()}},ys.drawArrowheads=function(t,e,r){var n=e._private.rscratch,i=\"haystack\"===n.edgeType;i||this.drawArrowhead(t,e,\"source\",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,\"mid-target\",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,\"mid-source\",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(t,e,\"target\",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},ys.drawArrowhead=function(t,e,r,n,i,a,o){if(!(isNaN(n)||null==n||isNaN(i)||null==i||isNaN(a)||null==a)){var s=this,l=e.pstyle(r+\"-arrow-shape\").value;if(\"none\"!==l){var u=\"hollow\"===e.pstyle(r+\"-arrow-fill\").value?\"both\":\"filled\",c=e.pstyle(r+\"-arrow-fill\").value,f=e.pstyle(\"width\").pfValue,h=e.pstyle(\"opacity\").value;void 0===o&&(o=h);var p=t.globalCompositeOperation;1===o&&\"hollow\"!==c||(t.globalCompositeOperation=\"destination-out\",s.colorFillStyle(t,255,255,255,1),s.colorStrokeStyle(t,255,255,255,1),s.drawArrowShape(e,t,u,f,l,n,i,a),t.globalCompositeOperation=p);var d=e.pstyle(r+\"-arrow-color\").value;s.colorFillStyle(t,d[0],d[1],d[2],o),s.colorStrokeStyle(t,d[0],d[1],d[2],o),s.drawArrowShape(e,t,c,f,l,n,i,a)}}},ys.drawArrowShape=function(t,e,r,n,i,a,o,s){var l,u=this,c=this.usePaths()&&\"triangle-cross\"!==i,f=!1,h=e,p={x:a,y:o},d=t.pstyle(\"arrow-scale\").value,g=this.getArrowWidth(n,d),v=u.arrowShapes[i];if(c){var m=u.arrowPathCache=u.arrowPathCache||[],y=ft(i),x=m[y];null!=x?(l=e=x,f=!0):(l=e=new Path2D,m[y]=l)}f||(e.beginPath&&e.beginPath(),c?v.draw(e,1,0,{x:0,y:0},1):v.draw(e,g,s,p,n),e.closePath&&e.closePath()),e=h,c&&(e.translate(a,o),e.rotate(s),e.scale(g,g)),\"filled\"!==r&&\"both\"!==r||(c?e.fill(l):e.fill()),\"hollow\"!==r&&\"both\"!==r||(e.lineWidth=(v.matchEdgeWidth?n:1)/(c?g:1),e.lineJoin=\"miter\",c?e.stroke(l):e.stroke()),c&&(e.scale(1/g,1/g),e.rotate(-s),e.translate(-a,-o))};var bs={safeDrawImage:function(t,e,r,n,i,a,o,s,l,u){if(!(i<=0||a<=0||l<=0||u<=0))try{t.drawImage(e,r,n,i,a,o,s,l,u)}catch(t){Tt(t)}},drawInscribedImage:function(t,e,r,n,i){var a=this,o=r.position(),s=o.x,l=o.y,u=r.cy().style(),c=u.getIndexedStyle.bind(u),f=c(r,\"background-fit\",\"value\",n),h=c(r,\"background-repeat\",\"value\",n),p=r.width(),d=r.height(),g=2*r.padding(),v=p+(\"inner\"===c(r,\"background-width-relative-to\",\"value\",n)?0:g),m=d+(\"inner\"===c(r,\"background-height-relative-to\",\"value\",n)?0:g),y=r._private.rscratch,x=\"node\"===c(r,\"background-clip\",\"value\",n),b=c(r,\"background-image-opacity\",\"value\",n)*i,_=c(r,\"background-image-smoothing\",\"value\",n),w=e.width||e.cachedW,k=e.height||e.cachedH;null!=w&&null!=k||(document.body.appendChild(e),w=e.cachedW=e.width||e.offsetWidth,k=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var T=w,M=k;if(\"auto\"!==c(r,\"background-width\",\"value\",n)&&(T=\"%\"===c(r,\"background-width\",\"units\",n)?c(r,\"background-width\",\"pfValue\",n)*v:c(r,\"background-width\",\"pfValue\",n)),\"auto\"!==c(r,\"background-height\",\"value\",n)&&(M=\"%\"===c(r,\"background-height\",\"units\",n)?c(r,\"background-height\",\"pfValue\",n)*m:c(r,\"background-height\",\"pfValue\",n)),0!==T&&0!==M){if(\"contain\"===f)T*=A=Math.min(v/T,m/M),M*=A;else if(\"cover\"===f){var A;T*=A=Math.max(v/T,m/M),M*=A}var S=s-v/2,E=c(r,\"background-position-x\",\"units\",n),C=c(r,\"background-position-x\",\"pfValue\",n);S+=\"%\"===E?(v-T)*C:C;var L=c(r,\"background-offset-x\",\"units\",n),P=c(r,\"background-offset-x\",\"pfValue\",n);S+=\"%\"===L?(v-T)*P:P;var O=l-m/2,I=c(r,\"background-position-y\",\"units\",n),D=c(r,\"background-position-y\",\"pfValue\",n);O+=\"%\"===I?(m-M)*D:D;var z=c(r,\"background-offset-y\",\"units\",n),R=c(r,\"background-offset-y\",\"pfValue\",n);O+=\"%\"===z?(m-M)*R:R,y.pathCache&&(S-=s,O-=l,s=0,l=0);var F=t.globalAlpha;t.globalAlpha=b;var N=a.getImgSmoothing(t),B=!1;if(\"no\"===_&&N?(a.setImgSmoothing(t,!1),B=!0):\"yes\"!==_||N||(a.setImgSmoothing(t,!0),B=!0),\"no-repeat\"===h)x&&(t.save(),y.pathCache?t.clip(y.pathCache):(a.nodeShapes[a.getNodeShape(r)].draw(t,s,l,v,m),t.clip())),a.safeDrawImage(t,e,0,0,w,k,S,O,T,M),x&&t.restore();else{var j=t.createPattern(e,h);t.fillStyle=j,a.nodeShapes[a.getNodeShape(r)].draw(t,s,l,v,m),t.translate(S,O),t.fill(),t.translate(-S,-O)}t.globalAlpha=F,B&&a.setImgSmoothing(t,N)}}},_s={};function ws(t,e,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),t.fill()}_s.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),i=Math.ceil(ne(r*n));e=Math.pow(2,i)}return!(t.pstyle(\"font-size\").pfValue*e<t.pstyle(\"min-zoomed-font-size\").pfValue)},_s.drawElementText=function(t,e,r,n,i){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this;if(null==n){if(a&&!o.eleTextBiggerThanMin(e))return}else if(!1===n)return;if(e.isNode()){var s=e.pstyle(\"label\");if(!s||!s.value)return;var l=o.getLabelJustification(e);t.textAlign=l,t.textBaseline=\"bottom\"}else{var u=e.element()._private.rscratch.badLine,c=e.pstyle(\"label\"),f=e.pstyle(\"source-label\"),h=e.pstyle(\"target-label\");if(u||(!c||!c.value)&&(!f||!f.value)&&(!h||!h.value))return;t.textAlign=\"center\",t.textBaseline=\"bottom\"}var p,d=!r;r&&(p=r,t.translate(-p.x1,-p.y1)),null==i?(o.drawText(t,e,null,d,a),e.isEdge()&&(o.drawText(t,e,\"source\",d,a),o.drawText(t,e,\"target\",d,a))):o.drawText(t,e,i,d,a),r&&t.translate(p.x1,p.y1)},_s.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if((e=this.fontCaches[r]).context===t)return e;return e={context:t},this.fontCaches.push(e),e},_s.setupTextStyle=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=e.pstyle(\"font-style\").strValue,i=e.pstyle(\"font-size\").pfValue+\"px\",a=e.pstyle(\"font-family\").strValue,o=e.pstyle(\"font-weight\").strValue,s=r?e.effectiveOpacity()*e.pstyle(\"text-opacity\").value:1,l=e.pstyle(\"text-outline-opacity\").value*s,u=e.pstyle(\"color\").value,c=e.pstyle(\"text-outline-color\").value;t.font=n+\" \"+o+\" \"+i+\" \"+a,t.lineJoin=\"round\",this.colorFillStyle(t,u[0],u[1],u[2],s),this.colorStrokeStyle(t,c[0],c[1],c[2],l)},_s.getTextAngle=function(t,e){var r=t._private.rscratch,n=e?e+\"-\":\"\",i=t.pstyle(n+\"text-rotation\"),a=Ot(r,\"labelAngle\",e);return\"autorotate\"===i.strValue?t.isEdge()?a:0:\"none\"===i.strValue?0:i.pfValue},_s.drawText=function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e._private,o=a.rscratch,s=i?e.effectiveOpacity():1;if(!i||0!==s&&0!==e.pstyle(\"text-opacity\").value){\"main\"===r&&(r=null);var l,u,c=Ot(o,\"labelX\",r),f=Ot(o,\"labelY\",r),h=this.getLabelText(e,r);if(null!=h&&\"\"!==h&&!isNaN(c)&&!isNaN(f)){this.setupTextStyle(t,e,i);var p,d=r?r+\"-\":\"\",g=Ot(o,\"labelWidth\",r),v=Ot(o,\"labelHeight\",r),m=e.pstyle(d+\"text-margin-x\").pfValue,y=e.pstyle(d+\"text-margin-y\").pfValue,x=e.isEdge(),b=e.pstyle(\"text-halign\").value,_=e.pstyle(\"text-valign\").value;switch(x&&(b=\"center\",_=\"center\"),c+=m,f+=y,0!==(p=n?this.getTextAngle(e,r):0)&&(l=c,u=f,t.translate(l,u),t.rotate(p),c=0,f=0),_){case\"top\":break;case\"center\":f+=v/2;break;case\"bottom\":f+=v}var w=e.pstyle(\"text-background-opacity\").value,k=e.pstyle(\"text-border-opacity\").value,T=e.pstyle(\"text-border-width\").pfValue,M=e.pstyle(\"text-background-padding\").pfValue;if(w>0||T>0&&k>0){var A=c-M;switch(b){case\"left\":A-=g;break;case\"center\":A-=g/2}var S=f-v-M,E=g+2*M,C=v+2*M;if(w>0){var L=t.fillStyle,P=e.pstyle(\"text-background-color\").value;t.fillStyle=\"rgba(\"+P[0]+\",\"+P[1]+\",\"+P[2]+\",\"+w*s+\")\";var O=e.pstyle(\"text-background-shape\").strValue;0===O.indexOf(\"round\")?ws(t,A,S,E,C,2):t.fillRect(A,S,E,C),t.fillStyle=L}if(T>0&&k>0){var I=t.strokeStyle,D=t.lineWidth,z=e.pstyle(\"text-border-color\").value,R=e.pstyle(\"text-border-style\").value;if(t.strokeStyle=\"rgba(\"+z[0]+\",\"+z[1]+\",\"+z[2]+\",\"+k*s+\")\",t.lineWidth=T,t.setLineDash)switch(R){case\"dotted\":t.setLineDash([1,1]);break;case\"dashed\":t.setLineDash([4,2]);break;case\"double\":t.lineWidth=T/4,t.setLineDash([]);break;case\"solid\":t.setLineDash([])}if(t.strokeRect(A,S,E,C),\"double\"===R){var F=T/2;t.strokeRect(A+F,S+F,E-2*F,C-2*F)}t.setLineDash&&t.setLineDash([]),t.lineWidth=D,t.strokeStyle=I}}var N=2*e.pstyle(\"text-outline-width\").pfValue;if(N>0&&(t.lineWidth=N),\"wrap\"===e.pstyle(\"text-wrap\").value){var B=Ot(o,\"labelWrapCachedLines\",r),j=Ot(o,\"labelLineHeight\",r),U=g/2,V=this.getLabelJustification(e);switch(\"auto\"===V||(\"left\"===b?\"left\"===V?c+=-g:\"center\"===V&&(c+=-U):\"center\"===b?\"left\"===V?c+=-U:\"right\"===V&&(c+=U):\"right\"===b&&(\"center\"===V?c+=U:\"right\"===V&&(c+=g))),_){case\"top\":case\"center\":case\"bottom\":f-=(B.length-1)*j}for(var H=0;H<B.length;H++)N>0&&t.strokeText(B[H],c,f),t.fillText(B[H],c,f),f+=j}else N>0&&t.strokeText(h,c,f),t.fillText(h,c,f);0!==p&&(t.rotate(-p),t.translate(-l,-u))}}};var ks={drawNode:function(t,e,r){var n,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=e._private,c=u.rscratch,f=e.position();if(O(f.x)&&O(f.y)&&(!s||e.visible())){var h,p,d=s?e.effectiveOpacity():1,g=l.usePaths(),v=!1,m=e.padding();n=e.width()+2*m,i=e.height()+2*m,r&&(p=r,t.translate(-p.x1,-p.y1));for(var y=e.pstyle(\"background-image\"),x=y.value,b=new Array(x.length),_=new Array(x.length),w=0,k=0;k<x.length;k++){var T=x[k],M=b[k]=null!=T&&\"none\"!==T;if(M){var A=e.cy().style().getIndexedStyle(e,\"background-image-crossorigin\",\"value\",k);w++,_[k]=l.getCachedImage(T,A,(function(){u.backgroundTimestamp=Date.now(),e.emitAndNotify(\"background\")}))}}var S=e.pstyle(\"background-blacken\").value,E=e.pstyle(\"border-width\").pfValue,C=e.pstyle(\"background-opacity\").value*d,L=e.pstyle(\"border-color\").value,P=e.pstyle(\"border-style\").value,I=e.pstyle(\"border-opacity\").value*d;t.lineJoin=\"miter\";var D=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;l.eleFillStyle(t,e,r)},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I;l.colorStrokeStyle(t,L[0],L[1],L[2],e)},R=e.pstyle(\"shape\").strValue,F=e.pstyle(\"shape-polygon-points\").pfValue;if(g){t.translate(f.x,f.y);var N=l.nodePathCache=l.nodePathCache||[],B=ht(\"polygon\"===R?R+\",\"+F.join(\",\"):R,\"\"+i,\"\"+n),j=N[B];null!=j?(h=j,v=!0,c.pathCache=h):(h=new Path2D,N[B]=c.pathCache=h)}var U=function(){if(!v){var r=f;g&&(r={x:0,y:0}),l.nodeShapes[l.getNodeShape(e)].draw(h||t,r.x,r.y,n,i)}g?t.fill(h):t.fill()},V=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,a=0,o=0;o<_.length;o++){var s=e.cy().style().getIndexedStyle(e,\"background-image-containment\",\"value\",o);n&&\"over\"===s||!n&&\"inside\"===s?a++:b[o]&&_[o].complete&&!_[o].error&&(a++,l.drawInscribedImage(t,_[o],e,o,r))}u.backgrounding=!(a===w),i!==u.backgrounding&&e.updateStyle(!1)},H=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;l.hasPie(e)&&(l.drawPie(t,e,a),r&&(g||l.nodeShapes[l.getNodeShape(e)].draw(t,f.x,f.y,n,i)))},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,r=(S>0?S:-S)*e,n=S>0?0:255;0!==S&&(l.colorFillStyle(t,n,n,n,r),g?t.fill(h):t.fill())},G=function(){if(E>0){if(t.lineWidth=E,t.lineCap=\"butt\",t.setLineDash)switch(P){case\"dotted\":t.setLineDash([1,1]);break;case\"dashed\":t.setLineDash([4,2]);break;case\"solid\":case\"double\":t.setLineDash([])}if(g?t.stroke(h):t.stroke(),\"double\"===P){t.lineWidth=E/3;var e=t.globalCompositeOperation;t.globalCompositeOperation=\"destination-out\",g?t.stroke(h):t.stroke(),t.globalCompositeOperation=e}t.setLineDash&&t.setLineDash([])}},Y=function(){o&&l.drawNodeOverlay(t,e,f,n,i)},W=function(){o&&l.drawNodeUnderlay(t,e,f,n,i)},X=function(){l.drawElementText(t,e,null,a)},Z=\"yes\"===e.pstyle(\"ghost\").value;if(Z){var K=e.pstyle(\"ghost-offset-x\").pfValue,J=e.pstyle(\"ghost-offset-y\").pfValue,$=e.pstyle(\"ghost-opacity\").value,Q=$*d;t.translate(K,J),D($*C),U(),V(Q,!0),z($*I),G(),H(0!==S||0!==E),V(Q,!1),q(Q),t.translate(-K,-J)}g&&t.translate(-f.x,-f.y),W(),g&&t.translate(f.x,f.y),D(),U(),V(d,!0),z(),G(),H(0!==S||0!==E),V(d,!1),q(),g&&t.translate(-f.x,-f.y),X(),Y(),r&&t.translate(p.x1,p.y1)}}},Ts=function(t){if(![\"overlay\",\"underlay\"].includes(t))throw new Error(\"Invalid state\");return function(e,r,n,i,a){if(r.visible()){var o=r.pstyle(\"\".concat(t,\"-padding\")).pfValue,s=r.pstyle(\"\".concat(t,\"-opacity\")).value,l=r.pstyle(\"\".concat(t,\"-color\")).value,u=r.pstyle(\"\".concat(t,\"-shape\")).value;if(s>0){if(n=n||r.position(),null==i||null==a){var c=r.padding();i=r.width()+2*c,a=r.height()+2*c}this.colorFillStyle(e,l[0],l[1],l[2],s),this.nodeShapes[u].draw(e,n.x,n.y,i+2*o,a+2*o),e.fill()}}}};ks.drawNodeOverlay=Ts(\"overlay\"),ks.drawNodeUnderlay=Ts(\"underlay\"),ks.hasPie=function(t){return(t=t[0])._private.hasPie},ks.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle(\"pie-size\"),o=n.x,s=n.y,l=e.width(),u=e.height(),c=Math.min(l,u)/2,f=0;this.usePaths()&&(o=0,s=0),\"%\"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var h=1;h<=i.pieBackgroundN;h++){var p=e.pstyle(\"pie-\"+h+\"-background-size\").value,d=e.pstyle(\"pie-\"+h+\"-background-color\").value,g=e.pstyle(\"pie-\"+h+\"-background-opacity\").value*r,v=p/100;v+f>1&&(v=1-f);var m=1.5*Math.PI+2*Math.PI*f,y=m+2*Math.PI*v;0===p||f>=1||f+v>1||(t.beginPath(),t.moveTo(o,s),t.arc(o,s,c,m,y),t.closePath(),this.colorFillStyle(t,d[0],d[1],d[2],g),t.fill(),f+=v)}};for(var Ms={getPixelRatio:function(){var t=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e},paintCache:function(t){for(var e,r=this.paintCaches=this.paintCaches||[],n=!0,i=0;i<r.length;i++)if((e=r[i]).context===t){n=!1;break}return n&&(e={context:t},r.push(e)),e},createGradientStyleFor:function(t,e,r,n,i){var a,o=this.usePaths(),s=r.pstyle(e+\"-gradient-stop-colors\").value,l=r.pstyle(e+\"-gradient-stop-positions\").pfValue;if(\"radial-gradient\"===n)if(r.isEdge()){var u=r.sourceEndpoint(),c=r.targetEndpoint(),f=r.midpoint(),h=ae(u,f),p=ae(c,f);a=t.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(h,p))}else{var d=o?{x:0,y:0}:r.position(),g=r.paddedWidth(),v=r.paddedHeight();a=t.createRadialGradient(d.x,d.y,0,d.x,d.y,Math.max(g,v))}else if(r.isEdge()){var m=r.sourceEndpoint(),y=r.targetEndpoint();a=t.createLinearGradient(m.x,m.y,y.x,y.y)}else{var x=o?{x:0,y:0}:r.position(),b=r.paddedWidth()/2,_=r.paddedHeight()/2;switch(r.pstyle(\"background-gradient-direction\").value){case\"to-bottom\":a=t.createLinearGradient(x.x,x.y-_,x.x,x.y+_);break;case\"to-top\":a=t.createLinearGradient(x.x,x.y+_,x.x,x.y-_);break;case\"to-left\":a=t.createLinearGradient(x.x+b,x.y,x.x-b,x.y);break;case\"to-right\":a=t.createLinearGradient(x.x-b,x.y,x.x+b,x.y);break;case\"to-bottom-right\":case\"to-right-bottom\":a=t.createLinearGradient(x.x-b,x.y-_,x.x+b,x.y+_);break;case\"to-top-right\":case\"to-right-top\":a=t.createLinearGradient(x.x-b,x.y+_,x.x+b,x.y-_);break;case\"to-bottom-left\":case\"to-left-bottom\":a=t.createLinearGradient(x.x+b,x.y-_,x.x-b,x.y+_);break;case\"to-top-left\":case\"to-left-top\":a=t.createLinearGradient(x.x+b,x.y+_,x.x-b,x.y-_)}}if(!a)return null;for(var w=l.length===s.length,k=s.length,T=0;T<k;T++)a.addColorStop(w?l[T]:T/(k-1),\"rgba(\"+s[T][0]+\",\"+s[T][1]+\",\"+s[T][2]+\",\"+i+\")\");return a},gradientFillStyle:function(t,e,r,n){var i=this.createGradientStyleFor(t,\"background\",e,r,n);if(!i)return null;t.fillStyle=i},colorFillStyle:function(t,e,r,n,i){t.fillStyle=\"rgba(\"+e+\",\"+r+\",\"+n+\",\"+i+\")\"},eleFillStyle:function(t,e,r){var n=e.pstyle(\"background-fill\").value;if(\"linear-gradient\"===n||\"radial-gradient\"===n)this.gradientFillStyle(t,e,n,r);else{var i=e.pstyle(\"background-color\").value;this.colorFillStyle(t,i[0],i[1],i[2],r)}},gradientStrokeStyle:function(t,e,r,n){var i=this.createGradientStyleFor(t,\"line\",e,r,n);if(!i)return null;t.strokeStyle=i},colorStrokeStyle:function(t,e,r,n,i){t.strokeStyle=\"rgba(\"+e+\",\"+r+\",\"+n+\",\"+i+\")\"},eleStrokeStyle:function(t,e,r){var n=e.pstyle(\"line-fill\").value;if(\"linear-gradient\"===n||\"radial-gradient\"===n)this.gradientStrokeStyle(t,e,n,r);else{var i=e.pstyle(\"line-color\").value;this.colorStrokeStyle(t,i[0],i[1],i[2],r)}},matchCanvasSize:function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),i=n[2],a=n[3],o=e.getPixelRatio(),s=e.motionBlurPxRatio;t!==e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]&&t!==e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG]||(o=s);var l,u=i*o,c=a*o;if(u!==e.canvasWidth||c!==e.canvasHeight){e.fontCaches=null;var f=r.canvasContainer;f.style.width=i+\"px\",f.style.height=a+\"px\";for(var h=0;h<e.CANVAS_LAYERS;h++)(l=r.canvases[h]).width=u,l.height=c,l.style.width=i+\"px\",l.style.height=a+\"px\";for(h=0;h<e.BUFFER_COUNT;h++)(l=r.bufferCanvases[h]).width=u,l.height=c,l.style.width=i+\"px\",l.style.height=a+\"px\";e.textureMult=1,o<=1&&(l=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,l.width=u*e.textureMult,l.height=c*e.textureMult),e.canvasWidth=u,e.canvasHeight=c}},renderTo:function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},render:function(t){var e=(t=t||Et()).forcedContext,r=t.drawAllLayers,n=t.drawOnlyNodeLayer,i=t.forcedZoom,a=t.forcedPan,o=this,s=void 0===t.forcedPxRatio?this.getPixelRatio():t.forcedPxRatio,l=o.cy,u=o.data,c=u.canvasNeedsRedraw,f=o.textureOnViewport&&!e&&(o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming),h=void 0!==t.motionBlur?t.motionBlur:o.motionBlur,p=o.motionBlurPxRatio,d=l.hasCompoundNodes(),g=o.hoverData.draggingEles,v=!(!o.hoverData.selecting&&!o.touchData.selecting),m=h=h&&!e&&o.motionBlurEnabled&&!v;e||(o.prevPxRatio!==s&&(o.invalidateContainerClientCoordsCache(),o.matchCanvasSize(o.container),o.redrawHint(\"eles\",!0),o.redrawHint(\"drag\",!0)),o.prevPxRatio=s),!e&&o.motionBlurTimeout&&clearTimeout(o.motionBlurTimeout),h&&(null==o.mbFrames&&(o.mbFrames=0),o.mbFrames++,o.mbFrames<3&&(m=!1),o.mbFrames>o.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!f&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var y=l.style(),x=l.zoom(),b=void 0!==i?i:x,_=l.pan(),w={x:_.x,y:_.y},k={zoom:x,pan:{x:_.x,y:_.y}},T=o.prevViewport;void 0===T||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||g&&!d||(o.motionBlurPxRatio=1),a&&(w=a),b*=s,w.x*=s,w.y*=s;var M=o.getCachedZSortedEles();function A(t,e,r,n,i){var a=t.globalCompositeOperation;t.globalCompositeOperation=\"destination-out\",o.colorFillStyle(t,255,255,255,o.motionBlurTransparency),t.fillRect(e,r,n,i),t.globalCompositeOperation=a}function S(t,n){var s,l,c,f;o.clearingMotionBlur||t!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=w,l=b,c=o.canvasWidth,f=o.canvasHeight):(s={x:_.x*p,y:_.y*p},l=x*p,c=o.canvasWidth*p,f=o.canvasHeight*p),t.setTransform(1,0,0,1,0,0),\"motionBlur\"===n?A(t,0,0,c,f):e||void 0!==n&&!n||t.clearRect(0,0,c,f),r||(t.translate(s.x,s.y),t.scale(l,l)),a&&t.translate(a.x,a.y),i&&t.scale(i,i)}if(f||(o.textureDrawLastFrame=!1),f){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var E=o.data.bufferContexts[o.TEXTURE_BUFFER];E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:E,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(k=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var C=u.contexts[o.NODE],L=o.textureCache.texture;k=o.textureCache.viewport,C.setTransform(1,0,0,1,0,0),h?A(C,0,0,k.width,k.height):C.clearRect(0,0,k.width,k.height);var P=y.core(\"outside-texture-bg-color\").value,O=y.core(\"outside-texture-bg-opacity\").value;o.colorFillStyle(C,P[0],P[1],P[2],O),C.fillRect(0,0,k.width,k.height),x=l.zoom(),S(C,!1),C.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s),C.drawImage(L,k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s)}else o.textureOnViewport&&!e&&(o.textureCache=null);var I=l.extent(),D=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),z=o.hideEdgesOnViewport&&D,R=[];if(R[o.NODE]=!c[o.NODE]&&h&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,R[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),R[o.DRAG]=!c[o.DRAG]&&h&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,R[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||r||n||R[o.NODE]){var F=h&&!R[o.NODE]&&1!==p;S(C=e||(F?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),h&&!F?\"motionBlur\":void 0),z?o.drawCachedNodes(C,M.nondrag,s,I):o.drawLayeredElements(C,M.nondrag,s,I),o.debug&&o.drawDebugPoints(C,M.nondrag),r||h||(c[o.NODE]=!1)}if(!n&&(c[o.DRAG]||r||R[o.DRAG])&&(F=h&&!R[o.DRAG]&&1!==p,S(C=e||(F?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),h&&!F?\"motionBlur\":void 0),z?o.drawCachedNodes(C,M.drag,s,I):o.drawCachedElements(C,M.drag,s,I),o.debug&&o.drawDebugPoints(C,M.drag),r||h||(c[o.DRAG]=!1)),o.showFps||!n&&c[o.SELECT_BOX]&&!r){if(S(C=e||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){x=o.cy.zoom();var N=y.core(\"selection-box-border-width\").value/x;C.lineWidth=N,C.fillStyle=\"rgba(\"+y.core(\"selection-box-color\").value[0]+\",\"+y.core(\"selection-box-color\").value[1]+\",\"+y.core(\"selection-box-color\").value[2]+\",\"+y.core(\"selection-box-opacity\").value+\")\",C.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),N>0&&(C.strokeStyle=\"rgba(\"+y.core(\"selection-box-border-color\").value[0]+\",\"+y.core(\"selection-box-border-color\").value[1]+\",\"+y.core(\"selection-box-border-color\").value[2]+\",\"+y.core(\"selection-box-opacity\").value+\")\",C.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){x=o.cy.zoom();var B=u.bgActivePosistion;C.fillStyle=\"rgba(\"+y.core(\"active-bg-color\").value[0]+\",\"+y.core(\"active-bg-color\").value[1]+\",\"+y.core(\"active-bg-color\").value[2]+\",\"+y.core(\"active-bg-opacity\").value+\")\",C.beginPath(),C.arc(B.x,B.y,y.core(\"active-bg-size\").pfValue/x,0,2*Math.PI),C.fill()}var j=o.lastRedrawTime;if(o.showFps&&j){j=Math.round(j);var U=Math.round(1e3/j);C.setTransform(1,0,0,1,0,0),C.fillStyle=\"rgba(255, 0, 0, 0.75)\",C.strokeStyle=\"rgba(255, 0, 0, 0.75)\",C.lineWidth=1,C.fillText(\"1 frame = \"+j+\" ms = \"+U+\" fps\",0,20),C.strokeRect(0,30,250,20),C.fillRect(0,30,250*Math.min(U/60,1),20)}r||(c[o.SELECT_BOX]=!1)}if(h&&1!==p){var V=u.contexts[o.NODE],H=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],q=u.contexts[o.DRAG],G=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],Y=function(t,e,r){t.setTransform(1,0,0,1,0,0),r||!m?t.clearRect(0,0,o.canvasWidth,o.canvasHeight):A(t,0,0,o.canvasWidth,o.canvasHeight);var n=p;t.drawImage(e,0,0,o.canvasWidth*n,o.canvasHeight*n,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||R[o.NODE])&&(Y(V,H,R[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||R[o.DRAG])&&(Y(q,G,R[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=k,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),h&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!f,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),e||l.emit(\"render\")}},As={drawPolygonPath:function(t,e,r,n,i,a){var o=n/2,s=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*a[0],r+s*a[1]);for(var l=1;l<a.length/2;l++)t.lineTo(e+o*a[2*l],r+s*a[2*l+1]);t.closePath()},drawRoundPolygonPath:function(t,e,r,n,i,a){var o=n/2,s=i/2,l=Ne(n,i);t.beginPath&&t.beginPath();for(var u=0;u<a.length/4;u++){var c,f;f=0===u?a.length-2:4*u-2,c=4*u+2;var h=e+o*a[4*u],p=r+s*a[4*u+1],d=-a[f]*a[c]-a[f+1]*a[c+1],g=l/Math.tan(Math.acos(d)/2),v=h-g*a[f],m=p-g*a[f+1],y=h+g*a[c],x=p+g*a[c+1];0===u?t.moveTo(v,m):t.lineTo(v,m),t.arcTo(h,p,y,x,l)}t.closePath()},drawRoundRectanglePath:function(t,e,r,n,i){var a=n/2,o=i/2,s=Fe(n,i);t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.arcTo(e+a,r-o,e+a,r,s),t.arcTo(e+a,r+o,e,r+o,s),t.arcTo(e-a,r+o,e-a,r,s),t.arcTo(e-a,r-o,e,r-o,s),t.lineTo(e,r-o),t.closePath()},drawBottomRoundRectanglePath:function(t,e,r,n,i){var a=n/2,o=i/2,s=Fe(n,i);t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.lineTo(e+a,r-o),t.lineTo(e+a,r),t.arcTo(e+a,r+o,e,r+o,s),t.arcTo(e-a,r+o,e-a,r,s),t.lineTo(e-a,r-o),t.lineTo(e,r-o),t.closePath()},drawCutRectanglePath:function(t,e,r,n,i){var a=n/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e-a+8,r-o),t.lineTo(e+a-8,r-o),t.lineTo(e+a,r-o+8),t.lineTo(e+a,r+o-8),t.lineTo(e+a-8,r+o),t.lineTo(e-a+8,r+o),t.lineTo(e-a,r+o-8),t.lineTo(e-a,r-o+8),t.closePath()},drawBarrelPath:function(t,e,r,n,i){var a=n/2,o=i/2,s=e-a,l=e+a,u=r-o,c=r+o,f=Be(n,i),h=f.widthOffset,p=f.heightOffset,d=f.ctrlPtOffsetPct*h;t.beginPath&&t.beginPath(),t.moveTo(s,u+p),t.lineTo(s,c-p),t.quadraticCurveTo(s+d,c,s+h,c),t.lineTo(l-h,c),t.quadraticCurveTo(l-d,c,l,c-p),t.lineTo(l,u+p),t.quadraticCurveTo(l-d,u,l-h,u),t.lineTo(s+h,u),t.quadraticCurveTo(s+d,u,s,u+p),t.closePath()}},Ss=Math.sin(0),Es=Math.cos(0),Cs={},Ls={},Ps=Math.PI/40,Os=0*Math.PI;Os<2*Math.PI;Os+=Ps)Cs[Os]=Math.sin(Os),Ls[Os]=Math.cos(Os);As.drawEllipsePath=function(t,e,r,n,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,i/2,0,0,2*Math.PI);else for(var a,o,s=n/2,l=i/2,u=0*Math.PI;u<2*Math.PI;u+=Ps)a=e-s*Cs[u]*Ss+s*Ls[u]*Es,o=r+l*Ls[u]*Ss+l*Cs[u]*Es,0===u?t.moveTo(a,o):t.lineTo(a,o);t.closePath()};var Is={};function Ds(t){var e=t.indexOf(\",\");return t.substr(e+1)}function zs(t,e,r){var n=function(){return e.toDataURL(r,t.quality)};switch(t.output){case\"blob-promise\":return new Kr((function(n,i){try{e.toBlob((function(t){null!=t?n(t):i(new Error(\"`canvas.toBlob()` sent a null value in its callback\"))}),r,t.quality)}catch(t){i(t)}}));case\"blob\":return function(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),i=new Uint8Array(n),a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return new Blob([n],{type:e})}(Ds(n()),r);case\"base64\":return Ds(n());default:return n()}}Is.createBuffer=function(t,e){var r=document.createElement(\"canvas\");return r.width=t,r.height=e,[r,r.getContext(\"2d\")]},Is.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements().boundingBox(),n=this.findContainerClientCoords(),i=t.full?Math.ceil(r.w):n[2],a=t.full?Math.ceil(r.h):n[3],o=O(t.maxWidth)||O(t.maxHeight),s=this.getPixelRatio(),l=1;if(void 0!==t.scale)i*=t.scale,a*=t.scale,l=t.scale;else if(o){var u=1/0,c=1/0;O(t.maxWidth)&&(u=l*t.maxWidth/i),O(t.maxHeight)&&(c=l*t.maxHeight/a),i*=l=Math.min(u,c),a*=l}o||(i*=s,a*=s,l*=s);var f=document.createElement(\"canvas\");f.width=i,f.height=a,f.style.width=i+\"px\",f.style.height=a+\"px\";var h=f.getContext(\"2d\");if(i>0&&a>0){h.clearRect(0,0,i,a),h.globalCompositeOperation=\"source-over\";var p=this.getCachedZSortedEles();if(t.full)h.translate(-r.x1*l,-r.y1*l),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(r.x1*l,r.y1*l);else{var d=e.pan(),g={x:d.x*l,y:d.y*l};l*=e.zoom(),h.translate(g.x,g.y),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(-g.x,-g.y)}t.bg&&(h.globalCompositeOperation=\"destination-over\",h.fillStyle=t.bg,h.rect(0,0,i,a),h.fill())}return f},Is.png=function(t){return zs(t,this.bufferCanvasImage(t),\"image/png\")},Is.jpg=function(t){return zs(t,this.bufferCanvasImage(t),\"image/jpeg\")};var Rs=Ns,Fs=Ns.prototype;function Ns(t){var e=this;e.data={canvases:new Array(Fs.CANVAS_LAYERS),contexts:new Array(Fs.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Fs.CANVAS_LAYERS),bufferCanvases:new Array(Fs.BUFFER_COUNT),bufferContexts:new Array(Fs.CANVAS_LAYERS)};var r=\"-webkit-tap-highlight-color\",n=\"rgba(0,0,0,0)\";e.data.canvasContainer=document.createElement(\"div\");var i=e.data.canvasContainer.style;e.data.canvasContainer.style[r]=n,i.position=\"relative\",i.zIndex=\"0\",i.overflow=\"hidden\";var a=t.cy.container();a.appendChild(e.data.canvasContainer),a.style[r]=n;var o={\"-webkit-user-select\":\"none\",\"-moz-user-select\":\"-moz-none\",\"user-select\":\"none\",\"-webkit-tap-highlight-color\":\"rgba(0,0,0,0)\",\"outline-style\":\"none\"};w&&w.userAgent.match(/msie|trident|edge/i)&&(o[\"-ms-touch-action\"]=\"none\",o[\"touch-action\"]=\"none\");for(var s=0;s<Fs.CANVAS_LAYERS;s++){var l=e.data.canvases[s]=document.createElement(\"canvas\");e.data.contexts[s]=l.getContext(\"2d\"),Object.keys(o).forEach((function(t){l.style[t]=o[t]})),l.style.position=\"absolute\",l.setAttribute(\"data-id\",\"layer\"+s),l.style.zIndex=String(Fs.CANVAS_LAYERS-s),e.data.canvasContainer.appendChild(l),e.data.canvasNeedsRedraw[s]=!1}for(e.data.topCanvas=e.data.canvases[0],e.data.canvases[Fs.NODE].setAttribute(\"data-id\",\"layer\"+Fs.NODE+\"-node\"),e.data.canvases[Fs.SELECT_BOX].setAttribute(\"data-id\",\"layer\"+Fs.SELECT_BOX+\"-selectbox\"),e.data.canvases[Fs.DRAG].setAttribute(\"data-id\",\"layer\"+Fs.DRAG+\"-drag\"),s=0;s<Fs.BUFFER_COUNT;s++)e.data.bufferCanvases[s]=document.createElement(\"canvas\"),e.data.bufferContexts[s]=e.data.bufferCanvases[s].getContext(\"2d\"),e.data.bufferCanvases[s].style.position=\"absolute\",e.data.bufferCanvases[s].setAttribute(\"data-id\",\"buffer\"+s),e.data.bufferCanvases[s].style.zIndex=String(-s-1),e.data.bufferCanvases[s].style.visibility=\"hidden\";e.pathsEnabled=!0;var u=fe(),c=function(t){return{x:-t.w/2,y:-t.h/2}},f=function(t){return t.boundingBox(),t[0]._private.bodyBounds},h=function(t){return t.boundingBox(),t[0]._private.labelBounds.main||u},p=function(t){return t.boundingBox(),t[0]._private.labelBounds.source||u},d=function(t){return t.boundingBox(),t[0]._private.labelBounds.target||u},g=function(t,e){return e},v=function(t,e,r){var n=t?t+\"-\":\"\";return{x:e.x+r.pstyle(n+\"text-margin-x\").pfValue,y:e.y+r.pstyle(n+\"text-margin-y\").pfValue}},m=function(t,e,r){var n=t[0]._private.rscratch;return{x:n[e],y:n[r]}},y=e.data.eleTxrCache=new $o(e,{getKey:function(t){return t[0]._private.nodeKey},doesEleInvalidateKey:function(t){var e=t[0]._private;return!(e.oldBackgroundTimestamp===e.backgroundTimestamp)},drawElement:function(t,r,n,i,a){return e.drawElement(t,r,n,!1,!1,a)},getBoundingBox:f,getRotationPoint:function(t){return{x:((e=f(t)).x1+e.x2)/2,y:(e.y1+e.y2)/2};var e},getRotationOffset:function(t){return c(f(t))},allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),x=e.data.lblTxrCache=new $o(e,{getKey:function(t){return t[0]._private.labelStyleKey},drawElement:function(t,r,n,i,a){return e.drawElementText(t,r,n,i,\"main\",a)},getBoundingBox:h,getRotationPoint:function(t){return v(\"\",m(t,\"labelX\",\"labelY\"),t)},getRotationOffset:function(t){var e=h(t),r=c(h(t));if(t.isNode()){switch(t.pstyle(\"text-halign\").value){case\"left\":r.x=-e.w;break;case\"right\":r.x=0}switch(t.pstyle(\"text-valign\").value){case\"top\":r.y=-e.h;break;case\"bottom\":r.y=0}}return r},isVisible:g}),b=e.data.slbTxrCache=new $o(e,{getKey:function(t){return t[0]._private.sourceLabelStyleKey},drawElement:function(t,r,n,i,a){return e.drawElementText(t,r,n,i,\"source\",a)},getBoundingBox:p,getRotationPoint:function(t){return v(\"source\",m(t,\"sourceLabelX\",\"sourceLabelY\"),t)},getRotationOffset:function(t){return c(p(t))},isVisible:g}),_=e.data.tlbTxrCache=new $o(e,{getKey:function(t){return t[0]._private.targetLabelStyleKey},drawElement:function(t,r,n,i,a){return e.drawElementText(t,r,n,i,\"target\",a)},getBoundingBox:d,getRotationPoint:function(t){return v(\"target\",m(t,\"targetLabelX\",\"targetLabelY\"),t)},getRotationOffset:function(t){return c(d(t))},isVisible:g}),k=e.data.lyrTxrCache=new ts(e);e.onUpdateEleCalcs((function(t,e){y.invalidateElements(e),x.invalidateElements(e),b.invalidateElements(e),_.invalidateElements(e),k.invalidateElements(e);for(var r=0;r<e.length;r++){var n=e[r]._private;n.oldBackgroundTimestamp=n.backgroundTimestamp}}));var T=function(t){for(var e=0;e<t.length;e++)k.enqueueElementRefinement(t[e].ele)};y.onDequeue(T),x.onDequeue(T),b.onDequeue(T),_.onDequeue(T)}Fs.CANVAS_LAYERS=3,Fs.SELECT_BOX=0,Fs.DRAG=1,Fs.NODE=2,Fs.BUFFER_COUNT=3,Fs.TEXTURE_BUFFER=0,Fs.MOTIONBLUR_BUFFER_NODE=1,Fs.MOTIONBLUR_BUFFER_DRAG=2,Fs.redrawHint=function(t,e){var r=this;switch(t){case\"eles\":r.data.canvasNeedsRedraw[Fs.NODE]=e;break;case\"drag\":r.data.canvasNeedsRedraw[Fs.DRAG]=e;break;case\"select\":r.data.canvasNeedsRedraw[Fs.SELECT_BOX]=e}};var Bs=\"undefined\"!=typeof Path2D;Fs.path2dEnabled=function(t){if(void 0===t)return this.pathsEnabled;this.pathsEnabled=!!t},Fs.usePaths=function(){return Bs&&this.pathsEnabled},Fs.setImgSmoothing=function(t,e){null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},Fs.getImgSmoothing=function(t){return null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},Fs.makeOffscreenCanvas=function(t,e){var r;return\"undefined\"!==(\"undefined\"==typeof OffscreenCanvas?\"undefined\":d(OffscreenCanvas))?r=new OffscreenCanvas(t,e):((r=document.createElement(\"canvas\")).width=t,r.height=e),r},[as,fs,ys,bs,_s,ks,Ms,As,Is,{nodeShapeImpl:function(t,e,r,n,i,a,o){switch(t){case\"ellipse\":return this.drawEllipsePath(e,r,n,i,a);case\"polygon\":return this.drawPolygonPath(e,r,n,i,a,o);case\"round-polygon\":return this.drawRoundPolygonPath(e,r,n,i,a,o);case\"roundrectangle\":case\"round-rectangle\":return this.drawRoundRectanglePath(e,r,n,i,a);case\"cutrectangle\":case\"cut-rectangle\":return this.drawCutRectanglePath(e,r,n,i,a);case\"bottomroundrectangle\":case\"bottom-round-rectangle\":return this.drawBottomRoundRectanglePath(e,r,n,i,a);case\"barrel\":return this.drawBarrelPath(e,r,n,i,a)}}}].forEach((function(t){X(Fs,t)}));var js=[{type:\"layout\",extensions:_o},{type:\"renderer\",extensions:[{name:\"null\",impl:wo},{name:\"base\",impl:Go},{name:\"canvas\",impl:Rs}]}],Us={},Vs={};function Hs(t,e,r){var n=r,i=function(r){Tt(\"Can not register `\"+e+\"` for `\"+t+\"` since `\"+r+\"` already exists in the prototype and can not be overridden\")};if(\"core\"===t){if(Da.prototype[e])return i(e);Da.prototype[e]=r}else if(\"collection\"===t){if(Ji.prototype[e])return i(e);Ji.prototype[e]=r}else if(\"layout\"===t){for(var a=function(t){this.options=t,r.call(this,t),P(this._private)||(this._private={}),this._private.cy=t.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(r.prototype),s=[],l=0;l<s.length;l++){var u=s[l];o[u]=o[u]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var c=r.prototype.stop;o.stop=function(){var t=this.options;if(t&&t.animate){var e=this.animations;if(e)for(var r=0;r<e.length;r++)e[r].stop()}return c?c.call(this):this.emit(\"layoutstop\"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var f=function(t){return t._private.cy},h={addEventFields:function(t,e){e.layout=t,e.cy=f(t),e.target=t},bubble:function(){return!0},parent:function(t){return f(t)}};X(o,{createEmitter:function(){return this._private.emitter=new vi(h,this),this},emitter:function(){return this._private.emitter},on:function(t,e){return this.emitter().on(t,e),this},one:function(t,e){return this.emitter().one(t,e),this},once:function(t,e){return this.emitter().one(t,e),this},removeListener:function(t,e){return this.emitter().removeListener(t,e),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(t,e){return this.emitter().emit(t,e),this}}),rn.eventAliasesOn(o),n=a}else if(\"renderer\"===t&&\"null\"!==e&&\"base\"!==e){var p=qs(\"renderer\",\"base\"),d=p.prototype,g=r,v=r.prototype,m=function(){p.apply(this,arguments),g.apply(this,arguments)},y=m.prototype;for(var x in d){var b=d[x];if(null!=v[x])return i(x);y[x]=b}for(var _ in v)y[_]=v[_];d.clientFunctions.forEach((function(t){y[t]=y[t]||function(){wt(\"Renderer does not implement `renderer.\"+t+\"()` on its prototype\")}})),n=m}else if(\"__proto__\"===t||\"constructor\"===t||\"prototype\"===t)return wt(t+\" is an illegal type to be registered, possibly lead to prototype pollutions\");return K({map:Us,keys:[t,e],value:n})}function qs(t,e){return J({map:Us,keys:[t,e]})}function Gs(t,e,r,n,i){return K({map:Vs,keys:[t,e,r,n],value:i})}function Ys(t,e,r,n){return J({map:Vs,keys:[t,e,r,n]})}var Ws=function(){return 2===arguments.length?qs.apply(null,arguments):3===arguments.length?Hs.apply(null,arguments):4===arguments.length?Ys.apply(null,arguments):5===arguments.length?Gs.apply(null,arguments):void wt(\"Invalid extension access syntax\")};Da.prototype.extension=Ws,js.forEach((function(t){t.extensions.forEach((function(e){Hs(t.type,e.name,e.impl)}))}));var Xs=function t(){if(!(this instanceof t))return new t;this.length=0},Zs=Xs.prototype;Zs.instanceString=function(){return\"stylesheet\"},Zs.selector=function(t){return this[this.length++]={selector:t,properties:[]},this},Zs.css=function(t,e){var r=this.length-1;if(E(t))this[r].properties.push({name:t,value:e});else if(P(t))for(var n=t,i=Object.keys(n),a=0;a<i.length;a++){var o=i[a],s=n[o];if(null!=s){var l=Ca.properties[o]||Ca.properties[H(o)];if(null!=l){var u=l.name,c=s;this[r].properties.push({name:u,value:c})}}}return this},Zs.style=Zs.css,Zs.generateStyle=function(t){var e=new Ca(t);return this.appendToStyle(e)},Zs.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,i=r.properties;t.selector(n);for(var a=0;a<i.length;a++){var o=i[a];t.css(o.name,o.value)}}return t};var Ks=function(t){return void 0===t&&(t={}),P(t)?new Da(t):E(t)?Ws.apply(Ws,arguments):void 0};Ks.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Ks),t.apply(null,e),this},Ks.warnings=function(t){return kt(t)},Ks.version=\"3.23.0\",Ks.stylesheet=Ks.Stylesheet=Xs,t.exports=Ks},4485:(t,e,r)=>{t.exports=r(2894)},2894:function(t,e){var r,n,i;(function(){var a,o,s,l,u,c,f,h,p,d,g,v,m,y,x;s=Math.floor,d=Math.min,o=function(t,e){return t<e?-1:t>e?1:0},p=function(t,e,r,n,i){var a;if(null==r&&(r=0),null==i&&(i=o),r<0)throw new Error(\"lo must be non-negative\");for(null==n&&(n=t.length);r<n;)i(e,t[a=s((r+n)/2)])<0?n=a:r=a+1;return[].splice.apply(t,[r,r-r].concat(e)),e},c=function(t,e,r){return null==r&&(r=o),t.push(e),y(t,0,t.length-1,r)},u=function(t,e){var r,n;return null==e&&(e=o),r=t.pop(),t.length?(n=t[0],t[0]=r,x(t,0,e)):n=r,n},h=function(t,e,r){var n;return null==r&&(r=o),n=t[0],t[0]=e,x(t,0,r),n},f=function(t,e,r){var n;return null==r&&(r=o),t.length&&r(t[0],e)<0&&(e=(n=[t[0],e])[0],t[0]=n[1],x(t,0,r)),e},l=function(t,e){var r,n,i,a,l,u;for(null==e&&(e=o),l=[],n=0,i=(a=function(){u=[];for(var e=0,r=s(t.length/2);0<=r?e<r:e>r;0<=r?e++:e--)u.push(e);return u}.apply(this).reverse()).length;n<i;n++)r=a[n],l.push(x(t,r,e));return l},m=function(t,e,r){var n;if(null==r&&(r=o),-1!==(n=t.indexOf(e)))return y(t,0,n,r),x(t,n,r)},g=function(t,e,r){var n,i,a,s,u;if(null==r&&(r=o),!(i=t.slice(0,e)).length)return i;for(l(i,r),a=0,s=(u=t.slice(e)).length;a<s;a++)n=u[a],f(i,n,r);return i.sort(r).reverse()},v=function(t,e,r){var n,i,a,s,c,f,h,g,v;if(null==r&&(r=o),10*e<=t.length){if(!(a=t.slice(0,e).sort(r)).length)return a;for(i=a[a.length-1],s=0,f=(h=t.slice(e)).length;s<f;s++)r(n=h[s],i)<0&&(p(a,n,0,null,r),a.pop(),i=a[a.length-1]);return a}for(l(t,r),v=[],c=0,g=d(e,t.length);0<=g?c<g:c>g;0<=g?++c:--c)v.push(u(t,r));return v},y=function(t,e,r,n){var i,a,s;for(null==n&&(n=o),i=t[r];r>e&&n(i,a=t[s=r-1>>1])<0;)t[r]=a,r=s;return t[r]=i},x=function(t,e,r){var n,i,a,s,l;for(null==r&&(r=o),i=t.length,l=e,a=t[e],n=2*e+1;n<i;)(s=n+1)<i&&!(r(t[n],t[s])<0)&&(n=s),t[e]=t[n],n=2*(e=n)+1;return t[e]=a,y(t,l,e,r)},a=function(){function t(t){this.cmp=null!=t?t:o,this.nodes=[]}return t.push=c,t.pop=u,t.replace=h,t.pushpop=f,t.heapify=l,t.updateItem=m,t.nlargest=g,t.nsmallest=v,t.prototype.push=function(t){return c(this.nodes,t,this.cmp)},t.prototype.pop=function(){return u(this.nodes,this.cmp)},t.prototype.peek=function(){return this.nodes[0]},t.prototype.contains=function(t){return-1!==this.nodes.indexOf(t)},t.prototype.replace=function(t){return h(this.nodes,t,this.cmp)},t.prototype.pushpop=function(t){return f(this.nodes,t,this.cmp)},t.prototype.heapify=function(){return l(this.nodes,this.cmp)},t.prototype.updateItem=function(t){return m(this.nodes,t,this.cmp)},t.prototype.clear=function(){return this.nodes=[]},t.prototype.empty=function(){return 0===this.nodes.length},t.prototype.size=function(){return this.nodes.length},t.prototype.clone=function(){var e;return(e=new t).nodes=this.nodes.slice(0),e},t.prototype.toArray=function(){return this.nodes.slice(0)},t.prototype.insert=t.prototype.push,t.prototype.top=t.prototype.peek,t.prototype.front=t.prototype.peek,t.prototype.has=t.prototype.contains,t.prototype.copy=t.prototype.clone,t}(),n=[],void 0===(i=\"function\"==typeof(r=function(){return a})?r.apply(e,n):r)||(t.exports=i)}).call(this)},8679:(t,e,r)=>{\"use strict\";var n=r(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(t){return n.isMemo(t)?o:s[t.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,r,n){if(\"string\"!=typeof r){if(d){var i=p(r);i&&i!==d&&t(e,i,n)}var o=c(r);f&&(o=o.concat(f(r)));for(var s=l(e),g=l(r),v=0;v<o.length;++v){var m=o[v];if(!(a[m]||n&&n[m]||g&&g[m]||s&&s[m])){var y=h(r,m);try{u(e,m,y)}catch(t){}}}}return e}},1989:(t,e,r)=>{var n=r(1789),i=r(401),a=r(7667),o=r(1327),s=r(1866);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},8407:(t,e,r)=>{var n=r(7040),i=r(4125),a=r(2117),o=r(7518),s=r(4705);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},7071:(t,e,r)=>{var n=r(852)(r(5639),\"Map\");t.exports=n},3369:(t,e,r)=>{var n=r(4785),i=r(1285),a=r(6e3),o=r(9916),s=r(5265);function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,t.exports=l},2705:(t,e,r)=>{var n=r(5639).Symbol;t.exports=n},9932:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},4865:(t,e,r)=>{var n=r(9465),i=r(7813),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var o=t[e];a.call(t,e)&&i(o,r)&&(void 0!==r||e in t)||n(t,e,r)}},8470:(t,e,r)=>{var n=r(7813);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},9465:(t,e,r)=>{var n=r(8777);t.exports=function(t,e,r){\"__proto__\"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},7786:(t,e,r)=>{var n=r(1811),i=r(327);t.exports=function(t,e){for(var r=0,a=(e=n(e,t)).length;null!=t&&r<a;)t=t[i(e[r++])];return r&&r==a?t:void 0}},4239:(t,e,r)=>{var n=r(2705),i=r(9607),a=r(2333),o=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?\"[object Undefined]\":\"[object Null]\":o&&o in Object(t)?i(t):a(t)}},8458:(t,e,r)=>{var n=r(3560),i=r(5346),a=r(3218),o=r(346),s=/^\\[object .+?Constructor\\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,f=u.hasOwnProperty,h=RegExp(\"^\"+c.call(f).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");t.exports=function(t){return!(!a(t)||i(t))&&(n(t)?h:s).test(o(t))}},611:(t,e,r)=>{var n=r(4865),i=r(1811),a=r(5776),o=r(3218),s=r(327);t.exports=function(t,e,r,l){if(!o(t))return t;for(var u=-1,c=(e=i(e,t)).length,f=c-1,h=t;null!=h&&++u<c;){var p=s(e[u]),d=r;if(\"__proto__\"===p||\"constructor\"===p||\"prototype\"===p)return t;if(u!=f){var g=h[p];void 0===(d=l?l(g,p,h):void 0)&&(d=o(g)?g:a(e[u+1])?[]:{})}n(h,p,d),h=h[p]}return t}},531:(t,e,r)=>{var n=r(2705),i=r(9932),a=r(1469),o=r(3448),s=n?n.prototype:void 0,l=s?s.toString:void 0;t.exports=function t(e){if(\"string\"==typeof e)return e;if(a(e))return i(e,t)+\"\";if(o(e))return l?l.call(e):\"\";var r=e+\"\";return\"0\"==r&&1/e==-1/0?\"-0\":r}},7561:(t,e,r)=>{var n=r(7990),i=/^\\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(i,\"\"):t}},1811:(t,e,r)=>{var n=r(1469),i=r(5403),a=r(5514),o=r(9833);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:a(o(t))}},278:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},4429:(t,e,r)=>{var n=r(5639)[\"__core-js_shared__\"];t.exports=n},8777:(t,e,r)=>{var n=r(852),i=function(){try{var t=n(Object,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}();t.exports=i},1957:(t,e,r)=>{var n=\"object\"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},5050:(t,e,r)=>{var n=r(7019);t.exports=function(t,e){var r=t.__data__;return n(e)?r[\"string\"==typeof e?\"string\":\"hash\"]:r.map}},852:(t,e,r)=>{var n=r(8458),i=r(7801);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},9607:(t,e,r)=>{var n=r(2705),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=o.call(t);return n&&(e?t[s]=r:delete t[s]),i}},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,r)=>{var n=r(4536);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,r)=>{var n=r(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return\"__lodash_hash_undefined__\"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},1327:(t,e,r)=>{var n=r(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},1866:(t,e,r)=>{var n=r(4536);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?\"__lodash_hash_undefined__\":e,this}},5776:t=>{var e=/^(?:0|[1-9]\\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&(\"number\"==n||\"symbol\"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},5403:(t,e,r)=>{var n=r(1469),i=r(3448),a=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,o=/^\\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!(\"number\"!=r&&\"symbol\"!=r&&\"boolean\"!=r&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},7019:t=>{t.exports=function(t){var e=typeof t;return\"string\"==e||\"number\"==e||\"symbol\"==e||\"boolean\"==e?\"__proto__\"!==t:null===t}},5346:(t,e,r)=>{var n,i=r(4429),a=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+n:\"\";t.exports=function(t){return!!a&&a in t}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,r)=>{var n=r(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},2117:(t,e,r)=>{var n=r(8470);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},7518:(t,e,r)=>{var n=r(8470);t.exports=function(t){return n(this.__data__,t)>-1}},4705:(t,e,r)=>{var n=r(8470);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},4785:(t,e,r)=>{var n=r(1989),i=r(8407),a=r(7071);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},1285:(t,e,r)=>{var n=r(5050);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).get(t)}},9916:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).has(t)}},5265:(t,e,r)=>{var n=r(5050);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},4523:(t,e,r)=>{var n=r(8306);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},4536:(t,e,r)=>{var n=r(852)(Object,\"create\");t.exports=n},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5639:(t,e,r)=>{var n=r(1957),i=\"object\"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function(\"return this\")();t.exports=a},5514:(t,e,r)=>{var n=r(4523),i=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,a=/\\\\(\\\\)?/g,o=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(\"\"),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(a,\"$1\"):r||t)})),e}));t.exports=o},327:(t,e,r)=>{var n=r(3448);t.exports=function(t){if(\"string\"==typeof t||n(t))return t;var e=t+\"\";return\"0\"==e&&1/t==-1/0?\"-0\":e}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+\"\"}catch(t){}}return\"\"}},7990:t=>{var e=/\\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},3279:(t,e,r)=>{var n=r(3218),i=r(7771),a=r(4841),o=Math.max,s=Math.min;t.exports=function(t,e,r){var l,u,c,f,h,p,d=0,g=!1,v=!1,m=!0;if(\"function\"!=typeof t)throw new TypeError(\"Expected a function\");function y(e){var r=l,n=u;return l=u=void 0,d=e,f=t.apply(n,r)}function x(t){return d=t,h=setTimeout(_,e),g?y(t):f}function b(t){var r=t-p;return void 0===p||r>=e||r<0||v&&t-d>=c}function _(){var t=i();if(b(t))return w(t);h=setTimeout(_,function(t){var r=e-(t-p);return v?s(r,c-(t-d)):r}(t))}function w(t){return h=void 0,m&&l?y(t):(l=u=void 0,f)}function k(){var t=i(),r=b(t);if(l=arguments,u=this,p=t,r){if(void 0===h)return x(p);if(v)return clearTimeout(h),h=setTimeout(_,e),y(p)}return void 0===h&&(h=setTimeout(_,e)),f}return e=a(e)||0,n(r)&&(g=!!r.leading,c=(v=\"maxWait\"in r)?o(a(r.maxWait)||0,e):c,m=\"trailing\"in r?!!r.trailing:m),k.cancel=function(){void 0!==h&&clearTimeout(h),d=0,l=p=u=h=void 0},k.flush=function(){return void 0===h?f:w(i())},k}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},7361:(t,e,r)=>{var n=r(7786);t.exports=function(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},1469:t=>{var e=Array.isArray;t.exports=e},3560:(t,e,r)=>{var n=r(4239),i=r(3218);t.exports=function(t){if(!i(t))return!1;var e=n(t);return\"[object Function]\"==e||\"[object GeneratorFunction]\"==e||\"[object AsyncFunction]\"==e||\"[object Proxy]\"==e}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&(\"object\"==e||\"function\"==e)}},7005:t=>{t.exports=function(t){return null!=t&&\"object\"==typeof t}},3448:(t,e,r)=>{var n=r(4239),i=r(7005);t.exports=function(t){return\"symbol\"==typeof t||i(t)&&\"[object Symbol]\"==n(t)}},8306:(t,e,r)=>{var n=r(3369);function i(t,e){if(\"function\"!=typeof t||null!=e&&\"function\"!=typeof e)throw new TypeError(\"Expected a function\");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},7771:(t,e,r)=>{var n=r(5639);t.exports=function(){return n.Date.now()}},6968:(t,e,r)=>{var n=r(611);t.exports=function(t,e,r){return null==t?t:n(t,e,r)}},4841:(t,e,r)=>{var n=r(7561),i=r(3218),a=r(3448),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if(\"number\"==typeof t)return t;if(a(t))return NaN;if(i(t)){var e=\"function\"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+\"\":e}if(\"string\"!=typeof t)return 0===t?t:+t;t=n(t);var r=s.test(t);return r||l.test(t)?u(t.slice(2),r?2:8):o.test(t)?NaN:+t}},84:(t,e,r)=>{var n=r(9932),i=r(278),a=r(1469),o=r(3448),s=r(5514),l=r(327),u=r(9833);t.exports=function(t){return a(t)?n(t,l):o(t)?[t]:i(s(u(t)))}},9833:(t,e,r)=>{var n=r(531);t.exports=function(t){return null==t?\"\":n(t)}},7418:t=>{\"use strict\";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String(\"abc\");if(t[5]=\"de\",\"5\"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e[\"_\"+String.fromCharCode(r)]=r;if(\"0123456789\"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(\"\"))return!1;var n={};return\"abcdefghijklmnopqrst\".split(\"\").forEach((function(t){n[t]=t})),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},n)).join(\"\")}catch(t){return!1}}()?Object.assign:function(t,a){for(var o,s,l=i(t),u=1;u<arguments.length;u++){for(var c in o=Object(arguments[u]))r.call(o,c)&&(l[c]=o[c]);if(e){s=e(o);for(var f=0;f<s.length;f++)n.call(o,s[f])&&(l[s[f]]=o[s[f]])}}return l}},5478:(t,e,r)=>{t.exports=function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var l=new Error(\"Cannot find module '\"+o+\"'\");throw l.code=\"MODULE_NOT_FOUND\",l}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var a=void 0,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){\"use strict\";var n=t(\"../src/lib\"),i={\"X,X div\":'direction:ltr;font-family:\"Open Sans\",verdana,arial,sans-serif;margin:0;padding:0;',\"X input,X button\":'font-family:\"Open Sans\",verdana,arial,sans-serif;',\"X input:focus,X button:focus\":\"outline:none;\",\"X a\":\"text-decoration:none;\",\"X a:hover\":\"text-decoration:none;\",\"X .crisp\":\"shape-rendering:crispEdges;\",\"X .user-select-none\":\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\",\"X svg\":\"overflow:hidden;\",\"X svg a\":\"fill:#447adb;\",\"X svg a:hover\":\"fill:#3c6dc5;\",\"X .main-svg\":\"position:absolute;top:0;left:0;pointer-events:none;\",\"X .main-svg .draglayer\":\"pointer-events:all;\",\"X .cursor-default\":\"cursor:default;\",\"X .cursor-pointer\":\"cursor:pointer;\",\"X .cursor-crosshair\":\"cursor:crosshair;\",\"X .cursor-move\":\"cursor:move;\",\"X .cursor-col-resize\":\"cursor:col-resize;\",\"X .cursor-row-resize\":\"cursor:row-resize;\",\"X .cursor-ns-resize\":\"cursor:ns-resize;\",\"X .cursor-ew-resize\":\"cursor:ew-resize;\",\"X .cursor-sw-resize\":\"cursor:sw-resize;\",\"X .cursor-s-resize\":\"cursor:s-resize;\",\"X .cursor-se-resize\":\"cursor:se-resize;\",\"X .cursor-w-resize\":\"cursor:w-resize;\",\"X .cursor-e-resize\":\"cursor:e-resize;\",\"X .cursor-nw-resize\":\"cursor:nw-resize;\",\"X .cursor-n-resize\":\"cursor:n-resize;\",\"X .cursor-ne-resize\":\"cursor:ne-resize;\",\"X .cursor-grab\":\"cursor:-webkit-grab;cursor:grab;\",\"X .modebar\":\"position:absolute;top:2px;right:2px;\",\"X .ease-bg\":\"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;\",\"X .modebar--hover>:not(.watermark)\":\"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;\",\"X:hover .modebar--hover .modebar-group\":\"opacity:1;\",\"X .modebar-group\":\"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\",\"X .modebar-btn\":\"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;\",\"X .modebar-btn svg\":\"position:relative;top:2px;\",\"X .modebar.vertical\":\"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\",\"X .modebar.vertical svg\":\"top:-1px;\",\"X .modebar.vertical .modebar-group\":\"display:block;float:none;padding-left:0px;padding-bottom:8px;\",\"X .modebar.vertical .modebar-group .modebar-btn\":\"display:block;text-align:center;\",\"X [data-title]:before,X [data-title]:after\":\"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;\",\"X [data-title]:hover:before,X [data-title]:hover:after\":\"display:block;opacity:1;\",\"X [data-title]:before\":'content:\"\";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',\"X [data-title]:after\":\"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;\",\"X .vertical [data-title]:before,X .vertical [data-title]:after\":\"top:0%;right:200%;\",\"X .vertical [data-title]:before\":\"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;\",Y:'font-family:\"Open Sans\",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',\"Y p\":\"margin:0;\",\"Y .notifier-note\":\"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;\",\"Y .notifier-close\":\"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;\",\"Y .notifier-close:hover\":\"color:#444;text-decoration:none;cursor:pointer;\"};for(var a in i){var o=a.replace(/^,/,\" ,\").replace(/X/g,\".js-plotly-plot .plotly\").replace(/Y/g,\".plotly-notifier\");n.addStyleRule(o,i[a])}},{\"../src/lib\":515}],2:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/aggregate\")},{\"../src/transforms/aggregate\":1127}],3:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/bar\")},{\"../src/traces/bar\":665}],4:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/barpolar\")},{\"../src/traces/barpolar\":678}],5:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/box\")},{\"../src/traces/box\":688}],6:[function(t,e,r){\"use strict\";e.exports=t(\"../src/components/calendars\")},{\"../src/components/calendars\":365}],7:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/candlestick\")},{\"../src/traces/candlestick\":697}],8:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/carpet\")},{\"../src/traces/carpet\":716}],9:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/choropleth\")},{\"../src/traces/choropleth\":730}],10:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/choroplethmapbox\")},{\"../src/traces/choroplethmapbox\":737}],11:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/cone\")},{\"../src/traces/cone\":743}],12:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/contour\")},{\"../src/traces/contour\":758}],13:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/contourcarpet\")},{\"../src/traces/contourcarpet\":769}],14:[function(t,e,r){\"use strict\";e.exports=t(\"../src/core\")},{\"../src/core\":493}],15:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/densitymapbox\")},{\"../src/traces/densitymapbox\":777}],16:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/filter\")},{\"../src/transforms/filter\":1128}],17:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/funnel\")},{\"../src/traces/funnel\":787}],18:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/funnelarea\")},{\"../src/traces/funnelarea\":796}],19:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/groupby\")},{\"../src/transforms/groupby\":1129}],20:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/heatmap\")},{\"../src/traces/heatmap\":809}],21:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/heatmapgl\")},{\"../src/traces/heatmapgl\":820}],22:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram\")},{\"../src/traces/histogram\":832}],23:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram2d\")},{\"../src/traces/histogram2d\":838}],24:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram2dcontour\")},{\"../src/traces/histogram2dcontour\":842}],25:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/icicle\")},{\"../src/traces/icicle\":848}],26:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/image\")},{\"../src/traces/image\":861}],27:[function(t,e,r){\"use strict\";var n=t(\"./core\");n.register([t(\"./bar\"),t(\"./box\"),t(\"./heatmap\"),t(\"./histogram\"),t(\"./histogram2d\"),t(\"./histogram2dcontour\"),t(\"./contour\"),t(\"./scatterternary\"),t(\"./violin\"),t(\"./funnel\"),t(\"./waterfall\"),t(\"./image\"),t(\"./pie\"),t(\"./sunburst\"),t(\"./treemap\"),t(\"./icicle\"),t(\"./funnelarea\"),t(\"./scatter3d\"),t(\"./surface\"),t(\"./isosurface\"),t(\"./volume\"),t(\"./mesh3d\"),t(\"./cone\"),t(\"./streamtube\"),t(\"./scattergeo\"),t(\"./choropleth\"),t(\"./scattergl\"),t(\"./splom\"),t(\"./pointcloud\"),t(\"./heatmapgl\"),t(\"./parcoords\"),t(\"./parcats\"),t(\"./scattermapbox\"),t(\"./choroplethmapbox\"),t(\"./densitymapbox\"),t(\"./sankey\"),t(\"./indicator\"),t(\"./table\"),t(\"./carpet\"),t(\"./scattercarpet\"),t(\"./contourcarpet\"),t(\"./ohlc\"),t(\"./candlestick\"),t(\"./scatterpolar\"),t(\"./scatterpolargl\"),t(\"./barpolar\"),t(\"./scattersmith\"),t(\"./aggregate\"),t(\"./filter\"),t(\"./groupby\"),t(\"./sort\"),t(\"./calendars\")]),e.exports=n},{\"./aggregate\":2,\"./bar\":3,\"./barpolar\":4,\"./box\":5,\"./calendars\":6,\"./candlestick\":7,\"./carpet\":8,\"./choropleth\":9,\"./choroplethmapbox\":10,\"./cone\":11,\"./contour\":12,\"./contourcarpet\":13,\"./core\":14,\"./densitymapbox\":15,\"./filter\":16,\"./funnel\":17,\"./funnelarea\":18,\"./groupby\":19,\"./heatmap\":20,\"./heatmapgl\":21,\"./histogram\":22,\"./histogram2d\":23,\"./histogram2dcontour\":24,\"./icicle\":25,\"./image\":26,\"./indicator\":28,\"./isosurface\":29,\"./mesh3d\":30,\"./ohlc\":31,\"./parcats\":32,\"./parcoords\":33,\"./pie\":34,\"./pointcloud\":35,\"./sankey\":36,\"./scatter3d\":37,\"./scattercarpet\":38,\"./scattergeo\":39,\"./scattergl\":40,\"./scattermapbox\":41,\"./scatterpolar\":42,\"./scatterpolargl\":43,\"./scattersmith\":44,\"./scatterternary\":45,\"./sort\":46,\"./splom\":47,\"./streamtube\":48,\"./sunburst\":49,\"./surface\":50,\"./table\":51,\"./treemap\":52,\"./violin\":53,\"./volume\":54,\"./waterfall\":55}],28:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/indicator\")},{\"../src/traces/indicator\":869}],29:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/isosurface\")},{\"../src/traces/isosurface\":875}],30:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/mesh3d\")},{\"../src/traces/mesh3d\":880}],31:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/ohlc\")},{\"../src/traces/ohlc\":885}],32:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/parcats\")},{\"../src/traces/parcats\":894}],33:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/parcoords\")},{\"../src/traces/parcoords\":905}],34:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/pie\")},{\"../src/traces/pie\":916}],35:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/pointcloud\")},{\"../src/traces/pointcloud\":925}],36:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/sankey\")},{\"../src/traces/sankey\":931}],37:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatter3d\")},{\"../src/traces/scatter3d\":969}],38:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattercarpet\")},{\"../src/traces/scattercarpet\":976}],39:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattergeo\")},{\"../src/traces/scattergeo\":984}],40:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattergl\")},{\"../src/traces/scattergl\":998}],41:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattermapbox\")},{\"../src/traces/scattermapbox\":1008}],42:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterpolar\")},{\"../src/traces/scatterpolar\":1016}],43:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterpolargl\")},{\"../src/traces/scatterpolargl\":1024}],44:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattersmith\")},{\"../src/traces/scattersmith\":1031}],45:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterternary\")},{\"../src/traces/scatterternary\":1039}],46:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/sort\")},{\"../src/transforms/sort\":1131}],47:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/splom\")},{\"../src/traces/splom\":1049}],48:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/streamtube\")},{\"../src/traces/streamtube\":1057}],49:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/sunburst\")},{\"../src/traces/sunburst\":1065}],50:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/surface\")},{\"../src/traces/surface\":1074}],51:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/table\")},{\"../src/traces/table\":1082}],52:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/treemap\")},{\"../src/traces/treemap\":1093}],53:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/violin\")},{\"../src/traces/violin\":1106}],54:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/volume\")},{\"../src/traces/volume\":1114}],55:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/waterfall\")},{\"../src/traces/waterfall\":1122}],56:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n,i){\"use strict\";function a(t){return t.target.depth}function o(t,e){return t.sourceLinks.length?t.depth:e-1}function s(t){return function(){return t}}i=i&&i.hasOwnProperty(\"default\")?i.default:i;var l=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t};function u(t,e){return f(t.source,e.source)||t.index-e.index}function c(t,e){return f(t.target,e.target)||t.index-e.index}function f(t,e){return t.partOfCycle===e.partOfCycle?t.y0-e.y0:\"top\"===t.circularLinkType||\"bottom\"===e.circularLinkType?-1:1}function h(t){return t.value}function p(t){return(t.y0+t.y1)/2}function d(t){return p(t.source)}function g(t){return p(t.target)}function v(t){return t.index}function m(t){return t.nodes}function y(t){return t.links}function x(t,e){var r=t.get(e);if(!r)throw new Error(\"missing: \"+e);return r}function b(t,e){return e(t)}var _=25,w=10;function k(t,e,r){var n=0;if(null===r){for(var a=[],o=0;o<t.links.length;o++){var s=t.links[o],l=s.source.index,u=s.target.index;a[l]||(a[l]=[]),a[u]||(a[u]=[]),-1===a[l].indexOf(u)&&a[l].push(u)}var c=i(a);c.sort((function(t,e){return t.length-e.length}));var f={};for(o=0;o<c.length;o++){var h=c[o].slice(-2);f[h[0]]||(f[h[0]]={}),f[h[0]][h[1]]=!0}t.links.forEach((function(t){var e=t.target.index,r=t.source.index;e===r||f[r]&&f[r][e]?(t.circular=!0,t.circularLinkID=n,n+=1):t.circular=!1}))}else t.links.forEach((function(t){t.source[r]<t.target[r]?t.circular=!1:(t.circular=!0,t.circularLinkID=n,n+=1)}))}function T(t,e){var r=0,n=0;t.links.forEach((function(i){i.circular&&(i.source.circularLinkType||i.target.circularLinkType?i.circularLinkType=i.source.circularLinkType?i.source.circularLinkType:i.target.circularLinkType:i.circularLinkType=r<n?\"top\":\"bottom\",\"top\"==i.circularLinkType?r+=1:n+=1,t.nodes.forEach((function(t){b(t,e)!=b(i.source,e)&&b(t,e)!=b(i.target,e)||(t.circularLinkType=i.circularLinkType)})))})),t.links.forEach((function(t){t.circular&&(t.source.circularLinkType==t.target.circularLinkType&&(t.circularLinkType=t.source.circularLinkType),G(t,e)&&(t.circularLinkType=t.source.circularLinkType))}))}function M(t){var e=Math.abs(t.y1-t.y0),r=Math.abs(t.target.x0-t.source.x1);return Math.atan(r/e)}function A(t,e){var r=0;t.sourceLinks.forEach((function(t){r=t.circular&&!G(t,e)?r+1:r}));var n=0;return t.targetLinks.forEach((function(t){n=t.circular&&!G(t,e)?n+1:n})),r+n}function S(t){var e=t.source.sourceLinks,r=0;e.forEach((function(t){r=t.circular?r+1:r}));var n=t.target.targetLinks,i=0;return n.forEach((function(t){i=t.circular?i+1:i})),!(r>1||i>1)}function E(t,e,r){return t.sort(L),t.forEach((function(n,i){var a,o,s=0;if(G(n,r)&&S(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;l<i;l++)if(a=t[i],o=t[l],!(a.source.column<o.target.column||a.target.column>o.source.column)){var u=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=u>s?u:s}n.circularPathData.verticalBuffer=s+n.width/2}})),t}function C(t,r,i,a){var o=e.min(t.links,(function(t){return t.source.y0}));t.links.forEach((function(t){t.circular&&(t.circularPathData={})})),E(t.links.filter((function(t){return\"top\"==t.circularLinkType})),r,a),E(t.links.filter((function(t){return\"bottom\"==t.circularLinkType})),r,a),t.links.forEach((function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+w,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,G(e,a)&&S(e))e.circularPathData.leftSmallArcRadius=w+e.width/2,e.circularPathData.leftLargeArcRadius=w+e.width/2,e.circularPathData.rightSmallArcRadius=w+e.width/2,e.circularPathData.rightLargeArcRadius=w+e.width/2,\"bottom\"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,u=t.links.filter((function(t){return t.source.column==s&&t.circularLinkType==l}));\"bottom\"==e.circularLinkType?u.sort(O):u.sort(P);var c=0;u.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=w+e.width/2+c,e.circularPathData.leftLargeArcRadius=w+e.width/2+n*r+c),c+=t.width})),s=e.target.column,u=t.links.filter((function(t){return t.target.column==s&&t.circularLinkType==l})),\"bottom\"==e.circularLinkType?u.sort(D):u.sort(I),c=0,u.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=w+e.width/2+c,e.circularPathData.rightLargeArcRadius=w+e.width/2+n*r+c),c+=t.width})),\"bottom\"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(i,e.source.y1,e.target.y1)+_+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-_-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){return\"top\"==t.circularLinkType?\"M\"+t.circularPathData.sourceX+\" \"+t.circularPathData.sourceY+\" L\"+t.circularPathData.leftInnerExtent+\" \"+t.circularPathData.sourceY+\" A\"+t.circularPathData.leftLargeArcRadius+\" \"+t.circularPathData.leftSmallArcRadius+\" 0 0 0 \"+t.circularPathData.leftFullExtent+\" \"+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+\" L\"+t.circularPathData.leftFullExtent+\" \"+t.circularPathData.verticalLeftInnerExtent+\" A\"+t.circularPathData.leftLargeArcRadius+\" \"+t.circularPathData.leftLargeArcRadius+\" 0 0 0 \"+t.circularPathData.leftInnerExtent+\" \"+t.circularPathData.verticalFullExtent+\" L\"+t.circularPathData.rightInnerExtent+\" \"+t.circularPathData.verticalFullExtent+\" A\"+t.circularPathData.rightLargeArcRadius+\" \"+t.circularPathData.rightLargeArcRadius+\" 0 0 0 \"+t.circularPathData.rightFullExtent+\" \"+t.circularPathData.verticalRightInnerExtent+\" L\"+t.circularPathData.rightFullExtent+\" \"+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+\" A\"+t.circularPathData.rightLargeArcRadius+\" \"+t.circularPathData.rightSmallArcRadius+\" 0 0 0 \"+t.circularPathData.rightInnerExtent+\" \"+t.circularPathData.targetY+\" L\"+t.circularPathData.targetX+\" \"+t.circularPathData.targetY:\"M\"+t.circularPathData.sourceX+\" \"+t.circularPathData.sourceY+\" L\"+t.circularPathData.leftInnerExtent+\" \"+t.circularPathData.sourceY+\" A\"+t.circularPathData.leftLargeArcRadius+\" \"+t.circularPathData.leftSmallArcRadius+\" 0 0 1 \"+t.circularPathData.leftFullExtent+\" \"+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+\" L\"+t.circularPathData.leftFullExtent+\" \"+t.circularPathData.verticalLeftInnerExtent+\" A\"+t.circularPathData.leftLargeArcRadius+\" \"+t.circularPathData.leftLargeArcRadius+\" 0 0 1 \"+t.circularPathData.leftInnerExtent+\" \"+t.circularPathData.verticalFullExtent+\" L\"+t.circularPathData.rightInnerExtent+\" \"+t.circularPathData.verticalFullExtent+\" A\"+t.circularPathData.rightLargeArcRadius+\" \"+t.circularPathData.rightLargeArcRadius+\" 0 0 1 \"+t.circularPathData.rightFullExtent+\" \"+t.circularPathData.verticalRightInnerExtent+\" L\"+t.circularPathData.rightFullExtent+\" \"+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+\" A\"+t.circularPathData.rightLargeArcRadius+\" \"+t.circularPathData.rightSmallArcRadius+\" 0 0 1 \"+t.circularPathData.rightInnerExtent+\" \"+t.circularPathData.targetY+\" L\"+t.circularPathData.targetX+\" \"+t.circularPathData.targetY}(e);else{var f=n.linkHorizontal().source((function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]})).target((function(t){return[t.target.x0,t.y1]}));e.path=f(e)}}))}function L(t,e){return z(t)==z(e)?\"bottom\"==t.circularLinkType?O(t,e):P(t,e):z(e)-z(t)}function P(t,e){return t.y0-e.y0}function O(t,e){return e.y0-t.y0}function I(t,e){return t.y1-e.y1}function D(t,e){return e.y1-t.y1}function z(t){return t.target.column-t.source.column}function R(t){return t.target.x0-t.source.x1}function F(t,e){var r=M(t),n=R(e)/Math.tan(r);return\"up\"==q(t)?t.y1+n:t.y1-n}function N(t,e){var r=M(t),n=R(e)/Math.tan(r);return\"up\"==q(t)?t.y1-n:t.y1+n}function B(t,e,r,n){t.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)t.nodes.forEach((function(o){if(o.column==a){var u,c=s/(l+1),f=Math.pow(1-c,3),h=3*c*Math.pow(1-c,2),p=3*Math.pow(c,2)*(1-c),d=Math.pow(c,3),g=f*i.y0+h*i.y0+p*i.y1+d*i.y1,v=g-i.width/2,m=g+i.width/2;v>o.y0&&v<o.y1?(u=o.y1-v+10,u=\"bottom\"==o.circularLinkType?u:-u,o=j(o,u,e,r),t.nodes.forEach((function(t){var i,a;b(t,n)!=b(o,n)&&t.column==o.column&&(a=t,(i=o).y0>a.y0&&i.y0<a.y1||i.y1>a.y0&&i.y1<a.y1||i.y0<a.y0&&i.y1>a.y1)&&j(t,u,e,r)}))):(m>o.y0&&m<o.y1||v<o.y0&&m>o.y1)&&(u=m-o.y0+10,o=j(o,u,e,r),t.nodes.forEach((function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0<o.y1&&t.y1>o.y1&&j(t,u,e,r)})))}}))}}))}function j(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach((function(t){t.y1=t.y1+e})),t.sourceLinks.forEach((function(t){t.y0=t.y0+e}))),t}function U(t,e,r,n){t.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>e&&(i.y=i.y-(i.y+(i.y1-i.y0)-e));var a=t.links.filter((function(t){return b(t.source,r)==b(i,r)})),o=a.length;o>1&&a.sort((function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!H(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=N(e,t);return t.y1-r}if(e.target.column>t.target.column)return N(t,e)-e.y1}return t.circular&&!e.circular?\"top\"==t.circularLinkType?-1:1:e.circular&&!t.circular?\"top\"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&\"top\"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&\"bottom\"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:\"top\"==t.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(t){t.y0=s+t.width/2,s+=t.width})),a.forEach((function(t,e){if(\"bottom\"==t.circularLinkType){for(var r=e+1,n=0;r<o;r++)n+=a[r].width;t.y0=i.y1-n-t.width/2}}))}))}function V(t,e,r){t.nodes.forEach((function(e){var n=t.links.filter((function(t){return b(t.target,r)==b(e,r)})),i=n.length;i>1&&n.sort((function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!H(t,e))return t.y0-e.y0;if(e.source.column<t.source.column){var r=F(e,t);return t.y0-r}if(t.source.column<e.source.column)return F(t,e)-e.y0}return t.circular&&!e.circular?\"top\"==t.circularLinkType?-1:1:e.circular&&!t.circular?\"top\"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&\"top\"==t.circularLinkType?t.source.column===e.source.column?t.source.y1-e.source.y1:t.source.column-e.source.column:t.circularLinkType===e.circularLinkType&&\"bottom\"==t.circularLinkType?t.source.column===e.source.column?t.source.y1-e.source.y1:e.source.column-t.source.column:\"top\"==t.circularLinkType?-1:1:void 0}));var a=e.y0;n.forEach((function(t){t.y1=a+t.width/2,a+=t.width})),n.forEach((function(t,r){if(\"bottom\"==t.circularLinkType){for(var a=r+1,o=0;a<i;a++)o+=n[a].width;t.y1=e.y1-o-t.width/2}}))}))}function H(t,e){return q(t)==q(e)}function q(t){return t.y0-t.y1>0?\"up\":\"down\"}function G(t,e){return b(t.source,e)==b(t.target,e)}function Y(t,r,n){var i=t.nodes,a=t.links,o=!1,s=!1;if(a.forEach((function(t){\"top\"==t.circularLinkType?o=!0:\"bottom\"==t.circularLinkType&&(s=!0)})),0==o||0==s){var l=e.min(i,(function(t){return t.y0})),u=(n-r)/(e.max(i,(function(t){return t.y1}))-l);i.forEach((function(t){var e=(t.y1-t.y0)*u;t.y0=(t.y0-l)*u,t.y1=t.y0+e})),a.forEach((function(t){t.y0=(t.y0-l)*u,t.y1=(t.y1-l)*u,t.width=t.width*u}))}}t.sankeyCircular=function(){var t,n,i=0,a=0,b=1,M=1,S=24,E=v,L=o,P=m,O=y,I=32,D=2,z=null;function R(){var t={nodes:P.apply(null,arguments),links:O.apply(null,arguments)};F(t),k(t,0,z),N(t),j(t),T(t,E),H(t,I,E),q(t);for(var e=4,r=0;r<e;r++)U(t,M,E),V(t,0,E),B(t,a,M,E),U(t,M,E),V(t,0,E);return Y(t,a,M),C(t,D,M,E),t}function F(t){t.nodes.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]}));var e=r.map(t.nodes,E);return t.links.forEach((function(t,r){t.index=r;var n=t.source,i=t.target;\"object\"!==(void 0===n?\"undefined\":l(n))&&(n=t.source=x(e,n)),\"object\"!==(void 0===i?\"undefined\":l(i))&&(i=t.target=x(e,i)),n.sourceLinks.push(t),i.targetLinks.push(t)})),t}function N(t){t.nodes.forEach((function(t){t.partOfCycle=!1,t.value=Math.max(e.sum(t.sourceLinks,h),e.sum(t.targetLinks,h)),t.sourceLinks.forEach((function(e){e.circular&&(t.partOfCycle=!0,t.circularLinkType=e.circularLinkType)})),t.targetLinks.forEach((function(e){e.circular&&(t.partOfCycle=!0,t.circularLinkType=e.circularLinkType)}))}))}function j(t){var e,r,n;for(e=t.nodes,r=[],n=0;e.length;++n,e=r,r=[])e.forEach((function(t){t.depth=n,t.sourceLinks.forEach((function(t){r.indexOf(t.target)<0&&!t.circular&&r.push(t.target)}))}));for(e=t.nodes,r=[],n=0;e.length;++n,e=r,r=[])e.forEach((function(t){t.height=n,t.targetLinks.forEach((function(t){r.indexOf(t.source)<0&&!t.circular&&r.push(t.source)}))}));t.nodes.forEach((function(t){t.column=Math.floor(L.call(null,t,n))}))}function H(o,s,l){var u=r.nest().key((function(t){return t.column})).sortKeys(e.ascending).entries(o.nodes).map((function(t){return t.values}));(function(r){if(n){var s=1/0;u.forEach((function(t){var e=M*n/(t.length+1);s=e<s?e:s})),t=s}var l=e.min(u,(function(r){return(M-a-(r.length-1)*t)/e.sum(r,h)}));l*=.3,o.links.forEach((function(t){t.width=t.value*l}));var c=function(t){var r=0,n=0,i=0,a=0,o=e.max(t.nodes,(function(t){return t.column}));return t.links.forEach((function(t){t.circular&&(\"top\"==t.circularLinkType?r+=t.width:n+=t.width,0==t.target.column&&(a+=t.width),t.source.column==o&&(i+=t.width))})),{top:r=r>0?r+_+w:r,bottom:n=n>0?n+_+w:n,left:a=a>0?a+_+w:a,right:i=i>0?i+_+w:i}}(o),f=function(t,r){var n=e.max(t.nodes,(function(t){return t.column})),o=b-i,s=M-a,l=o/(o+r.right+r.left),u=s/(s+r.top+r.bottom);return i=i*l+r.left,b=0==r.right?b:b*l,a=a*u+r.top,M*=u,t.nodes.forEach((function(t){t.x0=i+t.column*((b-i-S)/n),t.x1=t.x0+S})),u}(o,c);l*=f,o.links.forEach((function(t){t.width=t.value*l})),u.forEach((function(t){var e=t.length;t.forEach((function(t,n){t.depth==u.length-1&&1==e||0==t.depth&&1==e?(t.y0=M/2-t.value*l,t.y1=t.y0+t.value*l):t.partOfCycle?0==A(t,r)?(t.y0=M/2+n,t.y1=t.y0+t.value*l):\"top\"==t.circularLinkType?(t.y0=a+n,t.y1=t.y0+t.value*l):(t.y0=M-t.value*l-n,t.y1=t.y0+t.value*l):0==c.top||0==c.bottom?(t.y0=(M-a)/e*n,t.y1=t.y0+t.value*l):(t.y0=(M-a)/2-e/2+n,t.y1=t.y0+t.value*l)}))}))})(l),y();for(var c=1,v=s;v>0;--v)m(c*=.99,l),y();function m(t,r){var n=u.length;u.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&A(i,r)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=M/2-s/2,i.y1=M/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=M/2-s/2,i.y1=M/2+s/2;else{var l=e.mean(i.sourceLinks,g),u=e.mean(i.targetLinks,d),c=((l&&u?(l+u)/2:l||u)-p(i))*t;i.y0+=c,i.y1+=c}}))}))}function y(){u.forEach((function(e){var r,n,i,o=a,s=e.length;for(e.sort(f),i=0;i<s;++i)(n=o-(r=e[i]).y0)>0&&(r.y0+=n,r.y1+=n),o=r.y1+t;if((n=o-t-M)>0)for(o=r.y0-=n,r.y1-=n,i=s-2;i>=0;--i)(n=(r=e[i]).y1+t-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}function q(t){t.nodes.forEach((function(t){t.sourceLinks.sort(c),t.targetLinks.sort(u)})),t.nodes.forEach((function(t){var e=t.y0,r=e,n=t.y1,i=n;t.sourceLinks.forEach((function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)})),t.targetLinks.forEach((function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)}))}))}return R.nodeId=function(t){return arguments.length?(E=\"function\"==typeof t?t:s(t),R):E},R.nodeAlign=function(t){return arguments.length?(L=\"function\"==typeof t?t:s(t),R):L},R.nodeWidth=function(t){return arguments.length?(S=+t,R):S},R.nodePadding=function(e){return arguments.length?(t=+e,R):t},R.nodes=function(t){return arguments.length?(P=\"function\"==typeof t?t:s(t),R):P},R.links=function(t){return arguments.length?(O=\"function\"==typeof t?t:s(t),R):O},R.size=function(t){return arguments.length?(i=a=0,b=+t[0],M=+t[1],R):[b-i,M-a]},R.extent=function(t){return arguments.length?(i=+t[0][0],b=+t[1][0],a=+t[0][1],M=+t[1][1],R):[[i,a],[b,M]]},R.iterations=function(t){return arguments.length?(I=+t,R):I},R.circularLinkGap=function(t){return arguments.length?(D=+t,R):D},R.nodePaddingRatio=function(t){return arguments.length?(n=+t,R):n},R.sortNodes=function(t){return arguments.length?(z=t,R):z},R.update=function(t){return T(t,E),q(t),t.links.forEach((function(t){t.circular&&(t.circularLinkType=t.y0+t.y1<M?\"top\":\"bottom\",t.source.circularLinkType=t.circularLinkType,t.target.circularLinkType=t.circularLinkType)})),U(t,M,E,!1),V(t,0,E),C(t,D,M,E),t},R},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,a)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=o,Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\"),t(\"d3-collection\"),t(\"d3-shape\"),t(\"elementary-circuits-directed-graph\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,null)},{\"d3-array\":107,\"d3-collection\":108,\"d3-shape\":119,\"elementary-circuits-directed-graph\":130}],57:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n){\"use strict\";function i(t){return t.target.depth}function a(t,e){return t.sourceLinks.length?t.depth:e-1}function o(t){return function(){return t}}function s(t,e){return u(t.source,e.source)||t.index-e.index}function l(t,e){return u(t.target,e.target)||t.index-e.index}function u(t,e){return t.y0-e.y0}function c(t){return t.value}function f(t){return(t.y0+t.y1)/2}function h(t){return f(t.source)*t.value}function p(t){return f(t.target)*t.value}function d(t){return t.index}function g(t){return t.nodes}function v(t){return t.links}function m(t,e){var r=t.get(e);if(!r)throw new Error(\"missing: \"+e);return r}function y(t){return[t.source.x1,t.y0]}function x(t){return[t.target.x0,t.y1]}t.sankey=function(){var t=0,n=0,i=1,y=1,x=24,b=8,_=d,w=a,k=g,T=v,M=32;function A(){var t={nodes:k.apply(null,arguments),links:T.apply(null,arguments)};return S(t),E(t),C(t),L(t),P(t),t}function S(t){t.nodes.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]}));var e=r.map(t.nodes,_);t.links.forEach((function(t,r){t.index=r;var n=t.source,i=t.target;\"object\"!=typeof n&&(n=t.source=m(e,n)),\"object\"!=typeof i&&(i=t.target=m(e,i)),n.sourceLinks.push(t),i.targetLinks.push(t)}))}function E(t){t.nodes.forEach((function(t){t.value=Math.max(e.sum(t.sourceLinks,c),e.sum(t.targetLinks,c))}))}function C(e){var r,n,a;for(r=e.nodes,n=[],a=0;r.length;++a,r=n,n=[])r.forEach((function(t){t.depth=a,t.sourceLinks.forEach((function(t){n.indexOf(t.target)<0&&n.push(t.target)}))}));for(r=e.nodes,n=[],a=0;r.length;++a,r=n,n=[])r.forEach((function(t){t.height=a,t.targetLinks.forEach((function(t){n.indexOf(t.source)<0&&n.push(t.source)}))}));var o=(i-t-x)/(a-1);e.nodes.forEach((function(e){e.x1=(e.x0=t+Math.max(0,Math.min(a-1,Math.floor(w.call(null,e,a))))*o)+x}))}function L(t){var i=r.nest().key((function(t){return t.x0})).sortKeys(e.ascending).entries(t.nodes).map((function(t){return t.values}));(function(){var r=e.max(i,(function(t){return t.length})),a=.6666666666666666*(y-n)/(r-1);b>a&&(b=a);var o=e.min(i,(function(t){return(y-n-(t.length-1)*b)/e.sum(t,c)}));i.forEach((function(t){t.forEach((function(t,e){t.y1=(t.y0=e)+t.value*o}))})),t.links.forEach((function(t){t.width=t.value*o}))})(),d();for(var a=1,o=M;o>0;--o)l(a*=.99),d(),s(a),d();function s(t){i.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,h)/e.sum(r.targetLinks,c)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function l(t){i.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,p)/e.sum(r.sourceLinks,c)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function d(){i.forEach((function(t){var e,r,i,a=n,o=t.length;for(t.sort(u),i=0;i<o;++i)(r=a-(e=t[i]).y0)>0&&(e.y0+=r,e.y1+=r),a=e.y1+b;if((r=a-b-y)>0)for(a=e.y0-=r,e.y1-=r,i=o-2;i>=0;--i)(r=(e=t[i]).y1+b-a)>0&&(e.y0-=r,e.y1-=r),a=e.y0}))}}function P(t){t.nodes.forEach((function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)})),t.nodes.forEach((function(t){var e=t.y0,r=e;t.sourceLinks.forEach((function(t){t.y0=e+t.width/2,e+=t.width})),t.targetLinks.forEach((function(t){t.y1=r+t.width/2,r+=t.width}))}))}return A.update=function(t){return P(t),t},A.nodeId=function(t){return arguments.length?(_=\"function\"==typeof t?t:o(t),A):_},A.nodeAlign=function(t){return arguments.length?(w=\"function\"==typeof t?t:o(t),A):w},A.nodeWidth=function(t){return arguments.length?(x=+t,A):x},A.nodePadding=function(t){return arguments.length?(b=+t,A):b},A.nodes=function(t){return arguments.length?(k=\"function\"==typeof t?t:o(t),A):k},A.links=function(t){return arguments.length?(T=\"function\"==typeof t?t:o(t),A):T},A.size=function(e){return arguments.length?(t=n=0,i=+e[0],y=+e[1],A):[i-t,y-n]},A.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],y=+e[1][1],A):[[t,n],[i,y]]},A.iterations=function(t){return arguments.length?(M=+t,A):M},A},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,i)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=a,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\"),t(\"d3-collection\"),t(\"d3-shape\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)},{\"d3-array\":107,\"d3-collection\":108,\"d3-shape\":119}],58:[function(t,e,r){(function(){var t={version:\"3.8.0\"},r=[].slice,n=function(t){return r.call(t)},i=self.document;function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement(\"DIV\").style.setProperty(\"opacity\",0,\"\")}catch(t){var s=this.Element.prototype,l=s.setAttribute,u=s.setAttributeNS,c=this.CSSStyleDeclaration.prototype,f=c.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+\"\")},s.setAttributeNS=function(t,e,r){u.call(this,t,e,r+\"\")},c.setProperty=function(t,e,r){f.call(this,t,e+\"\",r)}}function h(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}t.ascending=h,t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r>n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r>n&&(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n>r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n>r&&(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(r>n&&(r=n),i<n&&(i=n))}return[r,i]},t.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)d(r=+t[a])&&(n+=r);else for(;++a<i;)d(r=+e.call(t,t[a],a))&&(n+=r);return n},t.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a<i;)d(r=p(t[a]))?n+=r:--o;else for(;++a<i;)d(r=p(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},t.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},t.median=function(e,r){var n,i=[],a=e.length,o=-1;if(1===arguments.length)for(;++o<a;)d(n=p(e[o]))&&i.push(n);else for(;++o<a;)d(n=p(r.call(e,e[o],o)))&&i.push(n);if(i.length)return t.quantile(i.sort(h),.5)},t.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)d(r=p(t[s]))&&(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s<i;)d(r=p(e.call(t,t[s],s)))&&(o+=(n=r-a)*(r-(a+=n/++l)));if(l>1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var v=g(h);function m(t){return t.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(t){return g(1===t.length?function(e,r){return h(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},t.transpose=function(e){if(!(a=e.length))return[];for(var r=-1,n=t.min(e,m),i=new Array(n);++r<n;)for(var a,o=-1,s=i[r]=new Array(a);++o<a;)s[o]=e[o][r];return i},t.zip=function(){return t.transpose(arguments)},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t){for(var e=1;t*e%1;)e*=10;return e}function b(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function _(){this._=Object.create(null)}function w(t){return\"__proto__\"==(t+=\"\")||\"\\0\"===t[0]?\"\\0\"+t:t}function k(t){return\"\\0\"===(t+=\"\")[0]?t.slice(1):t}function T(t){return w(t)in this._}function M(t){return(t=w(t))in this._&&delete this._[t]}function A(){var t=[];for(var e in this._)t.push(k(e));return t}function S(){var t=0;for(var e in this._)++t;return t}function E(){for(var t in this._)return!1;return!0}function C(){this._=Object.create(null)}function L(t){return t}function P(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function O(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=I.length;r<n;++r){var i=I[r]+e;if(i in t)return i}}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error(\"infinite range\");var n,i=[],a=x(y(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},t.map=function(t,e){var r=new _;if(t instanceof _)t.forEach((function(t,e){r.set(t,e)}));else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r},b(_,{has:T,get:function(t){return this._[w(t)]},set:function(t,e){return this._[w(t)]=e},remove:M,keys:A,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:k(e),value:this._[e]});return t},size:S,empty:E,forEach:function(t){for(var e in this._)t.call(this,k(e),this._[e])}}),t.nest=function(){var e,r,n={},i=[],a=[];function o(t,a,s){if(s>=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,u,c,f,h=-1,p=a.length,d=i[s++],g=new _;++h<p;)(f=g.get(l=d(u=a[h])))?f.push(u):g.set(l,[u]);return t?(u=t(),c=function(e,r){u.set(e,o(t,r,s))}):(u={},c=function(e,r){u[e]=o(t,r,s)}),g.forEach(c),u}function s(t,e){if(e>=i.length)return t;var r=[],n=a[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),n?r.sort((function(t,e){return n(t.key,e.key)})):r}return n.map=function(t,e){return o(e,t,0)},n.entries=function(e){return s(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new C;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},b(C,{has:T,add:function(t){return this._[w(t+=\"\")]=!0,t},remove:M,values:A,size:S,empty:E,forEach:function(t){for(var e in this._)t.call(this,k(e))}}),t.behavior={},t.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=P(t,e,e[r]);return t};var I=[\"webkit\",\"ms\",\"moz\",\"Moz\",\"o\",\"O\"];function D(){}function z(){}function R(t){var e=[],r=new _;function n(){for(var r,n=e,i=-1,a=n.length;++i<a;)(r=n[i].on)&&r.apply(this,arguments);return t}return n.on=function(n,i){var a,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function F(){t.event.preventDefault()}function N(){for(var e,r=t.event;e=r.sourceEvent;)r=e;return r}function B(e){for(var r=new z,n=0,i=arguments.length;++n<i;)r[arguments[n]]=R(r);return r.of=function(n,i){return function(a){try{var o=a.sourceEvent=t.event;a.target=e,t.event=a,r[a.type].apply(n,i)}finally{t.event=o}}},r}t.dispatch=function(){for(var t=new z,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=R(t);return t},z.prototype.on=function(t,e){var r=t.indexOf(\".\"),n=\"\";if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(j,\"\\\\$&\")};var j=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function V(t){return U(t,Y),t}var H=function(t,e){return e.querySelector(t)},q=function(t,e){return e.querySelectorAll(t)},G=function(t,e){var r=t.matches||t[O(t,\"matchesSelector\")];return G=function(t,e){return r.call(t,e)},G(t,e)};\"function\"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},q=Sizzle,G=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var Y=t.selection.prototype=[];function W(t){return\"function\"==typeof t?t:function(){return H(t,this)}}function X(t){return\"function\"==typeof t?t:function(){return q(t,this)}}Y.select=function(t){var e,r,n,i,a=[];t=W(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,u=n.length;++l<u;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&\"__data__\"in i&&(r.__data__=i.__data__)):e.push(null)}return V(a)},Y.selectAll=function(t){var e,r,i=[];t=X(t);for(var a=-1,o=this.length;++a<o;)for(var s=this[a],l=-1,u=s.length;++l<u;)(r=s[l])&&(i.push(e=n(t.call(r,r.__data__,l,a))),e.parentNode=r);return V(i)};var Z=\"http://www.w3.org/1999/xhtml\",K={svg:\"http://www.w3.org/2000/svg\",xhtml:Z,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};function J(e,r){return e=t.ns.qualify(e),null==r?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:\"function\"==typeof r?e.local?function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}:function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}:e.local?function(){this.setAttributeNS(e.space,e.local,r)}:function(){this.setAttribute(e,r)}}function $(t){return t.trim().replace(/\\s+/g,\" \")}function Q(e){return new RegExp(\"(?:^|\\\\s+)\"+t.requote(e)+\"(?:\\\\s+|$)\",\"g\")}function tt(t){return(t+\"\").trim().split(/^|\\s+/)}function et(t,e){var r=(t=tt(t).map(rt)).length;return\"function\"==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}:function(){for(var n=-1;++n<r;)t[n](this,e)}}function rt(t){var e=Q(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute(\"class\")||\"\";n?(e.lastIndex=0,e.test(i)||r.setAttribute(\"class\",$(i+\" \"+t))):r.setAttribute(\"class\",$(i.replace(e,\" \")))}}function nt(t,e,r){return null==e?function(){this.style.removeProperty(t)}:\"function\"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function it(t,e){return null==e?function(){delete this[t]}:\"function\"==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function at(e){return\"function\"==typeof e?e:(e=t.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Z&&t.documentElement.namespaceURI===Z?t.createElement(e):t.createElementNS(r,e)}}function ot(){var t=this.parentNode;t&&t.removeChild(this)}function st(t){return{__data__:t}}function lt(t){return function(){return G(this,t)}}function ut(t){return arguments.length||(t=h),function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}function ct(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function ft(t){return U(t,ht),t}t.ns={prefix:K,qualify:function(t){var e=t.indexOf(\":\"),r=t;return e>=0&&\"xmlns\"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),K.hasOwnProperty(r)?{space:K[r],local:t}:t}},Y.attr=function(e,r){if(arguments.length<2){if(\"string\"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(J(r,e[r]));return this}return this.each(J(e,r))},Y.classed=function(t,e){if(arguments.length<2){if(\"string\"==typeof t){var r=this.node(),n=(t=tt(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute(\"class\");++i<n;)if(!Q(t[i]).test(e))return!1;return!0}for(e in t)this.each(et(e,t[e]));return this}return this.each(et(t,e))},Y.style=function(t,e,r){var n=arguments.length;if(n<3){if(\"string\"!=typeof t){for(r in n<2&&(e=\"\"),t)this.each(nt(r,t[r],e));return this}if(n<2){var i=this.node();return o(i).getComputedStyle(i,null).getPropertyValue(t)}r=\"\"}return this.each(nt(t,e,r))},Y.property=function(t,e){if(arguments.length<2){if(\"string\"==typeof t)return this.node()[t];for(e in t)this.each(it(e,t[e]));return this}return this.each(it(t,e))},Y.text=function(t){return arguments.length?this.each(\"function\"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?\"\":e}:null==t?function(){this.textContent=\"\"}:function(){this.textContent=t}):this.node().textContent},Y.html=function(t){return arguments.length?this.each(\"function\"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?\"\":e}:null==t?function(){this.innerHTML=\"\"}:function(){this.innerHTML=t}):this.node().innerHTML},Y.append=function(t){return t=at(t),this.select((function(){return this.appendChild(t.apply(this,arguments))}))},Y.insert=function(t,e){return t=at(t),e=W(e),this.select((function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)}))},Y.remove=function(){return this.each(ot)},Y.data=function(t,e){var r,n,i=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++i<a;)(n=r[i])&&(t[i]=n.__data__);return t}function o(t,r){var n,i,a,o=t.length,c=r.length,f=Math.min(o,c),h=new Array(c),p=new Array(c),d=new Array(o);if(e){var g,v=new _,m=new Array(o);for(n=-1;++n<o;)(i=t[n])&&(v.has(g=e.call(i,i.__data__,n))?d[n]=i:v.set(g,i),m[n]=g);for(n=-1;++n<c;)(i=v.get(g=e.call(r,a=r[n],n)))?!0!==i&&(h[n]=i,i.__data__=a):p[n]=st(a),v.set(g,!0);for(n=-1;++n<o;)n in m&&!0!==v.get(m[n])&&(d[n]=t[n])}else{for(n=-1;++n<f;)i=t[n],a=r[n],i?(i.__data__=a,h[n]=i):p[n]=st(a);for(;n<c;++n)p[n]=st(r[n]);for(;n<o;++n)d[n]=t[n]}p.update=h,p.parentNode=h.parentNode=d.parentNode=t.parentNode,s.push(p),l.push(h),u.push(d)}var s=ft([]),l=V([]),u=V([]);if(\"function\"==typeof t)for(;++i<a;)o(r=this[i],t.call(r,r.parentNode.__data__,i));else for(;++i<a;)o(r=this[i],t);return l.enter=function(){return s},l.exit=function(){return u},l},Y.datum=function(t){return arguments.length?this.property(\"__data__\",t):this.property(\"__data__\")},Y.filter=function(t){var e,r,n,i=[];\"function\"!=typeof t&&(t=lt(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return V(i)},Y.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i>=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Y.sort=function(t){t=ut.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},Y.each=function(t){return ct(this,(function(e,r,n){t.call(e,e.__data__,r,n)}))},Y.call=function(t){var e=n(arguments);return t.apply(e[0]=this,e),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},Y.size=function(){var t=0;return ct(this,(function(){++t})),t};var ht=[];function pt(t){var e,r;return function(n,i,a){var o,s=t[a].update,l=s.length;for(a!=r&&(r=a,e=0),i>=e&&(e=i+1);!(o=s[e])&&++e<l;);return o}}function dt(e,r,i){var a=\"__on\"+e,o=e.indexOf(\".\"),s=vt;o>0&&(e=e.slice(0,o));var l=gt.get(e);function u(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}return l&&(e=l,s=mt),o?r?function(){var t=s(r,n(arguments));u.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:u:r?D:function(){var r,n=new RegExp(\"^__on([^.]+)\"+t.requote(e)+\"$\");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ft,t.selection.enter.prototype=ht,ht.append=Y.append,ht.empty=Y.empty,ht.node=Y.node,ht.call=Y.call,ht.size=Y.size,ht.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)(a=i[u])?(e.push(n[u]=r=t.call(i.parentNode,a.__data__,u,s)),r.__data__=a.__data__):e.push(null)}return V(o)},ht.insert=function(t,e){return arguments.length<2&&(e=pt(this)),Y.insert.call(this,t,e)},t.select=function(t){var e;return\"string\"==typeof t?(e=[H(t,i)]).parentNode=i.documentElement:(e=[t]).parentNode=a(t),V([e])},t.selectAll=function(t){var e;return\"string\"==typeof t?(e=n(q(t,i))).parentNode=i.documentElement:(e=n(t)).parentNode=null,V([e])},Y.on=function(t,e,r){var n=arguments.length;if(n<3){if(\"string\"!=typeof t){for(r in n<2&&(e=!1),t)this.each(dt(r,t[r],e));return this}if(n<2)return(n=this.node()[\"__on\"+t])&&n._;r=!1}return this.each(dt(t,e,r))};var gt=t.map({mouseenter:\"mouseover\",mouseleave:\"mouseout\"});function vt(e,r){return function(n){var i=t.event;t.event=n,r[0]=this.__data__;try{e.apply(this,r)}finally{t.event=i}}}function mt(t,e){var r=vt(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}i&&gt.forEach((function(t){\"on\"+t in i&&gt.remove(t)}));var yt,xt=0;function bt(e){var r=\".dragsuppress-\"+ ++xt,n=\"click\"+r,i=t.select(o(e)).on(\"touchmove\"+r,F).on(\"dragstart\"+r,F).on(\"selectstart\"+r,F);if(null==yt&&(yt=!(\"onselectstart\"in e)&&O(e.style,\"userSelect\")),yt){var s=a(e).style,l=s[yt];s[yt]=\"none\"}return function(t){if(i.on(r,null),yt&&(s[yt]=l),t){var e=function(){i.on(n,null)};i.on(n,(function(){F(),e()}),!0),setTimeout(e,0)}}}t.mouse=function(t){return wt(t,N())};var _t=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function wt(e,r){r.changedTouches&&(r=r.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();if(_t<0){var a=o(e);if(a.scrollX||a.scrollY){var s=(n=t.select(\"body\").append(\"svg\").style({position:\"absolute\",top:0,left:0,margin:0,padding:0,border:\"none\"},\"important\"))[0][0].getScreenCTM();_t=!(s.f||s.e),n.remove()}}return _t?(i.x=r.pageX,i.y=r.pageY):(i.x=r.clientX,i.y=r.clientY),[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}var l=e.getBoundingClientRect();return[r.clientX-l.left-e.clientLeft,r.clientY-l.top-e.clientTop]}function kt(){return t.event.changedTouches[0].identifier}t.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=N().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return wt(t,n)},t.behavior.drag=function(){var e=B(a,\"drag\",\"dragstart\",\"dragend\"),r=null,n=s(D,t.mouse,o,\"mousemove\",\"mouseup\"),i=s(kt,t.touch,L,\"touchmove\",\"touchend\");function a(){this.on(\"mousedown.drag\",n).on(\"touchstart.drag\",i)}function s(n,i,a,o,s){return function(){var l,u=this,c=t.event.target.correspondingElement||t.event.target,f=u.parentNode,h=e.of(u,arguments),p=0,d=n(),g=\".drag\"+(null==d?\"\":\"-\"+d),v=t.select(a(c)).on(o+g,x).on(s+g,b),m=bt(c),y=i(f,d);function x(){var t,e,r=i(f,d);r&&(t=r[0]-y[0],e=r[1]-y[1],p|=t|e,y=r,h({type:\"drag\",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e}))}function b(){i(f,d)&&(v.on(o+g,null).on(s+g,null),m(p),h({type:\"dragend\"}))}l=r?[(l=r.apply(u,arguments)).x-y[0],l.y-y[1]]:[0,0],h({type:\"dragstart\"})}}return a.origin=function(t){return arguments.length?(r=t,a):r},t.rebind(a,e,\"on\")},t.touches=function(t,e){return arguments.length<2&&(e=N().touches),e?n(e).map((function(e){var r=wt(t,e);return r.identifier=e.identifier,r})):[]};var Tt=1e-6,Mt=Math.PI,At=2*Mt,St=At-Tt,Et=Mt/2,Ct=Mt/180,Lt=180/Mt;function Pt(t){return t>1?Et:t<-1?-Et:Math.asin(t)}function Ot(t){return((t=Math.exp(t))+1/t)/2}var It=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],c=s-i,f=l-a,h=c*c+f*f;if(h<1e-12)n=Math.log(u/o)/It,r=function(t){return[i+t*c,a+t*f,o*Math.exp(It*t*n)]};else{var p=Math.sqrt(h),d=(u*u-o*o+4*h)/(2*o*2*p),g=(u*u-o*o-4*h)/(2*u*2*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);n=(m-v)/It,r=function(t){var e,r=t*n,s=Ot(v),l=o/(2*p)*(s*(e=It*r+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+l*c,a+l*f,o*s/Ot(It*r+v)]}}return r.duration=1e3*n,r},t.behavior.zoom=function(){var e,r,n,a,s,l,u,c,f,h={x:0,y:0,k:1},p=[960,500],d=Rt,g=250,v=0,m=\"mousedown.zoom\",y=\"mousemove.zoom\",x=\"mouseup.zoom\",b=\"touchstart.zoom\",_=B(w,\"zoomstart\",\"zoom\",\"zoomend\");function w(t){t.on(m,P).on(zt+\".zoom\",I).on(\"dblclick.zoom\",D).on(b,O)}function k(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function T(t){h.k=Math.max(d[0],Math.min(d[1],t))}function M(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function A(e,n,i,a){e.__chart__={x:h.x,y:h.y,k:h.k},T(Math.pow(2,a)),M(r=n,i),e=t.select(e),g>0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){u&&u.domain(l.range().map((function(t){return(t-h.x)/h.k})).map(l.invert)),f&&f.domain(c.range().map((function(t){return(t-h.y)/h.k})).map(c.invert))}function E(t){v++||t({type:\"zoomstart\"})}function C(t){S(),t({type:\"zoom\",scale:h.k,translate:[h.x,h.y]})}function L(t){--v||(t({type:\"zoomend\"}),r=null)}function P(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,l).on(x,u),a=k(t.mouse(e)),s=bt(e);function l(){n=1,M(t.mouse(e),a),C(r)}function u(){i.on(y,null).on(x,null),s(n),L(r)}Xi.call(e),E(r)}function O(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=\".zoom-\"+t.event.changedTouches[0].identifier,l=\"touchmove\"+o,u=\"touchend\"+o,c=[],f=t.select(r),p=bt(r);function d(){var n=t.touches(r);return e=h.k,n.forEach((function(t){t.identifier in i&&(i[t.identifier]=k(t))})),n}function g(){var e=t.event.target;t.select(e).on(l,v).on(u,y),c.push(e);for(var n=t.event.changedTouches,o=0,f=n.length;o<f;++o)i[n[o].identifier]=null;var p=d(),g=Date.now();if(1===p.length){if(g-s<500){var m=p[0];A(r,m,i[m.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),F()}s=g}else if(p.length>1){m=p[0];var x=p[1],b=m[0]-x[0],_=m[1]-x[1];a=b*b+_*_}}function v(){var o,l,u,c,f=t.touches(r);Xi.call(r);for(var h=0,p=f.length;h<p;++h,c=null)if(u=f[h],c=i[u.identifier]){if(l)break;o=u,l=c}if(c){var d=(d=u[0]-o[0])*d+(d=u[1]-o[1])*d,g=a&&Math.sqrt(d/a);o=[(o[0]+u[0])/2,(o[1]+u[1])/2],l=[(l[0]+c[0])/2,(l[1]+c[1])/2],T(g*e)}s=null,M(o,l),C(n)}function y(){if(t.event.touches.length){for(var e=t.event.changedTouches,r=0,a=e.length;r<a;++r)delete i[e[r].identifier];for(var s in i)return void d()}t.selectAll(c).on(o,null),f.on(m,P).on(b,O),p(),L(n)}g(),E(n),f.on(m,null).on(b,g)}function I(){var i=_.of(this,arguments);a?clearTimeout(a):(Xi.call(this),e=k(r=n||t.mouse(this)),E(i)),a=setTimeout((function(){a=null,L(i)}),50),F(),T(Math.pow(2,.002*Dt())*h.k),M(r,e),C(i)}function D(){var e=t.mouse(this),r=Math.log(h.k)/Math.LN2;A(this,e,k(e),t.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}return zt||(zt=\"onwheel\"in i?(Dt=function(){return-t.event.deltaY*(t.event.deltaMode?120:1)},\"wheel\"):\"onmousewheel\"in i?(Dt=function(){return t.event.wheelDelta},\"mousewheel\"):(Dt=function(){return-t.event.detail},\"MozMousePixelScroll\")),w.event=function(e){e.each((function(){var e=_.of(this,arguments),n=h;Ji?t.select(this).transition().each(\"start.zoom\",(function(){h=this.__chart__||{x:0,y:0,k:1},E(e)})).tween(\"zoom:zoom\",(function(){var i=p[0],a=p[1],o=r?r[0]:i/2,s=r?r[1]:a/2,l=t.interpolateZoom([(o-h.x)/h.k,(s-h.y)/h.k,i/h.k],[(o-n.x)/n.k,(s-n.y)/n.k,i/n.k]);return function(t){var r=l(t),n=i/r[2];this.__chart__=h={x:o-r[0]*n,y:s-r[1]*n,k:n},C(e)}})).each(\"interrupt.zoom\",(function(){L(e)})).each(\"end.zoom\",(function(){L(e)})):(this.__chart__=h,E(e),C(e),L(e))}))},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},S(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},T(+t),S(),w):h.k},w.scaleExtent=function(t){return arguments.length?(d=null==t?Rt:[+t[0],+t[1]],w):d},w.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],w):n},w.size=function(t){return arguments.length?(p=t&&[+t[0],+t[1]],w):p},w.duration=function(t){return arguments.length?(g=+t,w):g},w.x=function(t){return arguments.length?(u=t,l=t.copy(),h={x:0,y:0,k:1},w):u},w.y=function(t){return arguments.length?(f=t,c=t.copy(),h={x:0,y:0,k:1},w):f},t.rebind(w,_,\"on\")};var Dt,zt,Rt=[0,1/0];function Ft(){}function Nt(t,e,r){return this instanceof Nt?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof Nt?new Nt(t.h,t.s,t.l):ae(\"\"+t,oe,Nt):new Nt(t,e,r)}t.color=Ft,Ft.prototype.toString=function(){return this.rgb()+\"\"},t.hsl=Nt;var Bt=Nt.prototype=new Ft;function jt(t,e,r){var n,i;function a(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new te(a(t+120),a(t),a(t-120))}function Ut(e,r,n){return this instanceof Ut?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Ut?new Ut(e.h,e.c,e.l):Kt(e instanceof qt?e.l:(e=se((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ut(e,r,n)}Bt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Nt(this.h,this.s,this.l/t)},Bt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Nt(this.h,this.s,t*this.l)},Bt.rgb=function(){return jt(this.h,this.s,this.l)},t.hcl=Ut;var Vt=Ut.prototype=new Ft;function Ht(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new qt(r,Math.cos(t*=Ct)*e,Math.sin(t)*e)}function qt(t,e,r){return this instanceof qt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof qt?new qt(t.l,t.a,t.b):t instanceof Ut?Ht(t.h,t.c,t.l):se((t=te(t)).r,t.g,t.b):new qt(t,e,r)}Vt.brighter=function(t){return new Ut(this.h,this.c,Math.min(100,this.l+Gt*(arguments.length?t:1)))},Vt.darker=function(t){return new Ut(this.h,this.c,Math.max(0,this.l-Gt*(arguments.length?t:1)))},Vt.rgb=function(){return Ht(this.h,this.c,this.l).rgb()},t.lab=qt;var Gt=18,Yt=.95047,Wt=1.08883,Xt=qt.prototype=new Ft;function Zt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new te(Qt(3.2404542*(i=Jt(i)*Yt)-1.5371385*(n=1*Jt(n))-.4985314*(a=Jt(a)*Wt)),Qt(-.969266*i+1.8760108*n+.041556*a),Qt(.0556434*i-.2040259*n+1.0572252*a))}function Kt(t,e,r){return t>0?new Ut(Math.atan2(r,e)*Lt,Math.sqrt(e*e+r*r),t):new Ut(NaN,NaN,t)}function Jt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function $t(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function Qt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function te(t,e,r){return this instanceof te?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof te?new te(t.r,t.g,t.b):ae(\"\"+t,te,jt):new te(t,e,r)}function ee(t){return new te(t>>16,t>>8&255,255&t)}function re(t){return ee(t)+\"\"}Xt.brighter=function(t){return new qt(Math.min(100,this.l+Gt*(arguments.length?t:1)),this.a,this.b)},Xt.darker=function(t){return new qt(Math.max(0,this.l-Gt*(arguments.length?t:1)),this.a,this.b)},Xt.rgb=function(){return Zt(this.l,this.a,this.b)},t.rgb=te;var ne=te.prototype=new Ft;function ie(t){return t<16?\"0\"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ae(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\\((.*)\\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(\",\"),n[1]){case\"hsl\":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case\"rgb\":return e(ue(i[0]),ue(i[1]),ue(i[2]))}return(a=ce.get(t))?e(a.r,a.g,a.b):(null==t||\"#\"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function oe(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l>0&&l<1?0:n),new Nt(n,i,l)}function se(t,e,r){var n=$t((.4124564*(t=le(t))+.3575761*(e=le(e))+.1804375*(r=le(r)))/Yt),i=$t((.2126729*t+.7151522*e+.072175*r)/1);return qt(116*i-16,500*(n-i),200*(i-$t((.0193339*t+.119192*e+.9503041*r)/Wt)))}function le(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ue(t){var e=parseFloat(t);return\"%\"===t.charAt(t.length-1)?Math.round(2.55*e):e}ne.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e<i&&(e=i),r&&r<i&&(r=i),n&&n<i&&(n=i),new te(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new te(i,i,i)},ne.darker=function(t){return new te((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},ne.hsl=function(){return oe(this.r,this.g,this.b)},ne.toString=function(){return\"#\"+ie(this.r)+ie(this.g)+ie(this.b)};var ce=t.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function fe(t){return\"function\"==typeof t?t:function(){return t}}function he(t){return function(e,r,n){return 2===arguments.length&&\"function\"==typeof r&&(n=r,r=null),pe(e,r,t,n)}}function pe(e,r,i,a){var o={},s=t.dispatch(\"beforesend\",\"progress\",\"load\",\"error\"),l={},u=new XMLHttpRequest,c=null;function f(){var t,e=u.status;if(!e&&function(t){var e=t.responseType;return e&&\"text\"!==e?t.response:t.responseText}(u)||e>=200&&e<300||304===e){try{t=i.call(o,u)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,u)}return self.XDomainRequest&&!(\"withCredentials\"in u)&&/^(http(s)?:)?\\/\\//.test(e)&&(u=new XDomainRequest),\"onload\"in u?u.onload=u.onerror=f:u.onreadystatechange=function(){u.readyState>3&&f()},u.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,u)}finally{t.event=r}},o.header=function(t,e){return t=(t+\"\").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+\"\",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+\"\",o):r},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return i=t,o},[\"get\",\"post\"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}})),o.send=function(t,n,i){if(2===arguments.length&&\"function\"==typeof n&&(i=n,n=null),u.open(t,e,!0),null==r||\"accept\"in l||(l.accept=r+\",*/*\"),u.setRequestHeader)for(var a in l)u.setRequestHeader(a,l[a]);return null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=c&&(u.responseType=c),null!=i&&o.on(\"error\",i).on(\"load\",(function(t){i(null,t)})),s.beforesend.call(o,u),u.send(null==n?null:n),o},o.abort=function(){return u.abort(),o},t.rebind(o,s,\"on\"),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}ce.forEach((function(t,e){ce.set(t,ee(e))})),t.functor=fe,t.xhr=he(L),t.dsv=function(t,e){var r=new RegExp('[\"'+t+\"\\n]\"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=pe(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'\"'+t.replace(/\\\"/g,'\"\"')+'\"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i<n;++i)r[t[i]]=e[i];return r};r=e?function(t,r){return e(i(t),r)}:i}))},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,u=0,c=0;function f(){if(u>=l)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++<l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return u=r+2,13===(s=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&&++u):10===s&&(i=!0),t.slice(e+1,r).replace(/\"\"/g,'\"')}for(;u<l;){var s,c=1;if(10===(s=t.charCodeAt(u++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(u)&&(++u,++c);else if(s!==n)continue;return t.slice(e,u-c)}return t.slice(e)}for(;(r=f())!==o;){for(var h=[];r!==a&&r!==o;)h.push(r),r=f();e&&null==(h=e(h,c++))||s.push(h)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var r=new C,n=[];return e.forEach((function(t){for(var e in t)r.has(e)||n.push(r.add(e))})),[n.map(l).join(t)].concat(e.map((function(e){return n.map((function(t){return l(e[t])})).join(t)}))).join(\"\\n\")},i.formatRows=function(t){return t.map(s).join(\"\\n\")},i},t.csv=t.dsv(\",\",\"text/csv\"),t.tsv=t.dsv(\"\\t\",\"text/tab-separated-values\");var de,ge,ve,me,ye=this[O(this,\"requestAnimationFrame\")]||function(t){setTimeout(t,17)};function xe(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return ge?ge.n=i:de=i,ge=i,ve||(me=clearTimeout(me),ve=1,ye(be)),i}function be(){var t=_e(),e=we()-t;e>24?(isFinite(e)&&(clearTimeout(me),me=setTimeout(be,e)),ve=0):(ve=1,ye(be))}function _e(){for(var t=Date.now(),e=de;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function we(){for(var t,e=de,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:de=e.n;return ge=t,r}function ke(t){return t[0]}function Te(t){return t[1]}function Me(t){for(var e=t.length,r=[0,1],n=2,i=2;i<e;i++){for(;n>1&&(a=t[r[n-2]],o=t[r[n-1]],s=t[i],(o[0]-a[0])*(s[1]-a[1])-(o[1]-a[1])*(s[0]-a[0])<=0);)--n;r[n++]=i}var a,o,s;return r.slice(0,n)}function Ae(t,e){return t[0]-e[0]||t[1]-e[1]}t.timer=function(){xe.apply(this,arguments)},t.timer.flush=function(){_e(),we()},t.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},t.geom={},t.geom.hull=function(t){var e=ke,r=Te;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=fe(e),a=fe(r),o=t.length,s=[],l=[];for(n=0;n<o;n++)s.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(s.sort(Ae),n=0;n<o;n++)l.push([s[n][0],-s[n][1]]);var u=Me(s),c=Me(l),f=c[0]===u[0],h=c[c.length-1]===u[u.length-1],p=[];for(n=u.length-1;n>=0;--n)p.push(t[s[u[n]][2]]);for(n=+f;n<c.length-h;++n)p.push(t[s[c[n]][2]]);return p}return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n},t.geom.polygon=function(t){return U(t,Se),t};var Se=t.geom.polygon.prototype=[];function Ee(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Ce(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,f=n[1]-u,h=(s*(l-u)-f*(i-a))/(f*o-s*c);return[i+h*o,l+h*c]}function Le(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}Se.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e<r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},Se.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n<i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},Se.clip=function(t){for(var e,r,n,i,a,o,s=Le(t),l=-1,u=this.length-Le(this),c=this[u-1];++l<u;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r<n;)Ee(o=e[r],c,i)?(Ee(a,c,i)||t.push(Ce(a,o,c,i)),t.push(o)):Ee(a,c,i)&&t.push(Ce(a,o,c,i)),a=o;s&&t.push(t[0]),c=i}return t};var Pe,Oe,Ie,De,ze,Re=[],Fe=[];function Ne(){rr(this),this.edge=this.site=this.circle=null}function Be(t){var e=Re.pop()||new Ne;return e.site=t,e}function je(t){Ze(t),Ie.remove(t),Re.push(t),rr(t)}function Ue(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];je(t);for(var l=a;l.circle&&y(r-l.circle.x)<Tt&&y(n-l.circle.cy)<Tt;)a=l.P,s.unshift(l),je(l),l=a;s.unshift(l),Ze(l);for(var u=o;u.circle&&y(r-u.circle.x)<Tt&&y(n-u.circle.cy)<Tt;)o=u.N,s.push(u),je(u),u=o;s.push(u),Ze(u);var c,f=s.length;for(c=1;c<f;++c)u=s[c],l=s[c-1],Qe(u.edge,l.site,u.site,i);l=s[0],(u=s[f-1]).edge=$e(l.site,u.site,null,i),Xe(l),Xe(u)}function Ve(t){for(var e,r,n,i,a=t.x,o=t.y,s=Ie._;s;)if((n=He(s,o)-a)>Tt)s=s.L;else{if(!((i=a-qe(s,o))>Tt)){n>-Tt?(e=s.P,r=s):i>-Tt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Be(t);if(Ie.insert(e,l),e||r){if(e===r)return Ze(e),r=Be(e.site),Ie.insert(l,r),l.edge=r.edge=$e(e.site,l.site),Xe(e),void Xe(r);if(r){Ze(e),Ze(r);var u=e.site,c=u.x,f=u.y,h=t.x-c,p=t.y-f,d=r.site,g=d.x-c,v=d.y-f,m=2*(h*v-p*g),y=h*h+p*p,x=g*g+v*v,b={x:(v*y-p*x)/m+c,y:(h*x-g*y)/m+f};Qe(r.edge,u,d,b),l.edge=$e(u,t,null,b),r.edge=$e(t,d,null,b),Xe(e),Xe(r)}else l.edge=$e(e.site,l.site)}}function He(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,u=l-e;if(!u)return s;var c=s-n,f=1/a-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-l+u/2+i-a/2)))/f+n:(n+s)/2}function qe(t,e){var r=t.N;if(r)return He(r,e);var n=t.site;return n.y===e?n.x:1/0}function Ge(t){this.site=t,this.edges=[]}function Ye(t,e){return e.angle-t.angle}function We(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xe(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,u=n.y-s,c=a.x-o,f=2*(l*(v=a.y-s)-u*c);if(!(f>=-1e-12)){var h=l*l+u*u,p=c*c+v*v,d=(v*h-u*p)/f,g=(l*p-c*h)/f,v=g+s,m=Fe.pop()||new We;m.arc=t,m.site=i,m.x=d+o,m.y=v+Math.sqrt(d*d+g*g),m.cy=v,t.circle=m;for(var y=null,x=ze._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}ze.insert(y,m),y||(De=m)}}}}function Ze(t){var e=t.circle;e&&(e.P||(De=e.N),ze.remove(e),Fe.push(e),rr(e),t.circle=null)}function Ke(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],u=e[1][1],c=t.l,f=t.r,h=c.x,p=c.y,d=f.x,g=f.y,v=(h+d)/2,m=(p+g)/2;if(g===p){if(v<o||v>=s)return;if(h>d){if(a){if(a.y>=u)return}else a={x:v,y:l};r={x:v,y:u}}else{if(a){if(a.y<l)return}else a={x:v,y:u};r={x:v,y:l}}}else if(i=m-(n=(h-d)/(g-p))*v,n<-1||n>1)if(h>d){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y<l)return}else a={x:(u-i)/n,y:u};r={x:(l-i)/n,y:l}}else if(p<g){if(a){if(a.x>=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x<o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}function Je(t,e){this.l=t,this.r=e,this.a=this.b=null}function $e(t,e,r,n){var i=new Je(t,e);return Pe.push(i),r&&Qe(i,t,e,r),n&&Qe(i,e,t,n),Oe[t.i].edges.push(new tr(i,t,e)),Oe[e.i].edges.push(new tr(i,e,t)),i}function Qe(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function tr(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function er(){this._=null}function rr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function nr(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function ir(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function ar(t){for(;t.L;)t=t.L;return t}function or(t,e){var r,n,i,a=t.sort(sr).pop();for(Pe=[],Oe=new Array(t.length),Ie=new er,ze=new er;;)if(i=De,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))a.x===r&&a.y===n||(Oe[a.i]=new Ge(a),Ve(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;Ue(i.arc)}e&&(function(t){for(var e,r=Pe,n=function(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,u=o.y,c=0,f=1,h=s.x-l,p=s.y-u;if(a=t-l,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=r-l,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)}if(a=e-u,p||!(a>0)){if(a/=p,p<0){if(a<c)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>c&&(c=a)}if(a=n-u,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a<c)return;a<f&&(f=a)}return c>0&&(i.a={x:l+c*h,y:u+c*p}),f<1&&(i.b={x:l+f*h,y:u+f*p}),i}}}}}}(t[0][0],t[0][1],t[1][0],t[1][1]),i=r.length;i--;)(!Ke(e=r[i],t)||!n(e)||y(e.a.x-e.b.x)<Tt&&y(e.a.y-e.b.y)<Tt)&&(e.a=e.b=null,r.splice(i,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,u,c,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],g=Oe,v=g.length;v--;)if((a=g[v])&&a.prepare())for(l=(s=a.edges).length,o=0;o<l;)n=(c=s[o].end()).x,i=c.y,e=(u=s[++o%l].start()).x,r=u.y,(y(n-e)>Tt||y(i-r)>Tt)&&(s.splice(o,0,new tr((m=a.site,x=c,b=y(n-f)<Tt&&d-i>Tt?{x:f,y:y(e-f)<Tt?r:d}:y(i-d)<Tt&&h-n>Tt?{x:y(r-d)<Tt?e:h,y:d}:y(n-h)<Tt&&i-p>Tt?{x:h,y:y(e-h)<Tt?r:p}:y(i-p)<Tt&&n-f>Tt?{x:y(r-p)<Tt?e:f,y:p}:null,_=void 0,(_=new Je(m,null)).a=x,_.b=b,Pe.push(_),_),a.site,null)),++l);var m,x,b,_}(e));var o={cells:Oe,edges:Pe};return Ie=ze=Pe=Oe=null,o}function sr(t,e){return e.y-t.y||e.x-t.x}Ge.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&&t.a||e.splice(r,1);return e.sort(Ye),e.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=ar(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(nr(this,r),r=(t=r).U),r.C=!1,n.C=!0,ir(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(ir(this,r),r=(t=r).U),r.C=!1,n.C=!0,nr(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?ar(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,nr(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,ir(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,nr(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,ir(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,nr(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,ir(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},t.geom.voronoi=function(t){var e=ke,r=Te,n=e,i=r,a=lr;if(t)return o(t);function o(t){var e=new Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return or(s(t),a).cells.forEach((function(a,s){var l=a.edges,u=a.site;(e[s]=l.length?l.map((function(t){var e=t.start();return[e.x,e.y]})):u.x>=r&&u.x<=i&&u.y>=n&&u.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/Tt)*Tt,y:Math.round(i(t,e)/Tt)*Tt,i:e}}))}return o.links=function(t){return or(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},o.triangles=function(t){var e=[];return or(s(t)).cells.forEach((function(r,n){for(var i,a=r.site,o=r.edges.sort(Ye),s=-1,l=o.length,u=o[l-1].edge,c=u.l===a?u.r:u.l;++s<l;)i=c,c=(u=o[s].edge).l===a?u.r:u.l,n<i.i&&n<c.i&&(h=i,p=c,((f=a).x-p.x)*(h.y-f.y)-(f.x-h.x)*(p.y-f.y)<0)&&e.push([t[n],t[i.i],t[c.i]]);var f,h,p})),e},o.x=function(t){return arguments.length?(n=fe(e=t),o):e},o.y=function(t){return arguments.length?(i=fe(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?lr:t,o):a===lr?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&&[[0,0],t]):a===lr?null:a&&a[1]},o};var lr=[[-1e6,-1e6],[1e6,1e6]];function ur(t){return t.x}function cr(t){return t.y}function fr(t,e,r,n,i,a){if(!t(e,r,n,i,a)){var o=.5*(r+i),s=.5*(n+a),l=e.nodes;l[0]&&fr(t,l[0],r,n,o,s),l[1]&&fr(t,l[1],o,n,i,s),l[2]&&fr(t,l[2],r,s,o,a),l[3]&&fr(t,l[3],o,s,i,a)}}function hr(t,e,r,n,i,a,o){var s,l=1/0;return function t(u,c,f,h,p){if(!(c>a||f>o||h<n||p<i)){if(d=u.point){var d,g=e-u.x,v=r-u.y,m=g*g+v*v;if(m<l){var y=Math.sqrt(l=m);n=e-y,i=r-y,a=e+y,o=r+y,s=d}}for(var x=u.nodes,b=.5*(c+h),_=.5*(f+p),w=(r>=_)<<1|e>=b,k=w+4;w<k;++w)if(u=x[3&w])switch(3&w){case 0:t(u,c,f,b,_);break;case 1:t(u,b,f,h,_);break;case 2:t(u,c,_,b,p);break;case 3:t(u,b,_,h,p)}}}(t,n,i,a,o),s}function pr(e,r){e=t.rgb(e),r=t.rgb(r);var n=e.r,i=e.g,a=e.b,o=r.r-n,s=r.g-i,l=r.b-a;return function(t){return\"#\"+ie(Math.round(n+o*t))+ie(Math.round(i+s*t))+ie(Math.round(a+l*t))}}function dr(t,e){var r,n={},i={};for(r in t)r in e?n[r]=xr(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function gr(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function vr(t,e){var r,n,i,a=mr.lastIndex=yr.lastIndex=0,o=-1,s=[],l=[];for(t+=\"\",e+=\"\";(r=mr.exec(t))&&(n=yr.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:gr(r,n)})),a=yr.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+\"\"}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\"\")})}t.geom.delaunay=function(e){return t.geom.voronoi().triangles(e)},t.geom.quadtree=function(t,e,r,n,i){var a,o=ke,s=Te;if(a=arguments.length)return o=ur,s=cr,3===a&&(i=r,n=e,r=e=0),l(t);function l(t){var l,u,c,f,h,p,d,g,v,m=fe(o),x=fe(s);if(null!=e)p=e,d=r,g=n,v=i;else if(g=v=-(p=d=1/0),u=[],c=[],h=t.length,a)for(f=0;f<h;++f)(l=t[f]).x<p&&(p=l.x),l.y<d&&(d=l.y),l.x>g&&(g=l.x),l.y>v&&(v=l.y),u.push(l.x),c.push(l.y);else for(f=0;f<h;++f){var b=+m(l=t[f],f),_=+x(l,f);b<p&&(p=b),_<d&&(d=_),b>g&&(g=b),_>v&&(v=_),u.push(b),c.push(_)}var w=g-p,k=v-d;function T(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,u=t.y;if(null!=l)if(y(l-r)+y(u-n)<.01)M(t,e,r,n,i,a,o,s);else{var c=t.point;t.x=t.y=t.point=null,M(t,c,l,u,i,a,o,s),M(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else M(t,e,r,n,i,a,o,s)}function M(t,e,r,n,i,a,o,s){var l=.5*(i+o),u=.5*(a+s),c=r>=l,f=n>=u,h=f<<1|c;t.leaf=!1,c?i=l:o=l,f?a=u:s=u,T(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,a,o,s)}w>k?v=d+w:g=p+k;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(A,t,+m(t,++f),+x(t,f),p,d,g,v)},visit:function(t){fr(t,A,p,d,g,v)},find:function(t){return hr(A,t[0],t[1],p,d,g,v)}};if(f=-1,null==e){for(;++f<h;)T(A,t[f],u[f],c[f],p,d,g,v);--f}else t.forEach(A.add);return u=c=t=l=null,A}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,r],[n,i]]},l.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),l):null==e?null:[n-e,i-r]},l},t.interpolateRgb=pr,t.interpolateObject=dr,t.interpolateNumber=gr,t.interpolateString=vr;var mr=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,yr=new RegExp(mr.source,\"g\");function xr(e,r){for(var n,i=t.interpolators.length;--i>=0&&!(n=t.interpolators[i](e,r)););return n}function br(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r<s;++r)n.push(xr(t[r],e[r]));for(;r<a;++r)i[r]=t[r];for(;r<o;++r)i[r]=e[r];return function(t){for(r=0;r<s;++r)i[r]=n[r](t);return i}}t.interpolate=xr,t.interpolators=[function(t,e){var r=typeof e;return(\"string\"===r?ce.has(e.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(e)?pr:vr:e instanceof Ft?pr:Array.isArray(e)?br:\"object\"===r&&isNaN(e)?dr:gr)(t,e)}],t.interpolateArray=br;var _r=function(){return L},wr=t.map({linear:_r,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return Sr},cubic:function(){return Er},sin:function(){return Lr},exp:function(){return Pr},circle:function(){return Or},elastic:function(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/At*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*At/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return Ir}}),kr=t.map({in:L,out:Mr,\"in-out\":Ar,\"out-in\":function(t){return Ar(Mr(t))}});function Tr(t){return function(e){return e<=0?0:e>=1?1:t(e)}}function Mr(t){return function(e){return 1-t(1-e)}}function Ar(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Sr(t){return t*t}function Er(t){return t*t*t}function Cr(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Lr(t){return 1-Math.cos(t*Et)}function Pr(t){return Math.pow(2,10*(t-1))}function Or(t){return 1-Math.sqrt(1-t*t)}function Ir(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Dr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function zr(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=Fr(i),s=Rr(i,a),l=Fr(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]<a[0]*i[1]&&(i[0]*=-1,i[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-a[0],a[1]))*Lt,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Lt:0}function Rr(t,e){return t[0]*e[0]+t[1]*e[1]}function Fr(t){var e=Math.sqrt(Rr(t,t));return e&&(t[0]/=e,t[1]/=e),e}t.ease=function(t){var e=t.indexOf(\"-\"),n=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):\"in\";return n=wr.get(n)||_r,Tr((i=kr.get(i)||L)(n.apply(null,r.call(arguments,1))))},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?r.c:i),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return Ht(n+o*t,i+s*t,a+l*t)+\"\"}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?r.s:i),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return jt(n+o*t,i+s*t,a+l*t)+\"\"}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return Zt(n+o*t,i+s*t,a+l*t)+\"\"}},t.interpolateRound=Dr,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,\"g\");return(t.transform=function(t){if(null!=t){r.setAttribute(\"transform\",t);var e=r.transform.baseVal.consolidate()}return new zr(e?e.matrix:Nr)})(e)},zr.prototype.toString=function(){return\"translate(\"+this.translate+\")rotate(\"+this.rotate+\")skewX(\"+this.skew+\")scale(\"+this.scale+\")\"};var Nr={a:1,b:0,c:0,d:1,e:0,f:0};function Br(t){return t.length?t.pop()+\",\":\"\"}function jr(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(\"translate(\",null,\",\",null,\")\");n.push({i:i-4,x:gr(t[0],e[0])},{i:i-2,x:gr(t[1],e[1])})}else(e[0]||e[1])&&r.push(\"translate(\"+e+\")\")}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Br(r)+\"rotate(\",null,\")\")-2,x:gr(t,e)})):e&&r.push(Br(r)+\"rotate(\"+e+\")\")}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(Br(r)+\"skewX(\",null,\")\")-2,x:gr(t,e)}):e&&r.push(Br(r)+\"skewX(\"+e+\")\")}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Br(r)+\"scale(\",null,\",\",null,\")\");n.push({i:i-4,x:gr(t[0],e[0])},{i:i-2,x:gr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Br(r)+\"scale(\"+e+\")\")}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r<a;)n[(e=i[r]).i]=e.x(t);return n.join(\"\")}}function Ur(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function Vr(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}function Hr(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;for(var r=qr(t),n=qr(e),i=r.pop(),a=n.pop(),o=null;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function qr(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function Gr(t){t.fixed|=2}function Yr(t){t.fixed&=-7}function Wr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Xr(t){t.fixed&=-5}function Zr(t,e,r){var n=0,i=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++l<s;)null!=(a=o[l])&&(Zr(a,e,r),t.charge+=a.charge,n+=a.charge*a.cx,i+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=e*r[t.point.index];t.charge+=t.pointCharge=u,n+=u*t.point.x,i+=u*t.point.y}t.cx=n/t.charge,t.cy=i/t.charge}t.interpolateTransform=jr,t.layout={},t.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r<n;)e.push(Hr(t[r]));return e}},t.layout.chord=function(){var e,r,n,i,a,o,s,l={},u=0;function c(){var l,c,h,p,d,g={},v=[],m=t.range(i),y=[];for(e=[],r=[],l=0,p=-1;++p<i;){for(c=0,d=-1;++d<i;)c+=n[p][d];v.push(c),y.push(t.range(i)),l+=c}for(a&&m.sort((function(t,e){return a(v[t],v[e])})),o&&y.forEach((function(t,e){t.sort((function(t,r){return o(n[e][t],n[e][r])}))})),l=(At-u*i)/l,c=0,p=-1;++p<i;){for(h=c,d=-1;++d<i;){var x=m[p],b=y[x][d],_=n[x][b],w=c,k=c+=_*l;g[x+\"-\"+b]={index:x,subindex:b,startAngle:w,endAngle:k,value:_}}r[x]={index:x,startAngle:h,endAngle:c,value:v[x]},c+=u}for(p=-1;++p<i;)for(d=p-1;++d<i;){var T=g[p+\"-\"+d],M=g[d+\"-\"+p];(T.value||M.value)&&e.push(T.value<M.value?{source:M,target:T}:{source:T,target:M})}s&&f()}function f(){e.sort((function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)}))}return l.matrix=function(t){return arguments.length?(i=(n=t)&&n.length,e=r=null,l):n},l.padding=function(t){return arguments.length?(u=t,e=r=null,l):u},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(o=t,e=null,l):o},l.sortChords=function(t){return arguments.length?(s=t,e&&f(),l):s},l.chords=function(){return e||c(),e},l.groups=function(){return r||c(),r},l},t.layout.force=function(){var e,r,n,i,a,o,s={},l=t.dispatch(\"start\",\"tick\",\"end\"),u=[1,1],c=.9,f=Kr,h=Jr,p=-30,d=$r,g=.1,v=.64,m=[],y=[];function x(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/v<l){if(l<d){var u=e.charge/l;t.px-=a*u,t.py-=o*u}return!0}e.point&&l&&l<d&&(u=e.pointCharge/l,t.px-=a*u,t.py-=o*u)}return!e.charge}}function b(e){e.px=t.event.x,e.py=t.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return e=null,l.end({type:\"end\",alpha:n=0}),!0;var r,s,f,h,d,v,b,_,w,k=m.length,T=y.length;for(s=0;s<T;++s)h=(f=y[s]).source,(v=(_=(d=f.target).x-h.x)*_+(w=d.y-h.y)*w)&&(_*=v=n*a[s]*((v=Math.sqrt(v))-i[s])/v,w*=v,d.x-=_*(b=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=w*b,h.x+=_*(b=1-b),h.y+=w*b);if((b=n*g)&&(_=u[0]/2,w=u[1]/2,s=-1,b))for(;++s<k;)(f=m[s]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(p)for(Zr(r=t.geom.quadtree(m),n,o),s=-1;++s<k;)(f=m[s]).fixed||r.visit(x(f));for(s=-1;++s<k;)(f=m[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*c,f.y-=(f.py-(f.py=f.y))*c);l.tick({type:\"tick\",alpha:n})},s.nodes=function(t){return arguments.length?(m=t,s):m},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(u=t,s):u},s.linkDistance=function(t){return arguments.length?(f=\"function\"==typeof t?t:+t,s):f},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h=\"function\"==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(p=\"function\"==typeof t?t:+t,s):p},s.chargeDistance=function(t){return arguments.length?(d=t*t,s):Math.sqrt(d)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(v=t*t,s):Math.sqrt(v)},s.alpha=function(t){return arguments.length?(t=+t,n?t>0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:\"end\",alpha:n=0})):t>0&&(l.start({type:\"start\",alpha:n=t}),e=xe(s.tick)),s):n},s.start=function(){var t,e,r,n=m.length,l=y.length,c=u[0],d=u[1];for(t=0;t<n;++t)(r=m[t]).index=t,r.weight=0;for(t=0;t<l;++t)\"number\"==typeof(r=y[t]).source&&(r.source=m[r.source]),\"number\"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<n;++t)r=m[t],isNaN(r.x)&&(r.x=g(\"x\",c)),isNaN(r.y)&&(r.y=g(\"y\",d)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],\"function\"==typeof f)for(t=0;t<l;++t)i[t]=+f.call(this,y[t],t);else for(t=0;t<l;++t)i[t]=f;if(a=[],\"function\"==typeof h)for(t=0;t<l;++t)a[t]=+h.call(this,y[t],t);else for(t=0;t<l;++t)a[t]=h;if(o=[],\"function\"==typeof p)for(t=0;t<n;++t)o[t]=+p.call(this,m[t],t);else for(t=0;t<n;++t)o[t]=p;function g(r,i){if(!e){for(e=new Array(n),u=0;u<n;++u)e[u]=[];for(u=0;u<l;++u){var a=y[u];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}for(var o,s=e[t],u=-1,c=s.length;++u<c;)if(!isNaN(o=s[u][r]))return o;return Math.random()*i}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(r||(r=t.behavior.drag().origin(L).on(\"dragstart.force\",Gr).on(\"drag.force\",b).on(\"dragend.force\",Yr)),!arguments.length)return r;this.on(\"mouseover.force\",Wr).on(\"mouseout.force\",Xr).call(r)},t.rebind(s,l,\"on\")};var Kr=20,Jr=1,$r=1/0;function Qr(e,r){return t.rebind(e,r,\"sort\",\"children\",\"value\"),e.nodes=e,e.links=on,e}function tn(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&&(n=i.length))for(var n,i;--n>=0;)r.push(i[n])}function en(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o<i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function rn(t){return t.children}function nn(t){return t.value}function an(t,e){return e.value-t.value}function on(e){return t.merge(e.map((function(t){return(t.children||[]).map((function(e){return{source:t,target:e}}))})))}t.layout.hierarchy=function(){var t=an,e=rn,r=nn;function n(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(u=e.call(n,a,a.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;r&&(a.value=0),a.children=u}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return en(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(tn(t,(function(t){t.children&&(t.value=0)})),en(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,e,r,i){var a=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(r=t.value?r/t.value:0;++u<o;)n(s=a[u],e,l=s.value*r,i),e+=l}}function i(t){var e=t.children,r=0;if(e&&(n=e.length))for(var n,a=-1;++a<n;)r=Math.max(r,i(e[a]));return 1+r}function a(t,a){var o=e.call(this,t,a);return n(o[0],0,r[0],r[1]/i(o[0])),o}return a.size=function(t){return arguments.length?(r=t,a):r},Qr(a,e)},t.layout.pie=function(){var e=Number,r=sn,n=0,i=At,a=0;function o(s){var l,u=s.length,c=s.map((function(t,r){return+e.call(o,t,r)})),f=+(\"function\"==typeof n?n.apply(this,arguments):n),h=(\"function\"==typeof i?i.apply(this,arguments):i)-f,p=Math.min(Math.abs(h)/u,+(\"function\"==typeof a?a.apply(this,arguments):a)),d=p*(h<0?-1:1),g=t.sum(c),v=g?(h-u*d)/g:0,m=t.range(u),y=[];return null!=r&&m.sort(r===sn?function(t,e){return c[e]-c[t]}:function(t,e){return r(s[t],s[e])}),m.forEach((function(t){y[t]={data:s[t],value:l=c[t],startAngle:f,endAngle:f+=l*v+d,padAngle:p}})),y}return o.value=function(t){return arguments.length?(e=t,o):e},o.sort=function(t){return arguments.length?(r=t,o):r},o.startAngle=function(t){return arguments.length?(n=t,o):n},o.endAngle=function(t){return arguments.length?(i=t,o):i},o.padAngle=function(t){return arguments.length?(a=t,o):a},o};var sn={};function ln(t){return t.x}function un(t){return t.y}function cn(t,e,r){t.y0=e,t.y=r}t.layout.stack=function(){var e=L,r=pn,n=dn,i=cn,a=ln,o=un;function s(l,u){if(!(p=l.length))return l;var c=l.map((function(t,r){return e.call(s,t,r)})),f=c.map((function(t){return t.map((function(t,e){return[a.call(s,t,e),o.call(s,t,e)]}))})),h=r.call(s,f,u);c=t.permute(c,h),f=t.permute(f,h);var p,d,g,v,m=n.call(s,f,u),y=c[0].length;for(g=0;g<y;++g)for(i.call(s,c[0][g],v=m[g],f[0][g][1]),d=1;d<p;++d)i.call(s,c[d][g],v+=f[d-1][g][1],f[d][g][1]);return l}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(t){return arguments.length?(r=\"function\"==typeof t?t:fn.get(t)||pn,s):r},s.offset=function(t){return arguments.length?(n=\"function\"==typeof t?t:hn.get(t)||dn,s):n},s.x=function(t){return arguments.length?(a=t,s):a},s.y=function(t){return arguments.length?(o=t,s):o},s.out=function(t){return arguments.length?(i=t,s):i},s};var fn=t.map({\"inside-out\":function(e){var r,n,i=e.length,a=e.map(gn),o=e.map(vn),s=t.range(i).sort((function(t,e){return a[t]-a[e]})),l=0,u=0,c=[],f=[];for(r=0;r<i;++r)n=s[r],l<u?(l+=o[n],c.push(n)):(u+=o[n],f.push(n));return f.reverse().concat(c)},reverse:function(e){return t.range(e.length).reverse()},default:pn}),hn=t.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,u,c=t.length,f=t[0],h=f.length,p=[];for(p[0]=l=u=0,r=1;r<h;++r){for(e=0,i=0;e<c;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e<c;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n<e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}p[r]=l-=i?a/i*s:0,l<u&&(u=l)}for(r=0;r<h;++r)p[r]-=u;return p},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];if(n)for(e=0;e<i;e++)t[e][r][1]/=n;else for(e=0;e<i;e++)t[e][r][1]=o}for(r=0;r<a;++r)s[r]=0;return s},zero:dn});function pn(e){return t.range(e.length)}function dn(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function gn(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r<a;++r)(e=t[r][1])>i&&(n=r,i=e);return n}function vn(t){return t.reduce(mn,0)}function mn(t,e){return t+e[1]}function yn(t,e){return xn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function xn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function bn(e){return[t.min(e),t.max(e)]}function _n(t,e){return t.value-e.value}function wn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function kn(t,e){t._pack_next=e,e._pack_prev=t}function Tn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Mn(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,u=1/0,c=-1/0,f=1/0,h=-1/0;if(e.forEach(An),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(Cn(r,n,i=e[2]),x(i),wn(r,i),r._pack_prev=i,wn(i,n),n=r._pack_next,a=3;a<l;a++){Cn(r,n,i=e[a]);var p=0,d=1,g=1;for(o=n._pack_next;o!==n;o=o._pack_next,d++)if(Tn(o,i)){p=1;break}if(1==p)for(s=r._pack_prev;s!==o._pack_prev&&!Tn(s,i);s=s._pack_prev,g++);p?(d<g||d==g&&n.r<r.r?kn(r,n=o):kn(r=s,n),a--):(wn(r,i),n=i,x(i))}var v=(u+c)/2,m=(f+h)/2,y=0;for(a=0;a<l;a++)(i=e[a]).x-=v,i.y-=m,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(Sn)}function x(t){u=Math.min(t.x-t.r,u),c=Math.max(t.x+t.r,c),f=Math.min(t.y-t.r,f),h=Math.max(t.y+t.r,h)}}function An(t){t._pack_next=t._pack_prev=t}function Sn(t){delete t._pack_next,delete t._pack_prev}function En(t,e,r,n){var i=t.children;if(t.x=e+=n*t.x,t.y=r+=n*t.y,t.r*=n,i)for(var a=-1,o=i.length;++a<o;)En(i[a],e,r,n)}function Cn(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&&(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),u=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+u*a,r.y=t.y+l*a-u*i}else r.x=t.x+n,r.y=t.y}function Ln(t,e){return t.parent==e.parent?1:2}function Pn(t){var e=t.children;return e.length?e[0]:t.t}function On(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function In(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function Dn(t,e,r){return t.a.parent===e.parent?t.a:r}function zn(t){var e=t.children;return e&&e.length?zn(e[0]):t}function Rn(t){var e,r=t.children;return r&&(e=r.length)?Rn(r[e-1]):t}function Fn(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Nn(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Bn(t){var e=t[0],r=t[t.length-1];return e<r?[e,r]:[r,e]}function jn(t){return t.rangeExtent?t.rangeExtent():Bn(t.range())}function Un(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}}function Vn(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function Hn(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:qn}t.layout.histogram=function(){var e=!0,r=Number,n=bn,i=yn;function a(a,o){for(var s,l,u=[],c=a.map(r,this),f=n.call(this,c,o),h=i.call(this,f,c,o),p=(o=-1,c.length),d=h.length-1,g=e?1:1/p;++o<d;)(s=u[o]=[]).dx=h[o+1]-(s.x=h[o]),s.y=0;if(d>0)for(o=-1;++o<p;)(l=c[o])>=f[0]&&l<=f[1]&&((s=u[t.bisect(h,l,1,d)-1]).y+=g,s.push(a[o]));return u}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=fe(t),a):n},a.bins=function(t){return arguments.length?(i=\"number\"==typeof t?function(e){return xn(e,t)}:fe(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(_n),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],u=i[1],c=null==e?Math.sqrt:\"function\"==typeof e?e:function(){return e};if(s.x=s.y=0,en(s,(function(t){t.r=+c(t.value)})),en(s,Mn),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;en(s,(function(t){t.r+=f})),en(s,Mn),en(s,(function(t){t.r-=f}))}return En(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),o}return a.size=function(t){return arguments.length?(i=t,a):i},a.radius=function(t){return arguments.length?(e=null==t||\"function\"==typeof t?t:+t,a):e},a.padding=function(t){return arguments.length?(n=+t,a):n},Qr(a,r)},t.layout.tree=function(){var e=t.layout.hierarchy().sort(null).value(null),r=Ln,n=[1,1],i=null;function a(t,a){var u=e.call(this,t,a),c=u[0],f=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o<s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(c);if(en(f,o),f.parent.m=-f.z,tn(f,s),i)tn(c,l);else{var h=c,p=c,d=c;tn(c,(function(t){t.x<h.x&&(h=t),t.x>p.x&&(p=t),t.depth>d.depth&&(d=t)}));var g=r(h,p)/2-h.x,v=n[0]/(p.x+r(p,h)/2+g),m=n[1]/(d.depth||1);tn(c,(function(t){t.x=(t.x+g)*v,t.y=t.depth*m}))}return u}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,h=l.m;s=On(s),a=Pn(a),s&&a;)l=Pn(l),(o=On(o)).a=t,(i=s.z+f-a.z-u+r(s._,a._))>0&&(In(Dn(s,t,n),t,i),u+=i,c+=i),f+=s.m,u+=a.m,h+=l.m,c+=o.m;s&&!On(o)&&(o.t=s,o.m+=f-c),a&&!Pn(l)&&(l.t=a,l.m+=u-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Qr(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=Ln,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),u=l[0],c=0;en(u,(function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(n),e.y=function(e){return 1+t.max(e,(function(t){return t.y}))}(n)):(e.x=s?c+=r(e,s):0,e.y=0,s=e)}));var f=zn(u),h=Rn(u),p=f.x-r(f,h)/2,d=h.x+r(h,f)/2;return en(u,i?function(t){t.x=(t.x-u.x)*n[0],t.y=(u.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(u.y?t.y/u.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Qr(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=Fn,s=!1,l=\"squarify\",u=.5*(1+Math.sqrt(5));function c(t,e){for(var r,n,i=-1,a=t.length;++i<a;)n=(r=t[i]).value*(e<0?0:e),r.area=isNaN(n)||n<=0?0:n}function f(t){var e=t.children;if(e&&e.length){var r,n,i,a=o(t),s=[],u=e.slice(),h=1/0,g=\"slice\"===l?a.dx:\"dice\"===l?a.dy:\"slice-dice\"===l?1&t.depth?a.dy:a.dx:Math.min(a.dx,a.dy);for(c(u,a.dx*a.dy/t.value),s.area=0;(i=u.length)>0;)s.push(r=u[i-1]),s.area+=r.area,\"squarify\"!==l||(n=p(s,g))<=h?(u.pop(),h=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(d(s,g,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(c(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++o<s;)(r=t[o].area)&&(r<a&&(a=r),r>i&&(i=r));return e*=e,(n*=n)?Math.max(e*i*u/n,n/(e*a*u)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,u=r.y,c=e?n(t.area/e):0;if(e==r.dx){for((i||c>r.dy)&&(c=r.dy);++o<s;)(a=t[o]).x=l,a.y=u,a.dy=c,l+=a.dx=Math.min(r.x+r.dx-l,c?n(a.area/c):0);a.z=!0,a.dx+=r.x+r.dx-l,r.y+=c,r.dy-=c}else{for((i||c>r.dx)&&(c=r.dx);++o<s;)(a=t[o]).x=l,a.y=u,a.dx=c,u+=a.dy=Math.min(r.y+r.dy-u,c?n(a.area/c):0);a.z=!1,a.dy+=r.y+r.dy-u,r.x+=c,r.dx-=c}}function g(t){var n=e||r(t),a=n[0];return a.x=a.y=0,a.value?(a.dx=i[0],a.dy=i[1]):a.dx=a.dy=0,e&&r.revalue(a),c([a],a.dx*a.dy/a.value),(e?h:f)(a),s&&(e=n),n}return g.size=function(t){return arguments.length?(i=t,g):i},g.padding=function(t){if(!arguments.length)return a;function e(e){var r=t.call(g,e,e.depth);return null==r?Fn(e):Nn(e,\"number\"==typeof r?[r,r,r,r]:r)}function r(e){return Nn(e,t)}var n;return o=null==(a=t)?Fn:\"function\"==(n=typeof t)?e:\"number\"===n?(t=[t,t,t,t],r):r,g},g.round=function(t){return arguments.length?(n=t?Math.round:Number,g):n!=Number},g.sticky=function(t){return arguments.length?(s=t,e=null,g):s},g.ratio=function(t){return arguments.length?(u=t,g):u},g.mode=function(t){return arguments.length?(l=t+\"\",g):l},Qr(g,r)},t.random={normal:function(t,e){var r=arguments.length;return r<2&&(e=1),r<1&&(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i>1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r<t;r++)e+=Math.random();return e}}},t.scale={};var qn={floor:L,ceil:L};function Gn(e,r,n,i){var a=[],o=[],s=0,l=Math.min(e.length,r.length)-1;for(e[l]<e[0]&&(e=e.slice().reverse(),r=r.slice().reverse());++s<=l;)a.push(n(e[s-1],e[s])),o.push(i(r[s-1],r[s]));return function(r){var n=t.bisect(e,r,1,l)-1;return o[n](a[n](r))}}function Yn(t,e,r,n){var i,a;function o(){var o=Math.min(t.length,e.length)>2?Gn:Un,l=n?Vr:Ur;return i=o(t,e,l,r),a=o(e,t,l,xr),s}function s(t){return i(t)}return s.invert=function(t){return a(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},s.range=function(t){return arguments.length?(e=t,o()):e},s.rangeRound=function(t){return s.range(t).interpolate(Dr)},s.clamp=function(t){return arguments.length?(n=t,o()):n},s.interpolate=function(t){return arguments.length?(r=t,o()):r},s.ticks=function(e){return Kn(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Xn(t,e),o()},s.copy=function(){return Yn(t,e,r,n)},o()}function Wn(e,r){return t.rebind(e,r,\"range\",\"rangeRound\",\"interpolate\",\"clamp\")}function Xn(t,e){return Vn(t,Hn(Zn(t,e)[2])),Vn(t,Hn(Zn(t,e)[2])),t}function Zn(t,e){null==e&&(e=10);var r=Bn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function Kn(e,r){return t.range.apply(t,Zn(e,r))}function Jn(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Vn(n.map(i),r?Math:$n);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Bn(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),f=e%1?2:e;if(isFinite(c-u)){if(r){for(;u<c;u++)for(var h=1;h<f;h++)o.push(a(u)*h);o.push(a(u))}else for(o.push(a(u));u++<c;)for(h=f-1;h>0;h--)o.push(a(u)*h);for(u=0;o[u]<s;u++);for(c=o.length;o[c-1]>l;c--);o=o.slice(u,c)}return o},o.copy=function(){return Jn(t.copy(),e,r,n)},Wn(o,t)}t.scale.linear=function(){return Yn([0,1],[0,1],xr,!1)},t.scale.log=function(){return Jn(t.scale.linear().domain([0,1]),10,!0,[1,10])};var $n={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function Qn(t,e,r){var n=ti(e),i=ti(1/e);function a(e){return t(n(e))}return a.invert=function(e){return i(t.invert(e))},a.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),a):r},a.ticks=function(t){return Kn(r,t)},a.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},a.nice=function(t){return a.domain(Xn(r,t))},a.exponent=function(o){return arguments.length?(n=ti(e=o),i=ti(1/e),t.domain(r.map(n)),a):e},a.copy=function(){return Qn(t.copy(),e,r)},Wn(a,t)}function ti(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ei(e,r){var n,i,a;function o(t){return i[((n.get(t)||(\"range\"===r.t?n.set(t,e.push(t)):NaN))-1)%i.length]}function s(r,n){return t.range(e.length).map((function(t){return r+n*t}))}return o.domain=function(t){if(!arguments.length)return e;e=[],n=new _;for(var i,a=-1,s=t.length;++a<s;)n.has(i=t[a])||n.set(i,e.push(i));return o[r.t].apply(o,r.a)},o.range=function(t){return arguments.length?(i=t,a=0,r={t:\"range\",a:arguments},o):i},o.rangePoints=function(t,n){arguments.length<2&&(n=0);var l=t[0],u=t[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+n);return i=s(l+c*n/2,c),a=0,r={t:\"rangePoints\",a:arguments},o},o.rangeRoundPoints=function(t,n){arguments.length<2&&(n=0);var l=t[0],u=t[1],c=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+n)|0;return i=s(l+Math.round(c*n/2+(u-l-(e.length-1+n)*c)/2),c),a=0,r={t:\"rangeRoundPoints\",a:arguments},o},o.rangeBands=function(t,n,l){arguments.length<2&&(n=0),arguments.length<3&&(l=n);var u=t[1]<t[0],c=t[u-0],f=(t[1-u]-c)/(e.length-n+2*l);return i=s(c+f*l,f),u&&i.reverse(),a=f*(1-n),r={t:\"rangeBands\",a:arguments},o},o.rangeRoundBands=function(t,n,l){arguments.length<2&&(n=0),arguments.length<3&&(l=n);var u=t[1]<t[0],c=t[u-0],f=t[1-u],h=Math.floor((f-c)/(e.length-n+2*l));return i=s(c+Math.round((f-c-(e.length-n)*h)/2),h),u&&i.reverse(),a=Math.round(h*(1-n)),r={t:\"rangeRoundBands\",a:arguments},o},o.rangeBand=function(){return a},o.rangeExtent=function(){return Bn(r.a[0])},o.copy=function(){return ei(e,r)},o.domain(e)}t.scale.pow=function(){return Qn(t.scale.linear(),1,[0,1])},t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return ei([],{t:\"range\",a:[[]]})},t.scale.category10=function(){return t.scale.ordinal().range(ri)},t.scale.category20=function(){return t.scale.ordinal().range(ni)},t.scale.category20b=function(){return t.scale.ordinal().range(ii)},t.scale.category20c=function(){return t.scale.ordinal().range(ai)};var ri=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(re),ni=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(re),ii=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(re),ai=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(re);function oi(e,r){var n;function i(){var i=0,o=r.length;for(n=[];++i<o;)n[i-1]=t.quantile(e,i/o);return a}function a(e){if(!isNaN(e=+e))return r[t.bisect(n,e)]}return a.domain=function(t){return arguments.length?(e=t.map(p).filter(d).sort(h),i()):e},a.range=function(t){return arguments.length?(r=t,i()):r},a.quantiles=function(){return n},a.invertExtent=function(t){return(t=r.indexOf(t))<0?[NaN,NaN]:[t>0?n[t-1]:e[0],t<n.length?n[t]:e[e.length-1]]},a.copy=function(){return oi(e,r)},i()}function si(t,e,r){var n,i;function a(e){return r[Math.max(0,Math.min(i,Math.floor(n*(e-t))))]}function o(){return n=r.length/(e-t),i=r.length-1,a}return a.domain=function(r){return arguments.length?(t=+r[0],e=+r[r.length-1],o()):[t,e]},a.range=function(t){return arguments.length?(r=t,o()):r},a.invertExtent=function(e){return[e=(e=r.indexOf(e))<0?NaN:e/n+t,e+1/n]},a.copy=function(){return si(t,e,r)},o()}function li(e,r){function n(n){if(n<=n)return r[t.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=t,n):r},n.invertExtent=function(t){return t=r.indexOf(t),[e[t-1],e[t]]},n.copy=function(){return li(e,r)},n}function ui(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(r){return arguments.length?(t=r.map(e),e):t},e.ticks=function(e){return Kn(t,e)},e.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},e.copy=function(){return ui(t)},e}function ci(){return 0}t.scale.quantile=function(){return oi([],[])},t.scale.quantize=function(){return si(0,1,[0,1])},t.scale.threshold=function(){return li([.5],[0,1])},t.scale.identity=function(){return ui([0,1])},t.svg={},t.svg.arc=function(){var t=hi,e=pi,r=ci,n=fi,i=di,a=gi,o=vi;function s(){var s=Math.max(0,+t.apply(this,arguments)),u=Math.max(0,+e.apply(this,arguments)),c=i.apply(this,arguments)-Et,f=a.apply(this,arguments)-Et,h=Math.abs(f-c),p=c>f?0:1;if(u<s&&(d=u,u=s,s=d),h>=St)return l(u,p)+(s?l(s,1-p):\"\")+\"Z\";var d,g,v,m,y,x,b,_,w,k,T,M,A=0,S=0,E=[];if((m=(+o.apply(this,arguments)||0)/2)&&(v=n===fi?Math.sqrt(s*s+u*u):+n.apply(this,arguments),p||(S*=-1),u&&(S=Pt(v/u*Math.sin(m))),s&&(A=Pt(v/s*Math.sin(m)))),u){y=u*Math.cos(c+S),x=u*Math.sin(c+S),b=u*Math.cos(f-S),_=u*Math.sin(f-S);var C=Math.abs(f-c-2*S)<=Mt?0:1;if(S&&mi(y,x,b,_)===p^C){var L=(c+f)/2;y=u*Math.cos(L),x=u*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-A),k=s*Math.sin(f-A),T=s*Math.cos(c+A),M=s*Math.sin(c+A);var P=Math.abs(c-f+2*A)<=Mt?0:1;if(A&&mi(w,k,T,M)===1-p^P){var O=(c+f)/2;w=s*Math.cos(O),k=s*Math.sin(O),T=M=null}}else w=k=0;if(h>Tt&&(d=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){g=s<u^p?0:1;var I=d,D=d;if(h<Mt){var z=null==T?[w,k]:null==b?[y,x]:Ce([y,x],[T,M],[b,_],[w,k]),R=y-z[0],F=x-z[1],N=b-z[0],B=_-z[1],j=1/Math.sin(Math.acos((R*N+F*B)/(Math.sqrt(R*R+F*F)*Math.sqrt(N*N+B*B)))/2),U=Math.sqrt(z[0]*z[0]+z[1]*z[1]);D=Math.min(d,(s-U)/(j-1)),I=Math.min(d,(u-U)/(j+1))}if(null!=b){var V=yi(null==T?[w,k]:[T,M],[y,x],u,I,p),H=yi([b,_],[w,k],u,I,p);d===I?E.push(\"M\",V[0],\"A\",I,\",\",I,\" 0 0,\",g,\" \",V[1],\"A\",u,\",\",u,\" 0 \",1-p^mi(V[1][0],V[1][1],H[1][0],H[1][1]),\",\",p,\" \",H[1],\"A\",I,\",\",I,\" 0 0,\",g,\" \",H[0]):E.push(\"M\",V[0],\"A\",I,\",\",I,\" 0 1,\",g,\" \",H[0])}else E.push(\"M\",y,\",\",x);if(null!=T){var q=yi([y,x],[T,M],s,-D,p),G=yi([w,k],null==b?[y,x]:[b,_],s,-D,p);d===D?E.push(\"L\",G[0],\"A\",D,\",\",D,\" 0 0,\",g,\" \",G[1],\"A\",s,\",\",s,\" 0 \",p^mi(G[1][0],G[1][1],q[1][0],q[1][1]),\",\",1-p,\" \",q[1],\"A\",D,\",\",D,\" 0 0,\",g,\" \",q[0]):E.push(\"L\",G[0],\"A\",D,\",\",D,\" 0 0,\",g,\" \",q[0])}else E.push(\"L\",w,\",\",k)}else E.push(\"M\",y,\",\",x),null!=b&&E.push(\"A\",u,\",\",u,\" 0 \",C,\",\",p,\" \",b,\",\",_),E.push(\"L\",w,\",\",k),null!=T&&E.push(\"A\",s,\",\",s,\" 0 \",P,\",\",1-p,\" \",T,\",\",M);return E.push(\"Z\"),E.join(\"\")}function l(t,e){return\"M0,\"+t+\"A\"+t+\",\"+t+\" 0 1,\"+e+\" 0,\"+-t+\"A\"+t+\",\"+t+\" 0 1,\"+e+\" 0,\"+t}return s.innerRadius=function(e){return arguments.length?(t=fe(e),s):t},s.outerRadius=function(t){return arguments.length?(e=fe(t),s):e},s.cornerRadius=function(t){return arguments.length?(r=fe(t),s):r},s.padRadius=function(t){return arguments.length?(n=t==fi?fi:fe(t),s):n},s.startAngle=function(t){return arguments.length?(i=fe(t),s):i},s.endAngle=function(t){return arguments.length?(a=fe(t),s):a},s.padAngle=function(t){return arguments.length?(o=fe(t),s):o},s.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Et;return[Math.cos(n)*r,Math.sin(n)*r]},s};var fi=\"auto\";function hi(t){return t.innerRadius}function pi(t){return t.outerRadius}function di(t){return t.startAngle}function gi(t){return t.endAngle}function vi(t){return t&&t.padAngle}function mi(t,e,r,n){return(t-r)*e-(e-n)*t>0?0:1}function yi(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,f=t[1]+u,h=e[0]+l,p=e[1]+u,d=(c+h)/2,g=(f+p)/2,v=h-c,m=p-f,y=v*v+m*m,x=r-n,b=c*p-h*f,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-v*_)/y,k=(-b*v-m*_)/y,T=(b*m+v*_)/y,M=(-b*v+m*_)/y,A=w-d,S=k-g,E=T-d,C=M-g;return A*A+S*S>E*E+C*C&&(w=T,k=M),[[w-l,k-u],[w*r/x,k*r/x]]}function xi(){return!0}function bi(t){var e=ke,r=Te,n=xi,i=wi,a=i.key,o=.7;function s(a){var s,l=[],u=[],c=-1,f=a.length,h=fe(e),p=fe(r);function d(){l.push(\"M\",i(t(u),o))}for(;++c<f;)n.call(this,s=a[c],c)?u.push([+h.call(this,s,c),+p.call(this,s,c)]):u.length&&(d(),u=[]);return u.length&&d(),l.length?l.join(\"\"):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(r=t,s):r},s.defined=function(t){return arguments.length?(n=t,s):n},s.interpolate=function(t){return arguments.length?(a=\"function\"==typeof t?i=t:(i=_i.get(t)||wi).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}t.svg.line=function(){return bi(L)};var _i=t.map({linear:wi,\"linear-closed\":ki,step:function(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"H\",(n[0]+(n=t[e])[0])/2,\"V\",n[1]);return r>1&&i.push(\"H\",n[0]),i.join(\"\")},\"step-before\":Ti,\"step-after\":Mi,basis:Ei,\"basis-open\":function(t){if(t.length<4)return wi(t);for(var e,r=[],n=-1,i=t.length,a=[0],o=[0];++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);for(r.push(Ci(Oi,a)+\",\"+Ci(Oi,o)),--n;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Ii(r,a,o);return r.join(\"\")},\"basis-closed\":function(t){for(var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];++n<4;)r=t[n%i],o.push(r[0]),s.push(r[1]);for(e=[Ci(Oi,o),\",\",Ci(Oi,s)],--n;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Ii(e,o,s);return e.join(\"\")},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,u=-1;++u<=r;)i=u/r,(n=t[u])[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return Ei(t)},cardinal:function(t,e){return t.length<3?wi(t):t[0]+Ai(t,Si(t,e))},\"cardinal-open\":function(t,e){return t.length<4?wi(t):t[1]+Ai(t.slice(1,-1),Si(t,e))},\"cardinal-closed\":function(t,e){return t.length<3?ki(t):t[0]+Ai((t.push(t[0]),t),Si([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?wi(t):t[0]+Ai(t,function(t){for(var e,r,n,i,a=[],o=function(t){for(var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=Di(i,a);++e<r;)n[e]=(o+(o=Di(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;++s<l;)e=Di(t[s],t[s+1]),y(e)<Tt?o[s]=o[s+1]=0:(i=(r=o[s]/e)*r+(n=o[s+1]/e)*n)>9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function wi(t){return t.length>1?t.join(\"L\"):t+\"Z\"}function ki(t){return t.join(\"L\")+\"Z\"}function Ti(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"V\",(n=t[e])[1],\"H\",n[0]);return i.join(\"\")}function Mi(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"H\",(n=t[e])[0],\"V\",n[1]);return i.join(\"\")}function Ai(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return wi(t);var r=t.length!=e.length,n=\"\",i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&&(n+=\"Q\"+(a[0]-2*o[0]/3)+\",\"+(a[1]-2*o[1]/3)+\",\"+a[0]+\",\"+a[1],i=t[1],l=2),e.length>1){s=e[1],a=t[l],l++,n+=\"C\"+(i[0]+o[0])+\",\"+(i[1]+o[1])+\",\"+(a[0]-s[0])+\",\"+(a[1]-s[1])+\",\"+a[0]+\",\"+a[1];for(var u=2;u<e.length;u++,l++)a=t[l],s=e[u],n+=\"S\"+(a[0]-s[0])+\",\"+(a[1]-s[1])+\",\"+a[0]+\",\"+a[1]}if(r){var c=t[l];n+=\"Q\"+(a[0]+2*s[0]/3)+\",\"+(a[1]+2*s[1]/3)+\",\"+c[0]+\",\"+c[1]}return n}function Si(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s<l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Ei(t){if(t.length<3)return wi(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,\",\",a,\"L\",Ci(Oi,o),\",\",Ci(Oi,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Ii(l,o,s);return t.pop(),l.push(\"L\",n),l.join(\"\")}function Ci(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}_i.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var Li=[0,2/3,1/3,0],Pi=[0,1/3,2/3,0],Oi=[0,1/6,2/3,1/6];function Ii(t,e,r){t.push(\"C\",Ci(Li,e),\",\",Ci(Li,r),\",\",Ci(Pi,e),\",\",Ci(Pi,r),\",\",Ci(Oi,e),\",\",Ci(Oi,r))}function Di(t,e){return(e[1]-t[1])/(e[0]-t[0])}function zi(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Et,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function Ri(t){var e=ke,r=ke,n=0,i=Te,a=xi,o=wi,s=o.key,l=o,u=\"L\",c=.7;function f(s){var f,h,p,d=[],g=[],v=[],m=-1,y=s.length,x=fe(e),b=fe(n),_=e===r?function(){return h}:fe(r),w=n===i?function(){return p}:fe(i);function k(){d.push(\"M\",o(t(v),c),u,l(t(g.reverse()),c),\"Z\")}for(;++m<y;)a.call(this,f=s[m],m)?(g.push([h=+x.call(this,f,m),p=+b.call(this,f,m)]),v.push([+_.call(this,f,m),+w.call(this,f,m)])):g.length&&(k(),g=[],v=[]);return g.length&&k(),d.length?d.join(\"\"):null}return f.x=function(t){return arguments.length?(e=r=t,f):r},f.x0=function(t){return arguments.length?(e=t,f):e},f.x1=function(t){return arguments.length?(r=t,f):r},f.y=function(t){return arguments.length?(n=i=t,f):i},f.y0=function(t){return arguments.length?(n=t,f):n},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(a=t,f):a},f.interpolate=function(t){return arguments.length?(s=\"function\"==typeof t?o=t:(o=_i.get(t)||wi).key,l=o.reverse||o,u=o.closed?\"M\":\"L\",f):s},f.tension=function(t){return arguments.length?(c=t,f):c},f}function Fi(t){return t.source}function Ni(t){return t.target}function Bi(t){return t.radius}function ji(t){return[t.x,t.y]}function Ui(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Et;return[r*Math.cos(n),r*Math.sin(n)]}}function Vi(){return 64}function Hi(){return\"circle\"}function qi(t){var e=Math.sqrt(t/Mt);return\"M0,\"+e+\"A\"+e+\",\"+e+\" 0 1,1 0,\"+-e+\"A\"+e+\",\"+e+\" 0 1,1 0,\"+e+\"Z\"}t.svg.line.radial=function(){var t=bi(zi);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Ti.reverse=Mi,Mi.reverse=Ti,t.svg.area=function(){return Ri(L)},t.svg.area.radial=function(){var t=Ri(zi);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},t.svg.chord=function(){var t=Fi,e=Ni,r=Bi,n=di,i=gi;function a(r,n){var i,a,u=o(this,t,r,n),c=o(this,e,r,n);return\"M\"+u.p0+s(u.r,u.p1,u.a1-u.a0)+(a=c,((i=u).a0==a.a0&&i.a1==a.a1?l(u.r,u.p1,u.r,u.p0):l(u.r,u.p1,c.r,c.p0)+s(c.r,c.p1,c.a1-c.a0)+l(c.r,c.p1,u.r,u.p0))+\"Z\")}function o(t,e,a,o){var s=e.call(t,a,o),l=r.call(t,s,o),u=n.call(t,s,o)-Et,c=i.call(t,s,o)-Et;return{r:l,a0:u,a1:c,p0:[l*Math.cos(u),l*Math.sin(u)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function s(t,e,r){return\"A\"+t+\",\"+t+\" 0 \"+ +(r>Mt)+\",1 \"+e}function l(t,e,r,n){return\"Q 0,0 \"+n}return a.radius=function(t){return arguments.length?(r=fe(t),a):r},a.source=function(e){return arguments.length?(t=fe(e),a):t},a.target=function(t){return arguments.length?(e=fe(t),a):e},a.startAngle=function(t){return arguments.length?(n=fe(t),a):n},a.endAngle=function(t){return arguments.length?(i=fe(t),a):i},a},t.svg.diagonal=function(){var t=Fi,e=Ni,r=ji;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return\"M\"+(l=l.map(r))[0]+\"C\"+l[1]+\" \"+l[2]+\" \"+l[3]}return n.source=function(e){return arguments.length?(t=fe(e),n):t},n.target=function(t){return arguments.length?(e=fe(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=ji,n=e.projection;return e.projection=function(t){return arguments.length?n(Ui(r=t)):r},e},t.svg.symbol=function(){var t=Hi,e=Vi;function r(r,n){return(Gi.get(t.call(this,r,n))||qi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=fe(e),r):t},r.size=function(t){return arguments.length?(e=fe(t),r):e},r};var Gi=t.map({circle:qi,cross:function(t){var e=Math.sqrt(t/5)/2;return\"M\"+-3*e+\",\"+-e+\"H\"+-e+\"V\"+-3*e+\"H\"+e+\"V\"+-e+\"H\"+3*e+\"V\"+e+\"H\"+e+\"V\"+3*e+\"H\"+-e+\"V\"+e+\"H\"+-3*e+\"Z\"},diamond:function(t){var e=Math.sqrt(t/(2*Wi)),r=e*Wi;return\"M0,\"+-e+\"L\"+r+\",0 0,\"+e+\" \"+-r+\",0Z\"},square:function(t){var e=Math.sqrt(t)/2;return\"M\"+-e+\",\"+-e+\"L\"+e+\",\"+-e+\" \"+e+\",\"+e+\" \"+-e+\",\"+e+\"Z\"},\"triangle-down\":function(t){var e=Math.sqrt(t/Yi),r=e*Yi/2;return\"M0,\"+r+\"L\"+e+\",\"+-r+\" \"+-e+\",\"+-r+\"Z\"},\"triangle-up\":function(t){var e=Math.sqrt(t/Yi),r=e*Yi/2;return\"M0,\"+-r+\"L\"+e+\",\"+r+\" \"+-e+\",\"+r+\"Z\"}});t.svg.symbolTypes=Gi.keys();var Yi=Math.sqrt(3),Wi=Math.tan(30*Ct);Y.transition=function(t){for(var e,r,n=Ji||++ta,i=na(t),a=[],o=$i||{time:Date.now(),ease:Cr,delay:0,duration:250},s=-1,l=this.length;++s<l;){a.push(e=[]);for(var u=this[s],c=-1,f=u.length;++c<f;)(r=u[c])&&ia(r,c,i,n,o),e.push(r)}return Ki(a,i,n)},Y.interrupt=function(t){return this.each(null==t?Xi:Zi(na(t)))};var Xi=Zi(na());function Zi(t){return function(){var e,r,n;(e=this[t])&&(n=e[r=e.active])&&(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Ki(t,e,r){return U(t,Qi),t.namespace=e,t.id=r,t}var Ji,$i,Qi=[],ta=0;function ea(t,e,r,n){var i=t.id,a=t.namespace;return ct(t,\"function\"==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function ra(t){return null==t&&(t=\"\"),function(){this.textContent=t}}function na(t){return null==t?\"__transition__\":\"__transition_\"+t+\"__\"}function ia(t,e,r,n,i){var a,o,s,l,u,c=t[r]||(t[r]={active:0,count:0}),f=c[n];function h(r){var i=c.active,h=c[i];for(var d in h&&(h.timer.c=null,h.timer.t=NaN,--c.count,delete c[i],h.event&&h.event.interrupt.call(t,t.__data__,h.index)),c)if(+d<n){var g=c[d];g.timer.c=null,g.timer.t=NaN,--c.count,delete c[d]}o.c=p,xe((function(){return o.c&&p(r||1)&&(o.c=null,o.t=NaN),1}),0,a),c.active=n,f.event&&f.event.start.call(t,t.__data__,e),u=[],f.tween.forEach((function(r,n){(n=n.call(t,t.__data__,e))&&u.push(n)})),l=f.ease,s=f.duration}function p(i){for(var a=i/s,o=l(a),h=u.length;h>0;)u[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--c.count?delete c[n]:delete t[r],1}f||(a=i.time,o=xe((function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h}),0,a),f=c[n]={tween:new _,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}Qi.call=Y.call,Qi.empty=Y.empty,Qi.node=Y.node,Qi.size=Y.size,t.transition=function(e,r){return e&&e.transition?Ji?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=Qi,Qi.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=W(t);for(var s=-1,l=this.length;++s<l;){o.push(e=[]);for(var u=this[s],c=-1,f=u.length;++c<f;)(n=u[c])&&(r=t.call(n,n.__data__,c,s))?(\"__data__\"in n&&(r.__data__=n.__data__),ia(r,c,a,i,n[a][i]),e.push(r)):e.push(null)}return Ki(o,a,i)},Qi.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=X(t);for(var u=-1,c=this.length;++u<c;)for(var f=this[u],h=-1,p=f.length;++h<p;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,u),l.push(e=[]);for(var d=-1,g=r.length;++d<g;)(i=r[d])&&ia(i,d,s,o,a),e.push(i)}return Ki(l,s,o)},Qi.filter=function(t){var e,r,n=[];\"function\"!=typeof t&&(t=lt(t));for(var i=0,a=this.length;i<a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s<l;s++)(r=o[s])&&t.call(r,r.__data__,s,i)&&e.push(r)}return Ki(n,this.namespace,this.id)},Qi.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(t):ct(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},Qi.attr=function(e,r){if(arguments.length<2){for(r in e)this.attr(r,e[r]);return this}var n=\"transform\"==e?jr:xr,i=t.ns.qualify(e);function a(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}function s(t){return null==t?a:(t+=\"\",function(){var e,r=this.getAttribute(i);return r!==t&&(e=n(r,t),function(t){this.setAttribute(i,e(t))})})}function l(t){return null==t?o:(t+=\"\",function(){var e,r=this.getAttributeNS(i.space,i.local);return r!==t&&(e=n(r,t),function(t){this.setAttributeNS(i.space,i.local,e(t))})})}return ea(this,\"attr.\"+e,r,i.local?l:s)},Qi.attrTween=function(e,r){var n=t.ns.qualify(e);return this.tween(\"attr.\"+e,n.local?function(t,e){var i=r.call(this,t,e,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,e){var i=r.call(this,t,e,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},Qi.style=function(t,e,r){var n=arguments.length;if(n<3){if(\"string\"!=typeof t){for(r in n<2&&(e=\"\"),t)this.style(r,t[r],e);return this}r=\"\"}function i(){this.style.removeProperty(t)}function a(e){return null==e?i:(e+=\"\",function(){var n,i=o(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(n=xr(i,e),function(e){this.style.setProperty(t,n(e),r)})})}return ea(this,\"style.\"+t,e,a)},Qi.styleTween=function(t,e,r){function n(n,i){var a=e.call(this,n,i,o(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),r)}}return arguments.length<3&&(r=\"\"),this.tween(\"style.\"+t,n)},Qi.text=function(t){return ea(this,\"text\",t,ra)},Qi.remove=function(){var t=this.namespace;return this.each(\"end.transition\",(function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)}))},Qi.ease=function(e){var r=this.id,n=this.namespace;return arguments.length<1?this.node()[n][r].ease:(\"function\"!=typeof e&&(e=t.ease.apply(t,arguments)),ct(this,(function(t){t[n][r].ease=e})))},Qi.delay=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].delay:ct(this,\"function\"==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},Qi.duration=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].duration:ct(this,\"function\"==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},Qi.each=function(e,r){var n=this.id,i=this.namespace;if(arguments.length<2){var a=$i,o=Ji;try{Ji=n,ct(this,(function(t,r,a){$i=t[i][n],e.call(t,t.__data__,r,a)}))}finally{$i=a,Ji=o}}else ct(this,(function(a){var o=a[i][n];(o.event||(o.event=t.dispatch(\"start\",\"end\",\"interrupt\"))).on(e,r)}));return this},Qi.transition=function(){for(var t,e,r,n=this.id,i=++ta,a=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(t=[]);for(var u,c=0,f=(u=this[s]).length;c<f;c++)(e=u[c])&&ia(e,c,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return Ki(o,a,i)},t.svg.axis=function(){var e,r=t.scale.linear(),i=aa,a=6,o=6,s=3,l=[10],u=null;function c(n){n.each((function(){var n,c=t.select(this),f=this.__chart__||r,h=this.__chart__=r.copy(),p=null==u?h.ticks?h.ticks.apply(h,l):h.domain():u,d=null==e?h.tickFormat?h.tickFormat.apply(h,l):L:e,g=c.selectAll(\".tick\").data(p,h),v=g.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",Tt),m=t.transition(g.exit()).style(\"opacity\",Tt).remove(),y=t.transition(g.order()).style(\"opacity\",1),x=Math.max(a,0)+s,b=jn(h),_=c.selectAll(\".domain\").data([0]),w=(_.enter().append(\"path\").attr(\"class\",\"domain\"),t.transition(_));v.append(\"line\"),v.append(\"text\");var k,T,M,A,S=v.select(\"line\"),E=y.select(\"line\"),C=g.select(\"text\").text(d),P=v.select(\"text\"),O=y.select(\"text\"),I=\"top\"===i||\"left\"===i?-1:1;if(\"bottom\"===i||\"top\"===i?(n=sa,k=\"x\",M=\"y\",T=\"x2\",A=\"y2\",C.attr(\"dy\",I<0?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),w.attr(\"d\",\"M\"+b[0]+\",\"+I*o+\"V0H\"+b[1]+\"V\"+I*o)):(n=la,k=\"y\",M=\"x\",T=\"y2\",A=\"x2\",C.attr(\"dy\",\".32em\").style(\"text-anchor\",I<0?\"end\":\"start\"),w.attr(\"d\",\"M\"+I*o+\",\"+b[0]+\"H0V\"+b[1]+\"H\"+I*o)),S.attr(A,I*a),P.attr(M,I*x),E.attr(T,0).attr(A,I*a),O.attr(k,0).attr(M,I*x),h.rangeBand){var D=h,z=D.rangeBand()/2;f=h=function(t){return D(t)+z}}else f.rangeBand?f=h:m.call(n,h,f);v.call(n,f,h),y.call(n,h,h)}))}return c.scale=function(t){return arguments.length?(r=t,c):r},c.orient=function(t){return arguments.length?(i=t in oa?t+\"\":aa,c):i},c.ticks=function(){return arguments.length?(l=n(arguments),c):l},c.tickValues=function(t){return arguments.length?(u=t,c):u},c.tickFormat=function(t){return arguments.length?(e=t,c):e},c.tickSize=function(t){var e=arguments.length;return e?(a=+t,o=+arguments[e-1],c):a},c.innerTickSize=function(t){return arguments.length?(a=+t,c):a},c.outerTickSize=function(t){return arguments.length?(o=+t,c):o},c.tickPadding=function(t){return arguments.length?(s=+t,c):s},c.tickSubdivide=function(){return arguments.length&&c},c};var aa=\"bottom\",oa={top:1,right:1,bottom:1,left:1};function sa(t,e,r){t.attr(\"transform\",(function(t){var n=e(t);return\"translate(\"+(isFinite(n)?n:r(t))+\",0)\"}))}function la(t,e,r){t.attr(\"transform\",(function(t){var n=e(t);return\"translate(0,\"+(isFinite(n)?n:r(t))+\")\"}))}t.svg.brush=function(){var e,r,n=B(h,\"brushstart\",\"brush\",\"brushend\"),i=null,a=null,s=[0,0],l=[0,0],u=!0,c=!0,f=ca[0];function h(e){e.each((function(){var e=t.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",v).on(\"touchstart.brush\",v),r=e.selectAll(\".background\").data([0]);r.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),e.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var n=e.selectAll(\".resize\").data(f,L);n.exit().remove(),n.enter().append(\"g\").attr(\"class\",(function(t){return\"resize \"+t})).style(\"cursor\",(function(t){return ua[t]})).append(\"rect\").attr(\"x\",(function(t){return/[ew]$/.test(t)?-3:null})).attr(\"y\",(function(t){return/^[ns]/.test(t)?-3:null})).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),n.style(\"display\",h.empty()?\"none\":null);var o,s=t.transition(e),l=t.transition(r);i&&(o=jn(i),l.attr(\"x\",o[0]).attr(\"width\",o[1]-o[0]),d(s)),a&&(o=jn(a),l.attr(\"y\",o[0]).attr(\"height\",o[1]-o[0]),g(s)),p(s)}))}function p(t){t.selectAll(\".resize\").attr(\"transform\",(function(t){return\"translate(\"+s[+/e$/.test(t)]+\",\"+l[+/^s/.test(t)]+\")\"}))}function d(t){t.select(\".extent\").attr(\"x\",s[0]),t.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",s[1]-s[0])}function g(t){t.select(\".extent\").attr(\"y\",l[0]),t.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",l[1]-l[0])}function v(){var f,v,m=this,y=t.select(t.event.target),x=n.of(m,arguments),b=t.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&i,k=!/^(e|w)$/.test(_)&&a,T=y.classed(\"extent\"),M=bt(m),A=t.mouse(m),S=t.select(o(m)).on(\"keydown.brush\",L).on(\"keyup.brush\",P);if(t.event.changedTouches?S.on(\"touchmove.brush\",O).on(\"touchend.brush\",D):S.on(\"mousemove.brush\",O).on(\"mouseup.brush\",D),b.interrupt().selectAll(\"*\").interrupt(),T)A[0]=s[0]-A[0],A[1]=l[0]-A[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);v=[s[1-E]-A[0],l[1-C]-A[1]],A[0]=s[E],A[1]=l[C]}else t.event.altKey&&(f=A.slice());function L(){32==t.event.keyCode&&(T||(f=null,A[0]-=s[1],A[1]-=l[1],T=2),F())}function P(){32==t.event.keyCode&&2==T&&(A[0]+=s[1],A[1]+=l[1],T=0,F())}function O(){var e=t.mouse(m),r=!1;v&&(e[0]+=v[0],e[1]+=v[1]),T||(t.event.altKey?(f||(f=[(s[0]+s[1])/2,(l[0]+l[1])/2]),A[0]=s[+(e[0]<f[0])],A[1]=l[+(e[1]<f[1])]):f=null),w&&I(e,i,0)&&(d(b),r=!0),k&&I(e,a,1)&&(g(b),r=!0),r&&(p(b),x({type:\"brush\",mode:T?\"move\":\"resize\"}))}function I(t,n,i){var a,o,h=jn(n),p=h[0],d=h[1],g=A[i],v=i?l:s,m=v[1]-v[0];if(T&&(p-=g,d-=m+g),a=(i?c:u)?Math.max(p,Math.min(d,t[i])):t[i],T?o=(a+=g)+m:(f&&(g=Math.max(p,Math.min(d,2*f[i]-a))),g<a?(o=a,a=g):o=g),v[0]!=a||v[1]!=o)return i?r=null:e=null,v[0]=a,v[1]=o,!0}function D(){O(),b.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",h.empty()?\"none\":null),t.select(\"body\").style(\"cursor\",null),S.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),M(),x({type:\"brushend\"})}b.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),t.select(\"body\").style(\"cursor\",y.style(\"cursor\")),x({type:\"brushstart\"}),O()}return h.event=function(i){i.each((function(){var i=n.of(this,arguments),a={x:s,y:l,i:e,j:r},o=this.__chart__||a;this.__chart__=a,Ji?t.select(this).transition().each(\"start.brush\",(function(){e=o.i,r=o.j,s=o.x,l=o.y,i({type:\"brushstart\"})})).tween(\"brush:brush\",(function(){var t=br(s,a.x),n=br(l,a.y);return e=r=null,function(e){s=a.x=t(e),l=a.y=n(e),i({type:\"brush\",mode:\"resize\"})}})).each(\"end.brush\",(function(){e=a.i,r=a.j,i({type:\"brush\",mode:\"resize\"}),i({type:\"brushend\"})})):(i({type:\"brushstart\"}),i({type:\"brush\",mode:\"resize\"}),i({type:\"brushend\"}))}))},h.x=function(t){return arguments.length?(f=ca[!(i=t)<<1|!a],h):i},h.y=function(t){return arguments.length?(f=ca[!i<<1|!(a=t)],h):a},h.clamp=function(t){return arguments.length?(i&&a?(u=!!t[0],c=!!t[1]):i?u=!!t:a&&(c=!!t),h):i&&a?[u,c]:i?u:a?c:null},h.extent=function(t){var n,o,u,c,f;return arguments.length?(i&&(n=t[0],o=t[1],a&&(n=n[0],o=o[0]),e=[n,o],i.invert&&(n=i(n),o=i(o)),o<n&&(f=n,n=o,o=f),n==s[0]&&o==s[1]||(s=[n,o])),a&&(u=t[0],c=t[1],i&&(u=u[1],c=c[1]),r=[u,c],a.invert&&(u=a(u),c=a(c)),c<u&&(f=u,u=c,c=f),u==l[0]&&c==l[1]||(l=[u,c])),h):(i&&(e?(n=e[0],o=e[1]):(n=s[0],o=s[1],i.invert&&(n=i.invert(n),o=i.invert(o)),o<n&&(f=n,n=o,o=f))),a&&(r?(u=r[0],c=r[1]):(u=l[0],c=l[1],a.invert&&(u=a.invert(u),c=a.invert(c)),c<u&&(f=u,u=c,c=f))),i&&a?[[n,u],[o,c]]:i?[n,o]:a&&[u,c])},h.clear=function(){return h.empty()||(s=[0,0],l=[0,0],e=r=null),h},h.empty=function(){return!!i&&s[0]==s[1]||!!a&&l[0]==l[1]},t.rebind(h,n,\"on\")};var ua={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},ca=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]];function fa(t){return JSON.parse(t.responseText)}function ha(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}t.text=he((function(t){return t.responseText})),t.json=function(t,e){return pe(t,\"application/json\",fa,e)},t.html=function(t,e){return pe(t,\"text/html\",ha,e)},t.xml=he((function(t){return t.responseXML})),\"object\"==typeof e&&e.exports?e.exports=t:this.d3=t}).apply(self)},{}],59:[function(t,e,r){\"use strict\";e.exports=t(\"./quad\")},{\"./quad\":60}],60:[function(t,e,r){\"use strict\";var n=t(\"binary-search-bounds\"),i=t(\"clamp\"),a=t(\"parse-rect\"),o=t(\"array-bounds\"),s=t(\"pick-by-alias\"),l=t(\"defined\"),u=t(\"flatten-vertex-data\"),c=t(\"is-obj\"),f=t(\"dtype\"),h=t(\"math-log2\");function p(t,e){for(var r=e[0],n=e[1],a=1/(e[2]-r),o=1/(e[3]-n),s=new Array(t.length),l=0,u=t.length/2;l<u;l++)s[2*l]=i((t[2*l]-r)*a,0,1),s[2*l+1]=i((t[2*l+1]-n)*o,0,1);return s}e.exports=function(t,e){e||(e={}),t=u(t,\"float64\"),e=s(e,{bounds:\"range bounds dataBox databox\",maxDepth:\"depth maxDepth maxdepth level maxLevel maxlevel levels\",dtype:\"type dtype format out dst output destination\"});var r=l(e.maxDepth,255),i=l(e.bounds,o(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;var d,g=p(t,i),v=t.length>>>1;e.dtype||(e.dtype=\"array\"),\"string\"==typeof e.dtype?d=new(f(e.dtype))(v):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=v));for(var m=0;m<v;++m)d[m]=m;var y=[],x=[],b=[],_=[];!function t(e,n,i,a,o,s){if(!a.length)return null;var l=y[o]||(y[o]=[]),u=b[o]||(b[o]=[]),c=x[o]||(x[o]=[]),f=l.length;if(++o>r||s>1073741824){for(var h=0;h<a.length;h++)l.push(a[h]),u.push(s),c.push(null,null,null,null);return f}if(l.push(a[0]),u.push(s),a.length<=1)return c.push(null,null,null,null),f;for(var p=.5*i,d=e+p,v=n+p,m=[],_=[],w=[],k=[],T=1,M=a.length;T<M;T++){var A=a[T],S=g[2*A],E=g[2*A+1];S<d?E<v?m.push(A):_.push(A):E<v?w.push(A):k.push(A)}return s<<=2,c.push(t(e,n,p,m,o,s),t(e,v,p,_,o,s+1),t(d,n,p,w,o,s+2),t(d,v,p,k,o,s+3)),f}(0,0,1,d,0,1);for(var w=0,k=0;k<y.length;k++){var T=y[k];if(d.set)d.set(T,w);else for(var M=0,A=T.length;M<A;M++)d[M+w]=T[M];var S=w+y[k].length;_[k]=[w,S],w=S}return d.range=function(){for(var e,r=[],n=arguments.length;n--;)r[n]=arguments[n];if(c(r[r.length-1])){var o=r.pop();r.length||null==o.x&&null==o.l&&null==o.left||(r=[o],e={}),e=s(o,{level:\"level maxLevel\",d:\"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize\",lod:\"lod details ranges offsets\"})}else e={};r.length||(r=i);var u,f=a.apply(void 0,r),d=[Math.min(f.x,f.x+f.width),Math.min(f.y,f.y+f.height),Math.max(f.x,f.x+f.width),Math.max(f.y,f.y+f.height)],g=d[0],v=d[1],m=d[2],b=d[3],_=p([g,v,m,b],i),w=_[0],k=_[1],T=_[2],M=_[3],A=l(e.level,y.length);if(null!=e.d&&(\"number\"==typeof e.d?u=[e.d,e.d]:e.d.length&&(u=e.d),A=Math.min(Math.max(Math.ceil(-h(Math.abs(u[0])/(i[2]-i[0]))),Math.ceil(-h(Math.abs(u[1])/(i[3]-i[1])))),A)),A=Math.min(A,y.length),e.lod)return E(w,k,T,M,A);var S=[];function C(e,r,n,i,a,o){if(null!==a&&null!==o&&!(w>e+n||k>r+n||T<e||M<r||i>=A||a===o)){var s=y[i];void 0===o&&(o=s.length);for(var l=a;l<o;l++){var u=s[l],c=t[2*u],f=t[2*u+1];c>=g&&c<=m&&f>=v&&f<=b&&S.push(u)}var h=x[i],p=h[4*a+0],d=h[4*a+1],_=h[4*a+2],E=h[4*a+3],P=L(h,a+1),O=.5*n,I=i+1;C(e,r,O,I,p,d||_||E||P),C(e,r+O,O,I,d,_||E||P),C(e+O,r,O,I,_,E||P),C(e+O,r+O,O,I,E,P)}}function L(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}return C(0,0,1,0,0,1),S},d;function E(t,e,r,i,a){for(var o=[],s=0;s<a;s++){var l=b[s],u=_[s][0],c=C(t,e,s),f=C(r,i,s),h=n.ge(l,c),p=n.gt(l,f,h,l.length-1);o[s]=[h+u,p+u]}return o}function C(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s<r;s++)n<<=2,n+=t<i?e<a?0:1:e<a?2:3,o*=.5,i+=t<i?-o:o,a+=e<a?-o:o;return n}}},{\"array-bounds\":71,\"binary-search-bounds\":80,clamp:86,defined:124,dtype:127,\"flatten-vertex-data\":191,\"is-obj\":235,\"math-log2\":240,\"parse-rect\":249,\"pick-by-alias\":253}],61:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"@turf/meta\"),i=6378137;function a(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(o(t[r]))}return e}function o(t){var e,r,n,a,o,l,u=0,c=t.length;if(c>2){for(l=0;l<c;l++)l===c-2?(n=c-2,a=c-1,o=0):l===c-1?(n=c-1,a=0,o=1):(n=l,a=l+1,o=l+2),e=t[n],r=t[a],u+=(s(t[o][0])-s(e[0]))*Math.sin(s(r[1]));u=u*i*i/2}return u}function s(t){return t*Math.PI/180}r.default=function(t){return n.geomReduce(t,(function(t,e){return t+function(t){var e,r=0;switch(t.type){case\"Polygon\":return a(t.coordinates);case\"MultiPolygon\":for(e=0;e<t.coordinates.length;e++)r+=a(t.coordinates[e]);return r;case\"Point\":case\"MultiPoint\":case\"LineString\":case\"MultiLineString\":return 0}return 0}(e)}),0)}},{\"@turf/meta\":63}],62:[function(t,e,r){\"use strict\";function n(t,e,r){void 0===r&&(r={});var n={type:\"Feature\"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function i(t,e,r){if(void 0===r&&(r={}),!t)throw new Error(\"coordinates is required\");if(!Array.isArray(t))throw new Error(\"coordinates must be an Array\");if(t.length<2)throw new Error(\"coordinates must be at least 2 numbers long\");if(!d(t[0])||!d(t[1]))throw new Error(\"coordinates must contain numbers\");return n({type:\"Point\",coordinates:t},e,r)}function a(t,e,r){void 0===r&&(r={});for(var i=0,a=t;i<a.length;i++){var o=a[i];if(o.length<4)throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error(\"First and last Position are not equivalent.\")}return n({type:\"Polygon\",coordinates:t},e,r)}function o(t,e,r){if(void 0===r&&(r={}),t.length<2)throw new Error(\"coordinates must be an array of two or more positions\");return n({type:\"LineString\",coordinates:t},e,r)}function s(t,e){void 0===e&&(e={});var r={type:\"FeatureCollection\"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function l(t,e,r){return void 0===r&&(r={}),n({type:\"MultiLineString\",coordinates:t},e,r)}function u(t,e,r){return void 0===r&&(r={}),n({type:\"MultiPoint\",coordinates:t},e,r)}function c(t,e,r){return void 0===r&&(r={}),n({type:\"MultiPolygon\",coordinates:t},e,r)}function f(t,e){void 0===e&&(e=\"kilometers\");var n=r.factors[e];if(!n)throw new Error(e+\" units is invalid\");return t*n}function h(t,e){void 0===e&&(e=\"kilometers\");var n=r.factors[e];if(!n)throw new Error(e+\" units is invalid\");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function d(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(r,\"__esModule\",{value:!0}),r.earthRadius=6371008.8,r.factors={centimeters:100*r.earthRadius,centimetres:100*r.earthRadius,degrees:r.earthRadius/111325,feet:3.28084*r.earthRadius,inches:39.37*r.earthRadius,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:1e3*r.earthRadius,millimetres:1e3*r.earthRadius,nauticalmiles:r.earthRadius/1852,radians:1,yards:1.0936*r.earthRadius},r.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r.earthRadius,yards:1.0936133},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},r.feature=n,r.geometry=function(t,e,r){switch(void 0===r&&(r={}),t){case\"Point\":return i(e).geometry;case\"LineString\":return o(e).geometry;case\"Polygon\":return a(e).geometry;case\"MultiPoint\":return u(e).geometry;case\"MultiLineString\":return l(e).geometry;case\"MultiPolygon\":return c(e).geometry;default:throw new Error(t+\" is invalid\")}},r.point=i,r.points=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return i(t,e)})),r)},r.polygon=a,r.polygons=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return a(t,e)})),r)},r.lineString=o,r.lineStrings=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return o(t,e)})),r)},r.featureCollection=s,r.multiLineString=l,r.multiPoint=u,r.multiPolygon=c,r.geometryCollection=function(t,e,r){return void 0===r&&(r={}),n({type:\"GeometryCollection\",geometries:t},e,r)},r.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error(\"precision must be a positive number\");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=f,r.lengthToRadians=h,r.lengthToDegrees=function(t,e){return p(h(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e=\"kilometers\"),void 0===r&&(r=\"kilometers\"),!(t>=0))throw new Error(\"length must be a positive number\");return f(h(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e=\"meters\"),void 0===n&&(n=\"kilometers\"),!(t>=0))throw new Error(\"area must be a positive number\");var i=r.areaFactors[e];if(!i)throw new Error(\"invalid original units\");var a=r.areaFactors[n];if(!a)throw new Error(\"invalid final units\");return t/i*a},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error(\"bbox is required\");if(!Array.isArray(t))throw new Error(\"bbox must be an Array\");if(4!==t.length&&6!==t.length)throw new Error(\"bbox must be an Array of 4 or 6 numbers\");t.forEach((function(t){if(!d(t))throw new Error(\"bbox must only contain numbers\")}))},r.validateId=function(t){if(!t)throw new Error(\"id is required\");if(-1===[\"string\",\"number\"].indexOf(typeof t))throw new Error(\"id must be a number or a string\")}},{}],63:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"@turf/helpers\");function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,g=\"FeatureCollection\"===d,v=\"Feature\"===d,m=g?t.features.length:1,y=0;y<m;y++){l=(f=!!(c=g?t.features[y].geometry:v?t.geometry:t)&&\"GeometryCollection\"===c.type)?c.geometries.length:1;for(var x=0;x<l;x++){var b=0,_=0;if(null!==(s=f?c.geometries[x]:c)){u=s.coordinates;var w=s.type;switch(h=!r||\"Polygon\"!==w&&\"MultiPolygon\"!==w?0:1,w){case null:break;case\"Point\":if(!1===e(u,p,y,b,_))return!1;p++,b++;break;case\"LineString\":case\"MultiPoint\":for(n=0;n<u.length;n++){if(!1===e(u[n],p,y,b,_))return!1;p++,\"MultiPoint\"===w&&b++}\"LineString\"===w&&b++;break;case\"Polygon\":case\"MultiLineString\":for(n=0;n<u.length;n++){for(a=0;a<u[n].length-h;a++){if(!1===e(u[n][a],p,y,b,_))return!1;p++}\"MultiLineString\"===w&&b++,\"Polygon\"===w&&_++}\"Polygon\"===w&&b++;break;case\"MultiPolygon\":for(n=0;n<u.length;n++){for(_=0,a=0;a<u[n].length;a++){for(o=0;o<u[n][a].length-h;o++){if(!1===e(u[n][a][o],p,y,b,_))return!1;p++}_++}b++}break;case\"GeometryCollection\":for(n=0;n<s.geometries.length;n++)if(!1===i(s.geometries[n],e,r))return!1;break;default:throw new Error(\"Unknown Geometry Type\")}}}}}function a(t,e){var r;switch(t.type){case\"FeatureCollection\":for(r=0;r<t.features.length&&!1!==e(t.features[r].properties,r);r++);break;case\"Feature\":e(t.properties,0)}}function o(t,e){if(\"Feature\"===t.type)e(t,0);else if(\"FeatureCollection\"===t.type)for(var r=0;r<t.features.length&&!1!==e(t.features[r],r);r++);}function s(t,e){var r,n,i,a,o,s,l,u,c,f,h=0,p=\"FeatureCollection\"===t.type,d=\"Feature\"===t.type,g=p?t.features.length:1;for(r=0;r<g;r++){for(s=p?t.features[r].geometry:d?t.geometry:t,u=p?t.features[r].properties:d?t.properties:{},c=p?t.features[r].bbox:d?t.bbox:void 0,f=p?t.features[r].id:d?t.id:void 0,o=(l=!!s&&\"GeometryCollection\"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=l?s.geometries[i]:s))switch(a.type){case\"Point\":case\"LineString\":case\"MultiPoint\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":if(!1===e(a,h,u,c,f))return!1;break;case\"GeometryCollection\":for(n=0;n<a.geometries.length;n++)if(!1===e(a.geometries[n],h,u,c,f))return!1;break;default:throw new Error(\"Unknown Geometry Type\")}else if(!1===e(null,h,u,c,f))return!1;h++}}function l(t,e){s(t,(function(t,r,i,a,o){var s,l=null===t?null:t.type;switch(l){case null:case\"Point\":case\"LineString\":case\"Polygon\":return!1!==e(n.feature(t,i,{bbox:a,id:o}),r,0)&&void 0}switch(l){case\"MultiPoint\":s=\"Point\";break;case\"MultiLineString\":s=\"LineString\";break;case\"MultiPolygon\":s=\"Polygon\"}for(var u=0;u<t.coordinates.length;u++){var c={type:s,coordinates:t.coordinates[u]};if(!1===e(n.feature(c,i),r,u))return!1}}))}function u(t,e){l(t,(function(t,r,a){var o=0;if(t.geometry){var s=t.geometry.type;if(\"Point\"!==s&&\"MultiPoint\"!==s){var l,u=0,c=0,f=0;return!1!==i(t,(function(i,s,h,p,d){if(void 0===l||r>u||p>c||d>f)return l=i,u=r,c=p,f=d,void(o=0);var g=n.lineString([l,i],t.properties);if(!1===e(g,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error(\"geojson is required\");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case\"LineString\":if(!1===e(t,r,i,0,0))return!1;break;case\"Polygon\":for(var s=0;s<o.length;s++)if(!1===e(n.lineString(o[s],t.properties),r,i,s))return!1}}}))}r.coordEach=i,r.coordReduce=function(t,e,r,n){var a=r;return i(t,(function(t,n,i,o,s){a=0===n&&void 0===r?t:e(a,t,n,i,o,s)}),n),a},r.propEach=a,r.propReduce=function(t,e,r){var n=r;return a(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},r.featureEach=o,r.featureReduce=function(t,e,r){var n=r;return o(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},r.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},r.geomEach=s,r.geomReduce=function(t,e,r){var n=r;return s(t,(function(t,i,a,o,s){n=0===i&&void 0===r?t:e(n,t,i,a,o,s)})),n},r.flattenEach=l,r.flattenReduce=function(t,e,r){var n=r;return l(t,(function(t,i,a){n=0===i&&0===a&&void 0===r?t:e(n,t,i,a)})),n},r.segmentEach=u,r.segmentReduce=function(t,e,r){var n=r,i=!1;return u(t,(function(t,a,o,s,l){n=!1===i&&void 0===r?t:e(n,t,a,o,s,l),i=!0})),n},r.lineEach=c,r.lineReduce=function(t,e,r){var n=r;return c(t,(function(t,i,a,o){n=0===i&&void 0===r?t:e(n,t,i,a,o)})),n},r.findSegment=function(t,e){if(e=e||{},!n.isObject(e))throw new Error(\"options is invalid\");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,l=e.properties;switch(t.type){case\"FeatureCollection\":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case\"Feature\":l=l||t.properties,r=t.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":r=t;break;default:throw new Error(\"geojson is invalid\")}if(null===r)return null;var u=r.coordinates;switch(r.type){case\"Point\":case\"MultiPoint\":return null;case\"LineString\":return s<0&&(s=u.length+s-1),n.lineString([u[s],u[s+1]],l,e);case\"Polygon\":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),n.lineString([u[o][s],u[o][s+1]],l,e);case\"MultiLineString\":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),n.lineString([u[a][s],u[a][s+1]],l,e);case\"MultiPolygon\":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s-1),n.lineString([u[a][o][s],u[a][o][s+1]],l,e)}throw new Error(\"geojson is invalid\")},r.findPoint=function(t,e){if(e=e||{},!n.isObject(e))throw new Error(\"options is invalid\");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,l=e.properties;switch(t.type){case\"FeatureCollection\":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case\"Feature\":l=l||t.properties,r=t.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":r=t;break;default:throw new Error(\"geojson is invalid\")}if(null===r)return null;var u=r.coordinates;switch(r.type){case\"Point\":return n.point(u,l,e);case\"MultiPoint\":return a<0&&(a=u.length+a),n.point(u[a],l,e);case\"LineString\":return s<0&&(s=u.length+s),n.point(u[s],l,e);case\"Polygon\":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),n.point(u[o][s],l,e);case\"MultiLineString\":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),n.point(u[a][s],l,e);case\"MultiPolygon\":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s),n.point(u[a][o][s],l,e)}throw new Error(\"geojson is invalid\")}},{\"@turf/helpers\":62}],64:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"@turf/meta\");function i(t){var e=[1/0,1/0,-1/0,-1/0];return n.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}i.default=i,r.default=i},{\"@turf/meta\":66}],65:[function(t,e,r){arguments[4][62][0].apply(r,arguments)},{dup:62}],66:[function(t,e,r){arguments[4][63][0].apply(r,arguments)},{\"@turf/helpers\":65,dup:63}],67:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"@turf/meta\"),i=t(\"@turf/helpers\");r.default=function(t,e){void 0===e&&(e={});var r=0,a=0,o=0;return n.coordEach(t,(function(t){r+=t[0],a+=t[1],o++})),i.point([r/o,a/o],e.properties)}},{\"@turf/helpers\":68,\"@turf/meta\":69}],68:[function(t,e,r){\"use strict\";function n(t,e,r){void 0===r&&(r={});var n={type:\"Feature\"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function i(t,e,r){return void 0===r&&(r={}),n({type:\"Point\",coordinates:t},e,r)}function a(t,e,r){void 0===r&&(r={});for(var i=0,a=t;i<a.length;i++){var o=a[i];if(o.length<4)throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error(\"First and last Position are not equivalent.\")}return n({type:\"Polygon\",coordinates:t},e,r)}function o(t,e,r){if(void 0===r&&(r={}),t.length<2)throw new Error(\"coordinates must be an array of two or more positions\");return n({type:\"LineString\",coordinates:t},e,r)}function s(t,e){void 0===e&&(e={});var r={type:\"FeatureCollection\"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function l(t,e,r){return void 0===r&&(r={}),n({type:\"MultiLineString\",coordinates:t},e,r)}function u(t,e,r){return void 0===r&&(r={}),n({type:\"MultiPoint\",coordinates:t},e,r)}function c(t,e,r){return void 0===r&&(r={}),n({type:\"MultiPolygon\",coordinates:t},e,r)}function f(t,e){void 0===e&&(e=\"kilometers\");var n=r.factors[e];if(!n)throw new Error(e+\" units is invalid\");return t*n}function h(t,e){void 0===e&&(e=\"kilometers\");var n=r.factors[e];if(!n)throw new Error(e+\" units is invalid\");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function d(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)&&!/^\\s*$/.test(t)}Object.defineProperty(r,\"__esModule\",{value:!0}),r.earthRadius=6371008.8,r.factors={centimeters:100*r.earthRadius,centimetres:100*r.earthRadius,degrees:r.earthRadius/111325,feet:3.28084*r.earthRadius,inches:39.37*r.earthRadius,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:1e3*r.earthRadius,millimetres:1e3*r.earthRadius,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius/1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r.earthRadius,yards:1/1.0936},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},r.feature=n,r.geometry=function(t,e,r){switch(void 0===r&&(r={}),t){case\"Point\":return i(e).geometry;case\"LineString\":return o(e).geometry;case\"Polygon\":return a(e).geometry;case\"MultiPoint\":return u(e).geometry;case\"MultiLineString\":return l(e).geometry;case\"MultiPolygon\":return c(e).geometry;default:throw new Error(t+\" is invalid\")}},r.point=i,r.points=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return i(t,e)})),r)},r.polygon=a,r.polygons=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return a(t,e)})),r)},r.lineString=o,r.lineStrings=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return o(t,e)})),r)},r.featureCollection=s,r.multiLineString=l,r.multiPoint=u,r.multiPolygon=c,r.geometryCollection=function(t,e,r){return void 0===r&&(r={}),n({type:\"GeometryCollection\",geometries:t},e,r)},r.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error(\"precision must be a positive number\");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=f,r.lengthToRadians=h,r.lengthToDegrees=function(t,e){return p(h(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e=\"kilometers\"),void 0===r&&(r=\"kilometers\"),!(t>=0))throw new Error(\"length must be a positive number\");return f(h(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e=\"meters\"),void 0===n&&(n=\"kilometers\"),!(t>=0))throw new Error(\"area must be a positive number\");var i=r.areaFactors[e];if(!i)throw new Error(\"invalid original units\");var a=r.areaFactors[n];if(!a)throw new Error(\"invalid final units\");return t/i*a},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error(\"bbox is required\");if(!Array.isArray(t))throw new Error(\"bbox must be an Array\");if(4!==t.length&&6!==t.length)throw new Error(\"bbox must be an Array of 4 or 6 numbers\");t.forEach((function(t){if(!d(t))throw new Error(\"bbox must only contain numbers\")}))},r.validateId=function(t){if(!t)throw new Error(\"id is required\");if(-1===[\"string\",\"number\"].indexOf(typeof t))throw new Error(\"id must be a number or a string\")},r.radians2degrees=function(){throw new Error(\"method has been renamed to `radiansToDegrees`\")},r.degrees2radians=function(){throw new Error(\"method has been renamed to `degreesToRadians`\")},r.distanceToDegrees=function(){throw new Error(\"method has been renamed to `lengthToDegrees`\")},r.distanceToRadians=function(){throw new Error(\"method has been renamed to `lengthToRadians`\")},r.radiansToDistance=function(){throw new Error(\"method has been renamed to `radiansToLength`\")},r.bearingToAngle=function(){throw new Error(\"method has been renamed to `bearingToAzimuth`\")},r.convertDistance=function(){throw new Error(\"method has been renamed to `convertLength`\")}},{}],69:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"@turf/helpers\");function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,g=\"FeatureCollection\"===d,v=\"Feature\"===d,m=g?t.features.length:1,y=0;y<m;y++){l=(f=!!(c=g?t.features[y].geometry:v?t.geometry:t)&&\"GeometryCollection\"===c.type)?c.geometries.length:1;for(var x=0;x<l;x++){var b=0,_=0;if(null!==(s=f?c.geometries[x]:c)){u=s.coordinates;var w=s.type;switch(h=!r||\"Polygon\"!==w&&\"MultiPolygon\"!==w?0:1,w){case null:break;case\"Point\":if(!1===e(u,p,y,b,_))return!1;p++,b++;break;case\"LineString\":case\"MultiPoint\":for(n=0;n<u.length;n++){if(!1===e(u[n],p,y,b,_))return!1;p++,\"MultiPoint\"===w&&b++}\"LineString\"===w&&b++;break;case\"Polygon\":case\"MultiLineString\":for(n=0;n<u.length;n++){for(a=0;a<u[n].length-h;a++){if(!1===e(u[n][a],p,y,b,_))return!1;p++}\"MultiLineString\"===w&&b++,\"Polygon\"===w&&_++}\"Polygon\"===w&&b++;break;case\"MultiPolygon\":for(n=0;n<u.length;n++){for(_=0,a=0;a<u[n].length;a++){for(o=0;o<u[n][a].length-h;o++){if(!1===e(u[n][a][o],p,y,b,_))return!1;p++}_++}b++}break;case\"GeometryCollection\":for(n=0;n<s.geometries.length;n++)if(!1===i(s.geometries[n],e,r))return!1;break;default:throw new Error(\"Unknown Geometry Type\")}}}}}function a(t,e){var r;switch(t.type){case\"FeatureCollection\":for(r=0;r<t.features.length&&!1!==e(t.features[r].properties,r);r++);break;case\"Feature\":e(t.properties,0)}}function o(t,e){if(\"Feature\"===t.type)e(t,0);else if(\"FeatureCollection\"===t.type)for(var r=0;r<t.features.length&&!1!==e(t.features[r],r);r++);}function s(t,e){var r,n,i,a,o,s,l,u,c,f,h=0,p=\"FeatureCollection\"===t.type,d=\"Feature\"===t.type,g=p?t.features.length:1;for(r=0;r<g;r++){for(s=p?t.features[r].geometry:d?t.geometry:t,u=p?t.features[r].properties:d?t.properties:{},c=p?t.features[r].bbox:d?t.bbox:void 0,f=p?t.features[r].id:d?t.id:void 0,o=(l=!!s&&\"GeometryCollection\"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=l?s.geometries[i]:s))switch(a.type){case\"Point\":case\"LineString\":case\"MultiPoint\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":if(!1===e(a,h,u,c,f))return!1;break;case\"GeometryCollection\":for(n=0;n<a.geometries.length;n++)if(!1===e(a.geometries[n],h,u,c,f))return!1;break;default:throw new Error(\"Unknown Geometry Type\")}else if(!1===e(null,h,u,c,f))return!1;h++}}function l(t,e){s(t,(function(t,r,i,a,o){var s,l=null===t?null:t.type;switch(l){case null:case\"Point\":case\"LineString\":case\"Polygon\":return!1!==e(n.feature(t,i,{bbox:a,id:o}),r,0)&&void 0}switch(l){case\"MultiPoint\":s=\"Point\";break;case\"MultiLineString\":s=\"LineString\";break;case\"MultiPolygon\":s=\"Polygon\"}for(var u=0;u<t.coordinates.length;u++){var c={type:s,coordinates:t.coordinates[u]};if(!1===e(n.feature(c,i),r,u))return!1}}))}function u(t,e){l(t,(function(t,r,a){var o=0;if(t.geometry){var s=t.geometry.type;if(\"Point\"!==s&&\"MultiPoint\"!==s){var l,u=0,c=0,f=0;return!1!==i(t,(function(i,s,h,p,d){if(void 0===l||r>u||p>c||d>f)return l=i,u=r,c=p,f=d,void(o=0);var g=n.lineString([l,i],t.properties);if(!1===e(g,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error(\"geojson is required\");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case\"LineString\":if(!1===e(t,r,i,0,0))return!1;break;case\"Polygon\":for(var s=0;s<o.length;s++)if(!1===e(n.lineString(o[s],t.properties),r,i,s))return!1}}}))}r.coordEach=i,r.coordReduce=function(t,e,r,n){var a=r;return i(t,(function(t,n,i,o,s){a=0===n&&void 0===r?t:e(a,t,n,i,o,s)}),n),a},r.propEach=a,r.propReduce=function(t,e,r){var n=r;return a(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},r.featureEach=o,r.featureReduce=function(t,e,r){var n=r;return o(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},r.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},r.geomEach=s,r.geomReduce=function(t,e,r){var n=r;return s(t,(function(t,i,a,o,s){n=0===i&&void 0===r?t:e(n,t,i,a,o,s)})),n},r.flattenEach=l,r.flattenReduce=function(t,e,r){var n=r;return l(t,(function(t,i,a){n=0===i&&0===a&&void 0===r?t:e(n,t,i,a)})),n},r.segmentEach=u,r.segmentReduce=function(t,e,r){var n=r,i=!1;return u(t,(function(t,a,o,s,l){n=!1===i&&void 0===r?t:e(n,t,a,o,s,l),i=!0})),n},r.lineEach=c,r.lineReduce=function(t,e,r){var n=r;return c(t,(function(t,i,a,o){n=0===i&&void 0===r?t:e(n,t,i,a,o)})),n},r.findSegment=function(t,e){if(e=e||{},!n.isObject(e))throw new Error(\"options is invalid\");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,l=e.properties;switch(t.type){case\"FeatureCollection\":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case\"Feature\":l=l||t.properties,r=t.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":r=t;break;default:throw new Error(\"geojson is invalid\")}if(null===r)return null;var u=r.coordinates;switch(r.type){case\"Point\":case\"MultiPoint\":return null;case\"LineString\":return s<0&&(s=u.length+s-1),n.lineString([u[s],u[s+1]],l,e);case\"Polygon\":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),n.lineString([u[o][s],u[o][s+1]],l,e);case\"MultiLineString\":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),n.lineString([u[a][s],u[a][s+1]],l,e);case\"MultiPolygon\":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s-1),n.lineString([u[a][o][s],u[a][o][s+1]],l,e)}throw new Error(\"geojson is invalid\")},r.findPoint=function(t,e){if(e=e||{},!n.isObject(e))throw new Error(\"options is invalid\");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,l=e.properties;switch(t.type){case\"FeatureCollection\":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case\"Feature\":l=l||t.properties,r=t.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":r=t;break;default:throw new Error(\"geojson is invalid\")}if(null===r)return null;var u=r.coordinates;switch(r.type){case\"Point\":return n.point(u,l,e);case\"MultiPoint\":return a<0&&(a=u.length+a),n.point(u[a],l,e);case\"LineString\":return s<0&&(s=u.length+s),n.point(u[s],l,e);case\"Polygon\":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),n.point(u[o][s],l,e);case\"MultiLineString\":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),n.point(u[a][s],l,e);case\"MultiPolygon\":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s),n.point(u[a][o][s],l,e)}throw new Error(\"geojson is invalid\")}},{\"@turf/helpers\":68}],70:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map((function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case\"a\":t[6]+=n,t[7]+=i;break;case\"v\":t[1]+=i;break;case\"h\":t[1]+=n;break;default:for(var s=1;s<t.length;)t[s++]+=n,t[s++]+=i}switch(o){case\"Z\":n=e,i=r;break;case\"H\":n=t[1];break;case\"V\":i=t[1];break;case\"M\":n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t}))}},{}],71:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(!t||null==t.length)throw Error(\"Argument should be an array\");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n<e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o<s;o+=e)t[o]>i&&(i=t[o]),t[o]<a&&(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],72:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){if(\"function\"==typeof Array.prototype.findIndex)return t.findIndex(e,r);if(\"function\"!=typeof e)throw new TypeError(\"predicate must be a function\");var n=Object(t),i=n.length;if(0===i)return-1;for(var a=0;a<i;a++)if(e.call(r,n[a],a,n))return a;return-1}},{}],73:[function(t,e,r){\"use strict\";var n=t(\"array-bounds\");e.exports=function(t,e,r){if(!t||null==t.length)throw Error(\"Argument should be an array\");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i<e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&&o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===o?0:1;else{var u=a-o;for(s=i;s<l;s+=e)isNaN(t[s])||(t[s]=0===u?.5:(t[s]-o)/u)}}return t}},{\"array-bounds\":71}],74:[function(t,e,r){e.exports=function(t,e){var r=\"number\"==typeof t,n=\"number\"==typeof e;r&&!n?(e=t,t=0):r||n||(t=0,e=0);var i=(e|=0)-(t|=0);if(i<0)throw new Error(\"array length must be positive\");for(var a=new Array(i),o=0,s=t;o<i;o++,s++)a[o]=s;return a}},{}],75:[function(t,e,n){(function(r){(function(){\"use strict\";var n=t(\"object-assign\");function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function a(t){return r.Buffer&&\"function\"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=t(\"util/\"),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,u=\"foo\"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function f(t){return!a(t)&&\"function\"==typeof r.ArrayBuffer&&(\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer)))}var h=e.exports=y,p=/\\s*function\\s+([^\\(\\s]*)\\s*/;function d(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(p);return e&&e[1]}}function g(t,e){return\"string\"==typeof t?t.length<e?t:t.slice(0,e):t}function v(t){if(u||!o.isFunction(t))return o.inspect(t);var e=d(t);return\"[Function\"+(e?\": \"+e:\"\")+\"]\"}function m(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function y(t,e){t||m(t,!0,e,\"==\",h.ok)}function x(t,e,r,n){if(t===e)return!0;if(a(t)&&a(e))return 0===i(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&\"object\"==typeof t||null!==e&&\"object\"==typeof e){if(f(t)&&f(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(a(t)!==a(e))return!1;var s=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=b(t),a=b(e);if(i&&!a||!i&&a)return!1;if(i)return x(t=l.call(t),e=l.call(e),r);var s,u,c=k(t),f=k(e);if(c.length!==f.length)return!1;for(c.sort(),f.sort(),u=c.length-1;u>=0;u--)if(c[u]!==f[u])return!1;for(u=c.length-1;u>=0;u--)if(!x(t[s=c[u]],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function b(t){return\"[object Arguments]\"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if(\"[object RegExp]\"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if(\"function\"!=typeof e)throw new TypeError('\"block\" argument must be a function');\"string\"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?\" (\"+r.name+\").\":\".\")+(n?\" \"+n:\".\"),t&&!i&&m(i,r,\"Missing expected exception\"+n);var a=\"string\"==typeof n,s=!t&&i&&!r;if((!t&&o.isError(i)&&a&&_(i,r)||s)&&m(i,r,\"Got unwanted exception\"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name=\"AssertionError\",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(v(t.actual),128)+\" \"+t.operator+\" \"+g(v(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),a=n.indexOf(\"\\n\"+i);if(a>=0){var o=n.indexOf(\"\\n\",a+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=m,h.ok=y,h.equal=function(t,e,r){t!=e&&m(t,e,r,\"==\",h.equal)},h.notEqual=function(t,e,r){t==e&&m(t,e,r,\"!=\",h.notEqual)},h.deepEqual=function(t,e,r){x(t,e,!1)||m(t,e,r,\"deepEqual\",h.deepEqual)},h.deepStrictEqual=function(t,e,r){x(t,e,!0)||m(t,e,r,\"deepStrictEqual\",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){x(t,e,!1)&&m(t,e,r,\"notDeepEqual\",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){x(e,r,!0)&&m(e,r,n,\"notDeepStrictEqual\",t)},h.strictEqual=function(t,e,r){t!==e&&m(t,e,r,\"===\",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,\"!==\",h.notStrictEqual)},h.throws=function(t,e,r){w(!0,t,e,r)},h.doesNotThrow=function(t,e,r){w(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n((function t(e,r){e||m(e,!0,r,\"==\",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var k=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"object-assign\":247,\"util/\":78}],76:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],77:[function(t,e,r){e.exports=function(t){return t&&\"object\"==typeof t&&\"function\"==typeof t.copy&&\"function\"==typeof t.fill&&\"function\"==typeof t.readUInt8}},{}],78:[function(t,e,n){(function(e,r){(function(){var i=/%[sdj%]/g;n.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(\" \")}r=1;for(var n=arguments,a=n.length,o=String(t).replace(i,(function(t){if(\"%%\"===t)return\"%\";if(r>=a)return t;switch(t){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(t){return\"[Circular]\"}default:return t}})),l=n[r];r<a;l=n[++r])g(l)||!b(l)?o+=\" \"+l:o+=\" \"+s(l);return o},n.deprecate=function(t,i){if(y(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var a,o={};function s(t,e){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(e)?r.showHidden=e:e&&n._extend(r,e),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),c(r,t,r.depth)}function l(t,e){var r=s.styles[e];return r?\"\u001b[\"+s.colors[r][0]+\"m\"+t+\"\u001b[\"+s.colors[r][1]+\"m\":t}function u(t,e){return t}function c(t,e,r){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var a=function(t,e){if(y(e))return t.stylize(\"undefined\",\"undefined\");if(m(e)){var r=\"'\"+JSON.stringify(e).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return t.stylize(r,\"string\")}return v(e)?t.stylize(\"\"+e,\"number\"):d(e)?t.stylize(\"\"+e,\"boolean\"):g(e)?t.stylize(\"null\",\"null\"):void 0}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return f(e);if(0===o.length){if(k(e)){var l=e.name?\": \"+e.name:\"\";return t.stylize(\"[Function\"+l+\"]\",\"special\")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),\"regexp\");if(_(e))return t.stylize(Date.prototype.toString.call(e),\"date\");if(w(e))return f(e)}var u,b=\"\",T=!1,M=[\"{\",\"}\"];return p(e)&&(T=!0,M=[\"[\",\"]\"]),k(e)&&(b=\" [Function\"+(e.name?\": \"+e.name:\"\")+\"]\"),x(e)&&(b=\" \"+RegExp.prototype.toString.call(e)),_(e)&&(b=\" \"+Date.prototype.toUTCString.call(e)),w(e)&&(b=\" \"+f(e)),0!==o.length||T&&0!=e.length?r<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),\"regexp\"):t.stylize(\"[Object]\",\"special\"):(t.seen.push(e),u=T?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o<s;++o)E(e,String(o))?a.push(h(t,e,r,n,String(o),!0)):a.push(\"\");return i.forEach((function(i){i.match(/^\\d+$/)||a.push(h(t,e,r,n,i,!0))})),a}(t,e,r,s,o):o.map((function(n){return h(t,e,r,s,n,T)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf(\"\\n\"),t+e.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1}),0)>60?r[0]+(\"\"===e?\"\":e+\"\\n \")+\" \"+t.join(\",\\n  \")+\" \"+r[1]:r[0]+e+\" \"+t.join(\", \")+\" \"+r[1]}(u,b,M)):M[0]+b+M[1]}function f(t){return\"[\"+Error.prototype.toString.call(t)+\"]\"}function h(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize(\"[Getter/Setter]\",\"special\"):t.stylize(\"[Getter]\",\"special\"):l.set&&(s=t.stylize(\"[Setter]\",\"special\")),E(n,i)||(o=\"[\"+i+\"]\"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?c(t,l.value,null):c(t,l.value,r-1)).indexOf(\"\\n\")>-1&&(s=a?s.split(\"\\n\").map((function(t){return\"  \"+t})).join(\"\\n\").substr(2):\"\\n\"+s.split(\"\\n\").map((function(t){return\"   \"+t})).join(\"\\n\")):s=t.stylize(\"[Circular]\",\"special\")),y(o)){if(a&&i.match(/^\\d+$/))return s;(o=JSON.stringify(\"\"+i)).match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,\"name\")):(o=o.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),o=t.stylize(o,\"string\"))}return o+\": \"+s}function p(t){return Array.isArray(t)}function d(t){return\"boolean\"==typeof t}function g(t){return null===t}function v(t){return\"number\"==typeof t}function m(t){return\"string\"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&\"[object RegExp]\"===T(t)}function b(t){return\"object\"==typeof t&&null!==t}function _(t){return b(t)&&\"[object Date]\"===T(t)}function w(t){return b(t)&&(\"[object Error]\"===T(t)||t instanceof Error)}function k(t){return\"function\"==typeof t}function T(t){return Object.prototype.toString.call(t)}function M(t){return t<10?\"0\"+t.toString(10):t.toString(10)}n.debuglog=function(t){if(y(a)&&(a=e.env.NODE_DEBUG||\"\"),t=t.toUpperCase(),!o[t])if(new RegExp(\"\\\\b\"+t+\"\\\\b\",\"i\").test(a)){var r=e.pid;o[t]=function(){var e=n.format.apply(n,arguments);console.error(\"%s %d: %s\",t,r,e)}}else o[t]=function(){};return o[t]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},n.isArray=p,n.isBoolean=d,n.isNull=g,n.isNullOrUndefined=function(t){return null==t},n.isNumber=v,n.isString=m,n.isSymbol=function(t){return\"symbol\"==typeof t},n.isUndefined=y,n.isRegExp=x,n.isObject=b,n.isDate=_,n.isError=w,n.isFunction=k,n.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},n.isBuffer=t(\"./support/isBuffer\");var A=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function S(){var t=new Date,e=[M(t.getHours()),M(t.getMinutes()),M(t.getSeconds())].join(\":\");return[t.getDate(),A[t.getMonth()],e].join(\" \")}function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}n.log=function(){console.log(\"%s - %s\",S(),n.format.apply(n,arguments))},n.inherits=t(\"inherits\"),n._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t(\"_process\"),void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./support/isBuffer\":77,_process:278,inherits:76}],79:[function(t,e,r){\"use strict\";r.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=u(t),o=n[0],s=n[1],l=new a(function(t,e,r){return 3*(e+r)/4-r}(0,o,s)),c=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],l[c++]=e>>16&255,l[c++]=e>>8&255,l[c++]=255&e;return 2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[c++]=255&e),1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[c++]=e>>8&255,l[c++]=255&e),l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=16383,s=0,l=r-i;s<l;s+=o)a.push(c(t,s,s+o>l?l:s+o));return 1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+\"==\")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+\"=\")),a.join(\"\")};for(var n=[],i=[],a=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",s=0,l=o.length;s<l;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var i,a=[],o=e;o<r;o+=3)i=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),a.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);var s;return a.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],80:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function i(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function a(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function o(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function s(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function l(t,e,r,n,i,a){return\"function\"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}e.exports={ge:function(t,e,r,i,a){return l(t,e,r,i,a,n)},gt:function(t,e,r,n,a){return l(t,e,r,n,a,i)},lt:function(t,e,r,n,i){return l(t,e,r,n,i,a)},le:function(t,e,r,n,i){return l(t,e,r,n,i,o)},eq:function(t,e,r,n,i){return l(t,e,r,n,i,s)}}},{}],81:[function(t,e,r){\"use strict\";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,1+((t|=t>>>8)|t>>>16)},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=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},r.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},r.interleave3=function(t,e,r){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)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.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},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],82:[function(t,e,r){\"use strict\";var n=t(\"clamp\");e.exports=function(t,e){e||(e={});var r,o,s,l,u,c,f,h,p,d,g,v=null==e.cutoff?.25:e.cutoff,m=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error(\"For raw data width and height should be provided by options\");r=e.width,o=e.height,l=t,c=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext(\"2d\"),r=h.width,o=h.height,l=(p=f.getImageData(0,0,r,o)).data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t,r=(h=t.canvas).width,o=h.height,l=(p=f.getImageData(0,0,r,o)).data,c=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,c=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(r*o),d=0,g=u.length;d<g;d++)l[d]=u[d*c+y]/255;else if(1!==c)throw Error(\"Raw data can have only 1 value per pixel\");var x=Array(r*o),b=Array(r*o),_=Array(s),w=Array(s),k=Array(s+1),T=Array(s);for(d=0,g=r*o;d<g;d++){var M=l[d];x[d]=1===M?0:0===M?i:Math.pow(Math.max(0,.5-M),2),b[d]=1===M?i:0===M?0:Math.pow(Math.max(0,M-.5),2)}a(x,r,o,_,w,T,k),a(b,r,o,_,w,T,k);var A=window.Float32Array?new Float32Array(r*o):new Array(r*o);for(d=0,g=r*o;d<g;d++)A[d]=n(1-((x[d]-b[d])/m+v),0,1);return A};var i=1e20;function a(t,e,r,n,i,a,s){for(var l=0;l<e;l++){for(var u=0;u<r;u++)n[u]=t[u*e+l];for(o(n,i,a,s,r),u=0;u<r;u++)t[u*e+l]=i[u]}for(u=0;u<r;u++){for(l=0;l<e;l++)n[l]=t[u*e+l];for(o(n,i,a,s,e),l=0;l<e;l++)t[u*e+l]=Math.sqrt(i[l])}}function o(t,e,r,n,a){r[0]=0,n[0]=-i,n[1]=+i;for(var o=1,s=0;o<a;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=n[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,n[s]=l,n[s+1]=+i}for(o=0,s=0;o<a;o++){for(;n[s+1]<o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}},{clamp:86}],83:[function(t,e,r){},{}],84:[function(t,e,r){\"use strict\";var n,i=\"object\"==typeof Reflect?Reflect:null,a=i&&\"function\"==typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};n=i&&\"function\"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(t,e){return new Promise((function(r,n){function i(){void 0!==a&&t.removeListener(\"error\",a),r([].slice.call(arguments))}var a;\"error\"!==e&&(a=function(r){t.removeListener(e,i),n(r)},t.once(\"error\",a)),t.once(e,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(t){if(\"function\"!=typeof t)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,r,n){var i,a,o,s;if(u(r),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit(\"newListener\",e,r.listener?r.listener:r),a=t._events),o=a[e]),void 0===o)o=a[e]=r,++t._eventsCount;else if(\"function\"==typeof o?o=a[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(t))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error(\"Possible EventEmitter memory leak detected. \"+o.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");l.name=\"MaxListenersExceededWarning\",l.emitter=t,l.type=e,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:\"function\"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):v(i,i.length)}function g(t){var e=this._events;if(void 0!==e){var r=e[t];if(\"function\"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function v(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}Object.defineProperty(s,\"defaultMaxListeners\",{enumerable:!0,get:function(){return l},set:function(t){if(\"number\"!=typeof t||t<0||o(t))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+t+\".\");l=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if(\"number\"!=typeof t||t<0||o(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n=\"error\"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw s.context=o,s}var l=i[t];if(void 0===l)return!1;if(\"function\"==typeof l)a(l,this,e);else{var u=l.length,c=v(l,u);for(r=0;r<u;++r)a(c[r],this,e)}return!0},s.prototype.addListener=function(t,e){return f(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return f(this,t,e,!0)},s.prototype.once=function(t,e){return u(e),this.on(t,p(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,p(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,n,i,a,o;if(u(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit(\"removeListener\",t,r.listener||e));else if(\"function\"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit(\"removeListener\",t,o||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)\"removeListener\"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return\"function\"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],85:[function(t,e,r){(function(e){(function(){\"use strict\";var e=t(\"base64-js\"),n=t(\"ieee754\");r.Buffer=o,r.SlowBuffer=function(t){return+t!=t&&(t=0),o.alloc(+t)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function a(t){if(t>i)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=o.prototype,e}function o(t,e,r){if(\"number\"==typeof t){if(\"string\"==typeof e)throw new TypeError('The \"string\" argument must be of type string. Received type number');return u(t)}return s(t,e,r)}function s(t,e,r){if(\"string\"==typeof t)return function(t,e){if(\"string\"==typeof e&&\"\"!==e||(e=\"utf8\"),!o.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|h(t,e),n=a(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('\"offset\" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');var n;return(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r)).__proto__=o.prototype,n}(t,e,r);if(\"number\"==typeof t)throw new TypeError('The \"value\" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return o.from(n,e,r);var i=function(t){if(o.isBuffer(t)){var e=0|f(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?\"number\"!=typeof t.length||j(t.length)?a(0):c(t):\"Buffer\"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof t[Symbol.toPrimitive])return o.from(t[Symbol.toPrimitive](\"string\"),e,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 l(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 u(t){return l(t),a(t<0?0:0|f(t))}function c(t){for(var e=t.length<0?0:0|f(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t){if(t>=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return 0|t}function h(t,e){if(o.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){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 F(t).length;default:if(i)return n?-1:R(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function p(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return E(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return A(this,e,r);case\"latin1\":case\"binary\":return S(this,e,r);case\"base64\":return k(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return C(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function v(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;a<s;a++)if(u(t,a)===u(e,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(r+l>s&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;h<l;h++)if(u(t,a+h)!==u(e,h)){f=!1;break}if(f)return a}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(j(s))return o;t[r+o]=s}return o}function y(t,e,r,n){return N(R(e,t.length-r),t,r,n)}function x(t,e,r,n){return N(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function b(t,e,r,n){return x(t,e,r,n)}function _(t,e,r,n){return N(F(e),t,r,n)}function w(t,e,r,n){return N(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function k(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,o,s,l,u=t[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);for(var r=\"\",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=M));return r}(n)}r.kMaxLength=i,o.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}}(),o.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(o.prototype,\"parent\",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,\"offset\",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),\"undefined\"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(t,e,r){return s(t,e,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?a(t):void 0!==e?\"string\"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},o.allocUnsafe=function(t){return u(t)},o.allocUnsafeSlow=function(t){return u(t)},o.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==o.prototype},o.compare=function(t,e){if(B(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),B(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},o.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}},o.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=o.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(B(a,Uint8Array)&&(a=o.from(a)),!o.isBuffer(a))throw new TypeError('\"list\" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},o.byteLength=h,o.prototype._isBuffer=!0,o.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},o.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},o.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},o.prototype.toString=function(){var t=this.length;return 0===t?\"\":0===arguments.length?T(this,0,t):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t=\"\",e=r.INSPECT_MAX_BYTES;return t=this.toString(\"hex\",0,e).replace(/(.{2})/g,\"$1 \").trim(),this.length>e&&(t+=\" ... \"),\"<Buffer \"+t+\">\"},o.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(a,s),u=this.slice(n,i),c=t.slice(e,r),f=0;f<l;++f)if(u[f]!==c[f]){a=u[f],s=c[f];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},o.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},o.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},o.prototype.write=function(t,e,r,n){if(void 0===e)n=\"utf8\",r=this.length,e=0;else if(void 0===r&&\"string\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var a=!1;;)switch(n){case\"hex\":return m(this,t,e,r);case\"utf8\":case\"utf-8\":return y(this,t,e,r);case\"ascii\":return x(this,t,e,r);case\"latin1\":case\"binary\":return b(this,t,e,r);case\"base64\":return _(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return w(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function A(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function S(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function E(t,e,r){var n,i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var a=\"\",o=e;o<r;++o)a+=(n=t[o])<16?\"0\"+n.toString(16):n.toString(16);return a}function C(t,e,r){for(var n=t.slice(e,r),i=\"\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(t+e>r)throw new RangeError(\"Trying to access beyond buffer length\")}function P(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('\"value\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\"Index out of range\")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function I(t,e,r,i,a){return e=+e,r>>>=0,a||O(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function D(t,e,r,i,a){return e=+e,r>>>=0,a||O(t,0,r,8),n.write(t,e,r,i,52,8),r+8}o.prototype.slice=function(t,e){var r=this.length;(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);var n=this.subarray(t,e);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},o.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},o.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),n.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),n.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),n.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),n.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},o.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(!o.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&\"function\"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var a=i-1;a>=0;--a)t[a+e]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},o.prototype.fill=function(t,e,r,n){if(\"string\"==typeof t){if(\"string\"==typeof e?(n=e,e=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!o.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===t.length){var i=t.charCodeAt(0);(\"utf8\"===n&&i<128||\"latin1\"===n)&&(t=i)}}else\"number\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError(\"Out of range index\");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var s=o.isBuffer(t)?t:o.from(t,n),l=s.length;if(0===l)throw new TypeError('The value \"'+t+'\" is invalid for argument \"value\"');for(a=0;a<r-e;++a)this[a+e]=s[a%l]}return this};var z=/[^+/0-9A-Za-z-_]/g;function R(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function F(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(z,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function N(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return e<r?t<e?e:t>r?r:t:t<r?r:t>e?e:t}},{}],87:[function(t,e,r){\"use strict\";var n=t(\"clamp\");function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(255&n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:86}],88:[function(t,e,r){\"use strict\";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],89:[function(t,e,r){\"use strict\";var n=t(\"color-rgba\"),i=t(\"clamp\"),a=t(\"dtype\");e.exports=function(t,e){\"float\"!==e&&e||(e=\"array\"),\"uint\"===e&&(e=\"uint8\"),\"uint_clamped\"===e&&(e=\"uint8_clamped\");var r=new(a(e))(4),o=\"uint8\"!==e&&\"uint8_clamped\"!==e;return t.length&&\"string\"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},{clamp:86,\"color-rgba\":91,dtype:127}],90:[function(t,e,n){(function(r){(function(){\"use strict\";var n=t(\"color-name\"),i=t(\"is-plain-obj\"),a=t(\"defined\");e.exports=function(t){var e,s,l=[],u=1;if(\"string\"==typeof t)if(n[t])l=n[t].slice(),s=\"rgb\";else if(\"transparent\"===t)u=0,s=\"rgb\",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var c=t.slice(1);u=1,(p=c.length)<=4?(l=[parseInt(c[0]+c[0],16),parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16)],4===p&&(u=parseInt(c[3]+c[3],16)/255)):(l=[parseInt(c[0]+c[1],16),parseInt(c[2]+c[3],16),parseInt(c[4]+c[5],16)],8===p&&(u=parseInt(c[6]+c[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s=\"rgb\"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\s*\\(([^\\)]*)\\)/.exec(t)){var f=e[1],h=\"rgb\"===f;s=c=f.replace(/a$/,\"\");var p=\"cmyk\"===c?4:\"gray\"===c?1:3;l=e[2].trim().split(/\\s*,\\s*/).map((function(t,e){if(/%$/.test(t))return e===p?parseFloat(t)/100:\"rgb\"===c?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===c[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===c&&l.push(1),u=h||void 0===l[p]?1:l[p],l=l.slice(0,p)}else t.length>10&&/[0-9](?:\\s|\\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),s=t.match(/([a-z])/gi).join(\"\").toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s=\"rgb\",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s=\"hsl\",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),u=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(u/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s=\"rgb\",u=4===t.length?t[3]:1);else s=\"rgb\",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:u}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":88,defined:124,\"is-plain-obj\":236}],91:[function(t,e,r){\"use strict\";var n=t(\"color-parse\"),i=t(\"color-space/hsl\"),a=t(\"clamp\");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),\"h\"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:86,\"color-parse\":90,\"color-space/hsl\":92}],92:[function(t,e,r){\"use strict\";var n=t(\"./rgb\");e.exports={name:\"hsl\",min:[0,0,0],max:[360,100,100],channel:[\"hue\",\"saturation\",\"lightness\"],alias:[\"HSL\"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var u=0;u<3;u++)(n=o+1/3*-(u-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{\"./rgb\":93}],93:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],94:[function(t,e,r){e.exports={AFG:\"afghan\",ALA:\"\\\\b\\\\wland\",ALB:\"albania\",DZA:\"algeria\",ASM:\"^(?=.*americ).*samoa\",AND:\"andorra\",AGO:\"angola\",AIA:\"anguill?a\",ATA:\"antarctica\",ATG:\"antigua\",ARG:\"argentin\",ARM:\"armenia\",ABW:\"^(?!.*bonaire).*\\\\baruba\",AUS:\"australia\",AUT:\"^(?!.*hungary).*austria|\\\\baustri.*\\\\bemp\",AZE:\"azerbaijan\",BHS:\"bahamas\",BHR:\"bahrain\",BGD:\"bangladesh|^(?=.*east).*paki?stan\",BRB:\"barbados\",BLR:\"belarus|byelo\",BEL:\"^(?!.*luxem).*belgium\",BLZ:\"belize|^(?=.*british).*honduras\",BEN:\"benin|dahome\",BMU:\"bermuda\",BTN:\"bhutan\",BOL:\"bolivia\",BES:\"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\\\bbes.?islands\",BIH:\"herzegovina|bosnia\",BWA:\"botswana|bechuana\",BVT:\"bouvet\",BRA:\"brazil\",IOT:\"british.?indian.?ocean\",BRN:\"brunei\",BGR:\"bulgaria\",BFA:\"burkina|\\\\bfaso|upper.?volta\",BDI:\"burundi\",CPV:\"verde\",KHM:\"cambodia|kampuchea|khmer\",CMR:\"cameroon\",CAN:\"canada\",CYM:\"cayman\",CAF:\"\\\\bcentral.african.republic\",TCD:\"\\\\bchad\",CHL:\"\\\\bchile\",CHN:\"^(?!.*\\\\bmac)(?!.*\\\\bhong)(?!.*\\\\btai)(?!.*\\\\brep).*china|^(?=.*peo)(?=.*rep).*china\",CXR:\"christmas\",CCK:\"\\\\bcocos|keeling\",COL:\"colombia\",COM:\"comoro\",COG:\"^(?!.*\\\\bdem)(?!.*\\\\bd[\\\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\\\bcongo\",COK:\"\\\\bcook\",CRI:\"costa.?rica\",CIV:\"ivoire|ivory\",HRV:\"croatia\",CUB:\"\\\\bcuba\",CUW:\"^(?!.*bonaire).*\\\\bcura(c|ç)ao\",CYP:\"cyprus\",CSK:\"czechoslovakia\",CZE:\"^(?=.*rep).*czech|czechia|bohemia\",COD:\"\\\\bdem.*congo|congo.*\\\\bdem|congo.*\\\\bd[\\\\.]?r|\\\\bd[\\\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc\",DNK:\"denmark\",DJI:\"djibouti\",DMA:\"dominica(?!n)\",DOM:\"dominican.rep\",ECU:\"ecuador\",EGY:\"egypt\",SLV:\"el.?salvador\",GNQ:\"guine.*eq|eq.*guine|^(?=.*span).*guinea\",ERI:\"eritrea\",EST:\"estonia\",ETH:\"ethiopia|abyssinia\",FLK:\"falkland|malvinas\",FRO:\"faroe|faeroe\",FJI:\"fiji\",FIN:\"finland\",FRA:\"^(?!.*\\\\bdep)(?!.*martinique).*france|french.?republic|\\\\bgaul\",GUF:\"^(?=.*french).*guiana\",PYF:\"french.?polynesia|tahiti\",ATF:\"french.?southern\",GAB:\"gabon\",GMB:\"gambia\",GEO:\"^(?!.*south).*georgia\",DDR:\"german.?democratic.?republic|democratic.?republic.*germany|east.germany\",DEU:\"^(?!.*east).*germany|^(?=.*\\\\bfed.*\\\\brep).*german\",GHA:\"ghana|gold.?coast\",GIB:\"gibraltar\",GRC:\"greece|hellenic|hellas\",GRL:\"greenland\",GRD:\"grenada\",GLP:\"guadeloupe\",GUM:\"\\\\bguam\",GTM:\"guatemala\",GGY:\"guernsey\",GIN:\"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea\",GNB:\"bissau|^(?=.*portu).*guinea\",GUY:\"guyana|british.?guiana\",HTI:\"haiti\",HMD:\"heard.*mcdonald\",VAT:\"holy.?see|vatican|papal.?st\",HND:\"^(?!.*brit).*honduras\",HKG:\"hong.?kong\",HUN:\"^(?!.*austr).*hungary\",ISL:\"iceland\",IND:\"india(?!.*ocea)\",IDN:\"indonesia\",IRN:\"\\\\biran|persia\",IRQ:\"\\\\biraq|mesopotamia\",IRL:\"(^ireland)|(^republic.*ireland)\",IMN:\"^(?=.*isle).*\\\\bman\",ISR:\"israel\",ITA:\"italy\",JAM:\"jamaica\",JPN:\"japan\",JEY:\"jersey\",JOR:\"jordan\",KAZ:\"kazak\",KEN:\"kenya|british.?east.?africa|east.?africa.?prot\",KIR:\"kiribati\",PRK:\"^(?=.*democrat|people|north|d.*p.*.r).*\\\\bkorea|dprk|korea.*(d.*p.*r)\",KWT:\"kuwait\",KGZ:\"kyrgyz|kirghiz\",LAO:\"\\\\blaos?\\\\b\",LVA:\"latvia\",LBN:\"lebanon\",LSO:\"lesotho|basuto\",LBR:\"liberia\",LBY:\"libya\",LIE:\"liechtenstein\",LTU:\"lithuania\",LUX:\"^(?!.*belg).*luxem\",MAC:\"maca(o|u)\",MDG:\"madagascar|malagasy\",MWI:\"malawi|nyasa\",MYS:\"malaysia\",MDV:\"maldive\",MLI:\"\\\\bmali\\\\b\",MLT:\"\\\\bmalta\",MHL:\"marshall\",MTQ:\"martinique\",MRT:\"mauritania\",MUS:\"mauritius\",MYT:\"\\\\bmayotte\",MEX:\"\\\\bmexic\",FSM:\"fed.*micronesia|micronesia.*fed\",MCO:\"monaco\",MNG:\"mongolia\",MNE:\"^(?!.*serbia).*montenegro\",MSR:\"montserrat\",MAR:\"morocco|\\\\bmaroc\",MOZ:\"mozambique\",MMR:\"myanmar|burma\",NAM:\"namibia\",NRU:\"nauru\",NPL:\"nepal\",NLD:\"^(?!.*\\\\bant)(?!.*\\\\bcarib).*netherlands\",ANT:\"^(?=.*\\\\bant).*(nether|dutch)\",NCL:\"new.?caledonia\",NZL:\"new.?zealand\",NIC:\"nicaragua\",NER:\"\\\\bniger(?!ia)\",NGA:\"nigeria\",NIU:\"niue\",NFK:\"norfolk\",MNP:\"mariana\",NOR:\"norway\",OMN:\"\\\\boman|trucial\",PAK:\"^(?!.*east).*paki?stan\",PLW:\"palau\",PSE:\"palestin|\\\\bgaza|west.?bank\",PAN:\"panama\",PNG:\"papua|new.?guinea\",PRY:\"paraguay\",PER:\"peru\",PHL:\"philippines\",PCN:\"pitcairn\",POL:\"poland\",PRT:\"portugal\",PRI:\"puerto.?rico\",QAT:\"qatar\",KOR:\"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\\\bkorea(?!.*d.*p.*r)\",MDA:\"moldov|b(a|e)ssarabia\",REU:\"r(e|é)union\",ROU:\"r(o|u|ou)mania\",RUS:\"\\\\brussia|soviet.?union|u\\\\.?s\\\\.?s\\\\.?r|socialist.?republics\",RWA:\"rwanda\",BLM:\"barth(e|é)lemy\",SHN:\"helena\",KNA:\"kitts|\\\\bnevis\",LCA:\"\\\\blucia\",MAF:\"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)\",SPM:\"miquelon\",VCT:\"vincent\",WSM:\"^(?!.*amer).*samoa\",SMR:\"san.?marino\",STP:\"\\\\bs(a|ã)o.?tom(e|é)\",SAU:\"\\\\bsa\\\\w*.?arabia\",SEN:\"senegal\",SRB:\"^(?!.*monte).*serbia\",SYC:\"seychell\",SLE:\"sierra\",SGP:\"singapore\",SXM:\"^(?!.*martin)(?!.*saba).*maarten\",SVK:\"^(?!.*cze).*slovak\",SVN:\"slovenia\",SLB:\"solomon\",SOM:\"somali\",ZAF:\"south.africa|s\\\\\\\\..?africa\",SGS:\"south.?georgia|sandwich\",SSD:\"\\\\bs\\\\w*.?sudan\",ESP:\"spain\",LKA:\"sri.?lanka|ceylon\",SDN:\"^(?!.*\\\\bs(?!u)).*sudan\",SUR:\"surinam|dutch.?guiana\",SJM:\"svalbard\",SWZ:\"swaziland\",SWE:\"sweden\",CHE:\"switz|swiss\",SYR:\"syria\",TWN:\"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china\",TJK:\"tajik\",THA:\"thailand|\\\\bsiam\",MKD:\"macedonia|fyrom\",TLS:\"^(?=.*leste).*timor|^(?=.*east).*timor\",TGO:\"togo\",TKL:\"tokelau\",TON:\"tonga\",TTO:\"trinidad|tobago\",TUN:\"tunisia\",TUR:\"turkey\",TKM:\"turkmen\",TCA:\"turks\",TUV:\"tuvalu\",UGA:\"uganda\",UKR:\"ukrain\",ARE:\"emirates|^u\\\\.?a\\\\.?e\\\\.?$|united.?arab.?em\",GBR:\"united.?kingdom|britain|^u\\\\.?k\\\\.?$\",TZA:\"tanzania\",USA:\"united.?states\\\\b(?!.*islands)|\\\\bu\\\\.?s\\\\.?a\\\\.?\\\\b|^\\\\s*u\\\\.?s\\\\.?\\\\b(?!.*islands)\",UMI:\"minor.?outlying.?is\",URY:\"uruguay\",UZB:\"uzbek\",VUT:\"vanuatu|new.?hebrides\",VEN:\"venezuela\",VNM:\"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam\",VGB:\"^(?=.*\\\\bu\\\\.?\\\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin\",VIR:\"^(?=.*\\\\bu\\\\.?\\\\s?s).*virgin|^(?=.*states).*virgin\",WLF:\"futuna|wallis\",ESH:\"western.sahara\",YEM:\"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\\\bp\\\\.?d\\\\.?r).*yemen\",YMD:\"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\\\bp\\\\.?d\\\\.?r).*yemen\",YUG:\"yugoslavia\",ZMB:\"zambia|northern.?rhodesia\",EAZ:\"zanzibar\",ZWE:\"zimbabwe|^(?!.*northern).*rhodesia\"}},{}],95:[function(t,e,r){e.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]},{}],96:[function(t,e,r){e.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]},{}],97:[function(t,e,r){e.exports=[\"normal\",\"italic\",\"oblique\"]},{}],98:[function(t,e,r){e.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]},{}],99:[function(t,e,r){\"use strict\";e.exports={parse:t(\"./parse\"),stringify:t(\"./stringify\")}},{\"./parse\":101,\"./stringify\":102}],100:[function(t,e,r){\"use strict\";var n=t(\"css-font-size-keywords\");e.exports={isSize:function(t){return/^[\\d\\.]/.test(t)||-1!==t.indexOf(\"/\")||-1!==n.indexOf(t)}}},{\"css-font-size-keywords\":95}],101:[function(t,e,r){\"use strict\";var n=t(\"unquote\"),i=t(\"css-global-keywords\"),a=t(\"css-system-font-keywords\"),o=t(\"css-font-weight-keywords\"),s=t(\"css-font-style-keywords\"),l=t(\"css-font-stretch-keywords\"),u=t(\"string-split-by\"),c=t(\"./lib/util\").isSize;e.exports=h;var f=h.cache={};function h(t){if(\"string\"!=typeof t)throw new Error(\"Font argument must be a string.\");if(f[t])return f[t];if(\"\"===t)throw new Error(\"Cannot parse an empty string.\");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:\"normal\",variant:\"normal\",weight:\"normal\",stretch:\"normal\",lineHeight:\"normal\",size:\"1rem\",family:[\"serif\"]},h=u(t,/\\s+/);e=h.shift();){if(-1!==i.indexOf(e))return[\"style\",\"variant\",\"weight\",\"stretch\"].forEach((function(t){r[t]=e})),f[t]=r;if(-1===s.indexOf(e))if(\"normal\"!==e&&\"small-caps\"!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(c(e)){var d=u(e,\"/\");if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):\"/\"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error(\"Missing required font-family.\");return r.family=u(h.join(\" \"),/\\s*,\\s*/).map(n),f[t]=r}throw new Error(\"Unknown or unsupported font token: \"+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error(\"Missing required font-size.\")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},{\"./lib/util\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"string-split-by\":306,unquote:329}],102:[function(t,e,r){\"use strict\";var n=t(\"pick-by-alias\"),i=t(\"./lib/util\").isSize,a=g(t(\"css-global-keywords\")),o=g(t(\"css-system-font-keywords\")),s=g(t(\"css-font-weight-keywords\")),l=g(t(\"css-font-style-keywords\")),u=g(t(\"css-font-stretch-keywords\")),c={normal:1,\"small-caps\":1},f={serif:1,\"sans-serif\":1,monospace:1,cursive:1,fantasy:1,\"system-ui\":1},h=\"1rem\",p=\"serif\";function d(t,e){if(t&&!e[t]&&!a[t])throw Error(\"Unknown keyword `\"+t+\"`\");return t}function g(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=1;return e}e.exports=function(t){if((t=n(t,{style:\"style fontstyle fontStyle font-style slope distinction\",variant:\"variant font-variant fontVariant fontvariant var capitalization\",weight:\"weight w font-weight fontWeight fontweight\",stretch:\"stretch font-stretch fontStretch fontstretch width\",size:\"size s font-size fontSize fontsize height em emSize\",lineHeight:\"lh line-height lineHeight lineheight leading\",family:\"font family fontFamily font-family fontfamily type typeface face\",system:\"system reserved default global\"})).system)return t.system&&d(t.system,o),t.system;if(d(t.style,l),d(t.variant,c),d(t.weight,s),d(t.stretch,u),null==t.size&&(t.size=h),\"number\"==typeof t.size&&(t.size+=\"px\"),!i)throw Error(\"Bad size value `\"+t.size+\"`\");t.family||(t.family=p),Array.isArray(t.family)&&(t.family.length||(t.family=[p]),t.family=t.family.map((function(t){return f[t]?t:'\"'+t+'\"'})).join(\", \"));var e=[];return e.push(t.style),t.variant!==t.style&&e.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&e.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&e.push(t.stretch),e.push(t.size+(null==t.lineHeight||\"normal\"===t.lineHeight||t.lineHeight+\"\"==\"1\"?\"\":\"/\"+t.lineHeight)),e.push(t.family),e.filter(Boolean).join(\" \")}},{\"./lib/util\":100,\"css-font-stretch-keywords\":96,\"css-font-style-keywords\":97,\"css-font-weight-keywords\":98,\"css-global-keywords\":103,\"css-system-font-keywords\":104,\"pick-by-alias\":253}],103:[function(t,e,r){e.exports=[\"inherit\",\"initial\",\"unset\"]},{}],104:[function(t,e,r){e.exports=[\"caption\",\"icon\",\"menu\",\"message-box\",\"small-caption\",\"status-bar\"]},{}],105:[function(t,e,r){\"use strict\";var n,i=t(\"type/value/is\"),a=t(\"type/value/ensure\"),o=t(\"type/plain-function/ensure\"),s=t(\"es5-ext/object/copy\"),l=t(\"es5-ext/object/normalize-options\"),u=t(\"es5-ext/object/map\"),c=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,i=a(e)&&o(e.value);return delete(n=s(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?i:(e.value=c.call(i,r.resolveContext?r.resolveContext(this):this),f(this,t,e),this[t])},n},e.exports=function(t){var e=l(arguments[1]);return i(e.resolveContext)&&o(e.resolveContext),u(t,(function(t,r){return n(r,t,e)}))}},{\"es5-ext/object/copy\":147,\"es5-ext/object/map\":155,\"es5-ext/object/normalize-options\":156,\"type/plain-function/ensure\":322,\"type/value/ensure\":326,\"type/value/is\":327}],106:[function(t,e,r){\"use strict\";var n=t(\"type/value/is\"),i=t(\"type/plain-function/is\"),a=t(\"es5-ext/object/assign\"),o=t(\"es5-ext/object/normalize-options\"),s=t(\"es5-ext/string/#/contains\"),l=e.exports=function(t,e){var r,i,l,u,c;return arguments.length<2||\"string\"!=typeof t?(u=e,e=t,t=null):u=arguments[2],n(t)?(r=s.call(t,\"c\"),i=s.call(t,\"e\"),l=s.call(t,\"w\")):(r=l=!0,i=!1),c={value:e,configurable:r,enumerable:i,writable:l},u?a(o(u),c):c};l.gs=function(t,e,r){var l,u,c,f;return\"string\"!=typeof t?(c=r,r=e,e=t,t=null):c=arguments[3],n(e)?i(e)?n(r)?i(r)||(c=r,r=void 0):r=void 0:(c=e,e=r=void 0):e=void 0,n(t)?(l=s.call(t,\"c\"),u=s.call(t,\"e\")):(l=!0,u=!1),f={get:e,set:r,configurable:l,enumerable:u},c?a(o(c),f):f}},{\"es5-ext/object/assign\":144,\"es5-ext/object/normalize-options\":156,\"es5-ext/string/#/contains\":163,\"type/plain-function/is\":323,\"type/value/is\":327}],107:[function(t,e,r){var n;n=function(t){\"use strict\";function e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function r(t){return 1===t.length&&(r=t,t=function(t,n){return e(r(t),n)}),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}};var r}var n=r(e),i=n.right,a=n.left;function o(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function l(t,e){var r,n,i=t.length,a=0,o=-1,l=0,u=0;if(null==e)for(;++o<i;)isNaN(r=s(t[o]))||(u+=(n=r-l)*(r-(l+=n/++a)));else for(;++o<i;)isNaN(r=s(e(t[o],o,t)))||(u+=(n=r-l)*(r-(l+=n/++a)));if(a>1)return u/(a-1)}function u(t,e){var r=l(t,e);return r?Math.sqrt(r):r}function c(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(r=t[o])&&r>=r)for(n=i=r;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else for(;++o<a;)if(null!=(r=e(t[o],o,t))&&r>=r)for(n=i=r;++o<a;)null!=(r=e(t[o],o,t))&&(n>r&&(n=r),i<r&&(i=r));return[n,i]}var f=Array.prototype,h=f.slice,p=f.map;function d(t){return function(){return t}}function g(t){return t}function v(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a}var m=Math.sqrt(50),y=Math.sqrt(10),x=Math.sqrt(2);function b(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i>=0?(a>=m?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=m?10:a>=y?5:a>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=m?i*=10:a>=y?i*=5:a>=x&&(i*=2),e<t?-i:i}function w(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function k(t,e,r){if(null==r&&(r=s),n=t.length){if((e=+e)<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}}function T(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&n>r&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&n>r&&(n=r);return n}function M(t){if(!(i=t.length))return[];for(var e=-1,r=T(t,A),n=new Array(r);++e<r;)for(var i,a=-1,o=n[e]=new Array(i);++a<i;)o[a]=t[a][e];return n}function A(t){return t.length}t.bisect=i,t.bisectRight=i,t.bisectLeft=a,t.ascending=e,t.bisector=r,t.cross=function(t,e,r){var n,i,a,s,l=t.length,u=e.length,c=new Array(l*u);for(null==r&&(r=o),n=a=0;n<l;++n)for(s=t[n],i=0;i<u;++i,++a)c[a]=r(s,e[i]);return c},t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.deviation=u,t.extent=c,t.histogram=function(){var t=g,e=c,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;a<s;++a)l[a]=t(n[a],a,n);var u=e(l),c=u[0],f=u[1],h=r(l,c,f);Array.isArray(h)||(h=_(c,f,h),h=v(Math.ceil(c/h)*h,f,h));for(var p=h.length;h[0]<=c;)h.shift(),--p;for(;h[p-1]>f;)h.pop(),--p;var d,g=new Array(p+1);for(a=0;a<=p;++a)(d=g[a]=[]).x0=a>0?h[a-1]:c,d.x1=a<p?h[a]:f;for(a=0;a<s;++a)c<=(o=l[a])&&o<=f&&g[i(h,o,0,p)].push(n[a]);return g}return n.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:d(e),n):t},n.domain=function(t){return arguments.length?(e=\"function\"==typeof t?t:d([t[0],t[1]]),n):e},n.thresholds=function(t){return arguments.length?(r=\"function\"==typeof t?t:Array.isArray(t)?d(h.call(t)):d(t),n):r},n},t.thresholdFreedmanDiaconis=function(t,r,n){return t=p.call(t,s).sort(e),Math.ceil((n-r)/(2*(k(t,.75)-k(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*u(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=w,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&r>n&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&r>n&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a<n;)isNaN(r=s(t[a]))?--i:o+=r;else for(;++a<n;)isNaN(r=s(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,r){var n,i=t.length,a=-1,o=[];if(null==r)for(;++a<i;)isNaN(n=s(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=s(r(t[a],a,t)))||o.push(n);return k(o.sort(e),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=T,t.pairs=function(t,e){null==e&&(e=o);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return a},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=k,t.range=v,t.scan=function(t,r){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==r&&(r=e);++a<n;)(r(i=t[a],s)<0||0!==r(s,s))&&(s=i,o=a);return 0===r(s,s)?o:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i<n;)(r=+t[i])&&(a+=r);else for(;++i<n;)(r=+e(t[i],i,t))&&(a+=r);return a},t.ticks=function(t,e,r){var n,i,a,o,s=-1;if(r=+r,(t=+t)==(e=+e)&&r>0)return[t];if((n=e<t)&&(i=t,t=e,e=i),0===(o=b(t,e,r))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return n&&a.reverse(),a},t.tickIncrement=b,t.tickStep=_,t.transpose=M,t.variance=l,t.zip=function(){return M(arguments)},Object.defineProperty(t,\"__esModule\",{value:!0})},n(\"object\"==typeof r&&void 0!==e?r:this.d3=this.d3||{})},{}],108:[function(t,e,r){var n;n=function(t){\"use strict\";var e=\"$\";function r(){}function n(t,e){var n=new r;if(t instanceof r)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==e)for(;++a<o;)n.set(a,t[a]);else for(;++a<o;)n.set(e(i=t[a],a,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}function i(){return{}}function a(t,e,r){t[e]=r}function o(){return n()}function s(t,e,r){t.set(e,r)}function l(){}r.prototype=n.prototype={constructor:r,has:function(t){return e+t in this},get:function(t){return this[e+t]},set:function(t,r){return this[e+t]=r,this},remove:function(t){var r=e+t;return r in this&&delete this[r]},clear:function(){for(var t in this)t[0]===e&&delete this[t]},keys:function(){var t=[];for(var r in this)r[0]===e&&t.push(r.slice(1));return t},values:function(){var t=[];for(var r in this)r[0]===e&&t.push(this[r]);return t},entries:function(){var t=[];for(var r in this)r[0]===e&&t.push({key:r.slice(1),value:this[r]});return t},size:function(){var t=0;for(var r in this)r[0]===e&&++t;return t},empty:function(){for(var t in this)if(t[0]===e)return!1;return!0},each:function(t){for(var r in this)r[0]===e&&t(this[r],r.slice(1),this)}};var u=n.prototype;function c(t,e){var r=new l;if(t instanceof l)t.each((function(t){r.add(t)}));else if(t){var n=-1,i=t.length;if(null==e)for(;++n<i;)r.add(t[n]);else for(;++n<i;)r.add(e(t[n],n,t))}return r}l.prototype=c.prototype={constructor:l,has:u.has,add:function(t){return this[e+(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,r,l=[],u=[];function c(r,i,a,o){if(i>=l.length)return null!=t&&r.sort(t),null!=e?e(r):r;for(var s,u,f,h=-1,p=r.length,d=l[i++],g=n(),v=a();++h<p;)(f=g.get(s=d(u=r[h])+\"\"))?f.push(u):g.set(s,[u]);return g.each((function(t,e){o(v,e,c(t,i,a,o))})),v}function f(t,r){if(++r>l.length)return t;var n,i=u[r-1];return null!=e&&r>=l.length?n=t.entries():(n=[],t.each((function(t,e){n.push({key:e,values:f(t,r)})}))),null!=i?n.sort((function(t,e){return i(t.key,e.key)})):n}return r={object:function(t){return c(t,0,i,a)},map:function(t){return c(t,0,o,s)},entries:function(t){return f(c(t,0,o,s),0)},key:function(t){return l.push(t),r},sortKeys:function(t){return u[l.length-1]=t,r},sortValues:function(e){return t=e,r},rollup:function(t){return e=t,r}}},t.set=c,t.map=n,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,\"__esModule\",{value:!0})},n(\"object\"==typeof r&&void 0!==e?r:this.d3=this.d3||{})},{}],109:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i=.7,a=1/i,o=\"\\\\s*([+-]?\\\\d+)\\\\s*\",s=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",l=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",u=/^#([0-9a-f]{3,8})$/,c=new RegExp(\"^rgb\\\\(\"+[o,o,o]+\"\\\\)$\"),f=new RegExp(\"^rgb\\\\(\"+[l,l,l]+\"\\\\)$\"),h=new RegExp(\"^rgba\\\\(\"+[o,o,o,s]+\"\\\\)$\"),p=new RegExp(\"^rgba\\\\(\"+[l,l,l,s]+\"\\\\)$\"),d=new RegExp(\"^hsl\\\\(\"+[s,l,l]+\"\\\\)$\"),g=new RegExp(\"^hsla\\\\(\"+[s,l,l,s]+\"\\\\)$\"),v={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 y(){return this.rgb().formatRgb()}function x(t){var e,r;return t=(t+\"\").trim().toLowerCase(),(e=u.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?b(e):3===r?new T(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?_(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=c.exec(t))?new T(e[1],e[2],e[3],1):(e=f.exec(t))?new T(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?_(e[1],e[2],e[3],e[4]):(e=p.exec(t))?_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=d.exec(t))?E(e[1],e[2]/100,e[3]/100,1):(e=g.exec(t))?E(e[1],e[2]/100,e[3]/100,e[4]):v.hasOwnProperty(t)?b(v[t]):\"transparent\"===t?new T(NaN,NaN,NaN,0):null}function b(t){return new T(t>>16&255,t>>8&255,255&t,1)}function _(t,e,r,n){return n<=0&&(t=e=r=NaN),new T(t,e,r,n)}function w(t){return t instanceof n||(t=x(t)),t?new T((t=t.rgb()).r,t.g,t.b,t.opacity):new T}function k(t,e,r,n){return 1===arguments.length?w(t):new T(t,e,r,null==n?1:n)}function T(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function M(){return\"#\"+S(this.r)+S(this.g)+S(this.b)}function A(){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 S(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?\"0\":\"\")+t.toString(16)}function E(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new P(t,e,r,n)}function C(t){if(t instanceof P)return new P(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=x(t)),!t)return new P;if(t instanceof P)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,u=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r<i):r===o?(i-e)/l+2:(e-r)/l+4,l/=u<.5?o+a:2-o-a,s*=60):l=u>0&&u<1?0:s,new P(s,l,u,t.opacity)}function L(t,e,r,n){return 1===arguments.length?C(t):new P(t,e,r,null==n?1:n)}function P(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function O(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,x,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:m,formatHex:m,formatHsl:function(){return C(this).formatHsl()},formatRgb:y,toString:y}),e(T,k,r(n,{brighter:function(t){return t=null==t?a:Math.pow(a,t),new T(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?i:Math.pow(i,t),new T(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:M,formatHex:M,formatRgb:A,toString:A})),e(P,L,r(n,{brighter:function(t){return t=null==t?a:Math.pow(a,t),new P(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?i:Math.pow(i,t),new P(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new T(O(t>=240?t-240:t+120,i,n),O(t,i,n),O(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},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 I=Math.PI/180,D=180/Math.PI,z=.96422,R=.82521,F=4/29,N=6/29,B=3*N*N;function j(t){if(t instanceof V)return new V(t.l,t.a,t.b,t.opacity);if(t instanceof Z)return K(t);t instanceof T||(t=w(t));var e,r,n=Y(t.r),i=Y(t.g),a=Y(t.b),o=H((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=H((.4360747*n+.3850649*i+.1430804*a)/z),r=H((.0139322*n+.0971045*i+.7141733*a)/R)),new V(116*o-16,500*(e-o),200*(o-r),t.opacity)}function U(t,e,r,n){return 1===arguments.length?j(t):new V(t,e,r,null==n?1:n)}function V(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function H(t){return t>.008856451679035631?Math.pow(t,1/3):t/B+F}function q(t){return t>N?t*t*t:B*(t-F)}function G(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Y(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function W(t){if(t instanceof Z)return new Z(t.h,t.c,t.l,t.opacity);if(t instanceof V||(t=j(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)*D;return new Z(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function X(t,e,r,n){return 1===arguments.length?W(t):new Z(t,e,r,null==n?1:n)}function Z(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function K(t){if(isNaN(t.h))return new V(t.l,0,0,t.opacity);var e=t.h*I;return new V(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}e(V,U,r(n,{brighter:function(t){return new V(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new V(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new T(G(3.1338561*(e=z*q(e))-1.6168667*(t=1*q(t))-.4906146*(r=R*q(r))),G(-.9787684*e+1.9161415*t+.033454*r),G(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),e(Z,X,r(n,{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 K(this).rgb()}}));var J=-.14861,$=1.78277,Q=-.29227,tt=-.90649,et=1.97294,rt=et*tt,nt=et*$,it=$*Q-tt*J;function at(t){if(t instanceof st)return new st(t.h,t.s,t.l,t.opacity);t instanceof T||(t=w(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(it*n+rt*e-nt*r)/(it+rt-nt),a=n-i,o=(et*(r-i)-Q*a)/tt,s=Math.sqrt(o*o+a*a)/(et*i*(1-i)),l=s?Math.atan2(o,a)*D-120:NaN;return new st(l<0?l+360:l,s,i,t.opacity)}function ot(t,e,r,n){return 1===arguments.length?at(t):new st(t,e,r,null==n?1:n)}function st(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}e(st,ot,r(n,{brighter:function(t){return t=null==t?a:Math.pow(a,t),new st(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?i:Math.pow(i,t),new st(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*I,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new T(255*(e+r*(J*n+$*i)),255*(e+r*(Q*n+tt*i)),255*(e+r*(et*n)),this.opacity)}})),t.color=x,t.cubehelix=ot,t.gray=function(t,e){return new V(t,0,0,null==e?1:e)},t.hcl=X,t.hsl=L,t.lab=U,t.lch=function(t,e,r,n){return 1===arguments.length?W(t):new Z(r,e,t,null==n?1:n)},t.rgb=k,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).d3=n.d3||{})},{}],110:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";var e={value:function(){}};function r(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+\"\")||t in i||/[\\s.]/.test(t))throw new Error(\"illegal type: \"+t);i[t]=[]}return new n(i)}function n(t){this._=t}function i(t,e){return t.trim().split(/^|\\s+/).map((function(t){var r=\"\",n=t.indexOf(\".\");if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function o(t,r,n){for(var i=0,a=t.length;i<a;++i)if(t[i].name===r){t[i]=e,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:r,value:n}),t}n.prototype=r.prototype={constructor:n,on:function(t,e){var r,n=this._,s=i(t+\"\",n),l=-1,u=s.length;if(!(arguments.length<2)){if(null!=e&&\"function\"!=typeof e)throw new Error(\"invalid callback: \"+e);for(;++l<u;)if(r=(t=s[l]).type)n[r]=o(n[r],t.name,e);else if(null==e)for(r in n)n[r]=o(n[r],t.name,null);return this}for(;++l<u;)if((r=(t=s[l]).type)&&(r=a(n[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new n(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}},t.dispatch=r,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).d3=n.d3||{})},{}],111:[function(t,e,r){var n,i;n=this,i=function(t,e,r,n,i){\"use strict\";function a(t){return function(){return t}}function o(){return 1e-6*(Math.random()-.5)}function s(t){return t.x+t.vx}function l(t){return t.y+t.vy}function u(t){return t.index}function c(t,e){var r=t.get(e);if(!r)throw new Error(\"missing: \"+e);return r}function f(t){return t.x}function h(t){return t.y}var p=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;n<a;++n)o+=(i=r[n]).x,s+=i.y;for(o=o/a-t,s=s/a-e,n=0;n<a;++n)(i=r[n]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n},t.forceCollide=function(t){var r,n,i=1,u=1;function c(){for(var t,a,c,h,p,d,g,v=r.length,m=0;m<u;++m)for(a=e.quadtree(r,s,l).visitAfter(f),t=0;t<v;++t)c=r[t],d=n[c.index],g=d*d,h=c.x+c.vx,p=c.y+c.vy,a.visit(y);function y(t,e,r,n,a){var s=t.data,l=t.r,u=d+l;if(!s)return e>h+u||n<h-u||r>p+u||a<p-u;if(s.index>c.index){var f=h-s.x-s.vx,v=p-s.y-s.vy,m=f*f+v*v;m<u*u&&(0===f&&(m+=(f=o())*f),0===v&&(m+=(v=o())*v),m=(u-(m=Math.sqrt(m)))/m*i,c.vx+=(f*=m)*(u=(l*=l)/(g+l)),c.vy+=(v*=m)*u,s.vx-=f*(u=1-u),s.vy-=v*u)}}}function f(t){if(t.data)return t.r=n[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(r){var e,i,a=r.length;for(n=new Array(a),e=0;e<a;++e)i=r[e],n[i.index]=+t(i,e,r)}}return\"function\"!=typeof t&&(t=a(null==t?1:+t)),c.initialize=function(t){r=t,h()},c.iterations=function(t){return arguments.length?(u=+t,c):u},c.strength=function(t){return arguments.length?(i=+t,c):i},c.radius=function(e){return arguments.length?(t=\"function\"==typeof e?e:a(+e),h(),c):t},c},t.forceLink=function(t){var e,n,i,s,l,f=u,h=function(t){return 1/Math.min(s[t.source.index],s[t.target.index])},p=a(30),d=1;function g(r){for(var i=0,a=t.length;i<d;++i)for(var s,u,c,f,h,p,g,v=0;v<a;++v)u=(s=t[v]).source,f=(c=s.target).x+c.vx-u.x-u.vx||o(),h=c.y+c.vy-u.y-u.vy||o(),f*=p=((p=Math.sqrt(f*f+h*h))-n[v])/p*r*e[v],h*=p,c.vx-=f*(g=l[v]),c.vy-=h*g,u.vx+=f*(g=1-g),u.vy+=h*g}function v(){if(i){var a,o,u=i.length,h=t.length,p=r.map(i,f);for(a=0,s=new Array(u);a<h;++a)(o=t[a]).index=a,\"object\"!=typeof o.source&&(o.source=c(p,o.source)),\"object\"!=typeof o.target&&(o.target=c(p,o.target)),s[o.source.index]=(s[o.source.index]||0)+1,s[o.target.index]=(s[o.target.index]||0)+1;for(a=0,l=new Array(h);a<h;++a)o=t[a],l[a]=s[o.source.index]/(s[o.source.index]+s[o.target.index]);e=new Array(h),m(),n=new Array(h),y()}}function m(){if(i)for(var r=0,n=t.length;r<n;++r)e[r]=+h(t[r],r,t)}function y(){if(i)for(var e=0,r=t.length;e<r;++e)n[e]=+p(t[e],e,t)}return null==t&&(t=[]),g.initialize=function(t){i=t,v()},g.links=function(e){return arguments.length?(t=e,v(),g):t},g.id=function(t){return arguments.length?(f=t,g):f},g.iterations=function(t){return arguments.length?(d=+t,g):d},g.strength=function(t){return arguments.length?(h=\"function\"==typeof t?t:a(+t),m(),g):h},g.distance=function(t){return arguments.length?(p=\"function\"==typeof t?t:a(+t),y(),g):p},g},t.forceManyBody=function(){var t,r,n,i,s=a(-30),l=1,u=1/0,c=.81;function p(i){var a,o=t.length,s=e.quadtree(t,f,h).visitAfter(g);for(n=i,a=0;a<o;++a)r=t[a],s.visit(v)}function d(){if(t){var e,r,n=t.length;for(i=new Array(n),e=0;e<n;++e)r=t[e],i[r.index]=+s(r,e,t)}}function g(t){var e,r,n,a,o,s=0,l=0;if(t.length){for(n=a=o=0;o<4;++o)(e=t[o])&&(r=Math.abs(e.value))&&(s+=e.value,l+=r,n+=r*e.x,a+=r*e.y);t.x=n/l,t.y=a/l}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,a,s){if(!t.value)return!0;var f=t.x-r.x,h=t.y-r.y,p=s-e,d=f*f+h*h;if(p*p/c<d)return d<u&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d<l&&(d=Math.sqrt(l*d)),r.vx+=f*t.value*n/d,r.vy+=h*t.value*n/d),!0;if(!(t.length||d>=u)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d<l&&(d=Math.sqrt(l*d)));do{t.data!==r&&(p=i[t.data.index]*n/d,r.vx+=f*p,r.vy+=h*p)}while(t=t.next)}}return p.initialize=function(e){t=e,d()},p.strength=function(t){return arguments.length?(s=\"function\"==typeof t?t:a(+t),d(),p):s},p.distanceMin=function(t){return arguments.length?(l=t*t,p):Math.sqrt(l)},p.distanceMax=function(t){return arguments.length?(u=t*t,p):Math.sqrt(u)},p.theta=function(t){return arguments.length?(c=t*t,p):Math.sqrt(c)},p},t.forceRadial=function(t,e,r){var n,i,o,s=a(.1);function l(t){for(var a=0,s=n.length;a<s;++a){var l=n[a],u=l.x-e||1e-6,c=l.y-r||1e-6,f=Math.sqrt(u*u+c*c),h=(o[a]-f)*i[a]*t/f;l.vx+=u*h,l.vy+=c*h}}function u(){if(n){var e,r=n.length;for(i=new Array(r),o=new Array(r),e=0;e<r;++e)o[e]=+t(n[e],e,n),i[e]=isNaN(o[e])?0:+s(n[e],e,n)}}return\"function\"!=typeof t&&(t=a(+t)),null==e&&(e=0),null==r&&(r=0),l.initialize=function(t){n=t,u()},l.strength=function(t){return arguments.length?(s=\"function\"==typeof t?t:a(+t),u(),l):s},l.radius=function(e){return arguments.length?(t=\"function\"==typeof e?e:a(+e),u(),l):t},l.x=function(t){return arguments.length?(e=+t,l):e},l.y=function(t){return arguments.length?(r=+t,l):r},l},t.forceSimulation=function(t){var e,a=1,o=.001,s=1-Math.pow(o,1/300),l=0,u=.6,c=r.map(),f=i.timer(d),h=n.dispatch(\"tick\",\"end\");function d(){g(),h.call(\"tick\",e),a<o&&(f.stop(),h.call(\"end\",e))}function g(r){var n,i,o=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(a+=(l-a)*s,c.each((function(t){t(a)})),n=0;n<o;++n)null==(i=t[n]).fx?i.x+=i.vx*=u:(i.x=i.fx,i.vx=0),null==i.fy?i.y+=i.vy*=u:(i.y=i.fy,i.vy=0);return e}function v(){for(var e,r=0,n=t.length;r<n;++r){if((e=t[r]).index=r,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(r),a=r*p;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function m(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),v(),e={tick:g,restart:function(){return f.restart(d),e},stop:function(){return f.stop(),e},nodes:function(r){return arguments.length?(t=r,v(),c.each(m),e):t},alpha:function(t){return arguments.length?(a=+t,e):a},alphaMin:function(t){return arguments.length?(o=+t,e):o},alphaDecay:function(t){return arguments.length?(s=+t,e):+s},alphaTarget:function(t){return arguments.length?(l=+t,e):l},velocityDecay:function(t){return arguments.length?(u=1-t,e):1-u},force:function(t,r){return arguments.length>1?(null==r?c.remove(t):c.set(t,m(r)),e):c.get(t)},find:function(e,r,n){var i,a,o,s,l,u=0,c=t.length;for(null==n?n=1/0:n*=n,u=0;u<c;++u)(o=(i=e-(s=t[u]).x)*i+(a=r-s.y)*a)<n&&(l=s,n=o);return l},on:function(t,r){return arguments.length>1?(h.on(t,r),e):h.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(n[a]-i.x)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a<o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return\"function\"!=typeof t&&(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:a(+t),s(),o):i},o.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:a(+e),s(),o):t},o},t.forceY=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(n[a]-i.y)*r[a]*t}function s(){if(e){var a,o=e.length;for(r=new Array(o),n=new Array(o),a=0;a<o;++a)r[a]=isNaN(n[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return\"function\"!=typeof t&&(t=a(null==t?0:+t)),o.initialize=function(t){e=t,s()},o.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:a(+t),s(),o):i},o.y=function(e){return arguments.length?(t=\"function\"==typeof e?e:a(+e),s(),o):t},o},Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-quadtree\"),t(\"d3-collection\"),t(\"d3-dispatch\"),t(\"d3-timer\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)},{\"d3-collection\":108,\"d3-dispatch\":110,\"d3-quadtree\":118,\"d3-timer\":123}],112:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";function e(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf(\"e\"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error(\"invalid format: \"+t);var e;return new o({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 o(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,r){var n=e(t,r);if(!n)return t+\"\";var i=n[0],a=n[1];return a<0?\"0.\"+new Array(-a).join(\"0\")+i:i.length>a+1?i.slice(0,a+1)+\".\"+i.slice(a+1):i+new Array(a-i.length+2).join(\"0\")}a.prototype=o.prototype,o.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 l={\"%\":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.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):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,r){var i=e(t,r);if(!i)return t+\"\";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join(\"0\"):s>0?a.slice(0,s)+\".\"+a.slice(s):\"0.\"+new Array(1-s).join(\"0\")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function u(t){return t}var c,f=Array.prototype.map,h=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?u:(e=f.call(t.grouping,Number),i=t.thousands+\"\",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?\"\":t.currency[0]+\"\",c=void 0===t.currency?\"\":t.currency[1]+\"\",p=void 0===t.decimal?\".\":t.decimal+\"\",d=void 0===t.numerals?u:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?\"%\":t.percent+\"\",v=void 0===t.minus?\"-\":t.minus+\"\",m=void 0===t.nan?\"NaN\":t.nan+\"\";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,u=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;\"n\"===w?(x=!0,w=\"g\"):l[w]||(void 0===b&&(b=12),_=!0,w=\"g\"),(f||\"0\"===e&&\"=\"===r)&&(f=!0,e=\"0\",r=\"=\");var k=\"$\"===u?s:\"#\"===u&&/[boxX]/.test(w)?\"0\"+w.toLowerCase():\"\",T=\"$\"===u?c:/[%p]/.test(w)?g:\"\",M=l[w],A=/[defgprs%]/.test(w);function S(t){var a,s,l,u=k,c=T;if(\"c\"===w)c=M(t)+c,t=\"\";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?m:M(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n<r;++n)switch(t[n]){case\".\":i=e=n;break;case\"0\":0===i&&(i=n),e=n;break;default:if(!+t[n])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&\"+\"!==i&&(g=!1),u=(g?\"(\"===i?i:v:\"-\"===i||\"(\"===i?\"\":i)+u,c=(\"s\"===w?h[8+n/3]:\"\")+c+(g&&\"(\"===i?\")\":\"\"),A)for(a=-1,s=t.length;++a<s;)if(48>(l=t.charCodeAt(a))||l>57){c=(46===l?p+t.slice(a+1):t.slice(a))+c,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=u.length+t.length+c.length,E=S<y?new Array(y-S+1).join(e):\"\";switch(x&&f&&(t=o(E+t,E.length?y-c.length:1/0),E=\"\"),r){case\"<\":t=u+t+c+E;break;case\"=\":t=u+E+t+c;break;case\"^\":t=E.slice(0,S=E.length>>1)+u+t+c+E.slice(S);break;default:t=E+u+t+c}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+\"\"},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type=\"f\",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return c=p(e),t.format=c.format,t.formatPrefix=c.formatPrefix,c}d({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=\"undefined\"!=typeof globalThis?globalThis:n||self).d3=n.d3||{})},{}],113:[function(t,e,r){var n,i;n=this,i=function(t,e,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,v=Math.tan,m=1e-6,y=1e-12,x=Math.PI,b=x/2,_=x/4,w=Math.SQRT1_2,k=L(2),T=L(x),M=2*x,A=180/x,S=x/180;function E(t){return t>1?b:t<-1?-b:Math.asin(t)}function C(t){return t>1?0:t<-1?x:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function P(t){return(s(t)-s(-t))/2}function O(t){return(s(t)+s(-t))/2}function I(t){var e=v(t/2),r=2*u(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=g(e),s=i*n,l=-((1-s?u((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*g(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),c=-t/2,f=50;if(!l)return[0,0];do{var h=c/2,p=o(h),d=g(h),v=d/p,y=-u(n(p));c-=s=(2/v*y-r*v-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>m&&--f>0);var x=g(c);return[a(e*x,l*o(c)),E(i*x/l)]},i}function D(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(C(r*o(t/=2)));return[2*r*g(t)*n,g(e)*n]}function z(t){var e=g(t),r=o(t),i=t>=0?1:-1,s=v(i*t),l=(1+e-r)/2;function u(t,n){var u=o(n),c=o(t/=2);return[(1+u)*g(t),(i*n>-a(c,s)-.001?0:10*-i)+l+g(n)*r-(1+u)*e*c]}return u.invert=function(t,u){var c=0,f=0,h=50;do{var p=o(c),d=g(c),v=o(f),y=g(f),x=1+v,b=x*d-t,_=l+y*r-x*e*p-u,w=x*p/2,k=-d*y,T=e*x*d/2,M=r*v+e*p*y,A=k*T-M*w,S=(_*k-b*M)/A/2,E=(b*T-_*w)/A;n(E)>2&&(E/=2),c-=S,f-=E}while((n(S)>m||n(E)>m)&&--h>0);return i*f>-a(o(c),s)-.001?[2*c,f]:null},u}function R(t,e){var r=v(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=g(t)*n/i,s=r/i,l=a*a,u=s*s;return[4/3*a*(3+l-3*u),4/3*s*(3+3*l-u)]}D.invert=function(t,e){if(!(t*t+4*e*e>x*x+m)){var r=t,i=e,a=25;do{var s,l=g(r),u=g(r/2),c=o(r/2),f=g(i),h=o(i),p=g(2*i),d=f*f,v=h*h,y=u*u,b=1-v*c*c,_=b?C(h*c)*L(s=1/b):s=0,w=2*_*h*u-t,k=_*f-e,T=s*(v*y+_*h*c*d),M=s*(.5*l*p-2*_*f*u),A=.25*s*(p*u-_*f*v*l),S=s*(d*c+_*y*h),E=M*A-S*T;if(!E)break;var P=(k*M-w*S)/E,O=(w*A-k*T)/E;r-=P,i-=O}while((n(P)>m||n(O)>m)&&--a>0);return[r,i]}},R.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=E(i)/3,l=i?function(t){return u(t+L(t*t-1))}(n(e/i))/3:function(t){return u(t+L(t*t+1))}(n(t))/3,c=o(s),f=O(l),h=f*f-c*c;return[2*d(t)*a(P(l)*c,.25-h),2*d(e)*a(f*g(s),.25+h)]};var F=L(8),N=u(1+k);function B(t,e){var r=n(e);return r<_?[t,u(v(_+e/2))]:[t*o(r)*(2*k-1/g(r)),d(e)*(2*k*(r-_)-u(v(r/2)))]}function j(t){var r=2*x/t;function s(t,i){var s=e.geoAzimuthalEquidistantRaw(t,i);if(n(t)>b){var l=a(s[1],s[0]),u=L(s[0]*s[0]+s[1]*s[1]),c=r*p((l-b)/r)+b,f=a(g(l-=c),2-o(l));l=c+E(x/u*g(f))-f,s[0]=u*o(l),s[1]=u*g(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>b){var l=a(n,t),u=r*p((l-b)/r)+b,c=l>u?-1:1,f=s*o(u-l),h=1/v(c*C((f-x)/L(x*(x-2*f)+s*s)));l=u+2*i((h+c*L(h*h-3))/3),t=s*o(l),n=s*g(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function U(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return V;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function V(t,e){return[t*o(e)/o(e/=2),2*g(e)]}function H(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+m))&&(o=a+m),r-=i=-1e-6*(a-e)/(a-o)}while(s-- >0&&n(i)>m);return s<0?NaN:r}function q(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=y),function(i,a,o,s){var l,u,c;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;f<e;f++){var h=t(o,s),p=h[0]-i,d=h[1]-a;if(n(p)<r&&n(d)<r)break;var g=p*p+d*d;if(g>l)o-=u/=2,s-=c/=2;else{l=g;var v=(o>0?-1:1)*r,m=(s>0?-1:1)*r,y=t(o+v,s),x=t(o,s+m),b=(y[0]-h[0])/v,_=(y[1]-h[1])/v,w=(x[0]-h[0])/m,k=(x[1]-h[1])/m,T=k*b-_*w,M=(n(T)<.5?.5:1)/T;if(o+=u=(d*w-p*k)*M,s+=c=(p*_-d*b)*M,n(u)<r&&n(c)<r)break}}return[o,s]}}function G(){var t=U(1.68,2);function e(e,r){if(e+r<-1.4){var n=(e-r+1.6)*(e+r+1.4)/8;e+=n,r-=.8*n*g(r+x/2)}var i=t(e,r),a=(1-o(e*r))/12;return i[1]<0&&(i[0]*=1+a),i[1]>0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=q(e),e}function Y(t,e){var r,i=t*g(e),a=30;do{e-=r=(e+g(e)-i)/(1+o(e))}while(n(r)>m&&--a>0);return e/2}function W(t,e,r){function n(n,i){return[t*n*o(i=Y(r,i)),e*g(i)]}return n.invert=function(n,i){return i=E(i/e),[n/(t*o(i)),E((2*i+g(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))<N)return[t,2*i(s(e))-b];var r,a,l=_,c=25;do{var f=o(l/2),h=v(l/2);l-=r=(F*(l-_)-u(h)-a)/(F-f*f/(2*h))}while(n(r)>y&&--c>0);return[t/(o(l)*(F-1/g(l))),d(e)*l]},V.invert=function(t,e){var r=2*E(e/2);return[t*o(r/2)/o(r),r]};var X=W(k/b,k,x),Z=2.00276,K=1.11072;function J(t,e){var r=Y(x,e);return[Z*t/(1/o(e)+K/o(r)),(e+k*g(r))/Z]}function $(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*S):r*A},i}function Q(t,e){return[t*o(e),e]}function tt(t){if(!t)return Q;var e=1/v(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*g(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function et(t){function e(e,r){var n=b-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,b-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=b-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/t,b-o]},e}J.invert=function(t,e){var r,i,a=Z*e,s=e<0?-_:_,l=25;do{i=a-k*g(s),s-=r=(g(2*s)+2*s-x*g(i))/(2*o(2*s)+2+x*o(i)*k*o(s))}while(n(r)>m&&--l>0);return i=a-k*g(s),[t*(1/o(i)+K/o(s))/Z,i]},Q.invert=function(t,e){return[t/o(e),e]};var rt=W(1,4/x,x);function nt(t,e,r,i,s,l){var u,c=o(l);if(n(t)>1||n(l)>1)u=C(r*s+e*i*c);else{var f=g(t/2),h=g(l/2);u=2*E(L(f*f+e*i*h*h))}return n(u)>m?[u,a(i*g(l),e*s-r*i*c)]:[0,0]}function it(t,e,r){return C((t*t+e*e-r*r)/(2*t*e))}function at(t){return t-2*x*l((t+x)/(2*x))}function ot(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),o(t[1])],[e[0],e[1],g(e[1]),o(e[1])],[r[0],r[1],g(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=nt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=it(i[0].v[0],i[2].v[0],i[1].v[0]),u=it(i[0].v[0],i[1].v[0],i[2].v[0]),c=x-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=nt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=at(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=it(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=u-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*g(d)):(d=c-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*g(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function st(t){return t[0]*=S,t[1]*=S,t}function lt(t,r,n){var i=e.geoCentroid({type:\"MultiPoint\",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=ot(st(o(t)),st(o(r)),st(o(n)));s.invert=q(s);var l=e.geoProjection(s).rotate(a),u=l.center;return delete l.rotate,l.center=function(t){return arguments.length?u(o(t)):o.invert(u())},l.clipAngle(90)}function ut(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=v(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,E(t?e*v(t)/t:e)]},r}ut.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(x/r)/2:0,E(1-r)]};var ft=L(3);function ht(t,e){return[ft*t*(2*o(2*e/3)-1)/T,ft*T*g(e/3)]}function pt(t){var e=o(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,E(r*e)]},r}function dt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*v(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function gt(t,e){var r=L(8/(3*x));return[r*t*(1-n(e)/x),r*e]}function vt(t,e){var r=L(4-3*g(n(e)));return[2/L(6*x)*t*r,d(e)*L(2*x/3)*(2-r)]}function mt(t,e){var r=L(x*(4+x));return[2/r*t*(1+L(1-4*e*e/(x*x))),4/r*e]}function yt(t,e){var r=(2+b)*g(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>m;i++){var s=o(e);e-=a=(e+g(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(x*(4+x))*t*(1+o(e)),2*L(x/(4+x))*g(e)]}function xt(t,e){return[t*(1+o(e))/L(2+x),2*e/L(2+x)]}function bt(t,e){for(var r=(1+b)*g(e),i=0,a=1/0;i<10&&n(a)>m;i++)e-=a=(e+g(e)-r)/(1+o(e));return r=L(2+x),[t*(1+o(e))/r,2*e/r]}ht.invert=function(t,e){var r=3*E(e/(ft*T));return[T*t/(ft*(2*o(2*r/3)-1)),r]},gt.invert=function(t,e){var r=L(8/(3*x)),i=e/r;return[t/(r*(1-n(i)/x)),i]},vt.invert=function(t,e){var r=2-n(e)/L(2*x/3);return[t*L(6*x)/(2*r),d(e)*E((4-r*r)/3)]},mt.invert=function(t,e){var r=L(x*(4+x))/2;return[t*r/(1+L(1-e*e*(4+x)/(4*x))),e*r/2]},yt.invert=function(t,e){var r=e*L((4+x)/x)/2,n=E(r),i=o(n);return[t/(2/L(x*(4+x))*(1+i)),E((n+r*(i+2))/(2+b))]},xt.invert=function(t,e){var r=L(2+x),n=e*r/2;return[r*t/(1+o(n)),n]},bt.invert=function(t,e){var r=1+b,n=L(r/2);return[2*t*n/(1+o(e*=n)),E((e+g(e))/r)]};var _t=3+2*k;function wt(t,e){var r=g(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=g(e)/(s+k*n*a),c=L(2/(1+l*l)),f=L((k*s+(n+r)*a)/(k*s+(n-r)*a));return[_t*(c*(f-1/f)-2*u(f)),_t*(c*l*(f+1/f)-2*i(l))]}wt.invert=function(t,e){if(!(r=R.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=_t,e/=_t;do{var h=a/2,p=s/2,d=g(h),v=o(h),y=g(p),x=o(p),_=o(s),T=L(_),M=y/(x+k*v*T),A=M*M,S=L(2/(1+A)),E=(k*x+(v+d)*T)/(k*x+(v-d)*T),C=L(E),P=C-1/C,O=C+1/C,I=S*P-2*u(C)-t,D=S*M*O-2*i(M)-e,z=y&&w*T*d*A/y,F=(k*v*x+T)/(2*(x+k*v*T)*(x+k*v*T)*T),N=-.5*M*S*S*S,B=N*z,j=N*F,U=(U=2*x+k*T*(v-d))*U*C,V=(k*v*x*T+_)/U,H=-k*d*y/(T*U),q=P*B-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=M*O*B-2*z/(1+A)+S*O*z+S*M*(V-V/E),W=M*O*j-2*F/(1+A)+S*O*F+S*M*(H-H/E),X=G*Y-W*q;if(!X)break;var Z=(D*G-I*W)/X,K=(I*Y-D*q)/X;a-=Z,s=c(-b,f(b,s-K))}while((n(Z)>m||n(K)>m)&&--l>0);return n(n(s)-b)<m?[0,s]:l&&[a,s]};var kt=o(35*S);function Tt(t,e){var r=v(e/2);return[t*kt*L(1-r*r),(1+kt)*r]}function Mt(t,e){var r=e/2,n=o(r);return[2*t/T*o(e)*n*n,T*v(r)]}function At(t){var e=1-t,r=i(x,0)[0]-i(-x,0)[0],n=L(2*(i(0,b)[1]-i(0,-b)[1])/r);function i(r,n){var i=o(n),a=g(n);return[i/(e+t*i)*r,e*n+t*a]}function a(t,e){var r=i(t,e);return[r[0]*n,r[1]/n]}function s(t){return a(0,t)[1]}return a.invert=function(r,i){var a=H(s,i);return[r/n*(t+e/o(a)),a]},a}function St(t){return[t[0]/2,E(v(t[1]/2*S))*A]}function Et(t){return[2*t[0],2*i(g(t[1]*S))*A]}function Ct(t,r){var i=2*x/r,s=t*t;function l(r,l){var u=e.geoAzimuthalEquidistantRaw(r,l),c=u[0],f=u[1],h=c*c+f*f;if(h>s){var d=L(h),v=a(f,c),y=i*p(v/i),_=v-y,w=t*o(_),k=(t*g(_)-_*g(w))/(b-w),T=Lt(_,k),M=(x-t)/Pt(T,w,x);c=d;var A,S=50;do{c-=A=(t+Pt(T,w,c)*M-d)/(T(c)*M)}while(n(A)>m&&--S>0);f=_*g(c),c<b&&(f-=k*(c-b));var E=g(y),C=o(y);u[0]=c*C-f*E,u[1]=c*E+f*C}return u}return l.invert=function(r,l){var u=r*r+l*l;if(u>s){var c=L(u),f=a(l,r),h=i*p(f/i),d=f-h;r=c*o(d),l=c*g(d);for(var v=r-b,m=g(r),_=l/m,w=r<b?1/0:0,k=10;;){var T=t*g(_),M=t*o(_),A=g(M),S=b-M,E=(T-_*A)/S,C=Lt(_,E);if(n(w)<y||!--k)break;_-=w=(_*m-E*v-l)/(m-2*v*(S*(M+_*T*o(M)-A)-T*(T-_*A))/(S*S))}r=(c=t+Pt(C,M,r)*(x-t)/Pt(C,M,x))*o(f=h+_),l=c*g(f)}return e.geoAzimuthalEquidistantRaw.invert(r,l)},l}function Lt(t,e){return function(r){var n=t*o(r);return r<b&&(n-=e),L(1+n*n)}}function Pt(t,e,r){for(var n=(r-e)/50,i=t(e)+t(r),a=1,o=e;a<50;++a)i+=2*t(o+=n);return.5*i*n}function Ot(t,e,r,i,a,s,l,u){function c(n,c){if(!c)return[t*n/x,0];var f=c*c,h=t+f*(e+f*(r+f*i)),p=c*(a-1+f*(s-u+f*l)),d=(h*h+p*p)/(2*p),v=n*E(h/d)/x;return[d*g(v),c*(1+f*u)+d*(1-o(v))]}return arguments.length<8&&(u=0),c.invert=function(c,f){var h,p,d=x*c/t,v=f,y=50;do{var b=v*v,_=t+b*(e+b*(r+b*i)),w=v*(a-1+b*(s-u+b*l)),k=_*_+w*w,T=2*w,M=k/T,A=M*M,S=E(_/M)/x,C=d*S,P=_*_,O=(2*e+b*(4*r+6*b*i))*v,I=a+b*(3*s+5*b*l),D=(2*(_*O+w*(I-1))*T-k*(2*(I-1)))/(T*T),z=o(C),R=g(C),F=M*z,N=M*R,B=d/x*(1/L(1-P/A))*(O*M-_*D)/A,j=N-c,U=v*(1+b*u)+M-F-f,V=D*R+F*B,H=F*S,q=1+D-(D*z-N*B),G=N*S,Y=V*G-q*H;if(!Y)break;d-=h=(U*V-j*q)/Y,v-=p=(j*G-U*H)/Y}while((n(h)>m||n(p)>m)&&--y>0);return[d,v]},c}Tt.invert=function(t,e){var r=e/(1+kt);return[t&&t/(kt*L(1-r*r)),2*i(r)]},Mt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Ot(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),Dt=Ot(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),zt=Ot(5/6*x,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Rt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Rt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>m&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>m&&--o>0);return[i,a]};var Ft=Ot(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Nt(t){var e=t(b,0)[0]-t(-b,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*x,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*x;return o<-x?o+=2*x:o>x&&(o-=2*x),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,u=g(t)*s,c=g(i*e);t=n(a(u,c)),e=E(l),n(t-b)>m&&(t%=b);var f=function(t,e){if(e===b)return[0,0];var r,i,a=g(e),s=a*a,l=s*s,u=1+l,c=1+3*l,f=1-l,h=E(1/L(u)),p=f+s*u*h,d=(1-a)/p,v=L(d),y=d*u,_=L(y),w=v*f;if(0===t)return[0,-(w+s*_)];var k,T=o(e),M=1/T,A=2*a*T,S=(-p*T-(-3*s+h*c)*A*(1-a))/(p*p),C=-M*A,P=-M*(s*u*S+d*c*A),O=-2*M*(f*(.5*S/v)-2*s*v*A),I=4*t/x;if(t>.222*x||e<x/4&&t>.175*x){if(r=(w+s*L(y*(1+l)-w*w))/(1+l),t>x/4)return[r,r];var D=r,z=.5*r;r=.5*(z+D),i=50;do{var R=r*(O+C*L(y-r*r))+P*E(r/_)-I;if(!R)break;R<0?z=r:D=r,r=.5*(z+D)}while(n(D-z)>m&&--i>0)}else{r=m,i=25;do{var F=r*r,N=L(y-F),B=O+C*N,j=r*B+P*E(r/_)-I;r-=k=N?j/(B+(P-C*F)/N):0}while(n(k)>m&&--i>0)}return[r,-w-s*L(y-r*r)]}(t>x/4?b-t:t,e);return t>x/4&&(c=f[0],f[0]=-f[1],f[1]=-c),f[0]*=r,f[1]*=-i,f}function jt(t,e){var r,a,l,u,c,f;if(e<m)return[(u=g(t))-(r=e*(t-u*(a=o(t)))/4)*a,a+r*u,1-e*u*u/2,t-r];if(e>=.999999)return r=(1-e)/4,l=1/(a=O(t)),[(f=t,(u=((f=s(2*f))-1)/(f+1))+r*((c=a*P(t))-t)/(a*a)),l-r*u*l*(c-t),l+r*u*l*(c+t),2*i(s(t))-b+r*(c-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),c=1;n(p[d]/h[d])>m&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),c*=2;l=c*h[d]*t;do{l=(E(u=p[d]*g(a=l)/h[d])+l)/2}while(--d);return[g(l),u=o(l),u/o(l-a),l]}function Ut(t,e){if(!e)return t;if(1===e)return u(v(t/2+_));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>m;s++){if(t%x){var l=i(a*v(t)/r);l<0&&(l+=x),t+=l+~~(t/x)*x}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Vt(t,e){var r=(k-1)/(k+1),l=L(1-r*r),c=Ut(b,l*l),f=u(v(x/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?b:-b)-a(i,2*t)),-.25*u(i*i+4*r)+.5*u(n*n+r)]}(h*o(-1*t),h*g(-1*t)),m=function(t,e,r){var a=n(t),o=P(n(e));if(a){var s=1/g(a),l=1/(v(a)*v(a)),u=-(l+r*(o*o*s*s)-1+r),c=(-u+L(u*u-(r-1)*l*4))/2;return[Ut(i(1/L(c)),r)*d(t),Ut(i(L((c/l-1)/r)),1-r)*d(e)]}return[0,Ut(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-m[1],(e>=0?1:-1)*(.5*c-m[0])]}function Ht(t){var e=g(t),r=o(t),i=qt(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=g(a),u=o(a),c=o(t),f=C(e*l+r*u*c),h=g(f),p=n(h)>m?f/h:1;return[p*r*g(t),(n(t)>b?p:-p)*(e*u-r*l*c)]}return i.invert=qt(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-g(n),l=o(n),u=n*l,c=-r*s,f=n*e,h=L(u*u+c*c-f*f),p=a(u*f+c*h,c*f-u*h),d=(n>b?-1:1)*a(t*s,n*o(p)*l+r*g(p)*s);return i.invert(d,p)},s}function qt(t){var e=g(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=g(t)*i,u=g(n);return[a(l,s*r-u*e),E(u*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,u=l/s<1,c=function(t,e){for(var r=0,i=1,a=.5,s=50;;){var l=a*a,u=L(a),c=E(1/L(1+l)),f=1-l+a*(1+l)*c,h=(1-u)/f,p=L(h),d=h*(1+l),g=p*(1-l),v=L(d-t*t),m=e+g+a*v;if(n(i-r)<y||0==--s||0===m)break;m>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var b=E(u),_=o(b),w=1/_,k=2*u*_,T=(-f*_-(-3*a+c*(1+3*l))*k*(1-u))/(f*f);return[x/4*(t*(-2*w*(.5*T/p*(1-l)-2*a*p*k)+-w*k*v)+-w*(a*(1+l)*T+h*(1+3*l)*k)*E(t/L(d))),b]}(u?l:s,u?s:l),f=c[0],h=c[1],p=o(h);return u&&(f=-b-f),[r*(a(g(f)*p,-g(h))+x),i*E(o(f)*p)]},Vt.invert=function(t,e){var r,n,o,l,c,f,h=(k-1)/(k+1),p=L(1-h*h),d=(r=.5*Ut(b,p*p)-e,n=-t,o=p*p,r?(l=jt(r,o),n?(f=(c=jt(n,1-o))[1]*c[1]+o*l[0]*l[0]*c[0]*c[0],[[l[0]*c[2]/f,l[1]*l[2]*c[0]*c[1]/f],[l[1]*c[1]/f,-l[0]*l[2]*c[0]*c[2]/f],[l[2]*c[1]*c[2]/f,-o*l[0]*l[1]*c[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(c=jt(n,1-o))[0]/c[1]],[1/c[1],0],[c[2]/c[1],0]]),g=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(d[0],d[1]);return[a(g[1],g[0])/-1,2*i(s(-.5*u(h*g[0]*g[0]+h*g[1]*g[1])))-b]};var Gt=E(1-1/3)*A,Yt=pt(0);function Wt(t){var e=Gt*S,r=ut(x,e)[0]-ut(-x,e)[0],i=Yt(0,e)[1],a=ut(0,e)[1],o=T-a,s=M/t,u=4/M,h=i+o*o*4/M;function p(p,d){var g,v=n(d);if(v>e){var m=f(t-1,c(0,l((p+x)/s)));(g=ut(p+=x*(t-1)/t-m*s,v))[0]=g[0]*M/r-M*(t-1)/(2*t)+m*M/t,g[1]=i+4*(g[1]-a)*o/M,d<0&&(g[1]=-g[1])}else g=Yt(p,d);return g[0]*=u,g[1]/=h,g}return p.invert=function(e,p){e/=u;var d=n(p*=h);if(d>i){var g=f(t-1,c(0,l((e+x)/s)));e=(e+x*(t-1)/t-g*s)*r/M;var v=ut.invert(e,.25*(d-i)*M/o+a);return v[0]-=x*(t-1)/t-g*s,p<0&&(v[1]=-v[1]),v}return Yt.invert(e,p)},p}function Xt(t,e){return[t,1&e?89.999999:Gt]}function Zt(t,e){return[t,1&e?-89.999999:-Gt]}function Kt(t){return[.999999*t[0],t[1]]}function Jt(t){var e,r=1+t,i=E(g(1/r)),s=2*L(x/(e=x+4*i*r)),l=.5*s*(r+L(t*(2+t))),u=t*t,c=r*r;function f(f,h){var p,d,v=1-g(h);if(v&&v<2){var m,_=b-h,w=25;do{var k=g(_),T=o(_),M=i+a(k,r-T),A=1+c-2*r*T;_-=m=(_-u*i-r*k+A*M-.5*v*e)/(2*r*k*M)}while(n(m)>y&&--w>0);p=s*L(A),d=f*M/x}else p=s*(t+v),d=f*i/x;return[p*g(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+c-o/(s*s))/(2*r),h=C(f),p=g(h),d=i+a(p,r-f);return[E(t/L(o))*x/d,E(1-2*(h-u*i-r*p+(1+c-2*r*f)*d)/e)]},f}var $t=.7109889596207567,Qt=.0528035274542;function te(t,e){return e>-$t?((t=X(t,e))[1]+=Qt,t):Q(t,e)}function ee(t,e){return n(e)>$t?((t=X(t,e))[1]-=e>0?Qt:-Qt,t):Q(t,e)}function re(t,e,r,n){var i=L(4*x/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*u(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function u(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function c(t){return l(t)*g(t)}var f=function(t,e){var n=r*H(u,s*g(e)/r,e/x);isNaN(n)&&(n=r*d(e));var c=i*l(n);return[c*a*t/x*o(n),c/a*g(n)]};return f.invert=function(t,e){var n=H(c,e*a/i);return[t*x/(o(n)*i*a*l(n)),E(r*u(n/r)/s)]},0===r&&(i=L(n/x),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,E(e*i)]}),f}function ne(t,e,r,n,i,a,o,s,l,u,c){if(c.nanEncountered)return NaN;var f,h,p,d,g,v,m,y,x,b;if(h=t(e+.25*(f=r-e)),p=t(r-.25*f),isNaN(h))c.nanEncountered=!0;else{if(!isNaN(p))return b=((v=(d=f*(n+4*h+i)/12)+(g=f*(i+4*p+a)/12))-o)/15,u>l?(c.maxDepthCount++,v+b):Math.abs(b)<s?v+b:(y=ne(t,e,m=e+.5*f,n,h,i,d,.5*s,l,u+1,c),isNaN(y)?(c.nanEncountered=!0,NaN):(x=ne(t,m,r,i,p,a,g,.5*s,l,u+1,c),isNaN(x)?(c.nanEncountered=!0,NaN):y+x));c.nanEncountered=!0}}function ie(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return ne(t,e,r,a,o,s,(a+4*o+s)*(r-e)/6,n,i,1,{maxDepthCount:0,nanEncountered:!1})}function ae(t,e,r){function i(r){return t+(1-t)*h(1-h(r,e),1/e)}function a(t){return ie(i,0,t,1e-4)}for(var o=1/a(1),s=1e3,l=(1+1e-8)*o,u=[],c=0;c<=s;c++)u.push(a(c/s)*l);function f(t){var e=0,r=s,n=500;do{u[n]>t?r=n:e=n,n=e+r>>1}while(n>e);var i=u[n+1]-u[n];return i&&(i=(t-u[n+1])/i),(n+1+i)/s}var p=2*f(1)/x*o/r,v=function(t,e){var r=f(n(g(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return v.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*E(a(n(e))*o)),[t/i(n(e)),r]},v}function oe(t,e){return n(t[0]-e[0])<m&&n(t[1]-e[1])<m}function se(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++a<o;){n=((r=t[a])[0]-s[0])/e,i=(r[1]-s[1])/e;for(var u=0;u<e;++u)l.push([s[0]+u*n,s[1]+u*i]);s=r}return l.push(r),l}function le(t){var e,n,i,a,o,s,l,u=[],c=t[0].length;for(l=0;l<c;++l)n=(e=t[0][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],u.push(se([[n+m,i+m],[n+m,a-m],[o-m,a-m],[o-m,s+m]],30));for(l=t[1].length-1;l>=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],u.push(se([[o-m,s-m],[o-m,a+m],[n+m,a+m],[n+m,i-m]],30));return{type:\"Polygon\",coordinates:[r.merge(u)]}}function ue(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;o<s&&e>a[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,u=i.length;l<u;++l){var c=i[l];if(c[0][0]<=e&&e<c[1][0]&&c[0][1]<=n&&n<c[1][1]){var f=t.invert(e-t(s[l][1][0],0)[0],n);return f[0]+=s[l][1][0],oe(o(f[0],f[1]),[e,n])?f:null}}});var s=e.geoProjection(o),l=s.stream;return s.stream=function(t){var r=s.rotate(),n=l(t),a=(s.rotate([0,0]),l(t));return s.rotate(r),n.sphere=function(){e.geoStream(i,a)},n},s.lobes=function(e){return arguments.length?(i=le(e),r=e.map((function(t){return t.map((function(t){return[[t[0][0]*S,t[0][1]*S],[t[1][0]*S,t[1][1]*S],[t[2][0]*S,t[2][1]*S]]}))})),a=r.map((function(e){return e.map((function(e){var r,n=t(e[0][0],e[0][1])[0],i=t(e[2][0],e[2][1])[0],a=t(e[1][0],e[0][1])[1],o=t(e[1][0],e[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}te.invert=function(t,e){return e>-$t?X.invert(t,e-Qt):Q.invert(t,e)},ee.invert=function(t,e){return n(e)>$t?X.invert(t,e+(e>0?Qt:-Qt)):Q.invert(t,e)};var ce=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],fe=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],he=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],pe=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],de=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],ge=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function ve(t,e){return[3/M*t*L(x*x/3-e*e),e]}function me(t){function e(e,r){if(n(n(r)-b)<m)return[0,r<0?-2:2];var i=g(r),a=h((1+i)/(1-i),t/2),s=.5*(a+1/a)+o(e*=t);return[2*g(e)/s,(a-1/a)/s]}return e.invert=function(e,r){var i=n(r);if(n(i-2)<m)return e?null:[0,d(r)*b];if(i>2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,E((l-1)/(l+1))]},e}ve.invert=function(t,e){return[M/3*t/L(x*x/3-e*e),e]};var ye=x/k;function xe(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function be(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function _e(t,e){return[g(t)/o(e),v(e)*o(t)]}function we(t){var e=o(t),r=v(_+t/2);function i(i,a){var o=a-t,s=n(o)<m?i*e:n(s=_+a/2)<m||n(n(s)-b)<m?0:i*o/u(v(s)/r);return[s,o]}return i.invert=function(i,a){var o,s=a+t;return[n(a)<m?i/e:n(o=_+s/2)<m||n(n(o)-b)<m?0:i*u(v(o)/r)/a,s]},i}function ke(t,e){return[t,1.25*u(v(_+.4*e))]}function Te(t){var e=t.length-1;function r(r,n){for(var i,a=o(n),s=2/(1+a*o(r)),l=s*a*g(r),u=s*g(n),c=e,f=t[c],h=f[0],p=f[1];--c>=0;)h=(f=t[c])[0]+l*(i=h)-u*p,p=f[1]+l*p+u*i;return[h=l*(i=h)-u*p,p=l*p+u*i]}return r.invert=function(r,s){var l=20,u=r,c=s;do{for(var f,h=e,p=t[h],d=p[0],v=p[1],m=0,y=0;--h>=0;)m=d+u*(f=m)-c*y,y=v+u*y+c*f,d=(p=t[h])[0]+u*(f=d)-c*v,v=p[1]+u*v+c*f;var x,b,_=(m=d+u*(f=m)-c*y)*m+(y=v+u*y+c*f)*y;u-=x=((d=u*(f=d)-c*v-r)*m+(v=u*v+c*f-s)*y)/_,c-=b=(v*m-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(u*u+c*c),k=2*i(.5*w),T=g(k);return[a(u*T,w*o(k)),w?E(c*T/w):0]}},r}xe.invert=function(t,e){var r=n(t),i=n(e),a=m,s=b;i<ye?s*=i/ye:a+=6*C(ye/i);for(var l=0;l<25;l++){var u=g(s),c=L(o(s)),f=g(s/2),h=o(s/2),p=g(a/6),d=o(a/6),v=.5*a*(1+c)-r,y=s/(h*d)-i,x=c?-.25*a*u/c:0,_=.5*(1+c),w=(1+.5*s*f/h)/(h*d),k=s/h*(p/6)/(d*d),T=x*k-w*_,M=(v*k-y*_)/T,A=(y*x-v*w)/T;if(s-=M,a-=A,n(M)<m&&n(A)<m)break}return[t<0?-a:a,e<0?-s:s]},be.invert=function(t,e){var r=d(t)*x,i=e/2,a=50;do{var o=r*r,s=i*i,l=r*i,u=r*(.975534+s*(-.0143059*o-.119161+-.0547009*s))-t,c=i*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-e,f=.975534-s*(.119161+3*o*.0143059+.0547009*s),h=-l*(.238322+.2188036*s+.0286118*o),p=l*(.1605788+7961e-7*o+-.0571*s),g=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),v=h*p-g*f,y=(c*h-u*g)/v,b=(u*p-c*f)/v;r-=y,i-=b}while((n(y)>m||n(b)>m)&&--a>0);return a&&[r,i]},_e.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?w*L((i-L(i*i-4*r))/r):1/L(n);return[E(t*a),d(e)*C(a)]},ke.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*x]};var Me=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Ae=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Se=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ee=[[.9245,0],[0,0],[.01943,0]],Ce=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Le(t,r){var n=e.geoProjection(Te(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Pe=L(6),Oe=L(7);function Ie(t,e){var r=E(7*g(e)/(3*Pe));return[Pe*t*(2*o(2*r/3)-1)/Oe,9*g(r/3)/Oe]}function De(t,e){for(var r,i=(1+w)*g(e),a=e,s=0;s<25&&(a-=r=(g(a/2)+g(a)-i)/(.5*o(a/2)+o(a)),!(n(r)<m));s++);return[t*(1+2*o(a)/o(a/2))/(3*k),2*L(3)*g(a/2)/L(2+k)]}function ze(t,e){for(var r,i=L(6/(4+x)),a=(1+x/4)*g(e),s=e/2,l=0;l<25&&(s-=r=(s/2+g(s)-a)/(.5+o(s)),!(n(r)<m));l++);return[i*(.5+o(s))*t/1.5,i*s]}function Re(t,e){var r=e*e,n=r*r,i=r*n;return[t*(.84719-.13063*r+i*i*(.05494*r-.04515-.02326*n+.00331*i)),e*(1.01183+n*n*(.01926*r-.02625-.00396*n))]}function Fe(t,e){return[t*(1+o(e))/2,2*(e-v(e/2))]}Ie.invert=function(t,e){var r=3*E(e*Oe/9);return[t*Oe/(Pe*(2*o(2*r/3)-1)),E(3*g(r)*Pe/7)]},De.invert=function(t,e){var r=e*L(2+k)/(2*L(3)),n=2*E(r);return[3*k*t/(1+2*o(n)/o(n/2)),E((r+g(n))/(1+w))]},ze.invert=function(t,e){var r=L(6/(4+x)),i=e/r;return n(n(i)-b)<m&&(i=i<0?-b:b),[1.5*t/(r*(.5+o(i))),E((i/2+g(i))/(1+x/4))]},Re.invert=function(t,e){var r,i,a,o,s=e,l=25;do{s-=r=(s*(1.01183+(a=(i=s*s)*i)*a*(.01926*i-.02625-.00396*a))-e)/(1.01183+a*a*(.21186*i-.23625+-.05148*a))}while(n(r)>y&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Fe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>m;++i){var s=o(e/2);e-=a=(e-v(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var Ne=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Be(t,e){var r=g(e),i=o(e),a=d(t);if(0===t||n(e)===b)return[0,e];if(0===e)return[t,0];if(n(t)===b)return[t*i,b*r];var s=x/(2*t)-2*t/x,l=2*e/x,u=(1-l*l)/(r-l),c=s*s,f=u*u,h=1+c/f,p=1+f/c,v=(s*r/u-s/2)/h,m=(f*r/c+u/2)/p,y=m*m-(f*r*r/c+u*r-1)/p;return[b*(v+L(v*v+i*i/h)*a),b*(m+L(y<0?0:y)*d(-e*s)*a)]}Be.invert=function(t,e){var r=(t/=b)*t,n=r+(e/=b)*e,i=x*x;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*b:0,H((function(t){return n*(x*g(t)-2*t)*x+4*t*t*(e-g(t))+2*x*t-i*e}),0)]};var je=1.0148,Ue=.23185,Ve=-.14499,He=.02406,qe=1.790857183;function Ge(t,e){var r=e*e;return[t,e*(je+r*r*(Ue+r*(Ve+He*r)))]}function Ye(t,e){if(n(e)<m)return[t,0];var r=v(e),i=t*g(e);return[g(i)/r,e+(1-o(i))/r]}function We(t,e){var r=Ke(t[1],t[0]),n=Ke(e[1],e[0]),i=function(t,e){return a(t[0]*e[1]-t[1]*e[0],t[0]*e[0]+t[1]*e[1])}(r,n),s=Je(r)/Je(n);return Ze([1,0,t[0][0],0,1,t[0][1]],Ze([s,0,0,0,s,0],Ze([o(i),g(i),0,-g(i),o(i),0],[1,0,-e[0][0],0,1,-e[0][1]])))}function Xe(t){var e=1/(t[0]*t[4]-t[1]*t[3]);return[e*t[4],-e*t[1],e*(t[1]*t[5]-t[2]*t[4]),-e*t[3],e*t[0],e*(t[2]*t[3]-t[0]*t[5])]}function Ze(t,e){return[t[0]*e[0]+t[1]*e[3],t[0]*e[1]+t[1]*e[4],t[0]*e[2]+t[1]*e[5]+t[2],t[3]*e[0]+t[4]*e[3],t[3]*e[1]+t[4]*e[4],t[3]*e[2]+t[4]*e[5]+t[5]]}function Ke(t,e){return[t[0]-e[0],t[1]-e[1]]}function Je(t){return L(t[0]*t[0]+t[1]*t[1])}function $e(t,r,n){function i(t,e){var n,i=r(t,e),a=i.project([t*A,e*A]);return(n=i.transform)?[n[0]*a[0]+n[1]*a[1]+n[2],-(n[3]*a[0]+n[4]*a[1]+n[5])]:(a[1]=-a[1],a)}function a(t,e){var n=t.project.invert,i=t.transform,o=e;if(i&&(o=[(i=Xe(i))[0]*o[0]+i[1]*o[1]+i[2],i[3]*o[0]+i[4]*o[1]+i[5]]),n&&t===function(t){return r(t[0]*S,t[1]*S)}(s=n(o)))return s;for(var s,l=t.children,u=0,c=l&&l.length;u<c;++u)if(s=a(l[u],e))return s}(function t(e,r){if(e.edges=function(t){for(var e=t.length,r=[],n=t[e-1],i=0;i<e;++i)r.push([n,n=t[i]]);return r}(e.face),r.face){var n=e.shared=function(t,e){for(var r,n,i=t.length,a=null,o=0;o<i;++o){r=t[o];for(var s=e.length;--s>=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=We(n.map(r.project),n.map(e.project));e.transform=r.transform?Ze(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o<s;++o)tr(n[0],a[o][1])&&tr(n[1],a[o][0])&&(a[o]=e),tr(n[0],a[o][0])&&tr(n[1],a[o][1])&&(a[o]=e);for(o=0,s=(a=e.edges).length;o<s;++o)tr(n[0],a[o][0])&&tr(n[1],a[o][1])&&(a[o]=r),tr(n[0],a[o][1])&&tr(n[1],a[o][0])&&(a[o]=r)}else e.transform=r.transform;return e.children&&e.children.forEach((function(r){t(r,e)})),e})(t,{transform:null}),er(t)&&(i.invert=function(e,r){var n=a(t,[e,-r]);return n&&(n[0]*=S,n[1]*=S,n)});var o=e.geoProjection(i),s=o.stream;return o.stream=function(e){var r=o.rotate(),n=s(e),i=(o.rotate([0,0]),s(e));return o.rotate(r),n.sphere=function(){i.polygonStart(),i.lineStart(),Qe(i,t),i.lineEnd(),i.polygonEnd()},n},o.angle(null==n?-30:n*A)}function Qe(t,r,i){var a,o,s=r.edges,l=s.length,u={type:\"MultiPoint\",coordinates:r.face},c=r.face.filter((function(t){return 90!==n(t[1])})),f=e.geoBounds({type:\"MultiPoint\",coordinates:c}),h=!1,p=-1,d=f[1][0]-f[0][0],g=180===d||360===d?[(f[0][0]+f[1][0])/2,(f[0][1]+f[1][1])/2]:e.geoCentroid(u);if(i)for(;++p<l&&s[p]!==i;);++p;for(var v=0;v<l;++v)o=s[(v+p)%l],Array.isArray(o)?(h||(t.point((a=e.geoInterpolate(o[0],g)(m))[0],a[1]),h=!0),t.point((a=e.geoInterpolate(o[1],g)(m))[0],a[1])):(h=!1,o!==i&&Qe(t,o,r))}function tr(t,e){return t&&e&&t[0]===e[0]&&t[1]===e[1]}function er(t){return t.project.invert||t.children&&t.children.some(er)}Ge.invert=function(t,e){e>qe?e=qe:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(je+a*a*(Ue+a*(Ve+He*a)))-e)/(1.0148+a*a*(1.1592500000000001+a*(.21654*a-1.01493)))}while(n(r)>m);return[t,i]},Ye.invert=function(t,e){if(n(e)<m)return[t,0];var r,i=t*t+e*e,a=.5*e,s=10;do{var l=v(a),u=1/o(a),c=i-2*e*a+a*a;a-=r=(l*c+2*(a-e))/(2+c*u*u+2*(a-e)*l)}while(n(r)>m&&--s>0);return l=v(a),[(n(e)<n(a+1/l)?E(t*l):d(e)*d(t)*(C(n(t*l))+b))/g(a),a]};var rr=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],nr=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map((function(t){return t.map((function(t){return rr[t]}))})),ir=2/L(3);function ar(t,e){var r=ut(t,e);return[r[0]*ir,r[1]]}function or(t,e){for(var r=0,n=t.length,i=0;r<n;++r)i+=t[r]*e[r];return i}function sr(t){return[a(t[1],t[0])*A,E(c(-1,f(1,t[2])))*A]}function lr(t){var e=t[0]*S,r=t[1]*S,n=o(r);return[n*o(e),n*g(e),g(r)]}function ur(){}function cr(t,e){return{type:\"FeatureCollection\",features:t.features.map((function(t){return fr(t,e)}))}}function fr(t,e){return{type:\"Feature\",id:t.id,properties:t.properties,geometry:hr(t.geometry,e)}}function hr(t,r){if(!t)return null;if(\"GeometryCollection\"===t.type)return function(t,e){return{type:\"GeometryCollection\",geometries:t.geometries.map((function(t){return hr(t,e)}))}}(t,r);var n;switch(t.type){case\"Point\":case\"MultiPoint\":n=gr;break;case\"LineString\":case\"MultiLineString\":n=vr;break;case\"Polygon\":case\"MultiPolygon\":case\"Sphere\":n=mr;break;default:return null}return e.geoStream(t,r(n)),n.result()}ar.invert=function(t,e){return ut.invert(t/ir,e)};var pr=[],dr=[],gr={point:function(t,e){pr.push([t,e])},result:function(){var t=pr.length?pr.length<2?{type:\"Point\",coordinates:pr[0]}:{type:\"MultiPoint\",coordinates:pr}:null;return pr=[],t}},vr={lineStart:ur,point:function(t,e){pr.push([t,e])},lineEnd:function(){pr.length&&(dr.push(pr),pr=[])},result:function(){var t=dr.length?dr.length<2?{type:\"LineString\",coordinates:dr[0]}:{type:\"MultiLineString\",coordinates:dr}:null;return dr=[],t}},mr={polygonStart:ur,lineStart:ur,point:function(t,e){pr.push([t,e])},lineEnd:function(){var t=pr.length;if(t){do{pr.push(pr[0].slice())}while(++t<4);dr.push(pr),pr=[]}},polygonEnd:ur,result:function(){if(!dr.length)return null;var t=[],e=[];return dr.forEach((function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++r<e;)n+=t[r-1][1]*t[r][0]-t[r-1][0]*t[r][1];return n<=0}(r)?e.push(r):t.push([r])})),e.forEach((function(e){var r=e[0];t.some((function(t){if(function(t,e){for(var r=e[0],n=e[1],i=!1,a=0,o=t.length,s=o-1;a<o;s=a++){var l=t[a],u=l[0],c=l[1],f=t[s],h=f[0],p=f[1];c>n^p>n&&r<(h-u)*(n-c)/(p-c)+u&&(i=!i)}return i}(t[0],r))return t.push(e),!0}))||t.push([e])})),dr=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}};function yr(t){var r=t(b,0)[0]-t(-b,0)[0];function i(e,i){var a=n(e)<b,o=t(a?e:e>0?e-x:e+x,i),s=(o[0]-o[1])*w,l=(o[0]+o[1])*w;if(a)return[s,l];var u=r*w,c=s>0^l>0?-1:1;return[c*s-d(l)*u,c*l-d(s)*u]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*w,o=(i-e)*w,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*w,u=a>0^o>0?-1:1,c=-u*e+(o>0?1:-1)*l,f=-u*i+(a>0?1:-1)*l;a=(-c-f)*w,o=(c-f)*w}var h=t.invert(a,o);return s||(h[0]+=a>0?x:-x),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function xr(){return yr(Vt).scale(111.48)}function br(t){var e=g(t);function r(r,n){var a=e?v(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*g(n)),l=1/v(n);return[g(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)<m)return[e?2*i(e*r/2)/e:r,0];var s,l=r*r+a*a,u=0,c=10;do{var f=v(u),h=1/o(u),p=l-2*a*u+u*u;u-=s=(f*p+2*(u-a))/(2+p*h*h+2*(u-a)*f)}while(n(s)>m&&--c>0);var d=r*(f=v(u)),y=v(n(a)<n(u+1/f)?.5*E(d):.5*C(d)+x/4)/g(u);return[e?2*i(e*y)/e:2*y,u]},r}var _r=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function wr(t,e){var r,i=f(18,36*n(e)/x),a=l(i),o=i-a,s=(r=_r[a])[0],u=r[1],c=(r=_r[++a])[0],h=r[1],p=(r=_r[f(19,++a)])[0],d=r[1];return[t*(c+o*(p-s)/2+o*o*(p-2*c+s)/2),(e>0?b:-b)*(h+o*(d-u)/2+o*o*(d-2*h+u)/2)]}function kr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?E(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=g(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}_r.forEach((function(t){t[1]*=1.0144})),wr.invert=function(t,e){var r=e/b,i=90*r,a=f(18,n(i/5)),o=c(0,l(a));do{var s=_r[o][1],u=_r[o+1][1],h=_r[f(19,o+2)][1],p=h-s,d=h-2*u+s,g=2*(n(r)-u)/p,v=d/p,m=g*(1-v*g*(1-2*v*g));if(m>=0||1===o){i=(e>=0?5:-5)*(m+a);var x,_=50;do{m=(a=f(18,n(i)/5))-(o=l(a)),s=_r[o][1],u=_r[o+1][1],h=_r[f(19,o+2)][1],i-=(x=(e>=0?b:-b)*(u+m*(h-s)/2+m*m*(h-2*u+s)/2)-e)*A}while(n(x)>y&&--_>0);break}}while(--o>=0);var w=_r[o][0],k=_r[o+1][0],T=_r[f(19,o+2)][0];return[t/(k+m*(T-w)/2+m*m*(T-2*k+w)/2),i*S]};var Tr=-180,Mr=-179.9999,Ar=179.9999,Sr=-89.9999,Er=89.9999;function Cr(t){return t.length>0}function Lr(t){return-90===t||90===t?[0,t]:[Tr,(e=t,Math.floor(1e4*e)/1e4)];var e}function Pr(t){var e=t[0],r=t[1],n=!1;return e<=Mr?(e=Tr,n=!0):e>=Ar&&(e=180,n=!0),r<=Sr?(r=-90,n=!0):r>=Er&&(r=90,n=!0),n?[e,r]:t}function Or(t){return t.map(Pr)}function Ir(t,e,r){for(var n=0,i=t.length;n<i;++n){var a=t[n].slice();r.push({index:-1,polygon:e,ring:a});for(var o=0,s=a.length;o<s;++o){var l=a[o],u=l[0],c=l[1];if(u<=Mr||u>=Ar||c<=Sr||c>=Er){a[o]=Pr(l);for(var f=o+1;f<s;++f){var h=a[f],p=h[0],d=h[1];if(p>Mr&&p<Ar&&d>Sr&&d<Er)break}if(f===o+1)continue;if(o){var g={index:-1,polygon:e,ring:a.slice(0,o+1)};g.ring[g.ring.length-1]=Lr(c),r[r.length-1]=g}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=Lr(a[0][1]),o=-1,s=a.length}}}}function Dr(t){var e,r,n,i,a,o,s=t.length,l={},u={};for(e=0;e<s;++e)n=(r=t[e]).ring[0],a=r.ring[r.ring.length-1],n[0]!==a[0]||n[1]!==a[1]?(r.index=e,l[n]=u[a]=r):(r.polygon.push(r.ring),t[e]=null);for(e=0;e<s;++e)if(r=t[e]){if(n=r.ring[0],a=r.ring[r.ring.length-1],i=u[n],o=l[a],delete l[n],delete u[a],n[0]===a[0]&&n[1]===a[1]){r.polygon.push(r.ring);continue}i?(delete u[n],delete l[i.ring[0]],i.ring.pop(),t[i.index]=null,r={index:-1,polygon:i.polygon,ring:i.ring.concat(r.ring)},i===o?r.polygon.push(r.ring):(r.index=s++,t.push(l[r.ring[0]]=u[r.ring[r.ring.length-1]]=r))):o?(delete l[a],delete u[o.ring[o.ring.length-1]],r.ring.pop(),r={index:s++,polygon:o.polygon,ring:r.ring.concat(o.ring)},t[o.index]=null,t.push(l[r.ring[0]]=u[r.ring[r.ring.length-1]]=r)):(r.ring.push(r.ring[0]),r.polygon.push(r.ring))}}function zr(t){var e={type:\"Feature\",geometry:Rr(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}function Rr(t){if(null==t)return t;var e,r,n,i;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(Rr)};break;case\"Point\":e={type:\"Point\",coordinates:Pr(t.coordinates)};break;case\"MultiPoint\":case\"LineString\":e={type:t.type,coordinates:Or(t.coordinates)};break;case\"MultiLineString\":e={type:\"MultiLineString\",coordinates:t.coordinates.map(Or)};break;case\"Polygon\":var a=[];Ir(t.coordinates,a,r=[]),Dr(r),e={type:\"Polygon\",coordinates:a};break;case\"MultiPolygon\":r=[],n=-1,i=t.coordinates.length;for(var o=new Array(i);++n<i;)Ir(t.coordinates[n],o[n]=[],r);Dr(r),e={type:\"MultiPolygon\",coordinates:o.filter(Cr)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function Fr(t,e){var r=v(e/2),n=g(_*r);return[t*(.74482-.34588*n*n),1.70711*r]}function Nr(t,r,n){var i=e.geoInterpolate(r,n),a=i(.5),o=e.geoRotation([-a[0],-a[1]])(r),s=i.distance/2,l=-E(g(o[1]*S)/g(s)),u=[-a[0],-a[1],-(o[0]>0?x-l:l)*A],c=e.geoProjection(t(s)).rotate(u),f=e.geoRotation(u),h=c.center;return delete c.rotate,c.center=function(t){return arguments.length?h(f(t)):f.invert(h())},c.clipAngle(90)}function Br(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function jr(t,e){return Nr(Br,t,e)}function Ur(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=v(n),l=.5/g(n);function u(e,a){var s=C(o(a)*o(e-r)),l=C(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return u.invert=function(t,e){var i,u,c=e*e,f=o(L(c+(i=t+r)*i)),h=o(L(c+(i=t+n)*i));return[a(u=f-h,i=(f+h)*s),(e<0?-1:1)*C(L(i*i+u*u)*l)]},u}function Vr(t,e){return Nr(Ur,t,e)}function Hr(t,e){if(n(e)<m)return[t,0];var r=n(e/b),i=E(r);if(n(t)<m||n(n(e)-b)<m)return[0,d(e)*x*v(i/2)];var a=o(i),s=n(x/t-t/x)/2,l=s*s,u=a/(r+a-1),c=u*(2/r-1),f=c*c,h=f+l,p=u-f,g=l+u;return[d(t)*x*(s*p+L(l*p*p-h*(u*u-f)))/h,d(e)*x*(c*g-s*L((l+1)*h-g*g))/h]}function qr(t,e){if(n(e)<m)return[t,0];var r=n(e/b),i=E(r);if(n(t)<m||n(n(e)-b)<m)return[0,d(e)*x*v(i/2)];var a=o(i),s=n(x/t-t/x)/2,l=s*s,u=a*(L(1+l)-s*a)/(1+l*r*r);return[d(t)*x*u,d(e)*x*L(1-u*(2*s+u))]}function Gr(t,e){if(n(e)<m)return[t,0];var r=e/b,i=E(r);if(n(t)<m||n(n(e)-b)<m)return[0,x*v(i/2)];var a=(x/t-t/x)/2,s=r/(1+o(i));return[x*(d(t)*L(a*a+1-s*s)-a),x*s]}function Yr(t,e){if(!e)return[t,0];var r=n(e);if(!t||r===b)return[0,e];var i=r/b,a=i*i,o=(8*i-a*(a+2)-5)/(2*a*(i-1)),s=o*o,l=i*o,u=a+s+2*l,c=i+3*o,f=t/b,h=f+1/f,p=d(n(t)-b)*L(h*h-4),g=p*p,v=(p*(u+s-1)+2*L(u*(a+s*g-1)+(1-a)*(a*(c*c+4*s)+12*l*s+4*s*s)))/(4*u+g);return[d(t)*b*v,d(e)*b*L(1+p*n(v)-v*v)]}function Wr(t,e,r,n){var i=x/3;t=c(t,m),e=c(e,m),t=f(t,b),e=f(e,x-m),r=c(r,0),r=f(r,99.999999);var s=(n=c(n,m))/100,l=C((r/100+1)*o(i))/i,u=g(t)/g(l*b),h=e/x,p=L(s*g(t/2)/g(e/2));return function(t,e,r,n,i){function s(a,s){var l=r*g(n*s),u=L(1-l*l),c=L(2/(1+u*o(a*=i)));return[t*u*c*g(a),e*l*c]}return s.invert=function(o,s){var l=o/t,u=s/e,c=L(l*l+u*u),f=2*E(c/2);return[a(o*v(f),t*c)/i,c&&E(s*g(f)/(e*r*c))/n]},s}(p/L(h*u*l),1/(p*L(h*u*l)),u,l,h)}function Xr(){var t=65*S,r=60*S,n=20,i=200,a=e.geoProjectionMutator(Wr),o=a(t,r,n,i);return o.poleline=function(e){return arguments.length?a(t=+e*S,r,n,i):t*A},o.parallels=function(e){return arguments.length?a(t,r=+e*S,n,i):r*A},o.inflation=function(e){return arguments.length?a(t,r,n=+e,i):n},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(163.775)}Fr.invert=function(t,e){var r=e/1.70711,n=g(_*r);return[t/(.74482-.34588*n*n),2*i(r)]},Hr.invert=function(t,e){if(n(e)<m)return[t,0];if(n(t)<m)return[0,b*g(2*i(e/x))];var r=(t/=x)*t,a=(e/=x)*e,s=r+a,l=s*s,u=-n(e)*(1+s),c=u-2*a+r,f=-2*u+1+2*a+l,h=a/f+(2*c*c*c/(f*f*f)-9*u*c/(f*f))/27,p=(u-c*c/(3*f))/f,v=2*L(-p/3),y=C(3*h/(p*v))/3;return[x*(s-1+L(1+2*(r-a)+l))/(2*t),d(e)*x*(-v*o(y+x/3)-c/(3*f))]},qr.invert=function(t,e){if(!t)return[0,b*g(2*i(e/x))];var r=n(t/x),o=(1-r*r-(e/=x)*e)/(2*r),s=L(o*o+1);return[d(t)*x*(s-o),d(e)*b*g(2*a(L((1-2*o*r)*(o+s)-r),L(s+o+r)))]},Gr.invert=function(t,e){if(!e)return[t,0];var r=e/x,n=(x*x*(1-r*r)-t*t)/(2*x*t);return[t?x*(d(t)*L(n*n+1)-n):0,b*g(2*i(r))]},Yr.invert=function(t,e){var r;if(!t||!e)return[t,e];e/=x;var i=d(t)*t/b,a=(i*i-1+4*e*e)/n(i),o=a*a,s=2*e,l=50;do{var u=s*s,c=(8*s-u*(u+2)-5)/(2*u*(s-1)),f=(3*s-u*s-10)/(2*u*s),h=c*c,p=s*c,g=s+c,v=g*g,y=s+3*c,_=-2*g*(4*p*h+(1-4*u+3*u*u)*(1+f)+h*(14*u-6-o+(8*u-8-2*o)*f)+p*(12*u-8+(10*u-10-o)*f)),w=L(v*(u+h*o-1)+(1-u)*(u*(y*y+4*h)+h*(12*p+4*h)));s-=r=(a*(v+h-1)+2*w-i*(4*v+o))/(a*(2*c*f+2*g*(1+f))+_/w-8*g*(a*(-1+h+v)+2*w)*(1+f)/(o+4*v))}while(r>m&&--l>0);return[d(t)*(L(a*a+4)+a)*x/4,b*s]};var Zr=4*x+3*L(3),Kr=2*L(2*x*L(3)/Zr),Jr=W(Kr*L(3)/x,Kr,Zr/6);function $r(t,e){return[t*L(1-3*e*e/(x*x)),e]}function Qr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function tn(t,e){var r=D(t,e);return[(r[0]+t/b)/2,(r[1]+e)/2]}$r.invert=function(t,e){return[t/L(1-3*e*e/(x*x)),e]},Qr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-E(n*o/s):0]},tn.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),u=g(i),c=g(2*i),f=u*u,h=l*l,p=g(r),d=o(r/2),v=g(r/2),y=v*v,x=1-h*d*d,_=x?C(l*d)*L(s=1/x):s=0,w=.5*(2*_*l*v+r/b)-t,k=.5*(_*u+i)-e,T=.5*s*(h*y+_*l*d*f)+.5/b,M=s*(p*c/4-_*u*v),A=.125*s*(c*v-_*u*h*p),S=.5*s*(f*d+_*y*l)+.5,E=M*A-S*T,P=(k*M-w*S)/E,O=(w*A-k*T)/E;r-=P,i-=O}while((n(P)>m||n(O)>m)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=b,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*S):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(D).scale(152.63)},t.geoAitoffRaw=D,t.geoArmadillo=function(){var t=20*S,r=t>=0?1:-1,n=v(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=v((r=(t=e*S)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),u=l(e),c=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),u.sphere=function(){c.polygonStart(),c.lineStart();for(var e=-180*r;r*e<180;e+=90*r)c.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)c.point(e,r*-a(o(e*S/2),n)*A);c.lineEnd(),c.polygonEnd()},u},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(R).scale(66.1603)},t.geoAugustRaw=R,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(j),n=r(t),i=n.stream,s=.01,l=-o(s*S),u=g(s*S);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),f=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){f.polygonStart(),f.lineStart();for(var e=0,r=360/t,n=2*x/t,i=90-180/t,c=b;e<t;++e,i-=r,c-=n)f.point(a(u*o(c),l)*A,E(u*g(c))*A),i<-90?(f.point(-90,-180-i-s),f.point(-90,-180-i+s)):(f.point(90,i+s),f.point(90,i-s));f.lineEnd(),f.polygonEnd()},c},n.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},t.geoBerghausRaw=j,t.geoBertin1953=function(){return e.geoProjection(G()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},t.geoBertin1953Raw=G,t.geoBoggs=function(){return e.geoProjection(J).scale(160.857)},t.geoBoggsRaw=J,t.geoBonne=function(){return $(tt).scale(123.082).center([0,26.1441]).parallel(45)},t.geoBonneRaw=tt,t.geoBottomley=function(){var t=.5,r=e.geoProjectionMutator(et),n=r(t);return n.fraction=function(e){return arguments.length?r(t=+e):t},n.scale(158.837)},t.geoBottomleyRaw=et,t.geoBromley=function(){return e.geoProjection(rt).scale(152.63)},t.geoBromleyRaw=rt,t.geoChamberlin=lt,t.geoChamberlinRaw=ot,t.geoChamberlinAfrica=function(){return lt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},t.geoCollignon=function(){return e.geoProjection(ut).scale(95.6464).center([0,30])},t.geoCollignonRaw=ut,t.geoCraig=function(){return $(ct).scale(249.828).clipAngle(90)},t.geoCraigRaw=ct,t.geoCraster=function(){return e.geoProjection(ht).scale(156.19)},t.geoCrasterRaw=ht,t.geoCylindricalEqualArea=function(){return $(pt).parallel(38.58).scale(195.044)},t.geoCylindricalEqualAreaRaw=pt,t.geoCylindricalStereographic=function(){return $(dt).scale(124.75)},t.geoCylindricalStereographicRaw=dt,t.geoEckert1=function(){return e.geoProjection(gt).scale(165.664)},t.geoEckert1Raw=gt,t.geoEckert2=function(){return e.geoProjection(vt).scale(165.664)},t.geoEckert2Raw=vt,t.geoEckert3=function(){return e.geoProjection(mt).scale(180.739)},t.geoEckert3Raw=mt,t.geoEckert4=function(){return e.geoProjection(yt).scale(180.739)},t.geoEckert4Raw=yt,t.geoEckert5=function(){return e.geoProjection(xt).scale(173.044)},t.geoEckert5Raw=xt,t.geoEckert6=function(){return e.geoProjection(bt).scale(173.044)},t.geoEckert6Raw=bt,t.geoEisenlohr=function(){return e.geoProjection(wt).scale(62.5271)},t.geoEisenlohrRaw=wt,t.geoFahey=function(){return e.geoProjection(Tt).scale(137.152)},t.geoFaheyRaw=Tt,t.geoFoucaut=function(){return e.geoProjection(Mt).scale(135.264)},t.geoFoucautRaw=Mt,t.geoFoucautSinusoidal=function(){var t=.5,r=e.geoProjectionMutator(At),n=r(t);return n.alpha=function(e){return arguments.length?r(t=+e):t},n.scale(168.725)},t.geoFoucautSinusoidalRaw=At,t.geoGilbert=function(t){null==t&&(t=e.geoOrthographic);var r=t(),n=e.geoEquirectangular().scale(A).precision(0).clipAngle(null).translate([0,0]);function i(t){return r(St(t))}function a(t){i[t]=function(){return arguments.length?(r[t].apply(r,arguments),i):r[t]()}}return r.invert&&(i.invert=function(t){return Et(r.invert(t))}),i.stream=function(t){var e=r.stream(t),i=n.stream({point:function(t,r){e.point(t/2,E(v(-r/2*S))*A)},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}});return i.sphere=e.sphere,i},i.rotate=function(t){return arguments.length?(n.rotate(t),i):n.rotate()},i.center=function(t){return arguments.length?(r.center(St(t)),i):Et(r.center())},a(\"angle\"),a(\"clipAngle\"),a(\"clipExtent\"),a(\"fitExtent\"),a(\"fitHeight\"),a(\"fitSize\"),a(\"fitWidth\"),a(\"scale\"),a(\"translate\"),a(\"precision\"),i.scale(249.5)},t.geoGingery=function(){var t=6,r=30*S,n=o(r),i=g(r),s=e.geoProjectionMutator(Ct),l=s(r,t),u=l.stream,c=-o(.01*S),f=g(.01*S);return l.radius=function(e){return arguments.length?(n=o(r=e*S),i=g(r),s(r,t)):r*A},l.lobes=function(e){return arguments.length?s(r,t=+e):t},l.stream=function(e){var r=l.rotate(),s=u(e),h=(l.rotate([0,0]),u(e));return l.rotate(r),s.sphere=function(){h.polygonStart(),h.lineStart();for(var e=0,r=2*x/t,s=0;e<t;++e,s-=r)h.point(a(f*o(s),c)*A,E(f*g(s))*A),h.point(a(i*o(s-r/2),n)*A,E(i*g(s-r/2))*A);h.lineEnd(),h.polygonEnd()},s},l.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},t.geoGingeryRaw=Ct,t.geoGinzburg4=function(){return e.geoProjection(It).scale(149.995)},t.geoGinzburg4Raw=It,t.geoGinzburg5=function(){return e.geoProjection(Dt).scale(153.93)},t.geoGinzburg5Raw=Dt,t.geoGinzburg6=function(){return e.geoProjection(zt).scale(130.945)},t.geoGinzburg6Raw=zt,t.geoGinzburg8=function(){return e.geoProjection(Rt).scale(131.747)},t.geoGinzburg8Raw=Rt,t.geoGinzburg9=function(){return e.geoProjection(Ft).scale(131.087)},t.geoGinzburg9Raw=Ft,t.geoGringorten=function(){return e.geoProjection(Nt(Bt)).scale(239.75)},t.geoGringortenRaw=Bt,t.geoGuyou=function(){return e.geoProjection(Nt(Vt)).scale(151.496)},t.geoGuyouRaw=Vt,t.geoHammer=function(){var t=2,r=e.geoProjectionMutator(U),n=r(t);return n.coefficient=function(e){return arguments.length?r(t=+e):t},n.scale(169.529)},t.geoHammerRaw=U,t.geoHammerRetroazimuthal=function(){var t=0,r=e.geoProjectionMutator(Ht),n=r(t),i=n.rotate,a=n.stream,o=e.geoCircle();return n.parallel=function(e){if(!arguments.length)return t*A;var i=n.rotate();return r(t=e*S).rotate(i)},n.rotate=function(e){return arguments.length?(i.call(n,[e[0],e[1]-t*A]),o.center([-e[0],-e[1]]),n):((e=i.call(n))[1]+=t*A,e)},n.stream=function(t){return(t=a(t)).sphere=function(){t.polygonStart();var e,r=o.radius(89.99)().coordinates[0],n=r.length-1,i=-1;for(t.lineStart();++i<n;)t.point((e=r[i])[0],e[1]);for(t.lineEnd(),n=(r=o.radius(90.01)().coordinates[0]).length-1,t.lineStart();--i>=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Ht,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Wt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Xt),r.range(180,-180-n/2,-n).map(Zt)),{type:\"Polygon\",coordinates:[180===n?i.map(Kt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Wt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(ee).scale(152.63)},t.geoHomolosineRaw=ee,t.geoHufnagel=function(){var t=1,r=0,n=45*S,i=2,a=e.geoProjectionMutator(re),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*S,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=re,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ae),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ae,t.geoInterrupt=ue,t.geoInterruptedBoggs=function(){return ue(J,ce).scale(160.857)},t.geoInterruptedHomolosine=function(){return ue(ee,fe).scale(152.63)},t.geoInterruptedMollweide=function(){return ue(X,he).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ue(X,pe).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ue(te,de,q).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ue(Q,ge).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(ve).scale(158.837)},t.geoKavrayskiy7Raw=ve,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(me),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=me,t.geoLarrivee=function(){return e.geoProjection(xe).scale(97.2672)},t.geoLarriveeRaw=xe,t.geoLaskowski=function(){return e.geoProjection(be).scale(139.98)},t.geoLaskowskiRaw=be,t.geoLittrow=function(){return e.geoProjection(_e).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=_e,t.geoLoximuthal=function(){return $(we).parallel(40).scale(158.837)},t.geoLoximuthalRaw=we,t.geoMiller=function(){return e.geoProjection(ke).scale(108.318)},t.geoMillerRaw=ke,t.geoModifiedStereographic=Le,t.geoModifiedStereographicRaw=Te,t.geoModifiedStereographicAlaska=function(){return Le(Me,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Le(Ae,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Le(Se,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Le(Ee,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Le(Ce,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(X).scale(169.529)},t.geoMollweideRaw=X,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Ie).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Ie,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(De).scale(188.209)},t.geoMtFlatPolarQuarticRaw=De,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(ze).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=ze,t.geoNaturalEarth2=function(){return e.geoProjection(Re).scale(175.295)},t.geoNaturalEarth2Raw=Re,t.geoNellHammer=function(){return e.geoProjection(Fe).scale(152.63)},t.geoNellHammerRaw=Fe,t.geoInterruptedQuarticAuthalic=function(){return ue(U(1/0),Ne).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(Be).scale(127.267)},t.geoNicolosiRaw=Be,t.geoPatterson=function(){return e.geoProjection(Ge).scale(139.319)},t.geoPattersonRaw=Ge,t.geoPolyconic=function(){return e.geoProjection(Ye).scale(103.74)},t.geoPolyconicRaw=Ye,t.geoPolyhedral=$e,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=nr.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),$e(r[0],(function(t,e){return r[t<-x/2?e<0?6:4:t<0?e<0?2:0:t<x/2?e<0?3:1:e<0?7:5]})).angle(-30).scale(101.858).center([0,45])},t.geoPolyhedralCollignon=function(t){t=t||function(t){var r=e.geoCentroid({type:\"MultiPoint\",coordinates:t});return e.geoProjection(ar).translate([0,0]).scale(1).rotate(r[1]>0?[-r[0],0]:[180-r[0],180])};var r=nr.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),$e(r[0],(function(t,e){return r[t<-x/2?e<0?6:4:t<0?e<0?2:0:t<x/2?e<0?3:1:e<0?7:5]})).angle(-30).scale(121.906).center([0,48.5904])},t.geoPolyhedralWaterman=function(t){t=t||function(t){var r=6===t.length?e.geoCentroid({type:\"MultiPoint\",coordinates:t}):t[0];return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=nr.map((function(t){for(var e,r=t.map(lr),n=r.length,i=r[n-1],a=[],o=0;o<n;++o)e=r[o],a.push(sr([.9486832980505138*i[0]+.31622776601683794*e[0],.9486832980505138*i[1]+.31622776601683794*e[1],.9486832980505138*i[2]+.31622776601683794*e[2]]),sr([.9486832980505138*e[0]+.31622776601683794*i[0],.9486832980505138*e[1]+.31622776601683794*i[1],.9486832980505138*e[2]+.31622776601683794*i[2]])),i=e;return a})),n=[],i=[-1,0,0,1,0,1,4,5];r.forEach((function(t,e){for(var a=nr[e],o=a.length,s=n[e]=[],l=0;l<o;++l)r.push([a[l],t[(2*l+2)%(2*o)],t[(2*l+1)%(2*o)]]),i.push(e),s.push((u=lr(t[(2*l+2)%(2*o)]),c=lr(t[(2*l+1)%(2*o)]),[u[1]*c[2]-u[2]*c[1],u[2]*c[0]-u[0]*c[2],u[0]*c[1]-u[1]*c[0]]));var u,c}));var a=r.map((function(e){return{project:t(e),face:e}}));return i.forEach((function(t,e){var r=a[t];r&&(r.children||(r.children=[])).push(a[e])})),$e(a[0],(function(t,e){var r=o(e),i=[r*o(t),r*g(t),g(e)],s=t<-x/2?e<0?6:4:t<0?e<0?2:0:t<x/2?e<0?3:1:e<0?7:5,l=n[s];return a[or(l[0],i)<0?8+3*s:or(l[1],i)<0?8+3*s+1:or(l[2],i)<0?8+3*s+2:s]})).angle(-30).scale(110.625).center([0,45])},t.geoProject=function(t,e){var r,n=e.stream;if(!n)throw new Error(\"invalid projection\");switch(t&&t.type){case\"Feature\":r=fr;break;case\"FeatureCollection\":r=cr;break;default:r=hr}return r(t,n)},t.geoGringortenQuincuncial=function(){return yr(Bt).scale(176.423)},t.geoPeirceQuincuncial=xr,t.geoPierceQuincuncial=xr,t.geoQuantize=function(t,e){if(!(0<=(e=+e)&&e<=20))throw new Error(\"invalid digits\");function r(t){var r=t.length,n=2,i=new Array(r);for(i[0]=+t[0].toFixed(e),i[1]=+t[1].toFixed(e);n<r;)i[n]=t[n],++n;return i}function n(t){return t.map(r)}function i(t){for(var e=r(t[0]),n=[e],i=1;i<t.length;i++){var a=r(t[i]);(a.length>2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(o)};break;case\"Point\":e={type:\"Point\",coordinates:r(t.coordinates)};break;case\"MultiPoint\":e={type:t.type,coordinates:n(t.coordinates)};break;case\"LineString\":e={type:t.type,coordinates:i(t.coordinates)};break;case\"MultiLineString\":case\"Polygon\":e={type:t.type,coordinates:a(t.coordinates)};break;case\"MultiPolygon\":e={type:\"MultiPolygon\",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:\"Feature\",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case\"Feature\":return s(t);case\"FeatureCollection\":var l={type:\"FeatureCollection\",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=yr,t.geoRectangularPolyconic=function(){return $(br).scale(131.215)},t.geoRectangularPolyconicRaw=br,t.geoRobinson=function(){return e.geoProjection(wr).scale(152.63)},t.geoRobinsonRaw=wr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(kr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*S):r*A},i.scale(432.147).clipAngle(C(1/t)*A-1e-6)},t.geoSatelliteRaw=kr,t.geoSinuMollweide=function(){return e.geoProjection(te).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=te,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case\"Feature\":return zr(t);case\"FeatureCollection\":var e={type:\"FeatureCollection\",features:t.features.map(zr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Rr(t)}},t.geoTimes=function(){return e.geoProjection(Fr).scale(146.153)},t.geoTimesRaw=Fr,t.geoTwoPointAzimuthal=jr,t.geoTwoPointAzimuthalRaw=Br,t.geoTwoPointAzimuthalUsa=function(){return jr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Vr,t.geoTwoPointEquidistantRaw=Ur,t.geoTwoPointEquidistantUsa=function(){return Vr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Hr).scale(79.4183)},t.geoVanDerGrintenRaw=Hr,t.geoVanDerGrinten2=function(){return e.geoProjection(qr).scale(79.4183)},t.geoVanDerGrinten2Raw=qr,t.geoVanDerGrinten3=function(){return e.geoProjection(Gr).scale(79.4183)},t.geoVanDerGrinten3Raw=Gr,t.geoVanDerGrinten4=function(){return e.geoProjection(Yr).scale(127.16)},t.geoVanDerGrinten4Raw=Yr,t.geoWagner=Xr,t.geoWagner7=function(){return Xr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=Wr,t.geoWagner4=function(){return e.geoProjection(Jr).scale(176.84)},t.geoWagner4Raw=Jr,t.geoWagner6=function(){return e.geoProjection($r).scale(152.63)},t.geoWagner6Raw=$r,t.geoWiechel=function(){return e.geoProjection(Qr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=Qr,t.geoWinkel3=function(){return e.geoProjection(tn).scale(158.837)},t.geoWinkel3Raw=tn,Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-geo\"),t(\"d3-array\")):i(n.d3=n.d3||{},n.d3,n.d3)},{\"d3-array\":107,\"d3-geo\":114}],114:[function(t,e,r){var n,i;n=this,i=function(t,e){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=2*l,h=180/l,p=l/180,d=Math.abs,g=Math.atan,v=Math.atan2,m=Math.cos,y=Math.ceil,x=Math.exp,b=Math.log,_=Math.pow,w=Math.sin,k=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,M=Math.tan;function A(t){return t>1?0:t<-1?l:Math.acos(t)}function S(t){return t>1?u:t<-1?-u:Math.asin(t)}function E(t){return(t=w(t/2))*t}function C(){}function L(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var P={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)L(r[n].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 r=t.coordinates,n=-1,i=r.length;++n<i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){I(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)I(r[n],e,0)},Polygon:function(t,e){D(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)D(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)L(r[n],e)}};function I(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i<a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function D(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)I(t[r],e,1);e.polygonEnd()}function z(t,e){t&&P.hasOwnProperty(t.type)?P[t.type](t,e):L(t,e)}var R,F,N,B,j,U=r(),V=r(),H={point:C,lineStart:C,lineEnd:C,polygonStart:function(){U.reset(),H.lineStart=q,H.lineEnd=G},polygonEnd:function(){var t=+U;V.add(t<0?f+t:t),this.lineStart=this.lineEnd=this.point=C},sphere:function(){V.add(f)}};function q(){H.point=Y}function G(){W(R,F)}function Y(t,e){H.point=W,R=t,F=e,N=t*=p,B=m(e=(e*=p)/2+c),j=w(e)}function W(t,e){var r=(t*=p)-N,n=r>=0?1:-1,i=n*r,a=m(e=(e*=p)/2+c),o=w(e),s=j*o,l=B*a+s*m(i),u=s*n*w(i);U.add(v(u,l)),N=t,B=a,j=o}function X(t){return[v(t[1],t[0]),S(t[2])]}function Z(t){var e=t[0],r=t[1],n=m(r);return[n*m(e),n*w(e),w(r)]}function K(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(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 $(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function tt(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var et,rt,nt,it,at,ot,st,lt,ut,ct,ft,ht,pt,dt,gt,vt,mt,yt,xt,bt,_t,wt,kt,Tt,Mt,At,St=r(),Et={point:Ct,lineStart:Pt,lineEnd:Ot,polygonStart:function(){Et.point=It,Et.lineStart=Dt,Et.lineEnd=zt,St.reset(),H.polygonStart()},polygonEnd:function(){H.polygonEnd(),Et.point=Ct,Et.lineStart=Pt,Et.lineEnd=Ot,U<0?(et=-(nt=180),rt=-(it=90)):St>o?it=90:St<-o&&(rt=-90),ct[0]=et,ct[1]=nt},sphere:function(){et=-(nt=180),rt=-(it=90)}};function Ct(t,e){ut.push(ct=[et=t,nt=t]),e<rt&&(rt=e),e>it&&(it=e)}function Lt(t,e){var r=Z([t*p,e*p]);if(lt){var n=J(lt,r),i=J([n[1],-n[0],0],n);tt(i),i=X(i);var a,o=t-at,s=o>0?1:-1,l=i[0]*h*s,u=d(o)>180;u^(s*at<l&&l<s*t)?(a=i[1]*h)>it&&(it=a):u^(s*at<(l=(l+360)%360-180)&&l<s*t)?(a=-i[1]*h)<rt&&(rt=a):(e<rt&&(rt=e),e>it&&(it=e)),u?t<at?Rt(et,t)>Rt(et,nt)&&(nt=t):Rt(t,nt)>Rt(et,nt)&&(et=t):nt>=et?(t<et&&(et=t),t>nt&&(nt=t)):t>at?Rt(et,t)>Rt(et,nt)&&(nt=t):Rt(t,nt)>Rt(et,nt)&&(et=t)}else ut.push(ct=[et=t,nt=t]);e<rt&&(rt=e),e>it&&(it=e),lt=r,at=t}function Pt(){Et.point=Lt}function Ot(){ct[0]=et,ct[1]=nt,Et.point=Ct,lt=null}function It(t,e){if(lt){var r=t-at;St.add(d(r)>180?r+(r>0?360:-360):r)}else ot=t,st=e;H.point(t,e),Lt(t,e)}function Dt(){H.lineStart()}function zt(){It(ot,st),H.lineEnd(),d(St)>o&&(et=-(nt=180)),ct[0]=et,ct[1]=nt,lt=null}function Rt(t,e){return(e-=t)<0?e+360:e}function Ft(t,e){return t[0]-e[0]}function Nt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Bt={sphere:C,point:jt,lineStart:Vt,lineEnd:Gt,polygonStart:function(){Bt.lineStart=Yt,Bt.lineEnd=Wt},polygonEnd:function(){Bt.lineStart=Vt,Bt.lineEnd=Gt}};function jt(t,e){t*=p;var r=m(e*=p);Ut(r*m(t),r*w(t),w(e))}function Ut(t,e,r){++ft,pt+=(t-pt)/ft,dt+=(e-dt)/ft,gt+=(r-gt)/ft}function Vt(){Bt.point=Ht}function Ht(t,e){t*=p;var r=m(e*=p);Tt=r*m(t),Mt=r*w(t),At=w(e),Bt.point=qt,Ut(Tt,Mt,At)}function qt(t,e){t*=p;var r=m(e*=p),n=r*m(t),i=r*w(t),a=w(e),o=v(T((o=Mt*a-At*i)*o+(o=At*n-Tt*a)*o+(o=Tt*i-Mt*n)*o),Tt*n+Mt*i+At*a);ht+=o,vt+=o*(Tt+(Tt=n)),mt+=o*(Mt+(Mt=i)),yt+=o*(At+(At=a)),Ut(Tt,Mt,At)}function Gt(){Bt.point=jt}function Yt(){Bt.point=Xt}function Wt(){Zt(wt,kt),Bt.point=jt}function Xt(t,e){wt=t,kt=e,t*=p,e*=p,Bt.point=Zt;var r=m(e);Tt=r*m(t),Mt=r*w(t),At=w(e),Ut(Tt,Mt,At)}function Zt(t,e){t*=p;var r=m(e*=p),n=r*m(t),i=r*w(t),a=w(e),o=Mt*a-At*i,s=At*n-Tt*a,l=Tt*i-Mt*n,u=T(o*o+s*s+l*l),c=S(u),f=u&&-c/u;xt+=f*o,bt+=f*s,_t+=f*l,ht+=c,vt+=c*(Tt+(Tt=n)),mt+=c*(Mt+(Mt=i)),yt+=c*(At+(At=a)),Ut(Tt,Mt,At)}function Kt(t){return function(){return t}}function Jt(t,e){function r(r,n){return r=t(r,n),e(r[0],r[1])}return t.invert&&e.invert&&(r.invert=function(r,n){return(r=e.invert(r,n))&&t.invert(r[0],r[1])}),r}function $t(t,e){return[d(t)>l?t+Math.round(-t/f)*f:t,e]}function Qt(t,e,r){return(t%=f)?e||r?Jt(ee(t),re(e,r)):ee(t):e||r?re(e,r):$t}function te(t){return function(e,r){return[(e+=t)>l?e-f:e<-l?e+f:e,r]}}function ee(t){var e=te(t);return e.invert=te(-t),e}function re(t,e){var r=m(t),n=w(t),i=m(e),a=w(e);function o(t,e){var o=m(e),s=m(t)*o,l=w(t)*o,u=w(e),c=u*r+s*n;return[v(l*i-c*a,s*r-u*n),S(c*i+l*a)]}return o.invert=function(t,e){var o=m(e),s=m(t)*o,l=w(t)*o,u=w(e),c=u*i-l*a;return[v(l*i+u*a,s*r+c*n),S(c*r-s*n)]},o}function ne(t){function e(e){return(e=t(e[0]*p,e[1]*p))[0]*=h,e[1]*=h,e}return t=Qt(t[0]*p,t[1]*p,t.length>2?t[2]*p:0),e.invert=function(e){return(e=t.invert(e[0]*p,e[1]*p))[0]*=h,e[1]*=h,e},e}function ie(t,e,r,n,i,a){if(r){var o=m(e),s=w(e),l=n*r;null==i?(i=e+n*f,a=e-l/2):(i=ae(o,i),a=ae(o,a),(n>0?i<a:i>a)&&(i+=n*f));for(var u,c=i;n>0?c>a:c<a;c-=l)u=X([o,-s*m(c),-s*w(c)]),t.point(u[0],u[1])}}function ae(t,e){(e=Z(e))[0]-=t,tt(e);var r=A(-e[1]);return((-e[2]<0?-r:r)+f-o)%f}function oe(){var t,e=[];return{point:function(e,r,n){t.push([e,r,n])},lineStart:function(){e.push(t=[])},lineEnd:C,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function se(t,e){return d(t[0]-e[0])<o&&d(t[1]-e[1])<o}function le(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function ue(t,e,r,n,i){var a,o,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,r,n=t[0],o=t[e];if(se(n,o)){if(!n[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((n=t[a])[0],n[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(r=new le(n,t,null,!0)),l.push(r.o=new le(n,null,r,!1)),s.push(r=new le(o,t,null,!1)),l.push(r.o=new le(o,null,r,!0))}})),s.length){for(l.sort(e),ce(s),ce(l),a=0,o=l.length;a<o;++a)l[a].e=r=!r;for(var u,c,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=u.length;a<o;++a)i.point((c=u[a])[0],c[1]);else n(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,a=u.length-1;a>=0;--a)i.point((c=u[a])[0],c[1]);else n(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n<e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}$t.invert=$t;var fe=r();function he(t){return d(t[0])<=l?t[0]:k(t[0])*((d(t[0])+l)%f-l)}function pe(t,e){var r=he(e),n=e[1],i=w(n),a=[w(r),-m(r),0],s=0,h=0;fe.reset(),1===i?n=u+o:-1===i&&(n=-u-o);for(var p=0,d=t.length;p<d;++p)if(y=(g=t[p]).length)for(var g,y,x=g[y-1],b=he(x),_=x[1]/2+c,k=w(_),T=m(_),M=0;M<y;++M,b=E,k=L,T=P,x=A){var A=g[M],E=he(A),C=A[1]/2+c,L=w(C),P=m(C),O=E-b,I=O>=0?1:-1,D=I*O,z=D>l,R=k*L;if(fe.add(v(R*I*w(D),T*P+R*m(D))),s+=z?O+I*f:O,z^b>=r^E>=r){var F=J(Z(x),Z(A));tt(F);var N=J(a,F);tt(N);var B=(z^O>=0?-1:1)*S(N[2]);(n>B||n===B&&(F[0]||F[1]))&&(h+=z^O>=0?1:-1)}}return(s<-o||s<o&&fe<-o)^1&h}function de(t,r,n,i){return function(a){var o,s,l,u=r(a),c=oe(),f=r(c),h=!1,p={point:d,lineStart:v,lineEnd:m,polygonStart:function(){p.point=y,p.lineStart=x,p.lineEnd=b,s=[],o=[]},polygonEnd:function(){p.point=d,p.lineStart=v,p.lineEnd=m,s=e.merge(s);var t=pe(o,i);s.length?(h||(a.polygonStart(),h=!0),ue(s,ve,t,n,a)):t&&(h||(a.polygonStart(),h=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),h&&(a.polygonEnd(),h=!1),s=o=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function d(e,r){t(e,r)&&a.point(e,r)}function g(t,e){u.point(t,e)}function v(){p.point=g,u.lineStart()}function m(){p.point=d,u.lineEnd()}function y(t,e){l.push([t,e]),f.point(t,e)}function x(){f.lineStart(),l=[]}function b(){y(l[0][0],l[0][1]),f.lineEnd();var t,e,r,n,i=f.clean(),u=c.result(),p=u.length;if(l.pop(),o.push(l),l=null,p)if(1&i){if((e=(r=u[0]).length-1)>0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t<e;++t)a.point((n=r[t])[0],n[1]);a.lineEnd()}}else p>1&&2&i&&u.push(u.pop().concat(u.shift())),s.push(u.filter(ge))}return p}}function ge(t){return t.length>1}function ve(t,e){return((t=t.x)[0]<0?t[1]-u-o:u-t[1])-((e=e.x)[0]<0?e[1]-u-o:u-e[1])}var me=de((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,s){var c=a>0?l:-l,f=d(a-r);d(f-l)<o?(t.point(r,n=(n+s)/2>0?u:-u),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(c,n),t.point(a,n),e=0):i!==c&&f>=l&&(d(r-i)<o&&(r-=i*o),d(a-c)<o&&(a-=c*o),n=function(t,e,r,n){var i,a,s=w(t-r);return d(s)>o?g((w(e)*(a=m(n))*w(r)-w(n)*(i=m(e))*w(t))/(i*a*s)):(e+n)/2}(r,n,a,s),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(c,n),e=0),t.point(r=a,n=s),i=c},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*u,n.point(-l,i),n.point(0,i),n.point(l,i),n.point(l,0),n.point(l,-i),n.point(0,-i),n.point(-l,-i),n.point(-l,0),n.point(-l,i);else if(d(t[0]-e[0])>o){var a=t[0]<e[0]?l:-l;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])}),[-l,-u]);function ye(t){var e=m(t),r=6*p,n=e>0,i=d(e)>o;function a(t,r){return m(t)*m(r)>e}function s(t,r,n){var i=[1,0,0],a=J(Z(t),Z(r)),s=K(a,a),u=a[0],c=s-u*u;if(!c)return!n&&t;var f=e*s/c,h=-e*u/c,p=J(i,a),g=Q(i,f);$(g,Q(a,h));var v=p,m=K(g,v),y=K(v,v),x=m*m-y*(K(g,g)-1);if(!(x<0)){var b=T(x),_=Q(v,(-m-b)/y);if($(_,g),_=X(_),!n)return _;var w,k=t[0],M=r[0],A=t[1],S=r[1];M<k&&(w=k,k=M,M=w);var E=M-k,C=d(E-l)<o;if(!C&&S<A&&(w=A,A=S,S=w),C||E<o?C?A+S>0^_[1]<(d(_[0]-k)<o?A:S):A<=_[1]&&_[1]<=S:E>l^(k<=_[0]&&_[0]<=M)){var L=Q(v,(-m+b)/y);return $(L,g),[_,X(L)]}}}function u(e,r){var i=n?t:l-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return de(a,(function(t){var e,r,o,c,f;return{lineStart:function(){c=o=!1,f=1},point:function(h,p){var d,g=[h,p],v=a(h,p),m=n?v?0:u(h,p):v?u(h+(h<0?l:-l),p):0;if(!e&&(c=o=v)&&t.lineStart(),v!==o&&(!(d=s(e,g))||se(e,d)||se(g,d))&&(g[2]=1),v!==o)f=0,v?(t.lineStart(),d=s(g,e),t.point(d[0],d[1])):(d=s(e,g),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^v){var y;m&r||!(y=s(g,e,!0))||(f=0,n?(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],3)))}!v||e&&se(e,g)||t.point(g[0],g[1]),e=g,o=v,r=m},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(c&&o)<<1}}}),(function(e,n,i,a){ie(a,t,r,i,e,n)}),n?[0,-t]:[-l,t-l])}var xe=1e9,be=-xe;function _e(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var u=0,f=0;if(null==e||(u=l(e,o))!==(f=l(a,o))||c(e,a)<0^o>0)do{s.point(0===u||3===u?t:n,u>1?i:r)}while((u=(u+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return d(e[0]-t)<o?i>0?0:3:d(e[0]-n)<o?i>0?2:1:d(e[1]-r)<o?i>0?1:0:i>0?3:2}function u(t,e){return c(t.x,e.x)}function c(t,e){var r=l(t,1),n=l(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(o){var l,c,f,h,p,d,g,v,m,y,x,b=o,_=oe(),w={point:k,lineStart:function(){w.point=T,c&&c.push(f=[]),y=!0,m=!1,g=v=NaN},lineEnd:function(){l&&(T(h,p),d&&m&&_.rejoin(),l.push(_.result())),w.point=k,m&&b.lineEnd()},polygonStart:function(){b=_,l=[],c=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=c.length;r<n;++r)for(var a,o,s=c[r],l=1,u=s.length,f=s[0],h=f[0],p=f[1];l<u;++l)a=h,o=p,h=(f=s[l])[0],p=f[1],o<=i?p>i&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&ue(l,u,r,s,o),o.polygonEnd()),b=o,l=c=f=null}};function k(t,e){a(t,e)&&b.point(t,e)}function T(e,o){var s=a(e,o);if(c&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&m)b.point(e,o);else{var l=[g=Math.max(be,Math.min(xe,g)),v=Math.max(be,Math.min(xe,v))],u=[e=Math.max(be,Math.min(xe,e)),o=Math.max(be,Math.min(xe,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],u=0,c=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<c&&(c=o)}else if(f>0){if(o>c)return;o>u&&(u=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<c&&(c=o)}if(o=n-l,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<c&&(c=o)}else if(h>0){if(o>c)return;o>u&&(u=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<c&&(c=o)}return u>0&&(t[0]=s+u*f,t[1]=l+u*h),c<1&&(e[0]=s+c*f,e[1]=l+c*h),!0}}}}}(l,u,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(m||(b.lineStart(),b.point(l[0],l[1])),b.point(u[0],u[1]),s||b.lineEnd(),x=!1)}g=e,v=o,m=s}return w}}var we,ke,Te,Me=r(),Ae={sphere:C,point:C,lineStart:function(){Ae.point=Ee,Ae.lineEnd=Se},lineEnd:C,polygonStart:C,polygonEnd:C};function Se(){Ae.point=Ae.lineEnd=C}function Ee(t,e){we=t*=p,ke=w(e*=p),Te=m(e),Ae.point=Ce}function Ce(t,e){t*=p;var r=w(e*=p),n=m(e),i=d(t-we),a=m(i),o=n*w(i),s=Te*r-ke*n*a,l=ke*r+Te*n*a;Me.add(v(T(o*o+s*s),l)),we=t,ke=r,Te=n}function Le(t){return Me.reset(),z(t,Ae),+Me}var Pe=[null,null],Oe={type:\"LineString\",coordinates:Pe};function Ie(t,e){return Pe[0]=t,Pe[1]=e,Le(Oe)}var De={Feature:function(t,e){return Re(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)if(Re(r[n].geometry,e))return!0;return!1}},ze={Sphere:function(){return!0},Point:function(t,e){return Fe(t.coordinates,e)},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)if(Fe(r[n],e))return!0;return!1},LineString:function(t,e){return Ne(t.coordinates,e)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)if(Ne(r[n],e))return!0;return!1},Polygon:function(t,e){return Be(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)if(Be(r[n],e))return!0;return!1},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)if(Re(r[n],e))return!0;return!1}};function Re(t,e){return!(!t||!ze.hasOwnProperty(t.type))&&ze[t.type](t,e)}function Fe(t,e){return 0===Ie(t,e)}function Ne(t,e){for(var r,n,i,a=0,o=t.length;a<o;a++){if(0===(n=Ie(t[a],e)))return!0;if(a>0&&(i=Ie(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<s*i)return!0;r=n}return!1}function Be(t,e){return!!pe(t.map(je),Ue(e))}function je(t){return(t=t.map(Ue)).pop(),t}function Ue(t){return[t[0]*p,t[1]*p]}function Ve(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function He(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function qe(){var t,r,n,i,a,s,l,u,c,f,h,p,g=10,v=g,m=90,x=360,b=2.5;function _(){return{type:\"MultiLineString\",coordinates:w()}}function w(){return e.range(y(i/m)*m,n,m).map(h).concat(e.range(y(u/x)*x,l,x).map(p)).concat(e.range(y(r/g)*g,t,g).filter((function(t){return d(t%m)>o})).map(c)).concat(e.range(y(s/v)*v,a,v).filter((function(t){return d(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:\"LineString\",coordinates:t}}))},_.outline=function(){return{type:\"Polygon\",coordinates:[h(i).concat(p(l).slice(1),h(n).reverse().slice(1),p(u).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],u=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),u>l&&(t=u,u=l,l=t),_.precision(b)):[[i,u],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(m=+t[0],x=+t[1],_):[m,x]},_.stepMinor=function(t){return arguments.length?(g=+t[0],v=+t[1],_):[g,v]},_.precision=function(e){return arguments.length?(b=+e,c=Ve(s,a,90),f=He(r,t,b),h=Ve(u,l,90),p=He(i,n,b),_):b},_.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Ge(t){return t}var Ye,We,Xe,Ze,Ke=r(),Je=r(),$e={point:C,lineStart:C,lineEnd:C,polygonStart:function(){$e.lineStart=Qe,$e.lineEnd=rr},polygonEnd:function(){$e.lineStart=$e.lineEnd=$e.point=C,Ke.add(d(Je)),Je.reset()},result:function(){var t=Ke/2;return Ke.reset(),t}};function Qe(){$e.point=tr}function tr(t,e){$e.point=er,Ye=Xe=t,We=Ze=e}function er(t,e){Je.add(Ze*t-Xe*e),Xe=t,Ze=e}function rr(){er(Ye,We)}var nr,ir,ar,or,sr=1/0,lr=sr,ur=-sr,cr=ur,fr={point:function(t,e){t<sr&&(sr=t),t>ur&&(ur=t),e<lr&&(lr=e),e>cr&&(cr=e)},lineStart:C,lineEnd:C,polygonStart:C,polygonEnd:C,result:function(){var t=[[sr,lr],[ur,cr]];return ur=cr=-(lr=sr=1/0),t}},hr=0,pr=0,dr=0,gr=0,vr=0,mr=0,yr=0,xr=0,br=0,_r={point:wr,lineStart:kr,lineEnd:Ar,polygonStart:function(){_r.lineStart=Sr,_r.lineEnd=Er},polygonEnd:function(){_r.point=wr,_r.lineStart=kr,_r.lineEnd=Ar},result:function(){var t=br?[yr/br,xr/br]:mr?[gr/mr,vr/mr]:dr?[hr/dr,pr/dr]:[NaN,NaN];return hr=pr=dr=gr=vr=mr=yr=xr=br=0,t}};function wr(t,e){hr+=t,pr+=e,++dr}function kr(){_r.point=Tr}function Tr(t,e){_r.point=Mr,wr(ar=t,or=e)}function Mr(t,e){var r=t-ar,n=e-or,i=T(r*r+n*n);gr+=i*(ar+t)/2,vr+=i*(or+e)/2,mr+=i,wr(ar=t,or=e)}function Ar(){_r.point=wr}function Sr(){_r.point=Cr}function Er(){Lr(nr,ir)}function Cr(t,e){_r.point=Lr,wr(nr=ar=t,ir=or=e)}function Lr(t,e){var r=t-ar,n=e-or,i=T(r*r+n*n);gr+=i*(ar+t)/2,vr+=i*(or+e)/2,mr+=i,yr+=(i=or*t-ar*e)*(ar+t),xr+=i*(or+e),br+=3*i,wr(ar=t,or=e)}function Pr(t){this._context=t}Pr.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,f)}},result:C};var Or,Ir,Dr,zr,Rr,Fr=r(),Nr={point:C,lineStart:function(){Nr.point=Br},lineEnd:function(){Or&&jr(Ir,Dr),Nr.point=C},polygonStart:function(){Or=!0},polygonEnd:function(){Or=null},result:function(){var t=+Fr;return Fr.reset(),t}};function Br(t,e){Nr.point=jr,Ir=zr=t,Dr=Rr=e}function jr(t,e){zr-=t,Rr-=e,Fr.add(T(zr*zr+Rr*Rr)),zr=t,Rr=e}function Ur(){this._string=[]}function Vr(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function Hr(t){return function(e){var r=new qr;for(var n in t)r[n]=t[n];return r.stream=e,r}}function qr(){}function Gr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(fr)),e(fr.result()),null!=n&&t.clipExtent(n),t}function Yr(t,e,r){return Gr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function Wr(t,e,r){return Yr(t,[[0,0],e],r)}function Xr(t,e,r){return Gr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Zr(t,e,r){return Gr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Ur.prototype={_radius:4.5,_circle:Vr(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=Vr(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}},qr.prototype={constructor:qr,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 Kr=m(30*p);function Jr(t,e){return+e?function(t,e){function r(n,i,a,s,l,u,c,f,h,p,g,m,y,x){var b=c-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+p,M=l+g,A=u+m,E=T(k*k+M*M+A*A),C=S(A/=E),L=d(d(A)-1)<o||d(a-h)<o?(a+h)/2:v(M,k),P=t(L,C),O=P[0],I=P[1],D=O-n,z=I-i,R=_*D-b*z;(R*R/w>e||d((b*D+_*z)/w-.5)>.3||s*p+l*g+u*m<Kr)&&(r(n,i,a,s,l,u,O,I,L,k/=E,M/=E,A,y,x),x.point(O,I),r(O,I,L,k,M,A,c,f,h,p,g,m,y,x))}}return function(e){var n,i,a,o,s,l,u,c,f,h,p,d,g={point:v,lineStart:m,lineEnd:x,polygonStart:function(){e.polygonStart(),g.lineStart=b},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function v(r,n){r=t(r,n),e.point(r[0],r[1])}function m(){c=NaN,g.point=y,e.lineStart()}function y(n,i){var a=Z([n,i]),o=t(n,i);r(c,f,u,h,p,d,c=o[0],f=o[1],u=n,h=a[0],p=a[1],d=a[2],16,e),e.point(c,f)}function x(){g.point=v,e.lineEnd()}function b(){m(),g.point=_,g.lineEnd=w}function _(t,e){y(n=t,e),i=c,a=f,o=h,s=p,l=d,g.point=y}function w(){r(c,f,u,h,p,d,i,a,n,o,s,l,16,e),g.lineEnd=x,x()}return g}}(t,e):function(t){return Hr({point:function(e,r){e=t(e,r),this.stream.point(e[0],e[1])}})}(t)}var $r=Hr({point:function(t,e){this.stream.point(t*p,e*p)}});function Qr(t,e,r,n,i){function a(a,o){return[e+t*(a*=n),r-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*n,(r-o)/t*i]},a}function tn(t,e,r,n,i,a){var o=m(a),s=w(a),l=o*t,u=s*t,c=o/t,f=s/t,h=(s*r-o*e)/t,p=(s*e+o*r)/t;function d(t,a){return[l*(t*=n)-u*(a*=i)+e,r-u*t-l*a]}return d.invert=function(t,e){return[n*(c*t-f*e+h),i*(p-f*t-c*e)]},d}function en(t){return rn((function(){return t}))()}function rn(t){var e,r,n,i,a,o,s,l,u,c,f=150,d=480,g=250,v=0,m=0,y=0,x=0,b=0,_=0,w=1,k=1,M=null,A=me,S=null,E=Ge,C=.5;function L(t){return l(t[0]*p,t[1]*p)}function P(t){return(t=l.invert(t[0],t[1]))&&[t[0]*h,t[1]*h]}function O(){var t=tn(f,0,0,w,k,_).apply(null,e(v,m)),n=(_?tn:Qr)(f,d-t[0],g-t[1],w,k,_);return r=Qt(y,x,b),s=Jt(e,n),l=Jt(r,s),o=Jr(s,C),I()}function I(){return u=c=null,L}return L.stream=function(t){return u&&c===t?u:u=$r(function(t){return Hr({point:function(e,r){var n=t(e,r);return this.stream.point(n[0],n[1])}})}(r)(A(o(E(c=t)))))},L.preclip=function(t){return arguments.length?(A=t,M=void 0,I()):A},L.postclip=function(t){return arguments.length?(E=t,S=n=i=a=null,I()):E},L.clipAngle=function(t){return arguments.length?(A=+t?ye(M=t*p):(M=null,me),I()):M*h},L.clipExtent=function(t){return arguments.length?(E=null==t?(S=n=i=a=null,Ge):_e(S=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),I()):null==S?null:[[S,n],[i,a]]},L.scale=function(t){return arguments.length?(f=+t,O()):f},L.translate=function(t){return arguments.length?(d=+t[0],g=+t[1],O()):[d,g]},L.center=function(t){return arguments.length?(v=t[0]%360*p,m=t[1]%360*p,O()):[v*h,m*h]},L.rotate=function(t){return arguments.length?(y=t[0]%360*p,x=t[1]%360*p,b=t.length>2?t[2]%360*p:0,O()):[y*h,x*h,b*h]},L.angle=function(t){return arguments.length?(_=t%360*p,O()):_*h},L.reflectX=function(t){return arguments.length?(w=t?-1:1,O()):w<0},L.reflectY=function(t){return arguments.length?(k=t?-1:1,O()):k<0},L.precision=function(t){return arguments.length?(o=Jr(s,C=t*t),I()):T(C)},L.fitExtent=function(t,e){return Yr(L,t,e)},L.fitSize=function(t,e){return Wr(L,t,e)},L.fitWidth=function(t,e){return Xr(L,t,e)},L.fitHeight=function(t,e){return Zr(L,t,e)},function(){return e=t.apply(this,arguments),L.invert=e.invert&&P,O()}}function nn(t){var e=0,r=l/3,n=rn(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*p,r=t[1]*p):[e*h,r*h]},i}function an(t,e){var r=w(t),n=(r+w(e))/2;if(d(n)<o)return function(t){var e=m(t);function r(t,r){return[t*e,w(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}(t);var i=1+r*(2*n-r),a=T(i)/n;function s(t,e){var r=T(i-2*n*w(e))/n;return[r*w(t*=n),a-r*m(t)]}return s.invert=function(t,e){var r=a-e,o=v(t,d(r))*k(r);return r*n<0&&(o-=l*k(t)*k(r)),[o/n,S((i-(t*t+r*r)*n*n)/(2*n))]},s}function on(){return nn(an).scale(155.424).center([0,33.6442])}function sn(){return on().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ln(t){return function(e,r){var n=m(e),i=m(r),a=t(n*i);return[a*i*w(e),a*w(r)]}}function un(t){return function(e,r){var n=T(e*e+r*r),i=t(n),a=w(i),o=m(i);return[v(e*a,n*o),S(n&&r*a/n)]}}var cn=ln((function(t){return T(2/(1+t))}));cn.invert=un((function(t){return 2*S(t/2)}));var fn=ln((function(t){return(t=A(t))&&t/w(t)}));function hn(t,e){return[t,b(M((u+e)/2))]}function pn(t){var e,r,n,i=en(t),a=i.center,o=i.scale,s=i.translate,u=i.clipExtent,c=null;function f(){var a=l*o(),s=i(ne(i.rotate()).invert([0,0]));return u(null==c?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===hn?[[Math.max(s[0]-a,c),e],[Math.min(s[0]+a,r),n]]:[[c,Math.max(s[1]-a,e)],[r,Math.min(s[1]+a,n)]])}return i.scale=function(t){return arguments.length?(o(t),f()):o()},i.translate=function(t){return arguments.length?(s(t),f()):s()},i.center=function(t){return arguments.length?(a(t),f()):a()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=r=n=null:(c=+t[0][0],e=+t[0][1],r=+t[1][0],n=+t[1][1]),f()):null==c?null:[[c,e],[r,n]]},f()}function dn(t){return M((u+t)/2)}function gn(t,e){var r=m(t),n=t===e?w(t):b(r/m(e))/b(dn(e)/dn(t)),i=r*_(dn(t),n)/n;if(!n)return hn;function a(t,e){i>0?e<-u+o&&(e=-u+o):e>u-o&&(e=u-o);var r=i/_(dn(e),n);return[r*w(n*t),i-r*m(n*t)]}return a.invert=function(t,e){var r=i-e,a=k(n)*T(t*t+r*r),o=v(t,d(r))*k(r);return r*n<0&&(o-=l*k(t)*k(r)),[o/n,2*g(_(i/a,1/n))-u]},a}function vn(t,e){return[t,e]}function mn(t,e){var r=m(t),n=t===e?w(t):(r-m(e))/(e-t),i=r/n+t;if(d(n)<o)return vn;function a(t,e){var r=i-e,a=n*t;return[r*w(a),i-r*m(a)]}return a.invert=function(t,e){var r=i-e,a=v(t,d(r))*k(r);return r*n<0&&(a-=l*k(t)*k(r)),[a/n,i-k(n)*T(t*t+r*r)]},a}fn.invert=un((function(t){return t})),hn.invert=function(t,e){return[t,2*g(x(e))-u]},vn.invert=vn;var yn=1.340264,xn=-.081106,bn=893e-6,_n=.003796,wn=T(3)/2;function kn(t,e){var r=S(wn*w(e)),n=r*r,i=n*n*n;return[t*m(r)/(wn*(yn+3*xn*n+i*(7*bn+9*_n*n))),r*(yn+xn*n+i*(bn+_n*n))]}function Tn(t,e){var r=m(e),n=m(t)*r;return[r*w(t)/n,w(e)/n]}function Mn(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function An(t,e){return[m(e)*w(t),w(e)]}function Sn(t,e){var r=m(e),n=1+m(t)*r;return[r*w(t)/n,w(e)/n]}function En(t,e){return[b(M((u+e)/2)),-t]}kn.invert=function(t,e){for(var r,n=e,i=n*n,a=i*i*i,o=0;o<12&&(a=(i=(n-=r=(n*(yn+xn*i+a*(bn+_n*i))-e)/(yn+3*xn*i+a*(7*bn+9*_n*i)))*n)*i*i,!(d(r)<s));++o);return[wn*t*(yn+3*xn*i+a*(7*bn+9*_n*i))/m(n),S(w(n)/wn)]},Tn.invert=un(g),Mn.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,s=a*a;n-=r=(n*(1.007226+a*(.015085+s*(.028874*a-.044475-.005916*s)))-e)/(1.007226+a*(.045255+s*(.259866*a-.311325-.005916*11*s)))}while(d(r)>o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},An.invert=un(S),Sn.invert=un((function(t){return 2*g(t)})),En.invert=function(t,e){return[-e,2*g(x(t))-u]},t.geoAlbers=sn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=sn(),l=on().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=on().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?u:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),u.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++r<i;)n[r].point(t,e)},sphere:function(){for(var t=-1;++t<i;)n[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)n[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)n[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)n[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)n[t].polygonEnd()}});var n,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),u.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){if(!arguments.length)return s.translate();var e=s.scale(),a=+t[0],f=+t[1];return r=s.translate(t).clipExtent([[a-.455*e,f-.238*e],[a+.455*e,f+.238*e]]).stream(c),n=l.translate([a-.307*e,f+.201*e]).clipExtent([[a-.425*e+o,f+.12*e+o],[a-.214*e-o,f+.234*e-o]]).stream(c),i=u.translate([a-.205*e,f+.212*e]).clipExtent([[a-.214*e+o,f+.166*e+o],[a-.115*e-o,f+.234*e-o]]).stream(c),h()},f.fitExtent=function(t,e){return Yr(f,t,e)},f.fitSize=function(t,e){return Wr(f,t,e)},f.fitWidth=function(t,e){return Xr(f,t,e)},f.fitHeight=function(t,e){return Zr(f,t,e)},f.scale(1070)},t.geoArea=function(t){return V.reset(),z(t,H),2*V},t.geoAzimuthalEqualArea=function(){return en(cn).scale(124.75).clipAngle(179.999)},t.geoAzimuthalEqualAreaRaw=cn,t.geoAzimuthalEquidistant=function(){return en(fn).scale(79.4188).clipAngle(179.999)},t.geoAzimuthalEquidistantRaw=fn,t.geoBounds=function(t){var e,r,n,i,a,o,s;if(it=nt=-(et=rt=1/0),ut=[],z(t,Et),r=ut.length){for(ut.sort(Ft),e=1,a=[n=ut[0]];e<r;++e)Nt(n,(i=ut[e])[0])||Nt(n,i[1])?(Rt(n[0],i[1])>Rt(n[0],n[1])&&(n[1]=i[1]),Rt(i[0],n[1])>Rt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Rt(n[1],i[0]))>o&&(o=s,et=i[0],nt=n[1])}return ut=ct=null,et===1/0||rt===1/0?[[NaN,NaN],[NaN,NaN]]:[[et,rt],[nt,it]]},t.geoCentroid=function(t){ft=ht=pt=dt=gt=vt=mt=yt=xt=bt=_t=0,z(t,Bt);var e=xt,r=bt,n=_t,i=e*e+r*r+n*n;return i<s&&(e=vt,r=mt,n=yt,ht<o&&(e=pt,r=dt,n=gt),(i=e*e+r*r+n*n)<s)?[NaN,NaN]:[v(r,e)*h,S(n/T(i))*h]},t.geoCircle=function(){var t,e,r=Kt([0,0]),n=Kt(90),i=Kt(6),a={point:function(r,n){t.push(r=e(r,n)),r[0]*=h,r[1]*=h}};function o(){var o=r.apply(this,arguments),s=n.apply(this,arguments)*p,l=i.apply(this,arguments)*p;return t=[],e=Qt(-o[0]*p,-o[1]*p,0).invert,ie(a,s,l,1),o={type:\"Polygon\",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(r=\"function\"==typeof t?t:Kt([+t[0],+t[1]]),o):r},o.radius=function(t){return arguments.length?(n=\"function\"==typeof t?t:Kt(+t),o):n},o.precision=function(t){return arguments.length?(i=\"function\"==typeof t?t:Kt(+t),o):i},o},t.geoClipAntimeridian=me,t.geoClipCircle=ye,t.geoClipExtent=function(){var t,e,r,n=0,i=0,a=960,o=500;return r={stream:function(r){return t&&e===r?t:t=_e(n,i,a,o)(e=r)},extent:function(s){return arguments.length?(n=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,r):[[n,i],[a,o]]}}},t.geoClipRectangle=_e,t.geoConicConformal=function(){return nn(gn).scale(109.5).parallels([30,30])},t.geoConicConformalRaw=gn,t.geoConicEqualArea=on,t.geoConicEqualAreaRaw=an,t.geoConicEquidistant=function(){return nn(mn).scale(131.154).center([0,13.9389])},t.geoConicEquidistantRaw=mn,t.geoContains=function(t,e){return(t&&De.hasOwnProperty(t.type)?De[t.type]:Re)(t,e)},t.geoDistance=Ie,t.geoEqualEarth=function(){return en(kn).scale(177.158)},t.geoEqualEarthRaw=kn,t.geoEquirectangular=function(){return en(vn).scale(152.63)},t.geoEquirectangularRaw=vn,t.geoGnomonic=function(){return en(Tn).scale(144.049).clipAngle(60)},t.geoGnomonicRaw=Tn,t.geoGraticule=qe,t.geoGraticule10=function(){return qe()()},t.geoIdentity=function(){var t,e,r,n,i,a,o,s=1,l=0,u=0,c=1,f=1,d=0,g=null,v=1,y=1,x=Hr({point:function(t,e){var r=k([t,e]);this.stream.point(r[0],r[1])}}),b=Ge;function _(){return v=s*c,y=s*f,a=o=null,k}function k(r){var n=r[0]*v,i=r[1]*y;if(d){var a=i*t-n*e;n=n*t+i*e,i=a}return[n+l,i+u]}return k.invert=function(r){var n=r[0]-l,i=r[1]-u;if(d){var a=i*t+n*e;n=n*t-i*e,i=a}return[n/v,i/y]},k.stream=function(t){return a&&o===t?a:a=x(b(o=t))},k.postclip=function(t){return arguments.length?(b=t,g=r=n=i=null,_()):b},k.clipExtent=function(t){return arguments.length?(b=null==t?(g=r=n=i=null,Ge):_e(g=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),_()):null==g?null:[[g,r],[n,i]]},k.scale=function(t){return arguments.length?(s=+t,_()):s},k.translate=function(t){return arguments.length?(l=+t[0],u=+t[1],_()):[l,u]},k.angle=function(r){return arguments.length?(e=w(d=r%360*p),t=m(d),_()):d*h},k.reflectX=function(t){return arguments.length?(c=t?-1:1,_()):c<0},k.reflectY=function(t){return arguments.length?(f=t?-1:1,_()):f<0},k.fitExtent=function(t,e){return Yr(k,t,e)},k.fitSize=function(t,e){return Wr(k,t,e)},k.fitWidth=function(t,e){return Xr(k,t,e)},k.fitHeight=function(t,e){return Zr(k,t,e)},k},t.geoInterpolate=function(t,e){var r=t[0]*p,n=t[1]*p,i=e[0]*p,a=e[1]*p,o=m(n),s=w(n),l=m(a),u=w(a),c=o*m(r),f=o*w(r),d=l*m(i),g=l*w(i),y=2*S(T(E(a-n)+o*l*E(i-r))),x=w(y),b=y?function(t){var e=w(t*=y)/x,r=w(y-t)/x,n=r*c+e*d,i=r*f+e*g,a=r*s+e*u;return[v(i,n)*h,v(a,T(n*n+i*i))*h]}:function(){return[r*h,n*h]};return b.distance=y,b},t.geoLength=Le,t.geoMercator=function(){return pn(hn).scale(961/f)},t.geoMercatorRaw=hn,t.geoNaturalEarth1=function(){return en(Mn).scale(175.295)},t.geoNaturalEarth1Raw=Mn,t.geoOrthographic=function(){return en(An).scale(249.5).clipAngle(90.000001)},t.geoOrthographicRaw=An,t.geoPath=function(t,e){var r,n,i=4.5;function a(t){return t&&(\"function\"==typeof i&&n.pointRadius(+i.apply(this,arguments)),z(t,r(n))),n.result()}return a.area=function(t){return z(t,r($e)),$e.result()},a.measure=function(t){return z(t,r(Nr)),Nr.result()},a.bounds=function(t){return z(t,r(fr)),fr.result()},a.centroid=function(t){return z(t,r(_r)),_r.result()},a.projection=function(e){return arguments.length?(r=null==e?(t=null,Ge):(t=e).stream,a):t},a.context=function(t){return arguments.length?(n=null==t?(e=null,new Ur):new Pr(e=t),\"function\"!=typeof i&&n.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i=\"function\"==typeof t?t:(n.pointRadius(+t),+t),a):i},a.projection(t).context(e)},t.geoProjection=en,t.geoProjectionMutator=rn,t.geoRotation=ne,t.geoStereographic=function(){return en(Sn).scale(250).clipAngle(142)},t.geoStereographicRaw=Sn,t.geoStream=z,t.geoTransform=function(t){return{stream:Hr(t)}},t.geoTransverseMercator=function(){var t=pn(En),e=t.center,r=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?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=En,Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\")):i((n=n||self).d3=n.d3||{},n.d3)},{\"d3-array\":107}],115:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,c=new u(t),f=+t.value&&(c.value=t.value),h=[c];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new u(i[a])),n.parent=r,n.depth=r.depth+1;return c.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function u(t){this.data=t,this.depth=this.height=0,this.parent=null}u.prototype=a.prototype={constructor:u,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n<i;++n)o.push(r[n])}while(o.length);return this},eachAfter:function(t){for(var e,r,n,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(r=0,n=e.length;r<n;++r)a.push(e[r]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,r,n=this,i=[n];n=i.pop();)if(t(n),e=n.children)for(r=e.length-1;r>=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},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(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var c=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(c.call(t))).length,a=[];n<i;)e=t[n],r&&d(r,e)?++n:(r=v(a=h(a,e)),n=0);return r}function h(t,e){var r,n;if(g(e,t))return[e];for(r=0;r<t.length;++r)if(p(e,t[r])&&g(m(t[r],e),t))return[t[r],e];for(r=0;r<t.length-1;++r)for(n=r+1;n<t.length;++n)if(p(m(t[r],t[n]),e)&&p(m(t[r],e),t[n])&&p(m(t[n],e),t[r])&&g(y(t[r],t[n],e),t))return[t[r],t[n],e];throw new Error}function p(t,e){var r=t.r-e.r,n=e.x-t.x,i=e.y-t.y;return r<0||r*r<n*n+i*i}function d(t,e){var r=t.r-e.r+1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r<e.length;++r)if(!d(t,e[r]))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 m(t[0],t[1]);case 3:return y(t[0],t[1],t[2])}var e}function m(t,e){var r=t.x,n=t.y,i=t.r,a=e.x,o=e.y,s=e.r,l=a-r,u=o-n,c=s-i,f=Math.sqrt(l*l+u*u);return{x:(r+a+l/f*c)/2,y:(n+o+u/f*c)/2,r:(f+i+s)/2}}function y(t,e,r){var n=t.x,i=t.y,a=t.r,o=e.x,s=e.y,l=e.r,u=r.x,c=r.y,f=r.r,h=n-o,p=n-u,d=i-s,g=i-c,v=l-a,m=f-a,y=n*n+i*i-a*a,x=y-o*o-s*s+l*l,b=y-u*u-c*c+f*f,_=p*d-h*g,w=(d*b-g*x)/(2*_)-n,k=(g*v-d*m)/_,T=(p*x-h*b)/(2*_)-i,M=(h*m-p*v)/_,A=k*k+M*M-1,S=2*(a+w*k+T*M),E=w*w+T*T-a*a,C=-(A?(S+Math.sqrt(S*S-4*A*E))/(2*A):E/S);return{x:n+w+k*C,y:i+T+M*C,r:C}}function x(t,e,r){var n,i,a,o,s=t.x-e.x,l=t.y-e.y,u=s*s+l*l;u?(i=e.r+r.r,i*=i,o=t.r+r.r,i>(o*=o)?(n=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function k(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,u,c,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;s<i;++s){x(e._,r._,n=t[s]),n=new w(n),l=r.next,u=e.previous,c=r._.r,h=e._.r;do{if(c<=h){if(b(l._,n._)){r=l,e.next=r,r.previous=e,--s;continue t}c+=l._.r,l=l.next}else{if(b(u._,n._)){(e=u).next=r,r.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(l!==u.next);for(n.previous=e,n.next=r,e.next=r.previous=r=n,a=_(e);(n=n.next)!==r;)(o=_(n))<a&&(e=n,a=o);r=e.next}for(e=[r._],n=r;(n=n.next)!==r;)e.push(n._);for(n=f(e),s=0;s<i;++s)(e=t[s]).x-=n.x,e.y-=n.y;return n.r}function T(t){return null==t?null:M(t)}function M(t){if(\"function\"!=typeof t)throw new Error;return t}function A(){return 0}function S(t){return function(){return t}}function E(t){return Math.sqrt(t.value)}function C(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function L(t,e){return function(r){if(n=r.children){var n,i,a,o=n.length,s=t(r)*e||0;if(s)for(i=0;i<o;++i)n[i].r+=s;if(a=k(n),s)for(i=0;i<o;++i)n[i].r-=s;r.r=a+s}}}function P(t){return function(e){var r=e.parent;e.r*=t,r&&(e.x=r.x+t*e.x,e.y=r.y+t*e.y)}}function O(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 I(t,e,r,n,i){for(var a,o=t.children,s=-1,l=o.length,u=t.value&&(n-e)/t.value;++s<l;)(a=o[s]).y0=r,a.y1=i,a.x0=e,a.x1=e+=a.value*u}var D={depth:-1},z={};function R(t){return t.id}function F(t){return t.parentId}function N(t,e){return t.parent===e.parent?1:2}function B(t){var e=t.children;return e?e[0]:t.t}function j(t){var e=t.children;return e?e[e.length-1]:t.t}function U(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function V(t,e,r){return t.a.parent===e.parent?t.a:r}function H(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 q(t,e,r,n,i){for(var a,o=t.children,s=-1,l=o.length,u=t.value&&(i-r)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=n,a.y0=r,a.y1=r+=a.value*u}H.prototype=Object.create(u.prototype);var G=(1+Math.sqrt(5))/2;function Y(t,e,r,n,i,a){for(var o,s,l,u,c,f,h,p,d,g,v,m=[],y=e.children,x=0,b=0,_=y.length,w=e.value;x<_;){l=i-r,u=a-n;do{c=y[b++].value}while(!c&&b<_);for(f=h=c,v=c*c*(g=Math.max(u/l,l/u)/(w*t)),d=Math.max(h/v,v/f);b<_;++b){if(c+=s=y[b].value,s<f&&(f=s),s>h&&(h=s),v=c*c*g,(p=Math.max(h/v,v/f))>d){c-=s;break}d=p}m.push(o={value:c,dice:l<u,children:y.slice(x,b)}),o.dice?I(o,r,n,i,w?n+=u*c/w:a):q(o,r,n,w?r+=l*c/w:i,a),w-=c,x=b}return m}var W=function t(e){function r(t,r,n,i,a){Y(e,t,r,n,i,a)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}(G),X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,u,c,f=-1,h=o.length,p=t.value;++f<h;){for(l=(s=o[f]).children,u=s.value=0,c=l.length;u<c;++u)s.value+=l[u].value;s.dice?I(s,r,n,i,n+=(a-n)*s.value/p):q(s,r,n,r+=(i-r)*s.value/p,a),p-=s.value}else t._squarify=o=Y(e,t,r,n,i,a),o.ratio=e}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var u=function(t){for(var e;e=t.children;)t=e[0];return t}(e),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=A;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(C(t)).eachAfter(L(n,.5)).eachBefore(P(1)):i.eachBefore(C(E)).eachAfter(L(A,1)).eachAfter(L(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=T(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n=\"function\"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return k(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&I(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),n.x0=i,n.y0=a,n.x1=o,n.y1=s}}(e,a)),n&&i.eachBefore(O),i}return i.round=function(t){return arguments.length?(n=!!t,i):n},i.size=function(r){return arguments.length?(t=+r[0],e=+r[1],i):[t,e]},i.padding=function(t){return arguments.length?(r=+t,i):r},i},t.stratify=function(){var t=R,e=F;function r(r){var n,i,a,o,s,c,f,h=r.length,p=new Array(h),d={};for(i=0;i<h;++i)n=r[i],s=p[i]=new u(n),null!=(c=t(n,i,r))&&(c+=\"\")&&(d[f=\"$\"+(s.id=c)]=f in d?z:s);for(i=0;i<h;++i)if(s=p[i],null!=(c=e(r[i],i,r))&&(c+=\"\")){if(!(o=d[\"$\"+c]))throw new Error(\"missing: \"+c);if(o===z)throw new Error(\"ambiguous: \"+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error(\"multiple roots\");a=s}if(!a)throw new Error(\"no root\");if(a.parent=D,a.eachBefore((function(t){t.depth=t.parent.depth+1,--h})).eachBefore(l),a.parent=null,h>0)throw new Error(\"cycle\");return a}return r.id=function(e){return arguments.length?(t=M(e),r):t},r.parentId=function(t){return arguments.length?(e=M(t),r):e},r},t.tree=function(){var t=N,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var u=i,c=i,f=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>f.depth&&(f=t)}));var h=u===c?1:t(u,c)/2,p=h-u.x,d=e/(c.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,h=l.m;s=j(s),a=B(a),s&&a;)l=B(l),(o=j(o)).a=e,(i=s.z+f-a.z-u+t(s._,a._))>0&&(U(V(s,e,n),e,i),u+=i,c+=i),f+=s.m,u+=a.m,h+=l.m,c+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-c),a&&!B(l)&&(l.t=a,l.m+=u-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=A,o=A,s=A,l=A,u=A;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(O),t}function f(e){var r=i[e.depth],n=e.x0+r,c=e.y0+r,f=e.x1-r,h=e.y1-r;f<n&&(n=f=(n+f)/2),h<c&&(c=h=(c+h)/2),e.x0=n,e.y0=c,e.x1=f,e.y1=h,e.children&&(r=i[e.depth+1]=a(e)/2,n+=u(e)-r,c+=o(e)-r,(f-=s(e)-r)<n&&(n=f=(n+f)/2),(h-=l(e)-r)<c&&(c=h=(c+h)/2),t(e,n,c,f,h))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],n=+t[1],c):[r,n]},c.tile=function(e){return arguments.length?(t=M(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a=\"function\"==typeof t?t:S(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o=\"function\"==typeof t?t:S(+t),c):o},c.paddingRight=function(t){return arguments.length?(s=\"function\"==typeof t?t:S(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l=\"function\"==typeof t?t:S(+t),c):l},c.paddingLeft=function(t){return arguments.length?(u=\"function\"==typeof t?t:S(+t),c):u},c},t.treemapBinary=function(t,e,r,n,i){var a,o,s=t.children,l=s.length,u=new Array(l+1);for(u[0]=o=a=0;a<l;++a)u[a+1]=o+=s[a].value;!function t(e,r,n,i,a,o,l){if(e>=r-1){var c=s[e];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=l)}for(var f=u[e],h=n/2+f,p=e+1,d=r-1;p<d;){var g=p+d>>>1;u[g]<h?p=g+1:d=g}h-u[p-1]<u[p]-h&&e+1<p&&--p;var v=u[p]-f,m=n-v;if(o-i>l-a){var y=(i*m+o*v)/n;t(e,p,v,i,a,y,l),t(p,r,m,y,a,o,l)}else{var x=(a*m+l*v)/n;t(e,p,v,i,a,o,x),t(p,r,m,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=I,t.treemapResquarify=X,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:I)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).d3=n.d3||{})},{}],116:[function(t,e,r){var n,i;n=this,i=function(t,e){\"use strict\";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=i<e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,l)}}function i(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],l=t[(i+2)%e];return r((n-i/e)*e,a,o,s,l)}}function a(t){return function(){return t}}function o(t,e){return function(r){return t+r*e}}function s(t,e){var r=e-t;return r?o(t,r>180||r<-180?r-360*Math.round(r/360):r):a(isNaN(t)?e:t)}function l(t){return 1==(t=+t)?u:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):a(isNaN(e)?r:e)}}function u(t,e){var r=e-t;return r?o(t,r):a(isNaN(t)?e:t)}var c=function t(r){var n=l(r);function i(t,r){var i=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=n(t.g,r.g),o=n(t.b,r.b),s=u(t.opacity,r.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+\"\"}}return i.gamma=t,i}(1);function f(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n<a;++n)i=e.rgb(r[n]),o[n]=i.r||0,s[n]=i.g||0,l[n]=i.b||0;return o=t(o),s=t(s),l=t(l),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=l(t),i+\"\"}}}var h=f(n),p=f(i);function d(t,e){e||(e=[]);var r,n=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(r=0;r<n;++r)i[r]=t[r]*(1-a)+e[r]*a;return i}}function g(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function v(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(i),o=new Array(n);for(r=0;r<i;++r)a[r]=k(t[r],e[r]);for(;r<n;++r)o[r]=e[r];return function(t){for(r=0;r<i;++r)o[r]=a[r](t);return o}}function m(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function y(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function x(t,e){var r,n={},i={};for(r in null!==t&&\"object\"==typeof t||(t={}),null!==e&&\"object\"==typeof e||(e={}),e)r in t?n[r]=k(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var b=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,_=new RegExp(b.source,\"g\");function w(t,e){var r,n,i,a=b.lastIndex=_.lastIndex=0,o=-1,s=[],l=[];for(t+=\"\",e+=\"\";(r=b.exec(t))&&(n=_.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:y(r,n)})),a=_.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+\"\"}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\"\")})}function k(t,r){var n,i=typeof r;return null==r||\"boolean\"===i?a(r):(\"number\"===i?y:\"string\"===i?(n=e.color(r))?(r=n,c):w:r instanceof e.color?c:r instanceof Date?m:g(r)?d:Array.isArray(r)?v:\"function\"!=typeof r.valueOf&&\"function\"!=typeof r.toString||isNaN(r)?x:y)(t,r)}var T,M,A,S,E=180/Math.PI,C={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function L(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*E,skewX:Math.atan(l)*E,scaleX:o,scaleY:s}}function P(t,e,r,n){function i(t){return t.length?t.pop()+\" \":\"\"}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push(\"translate(\",null,e,null,r);s.push({i:l-4,x:y(t,i)},{i:l-2,x:y(n,a)})}else(i||a)&&o.push(\"translate(\"+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:y(t,e)})):e&&r.push(i(r)+\"rotate(\"+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+\"skewX(\",null,n)-2,x:y(t,e)}):e&&r.push(i(r)+\"skewX(\"+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+\"scale(\",null,\",\",null,\")\");o.push({i:s-4,x:y(t,r)},{i:s-2,x:y(e,n)})}else 1===r&&1===n||a.push(i(a)+\"scale(\"+r+\",\"+n+\")\")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r<n;)s[(e=l[r]).i]=e.x(t);return s.join(\"\")}}}var O=P((function(t){return\"none\"===t?C:(T||(T=document.createElement(\"DIV\"),M=document.documentElement,A=document.defaultView),T.style.transform=t,t=A.getComputedStyle(M.appendChild(T),null).getPropertyValue(\"transform\"),M.removeChild(T),L(+(t=t.slice(7,-1).split(\",\"))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),\"px, \",\"px)\",\"deg)\"),I=P((function(t){return null==t?C:(S||(S=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),S.setAttribute(\"transform\",t),(t=S.transform.baseVal.consolidate())?L((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):C)}),\", \",\")\",\")\"),D=Math.SQRT2;function z(t){return((t=Math.exp(t))+1/t)/2}function R(t){return function(r,n){var i=t((r=e.hsl(r)).h,(n=e.hsl(n)).h),a=u(r.s,n.s),o=u(r.l,n.l),s=u(r.opacity,n.opacity);return function(t){return r.h=i(t),r.s=a(t),r.l=o(t),r.opacity=s(t),r+\"\"}}}var F=R(s),N=R(u);function B(t){return function(r,n){var i=t((r=e.hcl(r)).h,(n=e.hcl(n)).h),a=u(r.c,n.c),o=u(r.l,n.l),s=u(r.opacity,n.opacity);return function(t){return r.h=i(t),r.c=a(t),r.l=o(t),r.opacity=s(t),r+\"\"}}}var j=B(s),U=B(u);function V(t){return function r(n){function i(r,i){var a=t((r=e.cubehelix(r)).h,(i=e.cubehelix(i)).h),o=u(r.s,i.s),s=u(r.l,i.l),l=u(r.opacity,i.opacity);return function(t){return r.h=a(t),r.s=o(t),r.l=s(Math.pow(t,n)),r.opacity=l(t),r+\"\"}}return n=+n,i.gamma=r,i}(1)}var H=V(s),q=V(u);t.interpolate=k,t.interpolateArray=function(t,e){return(g(e)?d:v)(t,e)},t.interpolateBasis=n,t.interpolateBasisClosed=i,t.interpolateCubehelix=H,t.interpolateCubehelixLong=q,t.interpolateDate=m,t.interpolateDiscrete=function(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}},t.interpolateHcl=j,t.interpolateHclLong=U,t.interpolateHsl=F,t.interpolateHslLong=N,t.interpolateHue=function(t,e){var r=s(+t,+e);return function(t){var e=r(t);return e-360*Math.floor(e/360)}},t.interpolateLab=function(t,r){var n=u((t=e.lab(t)).l,(r=e.lab(r)).l),i=u(t.a,r.a),a=u(t.b,r.b),o=u(t.opacity,r.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=a(e),t.opacity=o(e),t+\"\"}},t.interpolateNumber=y,t.interpolateNumberArray=d,t.interpolateObject=x,t.interpolateRgb=c,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=p,t.interpolateRound=function(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}},t.interpolateString=w,t.interpolateTransformCss=O,t.interpolateTransformSvg=I,t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],c=s-i,f=l-a,h=c*c+f*f;if(h<1e-12)n=Math.log(u/o)/D,r=function(t){return[i+t*c,a+t*f,o*Math.exp(D*t*n)]};else{var p=Math.sqrt(h),d=(u*u-o*o+4*h)/(2*o*2*p),g=(u*u-o*o-4*h)/(2*u*2*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);n=(m-v)/D,r=function(t){var e,r=t*n,s=z(v),l=o/(2*p)*(s*(e=D*r+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+l*c,a+l*f,o*s/z(D*r+v)]}}return r.duration=1e3*n,r},t.piecewise=function(t,e){for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(t){var e=Math.max(0,Math.min(n-1,Math.floor(t*=n)));return a[e](t-e)}},t.quantize=function(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i((n=n||self).d3=n.d3||{},n.d3)},{\"d3-color\":109}],117:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";var e=Math.PI,r=2*e,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=\"\"}function o(){return new a}a.prototype=o.prototype={constructor:a,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,r,n){this._+=\"Q\"+ +t+\",\"+ +e+\",\"+(this._x1=+r)+\",\"+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+=\"C\"+ +t+\",\"+ +e+\",\"+ +r+\",\"+ +n+\",\"+(this._x1=+i)+\",\"+(this._y1=+a)},arcTo:function(t,r,i,a,o){t=+t,r=+r,i=+i,a=+a,o=+o;var s=this._x1,l=this._y1,u=i-t,c=a-r,f=s-t,h=l-r,p=f*f+h*h;if(o<0)throw new Error(\"negative radius: \"+o);if(null===this._x1)this._+=\"M\"+(this._x1=t)+\",\"+(this._y1=r);else if(p>n)if(Math.abs(h*u-c*f)>n&&o){var d=i-s,g=a-l,v=u*u+c*c,m=d*d+g*g,y=Math.sqrt(v),x=Math.sqrt(p),b=o*Math.tan((e-Math.acos((v+p-m)/(2*y*x)))/2),_=b/x,w=b/y;Math.abs(_-1)>n&&(this._+=\"L\"+(t+_*f)+\",\"+(r+_*h)),this._+=\"A\"+o+\",\"+o+\",0,0,\"+ +(h*d>f*g)+\",\"+(this._x1=t+w*u)+\",\"+(this._y1=r+w*c)}else this._+=\"L\"+(this._x1=t)+\",\"+(this._y1=r)},arc:function(t,a,o,s,l,u){t=+t,a=+a,u=!!u;var c=(o=+o)*Math.cos(s),f=o*Math.sin(s),h=t+c,p=a+f,d=1^u,g=u?s-l:l-s;if(o<0)throw new Error(\"negative radius: \"+o);null===this._x1?this._+=\"M\"+h+\",\"+p:(Math.abs(this._x1-h)>n||Math.abs(this._y1-p)>n)&&(this._+=\"L\"+h+\",\"+p),o&&(g<0&&(g=g%r+r),g>i?this._+=\"A\"+o+\",\"+o+\",0,1,\"+d+\",\"+(t-c)+\",\"+(a-f)+\"A\"+o+\",\"+o+\",0,1,\"+d+\",\"+(this._x1=h)+\",\"+(this._y1=p):g>n&&(this._+=\"A\"+o+\",\"+o+\",0,\"+ +(g>=e)+\",\"+d+\",\"+(this._x1=t+o*Math.cos(l))+\",\"+(this._y1=a+o*Math.sin(l))))},rect:function(t,e,r,n){this._+=\"M\"+(this._x0=this._x1=+t)+\",\"+(this._y0=this._y1=+e)+\"h\"+ +r+\"v\"+ +n+\"h\"+-r+\"Z\"},toString:function(){return this._}},t.path=o,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).d3=n.d3||{})},{}],118:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,u,c,f,h,p=t._root,d={data:n},g=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((u=e>=(a=(g+m)/2))?g=a:m=a,(c=r>=(o=(v+y)/2))?v=o:y=o,i=p,!(p=p[f=c<<1|u]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+m)/2))?g=a:m=a,(c=r>=(o=(v+y)/2))?v=o:y=o}while((f=c<<1|u)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i}function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),u=1/0,c=1/0,f=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(i=+this._x.call(null,r=t[n]))||isNaN(a=+this._y.call(null,r))||(s[n]=i,l[n]=a,i<u&&(u=i),i>f&&(f=i),a<c&&(c=a),a>h&&(h=a));if(u>f||c>h)return this;for(this.cover(u,c).cover(f,h),n=0;n<o;++n)e(this,s[n],l[n],t[n]);return this},l.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{for(var o,s,l=i-r,u=this._root;r>t||t>=i||n>e||e>=a;)switch(s=(e<n)<<1|t<r,(o=new Array(4))[s]=u,u=o,l*=2,s){case 0:i=r+l,a=n+l;break;case 1:r=i-l,a=n+l;break;case 2:i=r+l,n=a-l;break;case 3:r=i-l,n=a-l}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},l.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},l.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]]},l.find=function(t,e,n){var i,a,o,s,l,u,c,f=this._x0,h=this._y0,p=this._x1,d=this._y1,g=[],v=this._root;for(v&&g.push(new r(v,f,h,p,d)),null==n?n=1/0:(f=t-n,h=e-n,p=t+n,d=e+n,n*=n);u=g.pop();)if(!(!(v=u.node)||(a=u.x0)>p||(o=u.y0)>d||(s=u.x1)<f||(l=u.y1)<h))if(v.length){var m=(a+s)/2,y=(o+l)/2;g.push(new r(v[3],m,y,s,l),new r(v[2],a,y,m,l),new r(v[1],m,o,s,y),new r(v[0],a,o,m,y)),(c=(e>=y)<<1|t>=m)&&(u=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=u)}else{var x=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=x*x+b*b;if(_<n){var w=Math.sqrt(n=_);f=t-w,h=e-w,p=t+w,d=e+w,i=v.data}}return i},l.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,u,c,f,h,p=this._root,d=this._x0,g=this._y0,v=this._x1,m=this._y1;if(!p)return this;if(p.length)for(;;){if((u=a>=(s=(d+v)/2))?d=s:v=s,(c=o>=(l=(g+m)/2))?g=l:m=l,e=p,!(p=p[f=c<<1|u]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this},l.root=function(){return this._root},l.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},l.visit=function(t){var e,n,i,a,o,s,l=[],u=this._root;for(u&&l.push(new r(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,i=e.x0,a=e.y0,o=e.x1,s=e.y1)&&u.length){var c=(i+o)/2,f=(a+s)/2;(n=u[3])&&l.push(new r(n,c,f,o,s)),(n=u[2])&&l.push(new r(n,i,f,c,s)),(n=u[1])&&l.push(new r(n,c,a,o,f)),(n=u[0])&&l.push(new r(n,i,a,c,f))}return this},l.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new r(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var a=e.node;if(a.length){var o,s=e.x0,l=e.y0,u=e.x1,c=e.y1,f=(s+u)/2,h=(l+c)/2;(o=a[0])&&n.push(new r(o,s,l,f,h)),(o=a[1])&&n.push(new r(o,f,l,u,h)),(o=a[2])&&n.push(new r(o,s,h,f,c)),(o=a[3])&&n.push(new r(o,f,h,u,c))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},l.x=function(t){return arguments.length?(this._x=t,this):this._x},l.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=a,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).d3=n.d3||{})},{}],119:[function(t,e,r){var n,i;n=this,i=function(t,e){\"use strict\";function r(t){return function(){return t}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,p=2*f;function d(t){return t>1?0:t<-1?f:Math.acos(t)}function g(t){return t>=1?h:t<=-1?-h:Math.asin(t)}function v(t){return t.innerRadius}function m(t){return t.outerRadius}function y(t){return t.startAngle}function x(t){return t.endAngle}function b(t){return t&&t.padAngle}function _(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,f=o-i,h=s-a,p=h*l-f*u;if(!(p*p<c))return[t+(p=(f*(e-a)-h*(t-i))/p)*l,e+p*u]}function w(t,e,r,n,i,a,s){var l=t-r,c=e-n,f=(s?a:-a)/u(l*l+c*c),h=f*c,p=-f*l,d=t+h,g=e+p,v=r+h,m=n+p,y=(d+v)/2,x=(g+m)/2,b=v-d,_=m-g,w=b*b+_*_,k=i-a,T=d*m-v*g,M=(_<0?-1:1)*u(o(0,k*k*w-T*T)),A=(T*_-b*M)/w,S=(-T*b-_*M)/w,E=(T*_+b*M)/w,C=(-T*b+_*M)/w,L=A-y,P=S-x,O=E-y,I=C-x;return L*L+P*P>O*O+I*I&&(A=E,S=C),{cx:A,cy:S,x01:-h,y01:-p,x11:A*(i/k-1),y11:S*(i/k-1)}}function k(t){this._context=t}function T(t){return new k(t)}function M(t){return t[0]}function A(t){return t[1]}function S(){var t=M,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,u,c,f=r.length,h=!1;for(null==a&&(s=o(c=e.path())),l=0;l<=f;++l)!(l<f&&i(u=r[l],l,r))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(u,l,r),+n(u,l,r));if(c)return s=null,c+\"\"||null}return l.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),l):t},l.y=function(t){return arguments.length?(n=\"function\"==typeof t?t:r(+t),l):n},l.defined=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(!!t),l):i},l.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),l):o},l.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),l):a},l}function E(){var t=M,n=null,i=r(0),a=A,o=r(!0),s=null,l=T,u=null;function c(r){var c,f,h,p,d,g=r.length,v=!1,m=new Array(g),y=new Array(g);for(null==s&&(u=l(d=e.path())),c=0;c<=g;++c){if(!(c<g&&o(p=r[c],c,r))===v)if(v=!v)f=c,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=c-1;h>=f;--h)u.point(m[h],y[h]);u.lineEnd(),u.areaEnd()}v&&(m[c]=+t(p,c,r),y[c]=+i(p,c,r),u.point(n?+n(p,c,r):m[c],a?+a(p,c,r):y[c]))}if(d)return u=null,d+\"\"||null}function f(){return S().defined(o).curve(l).context(s)}return c.x=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),n=null,c):t},c.x0=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:\"function\"==typeof t?t:r(+t),c):n},c.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a=null,c):i},c.y0=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),c):i},c.y1=function(t){return arguments.length?(a=null==t?null:\"function\"==typeof t?t:r(+t),c):a},c.lineX0=c.lineY0=function(){return f().x(t).y(i)},c.lineY1=function(){return f().x(t).y(a)},c.lineX1=function(){return f().x(n).y(i)},c.defined=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(!!t),c):o},c.curve=function(t){return arguments.length?(l=t,null!=s&&(u=l(s)),c):l},c.context=function(t){return arguments.length?(null==t?s=u=null:u=l(s=t),c):s},c}function C(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function L(t){return t}k.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 P=I(T);function O(t){this._curve=t}function I(t){function e(e){return new O(t(e))}return e._curve=t,e}function D(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(I(t)):e()._curve},t}function z(){return D(S().curve(P))}function R(){var t=E().curve(P),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=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 D(r())},delete t.lineX0,t.lineEndAngle=function(){return D(n())},delete t.lineX1,t.lineInnerRadius=function(){return D(i())},delete t.lineY0,t.lineOuterRadius=function(){return D(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function F(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}O.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 N=Array.prototype.slice;function B(t){return t.source}function j(t){return t.target}function U(t){var n=B,i=j,a=M,o=A,s=null;function l(){var r,l=N.call(arguments),u=n.apply(this,l),c=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=u,l)),+o.apply(this,l),+a.apply(this,(l[0]=c,l)),+o.apply(this,l)),r)return s=null,r+\"\"||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function H(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function q(t,e,r,n,i){var a=F(e,r),o=F(e,r=(r+i)/2),s=F(n,r),l=F(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var G={draw:function(t,e){var r=Math.sqrt(e/f);t.moveTo(r,0),t.arc(0,0,r,0,p)}},Y={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},W=Math.sqrt(1/3),X=2*W,Z={draw:function(t,e){var r=Math.sqrt(e/X),n=r*W;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},K=Math.sin(f/10)/Math.sin(7*f/10),J=Math.sin(p/10)*K,$=-Math.cos(p/10)*K,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=$*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=p*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},tt={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},et=Math.sqrt(3),rt={draw:function(t,e){var r=-Math.sqrt(e/(3*et));t.moveTo(0,2*r),t.lineTo(-et*r,-r),t.lineTo(et*r,-r),t.closePath()}},nt=-.5,it=Math.sqrt(3)/2,at=1/Math.sqrt(12),ot=3*(at/2+1),st={draw:function(t,e){var r=Math.sqrt(e/ot),n=r/2,i=r*at,a=n,o=r*at+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(nt*n-it*i,it*n+nt*i),t.lineTo(nt*a-it*o,it*a+nt*o),t.lineTo(nt*s-it*l,it*s+nt*l),t.lineTo(nt*n+it*i,nt*i-it*n),t.lineTo(nt*a+it*o,nt*o-it*a),t.lineTo(nt*s+it*l,nt*l-it*s),t.closePath()}},lt=[G,Y,Z,tt,Q,rt,st];function ut(){}function ct(t,e,r){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+r)/6)}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t){this._context=t}function dt(t,e){this._basis=new ft(t),this._beta=e}ft.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:ct(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:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:ut,areaEnd:ut,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:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.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 r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},dt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var gt=function t(e){function r(t){return 1===e?new ft(t):new dt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function vt(t,e,r){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-r),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:vt(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:vt(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 yt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function xt(t,e){this._context=t,this._k=(1-e)/6}xt.prototype={areaStart:ut,areaEnd:ut,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:vt(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 r(t){return new xt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _t(t,e){this._context=t,this._k=(1-e)/6}_t.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:vt(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 wt=function t(e){function r(t){return new _t(t,e)}return r.tension=function(e){return t(+e)},r}(0);function kt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>c){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>c){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*u+t._y1*t._l23_2a-r*t._l12_2a)/f}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.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 r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:kt(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 Mt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:ut,areaEnd:ut,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 r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:kt(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 St=function t(e){function r(t){return e?new At(t,e):new xt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Et(t,e){this._context=t,this._alpha=e}Et.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 r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:kt(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 Ct=function t(e){function r(t){return e?new Et(t,e):new _t(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Pt(t){return t<0?-1:1}function Ot(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Pt(a)+Pt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Dt(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Rt(t){this._context=new Ft(t)}function Ft(t){this._context=t}function Nt(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/a[e-1],a[e]-=r,o[e]-=r*o[e-1];for(i[n-1]=o[n-1]/a[n-1],e=n-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function jt(t,e){this._context=t,this._t=e}function Ut(t,e){if((i=t.length)>1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(n=o,o=t[e[a]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(n[r][1])?n[r][0]:n[r][1]}function Vt(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function Ht(t,e){return t[e]}function qt(t){var e=t.map(Gt);return Vt(t).sort((function(t,r){return e[t]-e[r]}))}function Gt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++r<i;)(e=+t[r][1])>a&&(a=e,n=r);return n}function Yt(t){var e=t.map(Wt);return Vt(t).sort((function(t,r){return e[t]-e[r]}))}function Wt(t){for(var e,r=0,n=-1,i=t.length;++n<i;)(e=+t[n][1])&&(r+=e);return r}Lt.prototype={areaStart:ut,areaEnd:ut,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))}},zt.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:Dt(this,this._t0,It(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=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,Dt(this,It(this,r=Ot(this,t,e)),r);break;default:Dt(this,this._t0,r=Ot(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Rt.prototype=Object.create(zt.prototype)).point=function(t,e){zt.prototype.point.call(this,e,t)},Ft.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,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}},Nt.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,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var n=Bt(t),i=Bt(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===r)&&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)}},jt.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 r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=v,o=m,k=r(0),T=null,M=y,A=x,S=b,E=null;function C(){var r,v,m=+t.apply(this,arguments),y=+o.apply(this,arguments),x=M.apply(this,arguments)-h,b=A.apply(this,arguments)-h,C=n(b-x),L=b>x;if(E||(E=r=e.path()),y<m&&(v=y,y=m,m=v),y>c)if(C>p-c)E.moveTo(y*a(x),y*l(x)),E.arc(0,0,y,x,b,!L),m>c&&(E.moveTo(m*a(b),m*l(b)),E.arc(0,0,m,b,x,L));else{var P,O,I=x,D=b,z=x,R=b,F=C,N=C,B=S.apply(this,arguments)/2,j=B>c&&(T?+T.apply(this,arguments):u(m*m+y*y)),U=s(n(y-m)/2,+k.apply(this,arguments)),V=U,H=U;if(j>c){var q=g(j/m*l(B)),G=g(j/y*l(B));(F-=2*q)>c?(z+=q*=L?1:-1,R-=q):(F=0,z=R=(x+b)/2),(N-=2*G)>c?(I+=G*=L?1:-1,D-=G):(N=0,I=D=(x+b)/2)}var Y=y*a(I),W=y*l(I),X=m*a(R),Z=m*l(R);if(U>c){var K,J=y*a(D),$=y*l(D),Q=m*a(z),tt=m*l(z);if(C<f&&(K=_(Y,W,Q,tt,J,$,X,Z))){var et=Y-K[0],rt=W-K[1],nt=J-K[0],it=$-K[1],at=1/l(d((et*nt+rt*it)/(u(et*et+rt*rt)*u(nt*nt+it*it)))/2),ot=u(K[0]*K[0]+K[1]*K[1]);V=s(U,(m-ot)/(at-1)),H=s(U,(y-ot)/(at+1))}}N>c?H>c?(P=w(Q,tt,Y,W,y,H,L),O=w(J,$,X,Z,y,H,L),E.moveTo(P.cx+P.x01,P.cy+P.y01),H<U?E.arc(P.cx,P.cy,H,i(P.y01,P.x01),i(O.y01,O.x01),!L):(E.arc(P.cx,P.cy,H,i(P.y01,P.x01),i(P.y11,P.x11),!L),E.arc(0,0,y,i(P.cy+P.y11,P.cx+P.x11),i(O.cy+O.y11,O.cx+O.x11),!L),E.arc(O.cx,O.cy,H,i(O.y11,O.x11),i(O.y01,O.x01),!L))):(E.moveTo(Y,W),E.arc(0,0,y,I,D,!L)):E.moveTo(Y,W),m>c&&F>c?V>c?(P=w(X,Z,J,$,m,-V,L),O=w(Y,W,Q,tt,m,-V,L),E.lineTo(P.cx+P.x01,P.cy+P.y01),V<U?E.arc(P.cx,P.cy,V,i(P.y01,P.x01),i(O.y01,O.x01),!L):(E.arc(P.cx,P.cy,V,i(P.y01,P.x01),i(P.y11,P.x11),!L),E.arc(0,0,m,i(P.cy+P.y11,P.cx+P.x11),i(O.cy+O.y11,O.cx+O.x11),L),E.arc(O.cx,O.cy,V,i(O.y11,O.x11),i(O.y01,O.x01),!L))):E.arc(0,0,m,R,z,L):E.lineTo(X,Z)}else E.moveTo(0,0);if(E.closePath(),r)return E=null,r+\"\"||null}return C.centroid=function(){var e=(+t.apply(this,arguments)+ +o.apply(this,arguments))/2,r=(+M.apply(this,arguments)+ +A.apply(this,arguments))/2-f/2;return[a(r)*e,l(r)*e]},C.innerRadius=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),C):t},C.outerRadius=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),C):o},C.cornerRadius=function(t){return arguments.length?(k=\"function\"==typeof t?t:r(+t),C):k},C.padRadius=function(t){return arguments.length?(T=null==t?null:\"function\"==typeof t?t:r(+t),C):T},C.startAngle=function(t){return arguments.length?(M=\"function\"==typeof t?t:r(+t),C):M},C.endAngle=function(t){return arguments.length?(A=\"function\"==typeof t?t:r(+t),C):A},C.padAngle=function(t){return arguments.length?(S=\"function\"==typeof t?t:r(+t),C):S},C.context=function(t){return arguments.length?(E=null==t?null:t,C):E},C},t.area=E,t.areaRadial=R,t.curveBasis=function(t){return new ft(t)},t.curveBasisClosed=function(t){return new ht(t)},t.curveBasisOpen=function(t){return new pt(t)},t.curveBundle=gt,t.curveCardinal=yt,t.curveCardinalClosed=bt,t.curveCardinalOpen=wt,t.curveCatmullRom=Mt,t.curveCatmullRomClosed=St,t.curveCatmullRomOpen=Ct,t.curveLinear=T,t.curveLinearClosed=function(t){return new Lt(t)},t.curveMonotoneX=function(t){return new zt(t)},t.curveMonotoneY=function(t){return new Rt(t)},t.curveNatural=function(t){return new Nt(t)},t.curveStep=function(t){return new jt(t,.5)},t.curveStepAfter=function(t){return new jt(t,1)},t.curveStepBefore=function(t){return new jt(t,0)},t.line=S,t.lineRadial=z,t.linkHorizontal=function(){return U(V)},t.linkRadial=function(){var t=U(q);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return U(H)},t.pie=function(){var t=L,e=C,n=null,i=r(0),a=r(p),o=r(0);function s(r){var s,l,u,c,f,h=r.length,d=0,g=new Array(h),v=new Array(h),m=+i.apply(this,arguments),y=Math.min(p,Math.max(-p,a.apply(this,arguments)-m)),x=Math.min(Math.abs(y)/h,o.apply(this,arguments)),b=x*(y<0?-1:1);for(s=0;s<h;++s)(f=v[g[s]=s]=+t(r[s],s,r))>0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(v[t],v[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,u=d?(y-h*b)/d:0;s<h;++s,m=c)l=g[s],c=m+((f=v[l])>0?f*u:0)+b,v[l]={data:r[l],index:s,value:f,startAngle:m,endAngle:c,padAngle:x};return v}return s.value=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:r(+t),s):o},s},t.pointRadial=F,t.radialArea=R,t.radialLine=z,t.stack=function(){var t=r([]),e=Vt,n=Ut,i=Ht;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,u=s.length,c=new Array(u);for(a=0;a<u;++a){for(var f,h=s[a],p=c[a]=new Array(l),d=0;d<l;++d)p[d]=f=[0,+i(r[d],h,d,r)],f.data=r[d];p.key=h}for(a=0,o=e(c);a<u;++a)c[o[a]].index=a;return n(c,o),c}return a.keys=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(N.call(e)),a):t},a.value=function(t){return arguments.length?(i=\"function\"==typeof t?t:r(+t),a):i},a.order=function(t){return arguments.length?(e=null==t?Vt:\"function\"==typeof t?t:r(N.call(t)),a):e},a.offset=function(t){return arguments.length?(n=null==t?Ut:t,a):n},a},t.stackOffsetDiverging=function(t,e){if((s=t.length)>0)for(var r,n,i,a,o,s,l=0,u=t[e[0]].length;l<u;++l)for(a=o=0,r=0;r<s;++r)(i=(n=t[e[r]][l])[1]-n[0])>0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a<o;++a){for(i=r=0;r<n;++r)i+=t[r][a][1]||0;if(i)for(r=0;r<n;++r)t[r][a][1]/=i}Ut(t,e)}},t.stackOffsetNone=Ut,t.stackOffsetSilhouette=function(t,e){if((r=t.length)>0){for(var r,n=0,i=t[e[0]],a=i.length;n<a;++n){for(var o=0,s=0;o<r;++o)s+=t[o][n][1]||0;i[n][1]+=i[n][0]=-s/2}Ut(t,e)}},t.stackOffsetWiggle=function(t,e){if((i=t.length)>0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o<n;++o){for(var s=0,l=0,u=0;s<i;++s){for(var c=t[e[s]],f=c[o][1]||0,h=(f-(c[o-1][1]||0))/2,p=0;p<s;++p){var d=t[e[p]];h+=(d[o][1]||0)-(d[o-1][1]||0)}l+=f,u+=h*f}r[o-1][1]+=r[o-1][0]=a,l&&(a-=u/l)}r[o-1][1]+=r[o-1][0]=a,Ut(t,e)}},t.stackOrderAppearance=qt,t.stackOrderAscending=Yt,t.stackOrderDescending=function(t){return Yt(t).reverse()},t.stackOrderInsideOut=function(t){var e,r,n=t.length,i=t.map(Wt),a=qt(t),o=0,s=0,l=[],u=[];for(e=0;e<n;++e)r=a[e],o<s?(o+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)},t.stackOrderNone=Vt,t.stackOrderReverse=function(t){return Vt(t).reverse()},t.symbol=function(){var t=r(G),n=r(64),i=null;function a(){var r;if(i||(i=r=e.path()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),r)return i=null,r+\"\"||null}return a.type=function(e){return arguments.length?(t=\"function\"==typeof e?e:r(e),a):t},a.size=function(t){return arguments.length?(n=\"function\"==typeof t?t:r(+t),a):n},a.context=function(t){return arguments.length?(i=null==t?null:t,a):i},a},t.symbolCircle=G,t.symbolCross=Y,t.symbolDiamond=Z,t.symbolSquare=tt,t.symbolStar=Q,t.symbolTriangle=rt,t.symbolWye=st,t.symbols=lt,Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-path\")):i((n=n||self).d3=n.d3||{},n.d3)},{\"d3-path\":117}],120:[function(t,e,r){var n,i;n=this,i=function(t,e){\"use strict\";function r(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 n(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,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function a(t){var a=t.dateTime,o=t.date,l=t.time,u=t.periods,c=t.days,f=t.shortDays,h=t.months,yt=t.shortMonths,xt=p(u),bt=d(u),_t=p(c),wt=d(c),kt=p(f),Tt=d(f),Mt=p(h),At=d(h),St=p(yt),Et=d(yt),Ct={a:function(t){return f[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return yt[t.getMonth()]},B:function(t){return h[t.getMonth()]},c:null,d:z,e:z,f:j,H:R,I:F,j:N,L:B,m:U,M:V,p:function(t){return u[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:vt,s:mt,S:H,u:q,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:K,Z:J,\"%\":gt},Lt={a:function(t){return f[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:$,e:$,f:nt,H:Q,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return u[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:vt,s:mt,S:ot,u:st,U:lt,V:ut,w:ct,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,\"%\":gt},Pt={a:function(t,e,r){var n=kt.exec(e.slice(r));return n?(t.w=Tt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=Mt.exec(e.slice(r));return n?(t.m=At[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return Dt(t,a,e,r)},d:M,e:M,f:P,H:S,I:S,j:A,L,m:T,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:k,Q:I,s:D,S:C,u:v,U:m,V:y,w:g,W:x,x:function(t,e,r){return Dt(t,o,e,r)},X:function(t,e,r){return Dt(t,l,e,r)},y:_,Y:b,Z:w,\"%\":O};function Ot(t,e){return function(r){var n,i,a,o=[],l=-1,u=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++l<c;)37===t.charCodeAt(l)&&(o.push(t.slice(u,l)),null!=(i=s[n=t.charAt(++l)])?n=t.charAt(++l):i=\"e\"===n?\" \":\"0\",(a=e[n])&&(n=a(r,i)),o.push(n),u=l+1);return o.push(t.slice(u,l)),o.join(\"\")}}function It(t,a){return function(o){var s,l,u=i(1900,void 0,1);if(Dt(u,t,o+=\"\",0)!=o.length)return null;if(\"Q\"in u)return new Date(u.Q);if(\"s\"in u)return new Date(1e3*u.s+(\"L\"in u?u.L:0));if(a&&!(\"Z\"in u)&&(u.Z=0),\"p\"in u&&(u.H=u.H%12+12*u.p),void 0===u.m&&(u.m=\"q\"in u?u.q:0),\"V\"in u){if(u.V<1||u.V>53)return null;\"w\"in u||(u.w=1),\"Z\"in u?(l=(s=n(i(u.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(u.V-1)),u.y=s.getUTCFullYear(),u.m=s.getUTCMonth(),u.d=s.getUTCDate()+(u.w+6)%7):(l=(s=r(i(u.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(u.V-1)),u.y=s.getFullYear(),u.m=s.getMonth(),u.d=s.getDate()+(u.w+6)%7)}else(\"W\"in u||\"U\"in u)&&(\"w\"in u||(u.w=\"u\"in u?u.u%7:\"W\"in u?1:0),l=\"Z\"in u?n(i(u.y,0,1)).getUTCDay():r(i(u.y,0,1)).getDay(),u.m=0,u.d=\"W\"in u?(u.w+6)%7+7*u.W-(l+5)%7:u.w+7*u.U-(l+6)%7);return\"Z\"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,n(u)):r(u)}}function Dt(t,e,r,n){for(var i,a,o=0,l=e.length,u=r.length;o<l;){if(n>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Ct.x=Ot(o,Ct),Ct.X=Ot(l,Ct),Ct.c=Ot(a,Ct),Lt.x=Ot(o,Lt),Lt.X=Ot(l,Lt),Lt.c=Ot(a,Lt),{format:function(t){var e=Ot(t+=\"\",Ct);return e.toString=function(){return t},e},parse:function(t){var e=It(t+=\"\",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Ot(t+=\"\",Lt);return e.toString=function(){return t},e},utcParse:function(t){var e=It(t+=\"\",!0);return e.toString=function(){return t},e}}}var o,s={\"-\":\"\",_:\" \",0:\"0\"},l=/^\\s*\\d+/,u=/^%/,c=/[\\\\^$*+?|[\\]().{}]/g;function f(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function h(t){return t.replace(c,\"\\\\$&\")}function p(t){return new RegExp(\"^(?:\"+t.map(h).join(\"|\")+\")\",\"i\")}function d(t){for(var e={},r=-1,n=t.length;++r<n;)e[t[r].toLowerCase()]=r;return e}function g(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function v(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function m(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function y(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function x(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function b(t,e,r){var n=l.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function _(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||\"00\")),r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function O(t,e,r){var n=u.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function I(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function D(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function z(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function N(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function B(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return B(t,e)+\"000\"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function K(t,e){return f(t.getFullYear()%1e4,e,4)}function J(t){var e=t.getTimezoneOffset();return(e>0?\"-\":(e*=-1,\"+\"))+f(e/60|0,\"0\",2)+f(e%60,\"0\",2)}function $(t,e){return f(t.getUTCDate(),e,2)}function Q(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+\"000\"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ut(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ct(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return\"+0000\"}function gt(){return\"%\"}function vt(t){return+t}function mt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({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 xt=\"%Y-%m-%dT%H:%M:%S.%LZ\",bt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(xt),_t=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(xt);t.isoFormat=bt,t.isoParse=_t,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,\"__esModule\",{value:!0})},\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-time\")):i((n=n||self).d3=n.d3||{},n.d3)},{\"d3-time\":121}],121:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";var e=new Date,r=new Date;function n(t,i,a,o){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),r=s.ceil(t);return t-e<r-t?e:r},s.offset=function(t,e){return i(t=new Date(+t),null==e?1:Math.floor(e)),t},s.range=function(e,r,n){var a,o=[];if(e=s.ceil(e),n=null==n?1:Math.floor(n),!(e<r&&n>0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a<e&&e<r);return o},s.filter=function(e){return n((function(r){if(r>=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((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?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*o)}),(function(t,e){return(e-t)/o}),(function(t){return t.getUTCSeconds()})),h=f.range,p=n((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*o)}),(function(t,e){t.setTime(+t+e*s)}),(function(t,e){return(e-t)/s}),(function(t){return t.getMinutes()})),d=p.range,g=n((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*o-t.getMinutes()*s)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getHours()})),v=g.range,m=n((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())*s)/u}),(function(t){return t.getDate()-1})),y=m.range;function x(t){return n((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())*s)/c}))}var b=x(0),_=x(1),w=x(2),k=x(3),T=x(4),M=x(5),A=x(6),S=b.range,E=_.range,C=w.range,L=k.range,P=T.range,O=M.range,I=A.range,D=n((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()})),z=D.range,R=n((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()}));R.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var F=R.range,N=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s)}),(function(t,e){return(e-t)/s}),(function(t){return t.getUTCMinutes()})),B=N.range,j=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getUTCHours()})),U=j.range,V=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/u}),(function(t){return t.getUTCDate()-1})),H=V.range;function q(t){return n((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)/c}))}var G=q(0),Y=q(1),W=q(2),X=q(3),Z=q(4),K=q(5),J=q(6),$=G.range,Q=Y.range,tt=W.range,et=X.range,rt=Z.range,nt=K.range,it=J.range,at=n((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()})),ot=at.range,st=n((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()}));st.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var lt=st.range;t.timeDay=m,t.timeDays=y,t.timeFriday=M,t.timeFridays=O,t.timeHour=g,t.timeHours=v,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=p,t.timeMinutes=d,t.timeMonday=_,t.timeMondays=E,t.timeMonth=D,t.timeMonths=z,t.timeSaturday=A,t.timeSaturdays=I,t.timeSecond=f,t.timeSeconds=h,t.timeSunday=b,t.timeSundays=S,t.timeThursday=T,t.timeThursdays=P,t.timeTuesday=w,t.timeTuesdays=C,t.timeWednesday=k,t.timeWednesdays=L,t.timeWeek=b,t.timeWeeks=S,t.timeYear=R,t.timeYears=F,t.utcDay=V,t.utcDays=H,t.utcFriday=K,t.utcFridays=nt,t.utcHour=j,t.utcHours=U,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=N,t.utcMinutes=B,t.utcMonday=Y,t.utcMondays=Q,t.utcMonth=at,t.utcMonths=ot,t.utcSaturday=J,t.utcSaturdays=it,t.utcSecond=f,t.utcSeconds=h,t.utcSunday=G,t.utcSundays=$,t.utcThursday=Z,t.utcThursdays=rt,t.utcTuesday=W,t.utcTuesdays=tt,t.utcWednesday=X,t.utcWednesdays=et,t.utcWeek=G,t.utcWeeks=$,t.utcYear=st,t.utcYears=lt,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).d3=n.d3||{})},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,u=\"object\"==typeof performance&&performance.now?performance:Date,c=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(c(h),s=u.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function v(){s=(o=u.now())+l,n=i=0;try{g()}finally{n=0,function(){for(var t,n,i=e,a=1/0;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,y(a)}(),s=0}}function m(){var t=u.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(v,t-u.now()-l)),a&&(a=clearInterval(a))):(a||(o=u.now(),a=setInterval(m,1e3)),n=1,c(v)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=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,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).d3=n.d3||{})},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],125:[function(t,e,r){\"use strict\";e.exports=a;var n=(a.canvas=document.createElement(\"canvas\")).getContext(\"2d\"),i=o([32,126]);function a(t,e){Array.isArray(t)&&(t=t.join(\", \"));var r,a={},s=16,l=.05;e&&(2===e.length&&\"number\"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=i),n.font=s+\"px \"+t;for(var u=0;u<r.length;u++){var c=r[u],f=n.measureText(c[0]).width+n.measureText(c[1]).width,h=n.measureText(c).width;if(Math.abs(f-h)>s*l){var p=(h-f)/s;a[c]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i<t[1];i++){var a=n+String.fromCharCode(i);e.push(a)}return e}a.createPairs=o,a.ascii=i},{}],126:[function(t,e,r){var n=t(\"abs-svg-path\"),i=t(\"normalize-svg-path\"),a={M:\"moveTo\",C:\"bezierCurveTo\"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach((function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)})),t.closePath()}},{\"abs-svg-path\":70,\"normalize-svg-path\":246}],127:[function(t,e,r){e.exports=function(t){switch(t){case\"int8\":return Int8Array;case\"int16\":return Int16Array;case\"int32\":return Int32Array;case\"uint8\":return Uint8Array;case\"uint16\":return Uint16Array;case\"uint32\":return Uint32Array;case\"float32\":return Float32Array;case\"float64\":return Float64Array;case\"array\":return Array;case\"uint8_clamped\":return Uint8ClampedArray}}},{}],128:[function(t,e,r){\"use strict\";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a<i;++a)o[a]=e;else for(a=0;a<i;++a)o[a]=n(t,e,r+1);return o}e.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case\"number\":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}(0|t,e);break;case\"object\":if(\"number\"==typeof t.length)return n(t,e,0)}return[]}},{}],129:[function(t,e,r){\"use strict\";function n(t,e,r){r=r||2;var n,s,l,u,c,p,d,v=e&&e.length,m=v?e[0]*r:t.length,y=i(t,0,m,r,!0),x=[];if(!y||y.next===y.prev)return x;if(v&&(y=function(t,e,r,n){var o,s,l,u=[];for(o=0,s=e.length;o<s;o++)(l=i(t,e[o]*n,o<s-1?e[o+1]*n:t.length,n,!1))===l.next&&(l.steiner=!0),u.push(g(l));for(u.sort(f),o=0;o<u.length;o++)h(u[o],r),r=a(r,r.next);return r}(t,e,y,r)),t.length>80*r){n=l=t[0],s=u=t[1];for(var b=r;b<m;b+=r)(c=t[b])<n&&(n=c),(p=t[b+1])<s&&(s=p),c>l&&(l=c),p>u&&(u=p);d=0!==(d=Math.max(l-n,u-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a<r;a+=n)o=M(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=M(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(A(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,f,h){if(t){!h&&f&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ);e++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(t,n,i,f);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),A(t),t=g.next,v=g.next;else if((t=g)===v){h?1===h?o(t=u(a(t),e,r),e,r,n,i,f,2):2===h&&c(t,e,r,n,i,f):o(a(t),e,r,n,i,f,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(y(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,u=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=d(s,l,e,r,n),h=d(u,c,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&v(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&v(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function u(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&k(i,o)&&k(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),A(n),A(n.next),n=t=o),n=n.next}while(n!==t);return a(n)}function c(t,e,r,n,i,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var c=T(l,u);return l=a(l,l.next),c=a(c,c.next),o(l,e,r,n,i,s),void o(c,e,r,n,i,s)}u=u.next}l=l.next}while(l!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r;var l,u=r,c=r.x,f=r.y,h=1/0;n=r;do{i>=n.x&&n.x>=c&&i!==n.x&&v(a<f?i:o,a,c,f,a<f?o:i,a,n.x,n.y)&&(l=Math.abs(a-n.y)/(i-n.x),k(n,t)&&(l<h||l===h&&(n.x>r.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==u);return r}(t,e)){var r=T(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function v(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(k(t,e)&&k(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||!(0!==i||!_(t,r,e))||!(0!==a||!_(t,n,e))||!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function k(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function T(t,e){var r=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function M(t,e,r,n){var i=new S(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}e.exports=n,e.exports.default=n,n.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(E(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;o-=Math.abs(E(t,u,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t(\"strongly-connected-components\");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function u(t){o[t]=!1,s.hasOwnProperty(t)&&Object.keys(s[t]).forEach((function(e){delete s[t][e],o[e]&&u(e)}))}function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e<l[t].length;e++)(n=l[t][e])===r?(f(r,a),i=!0):o[n]||(i=c(n));if(i)u(t);else for(e=0;e<l[t].length;e++){n=l[t][e];var h=s[n];h||(h={},s[n]=h),h[n]=!0}return a.pop(),i}function f(t,r){var n=[].concat(r).concat(t);e?e(c):i.push(n)}function h(e){!function(e){for(var r=0;r<t.length;r++)r<e&&(t[r]=[]),t[r]=t[r].filter((function(t){return t>=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o<i.length;o++)for(var s=0;s<i[o].length;s++)i[o][s]<a&&(a=i[o][s],r=o);var l=i[r];if(!l)return!1;var u=t.map((function(t,e){return-1===l.indexOf(e)?[]:t.filter((function(t){return-1!==l.indexOf(t)}))}));return{leastVertex:a,adjList:u}}r=0;for(var p=t.length;r<p;){var d=h(r);if(r=d.leastVertex,l=d.adjList){for(var g=0;g<l.length;g++)for(var v=0;v<l[g].length;v++){var m=l[g][v];o[+m]=!1,s[m]={}}c(r),r+=1}else r=p}return e?void 0:i}},{\"strongly-connected-components\":307}],131:[function(t,e,r){\"use strict\";var n=t(\"../../object/valid-value\");e.exports=function(){return n(this).length=0,this}},{\"../../object/valid-value\":162}],132:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Array.from:t(\"./shim\")},{\"./is-implemented\":133,\"./shim\":134}],133:[function(t,e,r){\"use strict\";e.exports=function(){var t,e,r=Array.from;return\"function\"==typeof r&&(e=r(t=[\"raz\",\"dwa\"]),Boolean(e&&e!==t&&\"dwa\"===e[1]))}},{}],134:[function(t,e,r){\"use strict\";var n=t(\"es6-symbol\").iterator,i=t(\"../../function/is-arguments\"),a=t(\"../../function/is-function\"),o=t(\"../../number/to-pos-integer\"),s=t(\"../../object/valid-callable\"),l=t(\"../../object/valid-value\"),u=t(\"../../object/is-value\"),c=t(\"../../string/is-string\"),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(t){var e,r,g,v,m,y,x,b,_,w,k=arguments[1],T=arguments[2];if(t=Object(l(t)),u(k)&&s(k),this&&this!==Array&&a(this))e=this;else{if(!k){if(i(t))return 1!==(m=t.length)?Array.apply(null,t):((v=new Array(1))[0]=t[0],v);if(f(t)){for(v=new Array(m=t.length),r=0;r<m;++r)v[r]=t[r];return v}}v=[]}if(!f(t))if(void 0!==(_=t[n])){for(x=s(_).call(t),e&&(v=new e),b=x.next(),r=0;!b.done;)w=k?h.call(k,T,b.value,r):b.value,e?(p.value=w,d(v,r,p)):v[r]=w,b=x.next(),++r;m=r}else if(c(t)){for(m=t.length,e&&(v=new e),r=0,g=0;r<m;++r)w=t[r],r+1<m&&(y=w.charCodeAt(0))>=55296&&y<=56319&&(w+=t[++r]),w=k?h.call(k,T,w,g):w,e?(p.value=w,d(v,g,p)):v[g]=w,++g;m=g}if(void 0===m)for(m=o(t.length),e&&(v=new e(m)),r=0;r<m;++r)w=k?h.call(k,T,t[r],r):t[r],e?(p.value=w,d(v,r,p)):v[r]=w;return e&&(p.value=null,v.length=m),v}},{\"../../function/is-arguments\":135,\"../../function/is-function\":136,\"../../number/to-pos-integer\":142,\"../../object/is-value\":151,\"../../object/valid-callable\":160,\"../../object/valid-value\":162,\"../../string/is-string\":166,\"es6-symbol\":175}],135:[function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(t){return n.call(t)===i}},{}],136:[function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(t){return\"function\"==typeof t&&i(n.call(t))}},{}],137:[function(t,e,r){\"use strict\";e.exports=function(){}},{}],138:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Math.sign:t(\"./shim\")},{\"./is-implemented\":139,\"./shim\":140}],139:[function(t,e,r){\"use strict\";e.exports=function(){var t=Math.sign;return\"function\"==typeof t&&1===t(10)&&-1===t(-20)}},{}],140:[function(t,e,r){\"use strict\";e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},{}],141:[function(t,e,r){\"use strict\";var n=t(\"../math/sign\"),i=Math.abs,a=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},{\"../math/sign\":138}],142:[function(t,e,r){\"use strict\";var n=t(\"./to-integer\"),i=Math.max;e.exports=function(t){return i(0,n(t))}},{\"./to-integer\":141}],143:[function(t,e,r){\"use strict\";var n=t(\"./valid-callable\"),i=t(\"./valid-value\"),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,u){var c,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(u),c=s(r),h&&c.sort(\"function\"==typeof h?a.call(h,r):void 0),\"function\"!=typeof t&&(t=c[t]),o.call(t,c,(function(t,n){return l.call(r,t)?o.call(u,f,r[t],t,r,n):e}))}}},{\"./valid-callable\":160,\"./valid-value\":162}],144:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":145,\"./shim\":146}],145:[function(t,e,r){\"use strict\";e.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\")}},{}],146:[function(t,e,r){\"use strict\";var n=t(\"../keys\"),i=t(\"../valid-value\"),a=Math.max;e.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o<l;++o)n(e=arguments[o]).forEach(s);if(void 0!==r)throw r;return t}},{\"../keys\":152,\"../valid-value\":162}],147:[function(t,e,r){\"use strict\";var n=t(\"../array/from\"),i=t(\"./assign\"),a=t(\"./valid-value\");e.exports=function(t){var e=Object(a(t)),r=arguments[1],o=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,(function(e){(o.ensure||e in t)&&(s[e]=t[e])})):i(s,t),s}},{\"../array/from\":132,\"./assign\":144,\"./valid-value\":162}],148:[function(t,e,r){\"use strict\";var n,i,a,o,s=Object.create;t(\"./set-prototype-of/is-implemented\")()||(n=t(\"./set-prototype-of/shim\")),e.exports=n?1!==n.level?s:(i={},a={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){a[t]=\"__proto__\"!==t?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,a),Object.defineProperty(n,\"nullPolyfill\",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},{\"./set-prototype-of/is-implemented\":158,\"./set-prototype-of/shim\":159}],149:[function(t,e,r){\"use strict\";e.exports=t(\"./_iterate\")(\"forEach\")},{\"./_iterate\":143}],150:[function(t,e,r){\"use strict\";var n=t(\"./is-value\"),i={function:!0,object:!0};e.exports=function(t){return n(t)&&i[typeof t]||!1}},{\"./is-value\":151}],151:[function(t,e,r){\"use strict\";var n=t(\"../function/noop\")();e.exports=function(t){return t!==n&&null!==t}},{\"../function/noop\":137}],152:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.keys:t(\"./shim\")},{\"./is-implemented\":153,\"./shim\":154}],153:[function(t,e,r){\"use strict\";e.exports=function(){try{return Object.keys(\"primitive\"),!0}catch(t){return!1}}},{}],154:[function(t,e,r){\"use strict\";var n=t(\"../is-value\"),i=Object.keys;e.exports=function(t){return i(n(t)?Object(t):t)}},{\"../is-value\":151}],155:[function(t,e,r){\"use strict\";var n=t(\"./valid-callable\"),i=t(\"./for-each\"),a=Function.prototype.call;e.exports=function(t,e){var r={},o=arguments[2];return n(e),i(t,(function(t,n,i,s){r[n]=a.call(e,o,t,n,i,s)})),r}},{\"./for-each\":149,\"./valid-callable\":160}],156:[function(t,e,r){\"use strict\";var n=t(\"./is-value\"),i=Array.prototype.forEach,a=Object.create,o=function(t,e){var r;for(r in t)e[r]=t[r]};e.exports=function(t){var e=a(null);return i.call(arguments,(function(t){n(t)&&o(Object(t),e)})),e}},{\"./is-value\":151}],157:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.setPrototypeOf:t(\"./shim\")},{\"./is-implemented\":158,\"./shim\":159}],158:[function(t,e,r){\"use strict\";var n=Object.create,i=Object.getPrototypeOf,a={};e.exports=function(){var t=Object.setPrototypeOf;return\"function\"==typeof t&&i(t((arguments[0]||n)(null),a))===a}},{}],159:[function(t,e,r){\"use strict\";var n,i,a,o,s=t(\"../is-object\"),l=t(\"../valid-value\"),u=Object.prototype.isPrototypeOf,c=Object.defineProperty,f={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError(\"Prototype must be null or an object\")},e.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}(),i?(2===i.level?i.set?(o=i.set,a=function(t,e){return o.call(n(t,e),e),t}):a=function(t,e){return n(t,e).__proto__=e,t}:a=function t(e,r){var i;return n(e,r),(i=u.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&c(t.nullPolyfill,\"__proto__\",f),e},Object.defineProperty(a,\"level\",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null),t(\"../create\")},{\"../create\":148,\"../is-object\":150,\"../valid-value\":162}],160:[function(t,e,r){\"use strict\";e.exports=function(t){if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");return t}},{}],161:[function(t,e,r){\"use strict\";var n=t(\"./is-object\");e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not an Object\");return t}},{\"./is-object\":150}],162:[function(t,e,r){\"use strict\";var n=t(\"./is-value\");e.exports=function(t){if(!n(t))throw new TypeError(\"Cannot use null or undefined\");return t}},{\"./is-value\":151}],163:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?String.prototype.contains:t(\"./shim\")},{\"./is-implemented\":164,\"./shim\":165}],164:[function(t,e,r){\"use strict\";var n=\"razdwatrzy\";e.exports=function(){return\"function\"==typeof n.contains&&!0===n.contains(\"dwa\")&&!1===n.contains(\"foo\")}},{}],165:[function(t,e,r){\"use strict\";var n=String.prototype.indexOf;e.exports=function(t){return n.call(this,t,arguments[1])>-1}},{}],166:[function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=n.call(\"\");e.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},{}],167:[function(t,e,r){\"use strict\";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do{t=i().toString(36).slice(2)}while(n[t]);return t}},{}],168:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/set-prototype-of\"),a=t(\"es5-ext/string/#/contains\"),o=t(\"d\"),s=t(\"es6-symbol\"),l=t(\"./\"),u=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");l.call(this,t),e=e?a.call(e,\"key+value\")?\"key+value\":a.call(e,\"key\")?\"key\":\"value\":\"value\",u(this,\"__kind__\",o(\"\",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(t){return\"value\"===this.__kind__?this.__list__[t]:\"key+value\"===this.__kind__?[t,this.__list__[t]]:t}))}),u(n.prototype,s.toStringTag,o(\"c\",\"Array Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/string/#/contains\":163,\"es6-symbol\":175}],169:[function(t,e,r){\"use strict\";var n=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/object/valid-callable\"),a=t(\"es5-ext/string/is-string\"),o=t(\"./get\"),s=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(t,e){var r,c,f,h,p,d,g,v,m=arguments[2];if(s(t)||n(t)?r=\"array\":a(t)?r=\"string\":t=o(t),i(e),f=function(){h=!0},\"array\"!==r)if(\"string\"!==r)for(c=t.next();!c.done;){if(l.call(e,m,c.value,f),h)return;c=t.next()}else for(d=t.length,p=0;p<d&&(g=t[p],p+1<d&&(v=g.charCodeAt(0))>=55296&&v<=56319&&(g+=t[++p]),l.call(e,m,g,f),!h);++p);else u.call(t,(function(t){return l.call(e,m,t,f),h}))}},{\"./get\":170,\"es5-ext/function/is-arguments\":135,\"es5-ext/object/valid-callable\":160,\"es5-ext/string/is-string\":166}],170:[function(t,e,r){\"use strict\";var n=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/string/is-string\"),a=t(\"./array\"),o=t(\"./string\"),s=t(\"./valid-iterable\"),l=t(\"es6-symbol\").iterator;e.exports=function(t){return\"function\"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},{\"./array\":168,\"./string\":173,\"./valid-iterable\":174,\"es5-ext/function/is-arguments\":135,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],171:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/array/#/clear\"),a=t(\"es5-ext/object/assign\"),o=t(\"es5-ext/object/valid-callable\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"d\"),u=t(\"d/auto-bind\"),c=t(\"es6-symbol\"),f=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");h(this,{__list__:l(\"w\",s(t)),__context__:l(\"w\",e),__nextIndex__:l(\"w\",0)}),e&&(o(e.on),e.on(\"_add\",this._onAdd),e.on(\"_delete\",this._onDelete),e.on(\"_clear\",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()})),next:l((function(){return this._createResult(this._next())})),_createResult:l((function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}})),_resolve:l((function(t){return this.__list__[t]})),_unBind:l((function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\"_add\",this._onAdd),this.__context__.off(\"_delete\",this._onDelete),this.__context__.off(\"_clear\",this._onClear),this.__context__=null)})),toString:l((function(){return\"[object \"+(this[c.toStringTag]||\"Object\")+\"]\"}))},u({_onAdd:l((function(t){t>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):f(this,\"__redo__\",l(\"c\",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(n.prototype,c.iterator,l((function(){return this})))},{d:106,\"d/auto-bind\":105,\"es5-ext/array/#/clear\":131,\"es5-ext/object/assign\":144,\"es5-ext/object/valid-callable\":160,\"es5-ext/object/valid-value\":162,\"es6-symbol\":175}],172:[function(t,e,r){\"use strict\";var n=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/string/is-string\"),o=t(\"es6-symbol\").iterator,s=Array.isArray;e.exports=function(t){return!(!i(t)||!s(t)&&!a(t)&&!n(t)&&\"function\"!=typeof t[o])}},{\"es5-ext/function/is-arguments\":135,\"es5-ext/object/is-value\":151,\"es5-ext/string/is-string\":166,\"es6-symbol\":175}],173:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/set-prototype-of\"),a=t(\"d\"),o=t(\"es6-symbol\"),s=t(\"./\"),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");t=String(t),s.call(this,t),l(this,\"__length__\",a(\"\",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a((function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()})),_resolve:a((function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0))>=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a(\"c\",\"String Iterator\"))},{\"./\":171,d:106,\"es5-ext/object/set-prototype-of\":157,\"es6-symbol\":175}],174:[function(t,e,r){\"use strict\";var n=t(\"./is-iterable\");e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not iterable\");return t}},{\"./is-iterable\":172}],175:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?t(\"ext/global-this\").Symbol:t(\"./polyfill\")},{\"./is-implemented\":176,\"./polyfill\":181,\"ext/global-this\":188}],176:[function(t,e,r){\"use strict\";var n=t(\"ext/global-this\"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if(\"function\"!=typeof e)return!1;t=e(\"test symbol\");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag]}},{\"ext/global-this\":188}],177:[function(t,e,r){\"use strict\";e.exports=function(t){return!!t&&(\"symbol\"==typeof t||!!t.constructor&&\"Symbol\"===t.constructor.name&&\"Symbol\"===t[t.constructor.toStringTag])}},{}],178:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||\"\")];)++i;return s[t+=i||\"\"]=!0,a(o,e=\"@@\"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"ext/global-this\").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n(\"\",i&&i.hasInstance||t(\"hasInstance\")),isConcatSpreadable:n(\"\",i&&i.isConcatSpreadable||t(\"isConcatSpreadable\")),iterator:n(\"\",i&&i.iterator||t(\"iterator\")),match:n(\"\",i&&i.match||t(\"match\")),replace:n(\"\",i&&i.replace||t(\"replace\")),search:n(\"\",i&&i.search||t(\"search\")),species:n(\"\",i&&i.species||t(\"species\")),split:n(\"\",i&&i.split||t(\"split\")),toPrimitive:n(\"\",i&&i.toPrimitive||t(\"toPrimitive\")),toStringTag:n(\"\",i&&i.toStringTag||t(\"toStringTag\")),unscopables:n(\"\",i&&i.unscopables||t(\"unscopables\"))})}},{d:106,\"ext/global-this\":188}],180:[function(t,e,r){\"use strict\";var n=t(\"d\"),i=t(\"../../../validate-symbol\"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{\"../../../validate-symbol\":182,d:106}],181:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"d\"),s=t(\"./validate-symbol\"),l=t(\"ext/global-this\").Symbol,u=t(\"./lib/private/generate-name\"),c=t(\"./lib/private/setup/standard-symbols\"),f=t(\"./lib/private/setup/symbol-registry\"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if(\"function\"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError(\"Symbol is not a constructor\");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return a?l(e):(r=h(i.prototype),e=void 0===e?\"\":String(e),p(r,{__description__:o(\"\",e),__name__:o(\"\",u(e))}))},c(n),f(n),p(i.prototype,{constructor:o(n),toString:o(\"\",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o(\"\",(function(){var t=s(this);return\"symbol\"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o(\"c\",\"Symbol\")),d(i.prototype,n.toStringTag,o(\"c\",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o(\"c\",n.prototype[n.toPrimitive]))},{\"./lib/private/generate-name\":178,\"./lib/private/setup/standard-symbols\":179,\"./lib/private/setup/symbol-registry\":180,\"./validate-symbol\":182,d:106,\"ext/global-this\":188}],182:[function(t,e,r){\"use strict\";var n=t(\"./is-symbol\");e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not a symbol\");return t}},{\"./is-symbol\":177}],183:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?WeakMap:t(\"./polyfill\")},{\"./is-implemented\":184,\"./polyfill\":186}],184:[function(t,e,r){\"use strict\";e.exports=function(){var t,e;if(\"function\"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},\"one\"],[{},\"two\"],[{},\"three\"]])}catch(t){return!1}return\"[object WeakMap]\"===String(t)&&\"function\"==typeof t.set&&t.set({},1)===t&&\"function\"==typeof t.delete&&\"function\"==typeof t.has&&\"one\"===t.get(e)}},{}],185:[function(t,e,r){\"use strict\";e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){\"use strict\";var n,i=t(\"es5-ext/object/is-value\"),a=t(\"es5-ext/object/set-prototype-of\"),o=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),l=t(\"es5-ext/string/random-uniq\"),u=t(\"d\"),c=t(\"es6-iterator/get\"),f=t(\"es6-iterator/for-of\"),h=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),d=Array.isArray,g=Object.defineProperty,v=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");return t=p&&a&&WeakMap!==n?a(new WeakMap,m(this)):this,i(e)&&(d(e)||(e=c(e))),g(t,\"__weakMapData__\",u(\"c\",\"$weakMap$\"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:u(n)})),Object.defineProperties(n.prototype,{delete:u((function(t){return!!v.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:u((function(t){if(v.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:u((function(t){return v.call(o(t),this.__weakMapData__)})),set:u((function(t,e){return g(o(t),this.__weakMapData__,u(\"c\",e)),this})),toString:u((function(){return\"[object WeakMap]\"}))}),g(n.prototype,h,u(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":185,d:106,\"es5-ext/object/is-value\":151,\"es5-ext/object/set-prototype-of\":157,\"es5-ext/object/valid-object\":161,\"es5-ext/object/valid-value\":162,\"es5-ext/string/random-uniq\":167,\"es6-iterator/for-of\":169,\"es6-iterator/get\":170,\"es6-symbol\":175}],187:[function(t,e,r){var n=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?globalThis:t(\"./implementation\")},{\"./implementation\":187,\"./is-implemented\":189}],189:[function(t,e,r){\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},{}],190:[function(t,e,r){\"use strict\";var n=t(\"is-string-blank\");e.exports=function(t){var e=typeof t;if(\"string\"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if(\"number\"!==e)return!1;return t-t<1}},{\"is-string-blank\":237}],191:[function(t,e,r){var n=t(\"dtype\");e.exports=function(t,e,r){if(!t)throw new TypeError(\"must specify data as first parameter\");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&\"number\"==typeof t[0][0]){var i,a,o,s,l=t[0].length,u=t.length*l;e&&\"string\"!=typeof e||(e=new(n(e||\"float32\"))(u+r));var c=e.length-r;if(u!==c)throw new Error(\"source length \"+u+\" (\"+l+\"x\"+t.length+\") does not match destination length \"+c);for(i=0,o=r;i<t.length;i++)for(a=0;a<l;a++)e[o++]=null===t[i][a]?NaN:t[i][a]}else if(e&&\"string\"!=typeof e)e.set(t,r);else{var f=n(e||\"float32\");if(Array.isArray(t)||\"array\"===e)for(i=0,o=r,s=(e=new f(t.length+r)).length;o<s;o++,i++)e[o]=null===t[i]?NaN:t[i];else 0===r?e=new f(t):(e=new f(t.length+r)).set(t,r)}return e}},{dtype:127}],192:[function(t,e,r){\"use strict\";var n=t(\"css-font/stringify\"),i=[32,126];e.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement(\"canvas\"),a=t.font,o=\"number\"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;if(a&&\"string\"!=typeof a&&(a=n(a)),Array.isArray(s)){if(2===s.length&&\"number\"==typeof s[0]&&\"number\"==typeof s[1]){for(var l=[],u=s[0],c=0;u<=s[1];u++)l[c++]=String.fromCharCode(u);s=l}}else s=String(s).split(\"\");e=e.slice(),r.width=e[0],r.height=e[1];var f=r.getContext(\"2d\");f.fillStyle=\"#000\",f.fillRect(0,0,r.width,r.height),f.font=a,f.textAlign=\"center\",f.textBaseline=\"middle\",f.fillStyle=\"#fff\";var h=o[0]/2,p=o[1]/2;for(u=0;u<s.length;u++)f.fillText(s[u],h,p),(h+=o[0])>e[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{\"css-font/stringify\":102}],193:[function(t,e,r){\"use strict\";function n(t,e){e||(e={}),(\"string\"==typeof t||Array.isArray(t))&&(e.family=t);var r=Array.isArray(e.family)?e.family.join(\", \"):e.family;if(!r)throw Error(\"`family` must be defined\");var s=e.size||e.fontSize||e.em||48,l=e.weight||e.fontWeight||\"\",u=(t=[e.style||e.fontStyle||\"\",l,s].join(\" \")+\"px \"+r,e.origin||\"top\");if(n.cache[r]&&s<=n.cache[r].em)return i(n.cache[r],u);var c=e.canvas||n.canvas,f=c.getContext(\"2d\"),h={upper:void 0!==e.upper?e.upper:\"H\",lower:void 0!==e.lower?e.lower:\"x\",descent:void 0!==e.descent?e.descent:\"p\",ascent:void 0!==e.ascent?e.ascent:\"h\",tittle:void 0!==e.tittle?e.tittle:\"i\",overshoot:void 0!==e.overshoot?e.overshoot:\"O\"},p=Math.ceil(1.5*s);c.height=p,c.width=.5*p,f.font=t;var d=\"H\",g={top:0};f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillStyle=\"black\",f.fillText(d,0,0);var v=a(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline=\"bottom\",f.fillText(d,0,p);var m=a(f.getImageData(0,0,p,p));g.lineHeight=g.bottom=p-m+v,f.clearRect(0,0,p,p),f.textBaseline=\"alphabetic\",f.fillText(d,0,p);var y=p-a(f.getImageData(0,0,p,p))-1+v;g.baseline=g.alphabetic=y,f.clearRect(0,0,p,p),f.textBaseline=\"middle\",f.fillText(d,0,.5*p);var x=a(f.getImageData(0,0,p,p));g.median=g.middle=p-x-1+v-.5*p,f.clearRect(0,0,p,p),f.textBaseline=\"hanging\",f.fillText(d,0,.5*p);var b=a(f.getImageData(0,0,p,p));g.hanging=p-b-1+v-.5*p,f.clearRect(0,0,p,p),f.textBaseline=\"ideographic\",f.fillText(d,0,p);var _=a(f.getImageData(0,0,p,p));if(g.ideographic=p-_-1+v,h.upper&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.upper,0,0),g.upper=a(f.getImageData(0,0,p,p)),g.capHeight=g.baseline-g.upper),h.lower&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.lower,0,0),g.lower=a(f.getImageData(0,0,p,p)),g.xHeight=g.baseline-g.lower),h.tittle&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.tittle,0,0),g.tittle=a(f.getImageData(0,0,p,p))),h.ascent&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.ascent,0,0),g.ascent=a(f.getImageData(0,0,p,p))),h.descent&&(f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.descent,0,0),g.descent=o(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline=\"top\",f.fillText(h.overshoot,0,0);var w=o(f.getImageData(0,0,p,p));g.overshoot=w-y}for(var k in g)g[k]/=s;return g.em=s,n.cache[r]=g,i(g,u)}function i(t,e){var r={};for(var n in\"string\"==typeof e&&(e=t[e]),t)\"em\"!==n&&(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n<r.length;n+=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}function o(t){for(var e=t.height,r=t.data,n=r.length-1;n>0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement(\"canvas\"),n.cache={}},{}],194:[function(t,e,r){e.exports=function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"must specify type string\");if(e=e||{},\"undefined\"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement(\"canvas\");\"number\"==typeof e.width&&(r.width=e.width),\"number\"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf(\"webgl\")&&a.push(\"experimental-\"+t);for(var o=0;o<a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},{}],195:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15];return t[0]=s*(h*m-p*v)-f*(l*m-u*v)+g*(l*p-u*h),t[1]=-(n*(h*m-p*v)-f*(i*m-a*v)+g*(i*p-a*h)),t[2]=n*(l*m-u*v)-s*(i*m-a*v)+g*(i*u-a*l),t[3]=-(n*(l*p-u*h)-s*(i*p-a*h)+f*(i*u-a*l)),t[4]=-(o*(h*m-p*v)-c*(l*m-u*v)+d*(l*p-u*h)),t[5]=r*(h*m-p*v)-c*(i*m-a*v)+d*(i*p-a*h),t[6]=-(r*(l*m-u*v)-o*(i*m-a*v)+d*(i*u-a*l)),t[7]=r*(l*p-u*h)-o*(i*p-a*h)+c*(i*u-a*l),t[8]=o*(f*m-p*g)-c*(s*m-u*g)+d*(s*p-u*f),t[9]=-(r*(f*m-p*g)-c*(n*m-a*g)+d*(n*p-a*f)),t[10]=r*(s*m-u*g)-o*(n*m-a*g)+d*(n*u-a*s),t[11]=-(r*(s*p-u*f)-o*(n*p-a*f)+c*(n*u-a*s)),t[12]=-(o*(f*v-h*g)-c*(s*v-l*g)+d*(s*h-l*f)),t[13]=r*(f*v-h*g)-c*(n*v-i*g)+d*(n*h-i*f),t[14]=-(r*(s*v-l*g)-o*(n*v-i*g)+d*(n*l-i*s)),t[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),t}},{}],196:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],197:[function(t,e,r){e.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}},{}],198:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],199:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11],p=t[12],d=t[13],g=t[14],v=t[15];return(e*o-r*a)*(f*v-h*g)-(e*s-n*a)*(c*v-h*d)+(e*l-i*a)*(c*g-f*d)+(r*s-n*o)*(u*v-h*p)-(r*l-i*o)*(u*g-f*p)+(n*l-i*s)*(u*d-c*p)}},{}],200:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,p=i*s,d=i*l,g=a*o,v=a*s,m=a*l;return t[0]=1-f-d,t[1]=c+m,t[2]=h-v,t[3]=0,t[4]=c-m,t[5]=1-u-d,t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],201:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(o*=u=1/u,s*=u,l*=u,n=Math.sin(e),a=1-(i=Math.cos(e)),t[0]=o*o*a+i,t[1]=s*o*a+l*n,t[2]=l*o*a-s*n,t[3]=0,t[4]=o*s*a-l*n,t[5]=s*s*a+i,t[6]=l*s*a+o*n,t[7]=0,t[8]=o*l*a+s*n,t[9]=s*l*a-o*n,t[10]=l*l*a+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},{}],202:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,p=i*l,d=i*u,g=a*u,v=o*s,m=o*l,y=o*u;return t[0]=1-(p+g),t[1]=f+y,t[2]=h-m,t[3]=0,t[4]=f-y,t[5]=1-(c+g),t[6]=d+v,t[7]=0,t[8]=h+m,t[9]=d-v,t[10]=1-(c+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],203:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],204:[function(t,e,r){e.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},{}],205:[function(t,e,r){e.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],206:[function(t,e,r){e.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],207:[function(t,e,r){e.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],208:[function(t,e,r){e.exports=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t}},{}],209:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],210:[function(t,e,r){e.exports={create:t(\"./create\"),clone:t(\"./clone\"),copy:t(\"./copy\"),identity:t(\"./identity\"),transpose:t(\"./transpose\"),invert:t(\"./invert\"),adjoint:t(\"./adjoint\"),determinant:t(\"./determinant\"),multiply:t(\"./multiply\"),translate:t(\"./translate\"),scale:t(\"./scale\"),rotate:t(\"./rotate\"),rotateX:t(\"./rotateX\"),rotateY:t(\"./rotateY\"),rotateZ:t(\"./rotateZ\"),fromRotation:t(\"./fromRotation\"),fromRotationTranslation:t(\"./fromRotationTranslation\"),fromScaling:t(\"./fromScaling\"),fromTranslation:t(\"./fromTranslation\"),fromXRotation:t(\"./fromXRotation\"),fromYRotation:t(\"./fromYRotation\"),fromZRotation:t(\"./fromZRotation\"),fromQuat:t(\"./fromQuat\"),frustum:t(\"./frustum\"),perspective:t(\"./perspective\"),perspectiveFromFieldOfView:t(\"./perspectiveFromFieldOfView\"),ortho:t(\"./ortho\"),lookAt:t(\"./lookAt\"),str:t(\"./str\")}},{\"./adjoint\":195,\"./clone\":196,\"./copy\":197,\"./create\":198,\"./determinant\":199,\"./fromQuat\":200,\"./fromRotation\":201,\"./fromRotationTranslation\":202,\"./fromScaling\":203,\"./fromTranslation\":204,\"./fromXRotation\":205,\"./fromYRotation\":206,\"./fromZRotation\":207,\"./frustum\":208,\"./identity\":209,\"./invert\":211,\"./lookAt\":212,\"./multiply\":213,\"./ortho\":214,\"./perspective\":215,\"./perspectiveFromFieldOfView\":216,\"./rotate\":217,\"./rotateX\":218,\"./rotateY\":219,\"./rotateZ\":220,\"./scale\":221,\"./str\":222,\"./translate\":223,\"./transpose\":224}],211:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,k=i*u-a*l,T=c*g-f*d,M=c*v-h*d,A=c*m-p*d,S=f*v-h*g,E=f*m-p*g,C=h*m-p*v,L=y*C-x*E+b*S+_*A-w*M+k*T;return L?(L=1/L,t[0]=(s*C-l*E+u*S)*L,t[1]=(i*E-n*C-a*S)*L,t[2]=(g*k-v*w+m*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*A-o*C-u*M)*L,t[5]=(r*C-i*A+a*M)*L,t[6]=(v*b-d*k-m*x)*L,t[7]=(c*k-h*b+p*x)*L,t[8]=(o*E-s*A+u*T)*L,t[9]=(n*A-r*E-a*T)*L,t[10]=(d*w-g*b+m*y)*L,t[11]=(f*b-c*w-p*y)*L,t[12]=(s*M-o*S-l*T)*L,t[13]=(r*S-n*M+i*T)*L,t[14]=(g*x-d*_-v*y)*L,t[15]=(c*_-f*x+h*y)*L,t):null}},{}],212:[function(t,e,r){var n=t(\"./identity\");e.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,p,d,g=e[0],v=e[1],m=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];return Math.abs(g-_)<1e-6&&Math.abs(v-w)<1e-6&&Math.abs(m-k)<1e-6?n(t):(f=g-_,h=v-w,p=m-k,a=x*(p*=d=1/Math.sqrt(f*f+h*h+p*p))-b*(h*=d),o=b*(f*=d)-y*p,s=y*h-x*f,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0),l=h*s-p*o,u=p*a-f*s,c=f*o-h*a,(d=Math.sqrt(l*l+u*u+c*c))?(l*=d=1/d,u*=d,c*=d):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=p,t[11]=0,t[12]=-(a*g+o*v+s*m),t[13]=-(l*g+u*v+c*m),t[14]=-(f*g+h*v+p*m),t[15]=1,t)}},{\"./identity\":209}],213:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*v,t[2]=x*a+b*u+_*p+w*m,t[3]=x*o+b*c+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*v,t[6]=x*a+b*u+_*p+w*m,t[7]=x*o+b*c+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*v,t[10]=x*a+b*u+_*p+w*m,t[11]=x*o+b*c+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*v,t[14]=x*a+b*u+_*p+w*m,t[15]=x*o+b*c+_*d+w*y,t}},{}],214:[function(t,e,r){e.exports=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t}},{}],215:[function(t,e,r){e.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},{}],216:[function(t,e,r){e.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},{}],217:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,p,d,g,v,m,y,x,b,_,w,k,T,M,A,S,E=n[0],C=n[1],L=n[2],P=Math.sqrt(E*E+C*C+L*L);return Math.abs(P)<1e-6?null:(E*=P=1/P,C*=P,L*=P,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],p=e[6],d=e[7],g=e[8],v=e[9],m=e[10],y=e[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,T=L*C*o+E*i,M=E*L*o+C*i,A=C*L*o-E*i,S=L*L*o+a,t[0]=s*x+f*b+g*_,t[1]=l*x+h*b+v*_,t[2]=u*x+p*b+m*_,t[3]=c*x+d*b+y*_,t[4]=s*w+f*k+g*T,t[5]=l*w+h*k+v*T,t[6]=u*w+p*k+m*T,t[7]=c*w+d*k+y*T,t[8]=s*M+f*A+g*S,t[9]=l*M+h*A+v*S,t[10]=u*M+p*A+m*S,t[11]=c*M+d*A+y*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},{}],218:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],219:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-u*n,t[1]=o*i-c*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],220:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],221:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],222:[function(t,e,r){e.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]+\")\"}},{}],223:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,p,d,g=r[0],v=r[1],m=r[2];return e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*v+f*m+e[12],t[13]=i*g+l*v+h*m+e[13],t[14]=a*g+u*v+p*m+e[14],t[15]=o*g+c*v+d*m+e[15]),t}},{}],224:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],225:[function(t,e,r){\"use strict\";var n=t(\"css-font\"),i=t(\"pick-by-alias\"),a=t(\"regl\"),o=t(\"gl-util/context\"),s=t(\"es6-weak-map\"),l=t(\"color-normalize\"),u=t(\"font-atlas\"),c=t(\"typedarray-pool\"),f=t(\"parse-rect\"),h=t(\"is-plain-obj\"),p=t(\"parse-unit\"),d=t(\"to-px\"),g=t(\"detect-kerning\"),v=t(\"object-assign\"),m=t(\"font-measure\"),y=t(\"flatten-vertex-data\"),x=t(\"bit-twiddle\").nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement(\"div\"));w.style.font=\"italic small-caps bold condensed 16px/2 cursive\",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var k=function(t){!function(t){return\"function\"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=o(t):(t={regl:t},this.gl=t.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:\"uint8\",usage:\"stream\"}),this.sizeBuffer=this.regl.buffer({type:\"float\",usage:\"stream\"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};k.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop(\"count\"),offset:t.prop(\"offset\"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this(\"sizeBuffer\")},width:{offset:0,stride:8,buffer:t.this(\"sizeBuffer\")},char:t.this(\"charBuffer\"),position:t.this(\"position\")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop(\"color\"),opacity:t.prop(\"opacity\"),viewport:t.this(\"viewportArray\"),scale:t.this(\"scale\"),align:t.prop(\"align\"),baseline:t.prop(\"baseline\"),translate:t.this(\"translate\"),positionOffset:t.prop(\"positionOffset\")},primitive:\"points\",viewport:t.this(\"viewport\"),vert:\"\\n\\t\\t\\tprecision highp float;\\n\\t\\t\\tattribute float width, charOffset, char;\\n\\t\\t\\tattribute vec2 position;\\n\\t\\t\\tuniform float fontSize, charStep, em, align, baseline;\\n\\t\\t\\tuniform vec4 viewport;\\n\\t\\t\\tuniform vec4 color;\\n\\t\\t\\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\\n\\t\\t\\tvarying vec2 charCoord, charId;\\n\\t\\t\\tvarying float charWidth;\\n\\t\\t\\tvarying vec4 fontColor;\\n\\t\\t\\tvoid main () {\\n\\t\\t\\t\\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\\n\\t\\t\\t\\t\\t+ vec2(positionOffset.x, -positionOffset.y)))\\n\\t\\t\\t\\t\\t/ (viewport.zw * scale.xy);\\n\\n\\t\\t\\t\\tvec2 position = (position + translate) * scale;\\n\\t\\t\\t\\tposition += offset * scale;\\n\\n\\t\\t\\t\\tcharCoord = position * viewport.zw + viewport.xy;\\n\\n\\t\\t\\t\\tgl_Position = vec4(position * 2. - 1., 0, 1);\\n\\n\\t\\t\\t\\tgl_PointSize = charStep;\\n\\n\\t\\t\\t\\tcharId.x = mod(char, atlasDim.x);\\n\\t\\t\\t\\tcharId.y = floor(char / atlasDim.x);\\n\\n\\t\\t\\t\\tcharWidth = width * em;\\n\\n\\t\\t\\t\\tfontColor = color / 255.;\\n\\t\\t\\t}\",frag:\"\\n\\t\\t\\tprecision highp float;\\n\\t\\t\\tuniform float fontSize, charStep, opacity;\\n\\t\\t\\tuniform vec2 atlasSize;\\n\\t\\t\\tuniform vec4 viewport;\\n\\t\\t\\tuniform sampler2D atlas;\\n\\t\\t\\tvarying vec4 fontColor;\\n\\t\\t\\tvarying vec2 charCoord, charId;\\n\\t\\t\\tvarying float charWidth;\\n\\n\\t\\t\\tfloat lightness(vec4 color) {\\n\\t\\t\\t\\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\\n\\t\\t\\t}\\n\\n\\t\\t\\tvoid main () {\\n\\t\\t\\t\\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\\n\\t\\t\\t\\tfloat halfCharStep = floor(charStep * .5 + .5);\\n\\n\\t\\t\\t\\t// invert y and shift by 1px (FF expecially needs that)\\n\\t\\t\\t\\tuv.y = charStep - uv.y;\\n\\n\\t\\t\\t\\t// ignore points outside of character bounding box\\n\\t\\t\\t\\tfloat halfCharWidth = ceil(charWidth * .5);\\n\\t\\t\\t\\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\\n\\t\\t\\t\\t\\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\\n\\n\\t\\t\\t\\tuv += charId * charStep;\\n\\t\\t\\t\\tuv = uv / atlasSize;\\n\\n\\t\\t\\t\\tvec4 color = fontColor;\\n\\t\\t\\t\\tvec4 mask = texture2D(atlas, uv);\\n\\n\\t\\t\\t\\tfloat maskY = lightness(mask);\\n\\t\\t\\t\\t// float colorY = lightness(color);\\n\\t\\t\\t\\tcolor.a *= maskY;\\n\\t\\t\\t\\tcolor.a *= opacity;\\n\\n\\t\\t\\t\\t// color.a += .1;\\n\\n\\t\\t\\t\\t// antialiasing, see yiq color space y-channel formula\\n\\t\\t\\t\\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\\n\\n\\t\\t\\t\\tgl_FragColor = color;\\n\\t\\t\\t}\"});return{regl:t,draw:e,atlas:{}}},k.prototype.update=function(t){var e=this;if(\"string\"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:\"position positions coord coords coordinates\",font:\"font fontFace fontface typeface cssFont css-font family fontFamily\",fontSize:\"fontSize fontsize size font-size\",text:\"text texts chars characters value values symbols\",align:\"align alignment textAlign textbaseline\",baseline:\"baseline textBaseline textbaseline\",direction:\"dir direction textDirection\",color:\"color colour fill fill-color fillColor textColor textcolor\",kerning:\"kerning kern\",range:\"range dataBox\",viewport:\"vp viewport viewBox viewbox viewPort\",opacity:\"opacity alpha transparency visible visibility opaque\",offset:\"offset positionOffset padding shift indent indentation\"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&(\"number\"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=k.baseFontSize+\"px sans-serif\");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if(\"string\"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(k.baseFontSize+\"px \"+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:k.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=k.fonts[i],e.font[r]))){var u=t.family.join(\", \"),c=[t.style];t.style!=t.variant&&c.push(t.variant),t.variant!=t.weight&&c.push(t.weight),_&&t.weight!=t.stretch&&c.push(t.stretch),e.font[r]={baseString:i,family:u,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:m(u,{origin:\"top\",fontSize:k.baseFontSize,fontStyle:c.join(\" \")})},k.fonts[i]=e.font[r]}})),(a||o)&&this.font.forEach((function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),\"string\"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h<s.length;h++)s[h]=t.text;t.text=s}if(null!=t.text||a){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var b=1;b<t.text.length;b++)this.textOffsets[b]=this.textOffsets[b-1]+t.text[b-1].length,this.count+=t.text[b].length,this.counts.push(t.text[b].length);this.text=t.text.join(\"\")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];r=[],this.font.forEach((function(t,n){k.atlasContext.font=t.baseString;for(var i=e.fontAtlas[n],a=0;a<e.text.length;a++){var o=e.text.charAt(a);if(null==i.ids[o]&&(i.ids[o]=i.chars.length,i.chars.push(o),r.push(o)),null==t.width[o]&&(t.width[o]=k.atlasContext.measureText(o).width/k.baseFontSize,e.kerning)){var s=[];for(var l in t.width)s.push(l+o,o+l);v(t.kerning,g(t.family,{pairs:s}))}}}))}if(t.position)if(t.position.length>2){for(var w=!t.position[0].length,T=c.mallocFloat(2*this.count),M=0,A=0;M<this.counts.length;M++){var S=this.counts[M];if(w)for(var E=0;E<S;E++)T[A++]=t.position[2*M],T[A++]=t.position[2*M+1];else for(var C=0;C<S;C++)T[A++]=t.position[M][0],T[A++]=t.position[M][1]}this.position.call?this.position({type:\"float\",data:T}):this.position=this.regl.buffer({type:\"float\",data:T}),c.freeFloat(T)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||a){var L=c.mallocUint8(this.count),P=c.mallocFloat(2*this.count);this.textWidth=[];for(var O=0,I=0;O<this.counts.length;O++){for(var D=this.counts[O],z=this.font[O]||this.font[0],R=this.fontAtlas[O]||this.fontAtlas[0],F=0;F<D;F++){var N=this.text.charAt(I),B=this.text.charAt(I-1);if(L[I]=R.ids[N],P[2*I]=z.width[N],F){var j=P[2*I-2],U=P[2*I],V=P[2*I-1]+.5*j+.5*U;if(this.kerning){var H=z.kerning[B+N];H&&(V+=.001*H)}P[2*I+1]=V}else P[2*I+1]=.5*P[2*I];I++}this.textWidth.push(P.length?.5*P[2*I-2]+P[2*I-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:L,type:\"uint8\",usage:\"stream\"}),this.sizeBuffer({data:P,type:\"float\",usage:\"stream\"}),c.freeUint8(L),c.freeFloat(P),r.length&&this.font.forEach((function(t,r){var n=e.fontAtlas[r],i=n.step,a=Math.floor(k.maxAtlasSize/i),o=Math.min(a,n.chars.length),s=Math.ceil(n.chars.length/o),l=x(o*i),c=x(s*i);n.width=l,n.height=c,n.rows=s,n.cols=o,n.em&&n.texture({data:u({canvas:k.atlasCanvas,font:n.fontString,chars:n.chars,shape:[l,c],step:[i,i]})})}))}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map((function(t,r){var n=Array.isArray(e.align)?e.align.length>1?e.align[r]:e.align[0]:e.align;if(\"number\"==typeof n)return n;switch(n){case\"right\":case\"end\":return-t;case\"center\":case\"centre\":case\"middle\":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+=\"number\"==typeof t?t-n.baseline:-n[t])}))),null!=t.color)if(t.color||(t.color=\"transparent\"),\"string\"!=typeof t.color&&isNaN(t.color)){var q;if(\"number\"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=c.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W<G;W+=4)q.set(l(Y(W,W+4),\"uint8\"),W)}else{var X=t.color.length;q=c.mallocUint8(4*X);for(var Z=0;Z<X;Z++)q.set(l(t.color[Z]||0,\"uint8\"),4*Z)}this.color=q}else this.color=l(t.color,\"uint8\");if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity)if(this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var K=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(K);for(var J=0;J<this.batch.length;J++)this.batch[J]={count:this.counts.length>1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text=\"\",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement(\"canvas\"),k.atlasContext=k.atlasCanvas.getContext(\"2d\",{alpha:!1}),k.baseFontSize=64,k.fonts={},e.exports=k},{\"bit-twiddle\":81,\"color-normalize\":89,\"css-font\":99,\"detect-kerning\":125,\"es6-weak-map\":183,\"flatten-vertex-data\":191,\"font-atlas\":192,\"font-measure\":193,\"gl-util/context\":226,\"is-plain-obj\":236,\"object-assign\":247,\"parse-rect\":249,\"parse-unit\":251,\"pick-by-alias\":253,regl:284,\"to-px\":315,\"typedarray-pool\":328}],226:[function(t,e,n){(function(r){(function(){\"use strict\";var n=t(\"pick-by-alias\");function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return\"function\"==typeof t.getContext&&\"width\"in t&&\"height\"in t}function o(){var t=document.createElement(\"canvas\");return t.style.position=\"absolute\",t.style.top=0,t.style.left=0,t}e.exports=function(t){if(t?\"string\"==typeof t&&(t={container:t}):t={},(t=a(t)||(e=t,\"string\"==typeof e.nodeName&&\"function\"==typeof e.appendChild&&\"function\"==typeof e.getBoundingClientRect)?{container:t}:function(t){return\"function\"==typeof t.drawArrays||\"function\"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:\"container target element el canvas holder parent parentNode wrapper use ref root node\",gl:\"gl context webgl glContext\",attrs:\"attributes attrs contextAttributes\",pixelRatio:\"pixelRatio pxRatio px ratio pxratio pixelratio\",width:\"w width\",height:\"h height\"},!0)).pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;var e;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(\"string\"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error(\"Element \"+t.container+\" is not found\");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if(\"undefined\"==typeof document)throw Error(\"Not DOM environment. Use headless-gl.\");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"pick-by-alias\":253}],227:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n<t.length-1;n++)r.push(t[n],e[n]||\"\");return r.push(t[n]),r.join(\"\")}},{}],228:[function(t,e,n){(function(r){(function(){\"use strict\";var n,i=t(\"is-browser\");n=\"function\"==typeof r.matchMedia?!r.matchMedia(\"(hover: none)\").matches:i,e.exports=n}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"is-browser\":232}],229:[function(t,e,r){\"use strict\";var n=t(\"is-browser\");e.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e),window.removeEventListener(\"test\",null,e)}catch(e){t=!1}return t}()},{\"is-browser\":232}],230:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*g}},{}],231:[function(t,e,r){\"function\"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],234:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var n=/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series[46]0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series[46]0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function a(t){t||(t={});var e=t.ua;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],235:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}},{}],236:[function(t,e,r){\"use strict\";var n=Object.prototype.toString;e.exports=function(t){var e;return\"[object Object]\"===n.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],237:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},{}],238:[function(t,e,r){\"use strict\";e.exports=function(t){return\"string\"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\\dz]$/i.test(t)&&t.length>4))}},{}],239:[function(t,e,r){var n,i;n=this,i=function(){\"use strict\";var t,e,r;function n(n,i){if(t)if(e){var a=\"var sharedChunk = {}; (\"+t+\")(sharedChunk); (\"+e+\")(sharedChunk);\",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:\"text/javascript\"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=\"1.10.1\",n=i;function i(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=a/s}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(a=this.sampleCurveX(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var a=o;function o(t,e){this.x=t,this.y=e}function s(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var l=s(.25,.1,.25,1);function u(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function f(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}var h=1;function p(){return h++}function d(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function g(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function v(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function y(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function x(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function b(t){return Array.isArray(t)?t.map(b):\"object\"==typeof t&&t?y(t,b):t}var _={};function w(t){_[t]||(\"undefined\"!=typeof console&&console.warn(t),_[t]=!0)}function k(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r<n;i=r++)a=t[r],e+=((o=t[i]).x-a.x)*(a.y+o.y);return e}function M(){return\"undefined\"!=typeof WorkerGlobalScope&&\"undefined\"!=typeof self&&self instanceof WorkerGlobalScope}function A(t){var e={};if(t.replace(/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,(function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),\"\"})),e[\"max-age\"]){var r=parseInt(e[\"max-age\"],10);isNaN(r)?delete e[\"max-age\"]:e[\"max-age\"]=r}return e}var S=null;function E(t){if(null==S){var e=t.navigator?t.navigator.userAgent:null;S=!!t.safari||!(!e||!(/\\b(iPad|iPhone|iPod)\\b/.test(e)||e.match(\"Safari\")&&!e.match(\"Chrome\")))}return S}function C(t){try{var e=self[t];return e.setItem(\"_mapbox_test_\",1),e.removeItem(\"_mapbox_test_\"),!0}catch(t){return!1}}var L,P,O,I,D=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,R=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,F={now:D,frame:function(t){var e=z(t);return{cancel:function(){return R(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement(\"canvas\"),n=r.getContext(\"2d\");if(!n)throw new Error(\"failed to create canvas 2d context\");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement(\"a\")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==P&&(P=self.matchMedia(\"(prefers-reduced-motion: reduce)\")),P.matches)}},N={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf(\"https://api.mapbox.cn\")?\"https://events.mapbox.cn/events/v2\":0===this.API_URL.indexOf(\"https://api.mapbox.com\")?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){!j&&I&&(U?V(t):O=t)}},j=!1,U=!1;function V(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),j=!0}self.document&&((I=self.document.createElement(\"img\")).onload=function(){O&&V(O),O=null,U=!0},I.onerror=function(){j=!0,O=null},I.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");var H=\"01\",q=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function G(t){return 0===t.indexOf(\"mapbox:\")}q.prototype._createSkuToken=function(){var t=function(){for(var t=\"\",e=0;e<10;e++)t+=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(62*Math.random())];return{token:[\"1\",H,t].join(\"\"),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!G(t))return t;var r=Z(t);return r.path=\"/styles/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!G(t))return t;var r=Z(t);return r.path=\"/fonts/v1\"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!G(t))return t;var r=Z(t);return r.path=\"/v4/\"+r.authority+\".json\",r.params.push(\"secure\"),this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,r,n){var i=Z(t);return G(t)?(i.path=\"/styles/v1\"+i.path+\"/sprite\"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=\"\"+e+r,K(i))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!G(t))return t;var r=Z(t),n=F.devicePixelRatio>=2||512===e?\"@2x\":\"\",i=B.supported?\".webp\":\"$1\";r.path=r.path.replace(/(\\.(png|jpg)\\d*)(?=$)/,\"\"+n+i),r.path=r.path.replace(/^.+\\/v4\\//,\"/\"),r.path=\"/v4\"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e<r.length;e+=1){var n=r[e].match(/^access_token=(.*)$/);if(n)return n[1]}return null}(r.params)||N.ACCESS_TOKEN;return N.REQUIRE_ACCESS_TOKEN&&a&&this._skuToken&&r.params.push(\"sku=\"+this._skuToken),this._makeAPIURL(r,a)},q.prototype.canonicalizeTileURL=function(t,e){var r=Z(t);if(!r.path.match(/(^\\/v4\\/)/)||!r.path.match(/\\.[\\w]+$/))return t;var n=\"mapbox://tiles/\";n+=r.path.replace(\"/v4/\",\"\");var i=r.params;return e&&(i=i.filter((function(t){return!t.match(/^access_token=/)}))),i.length&&(n+=\"?\"+i.join(\"&\")),n},q.prototype.canonicalizeTileset=function(t,e){for(var r=!!e&&G(e),n=[],i=0,a=t.tiles||[];i<a.length;i+=1){var o=a[i];W(o)?n.push(this.canonicalizeTileURL(o,r)):n.push(o)}return n},q.prototype._makeAPIURL=function(t,e){var r=\"See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\",n=Z(N.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,\"/\"!==n.path&&(t.path=\"\"+n.path+t.path),!N.REQUIRE_ACCESS_TOKEN)return K(t);if(!(e=e||N.ACCESS_TOKEN))throw new Error(\"An API access token is required to use Mapbox GL. \"+r);if(\"s\"===e[0])throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+r);return t.params=t.params.filter((function(t){return-1===t.indexOf(\"access_token\")})),t.params.push(\"access_token=\"+e),K(t)};var Y=/^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/|\\?|$)/i;function W(t){return Y.test(t)}var X=/^(\\w+):\\/\\/([^/?]*)(\\/[^?]+)?\\??(.+)?/;function Z(t){var e=t.match(X);if(!e)throw new Error(\"Unable to parse URL object\");return{protocol:e[1],authority:e[2],path:e[3]||\"/\",params:e[4]?e[4].split(\"&\"):[]}}function K(t){var e=t.params.length?\"?\"+t.params.join(\"&\"):\"\";return t.protocol+\"://\"+t.authority+t.path+e}var J=\"mapbox.eventData\";function $(t){if(!t)return null;var e,r=t.split(\".\");if(!r||3!==r.length)return null;try{return JSON.parse((e=r[1],decodeURIComponent(self.atob(e).split(\"\").map((function(t){return\"%\"+(\"00\"+t.charCodeAt(0).toString(16)).slice(-2)})).join(\"\"))))}catch(t){return null}}var Q=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Q.prototype.getStorageKey=function(t){var e,r,n=$(N.ACCESS_TOKEN);return e=n&&n.u?(r=n.u,self.btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number(\"0x\"+e))})))):N.ACCESS_TOKEN||\"\",t?J+\".\"+t+\":\"+e:J+\":\"+e},Q.prototype.fetchEventData=function(){var t=C(\"localStorage\"),e=this.getStorageKey(),r=this.getStorageKey(\"uuid\");if(t)try{var n=self.localStorage.getItem(e);n&&(this.eventData=JSON.parse(n));var i=self.localStorage.getItem(r);i&&(this.anonId=i)}catch(t){w(\"Unable to read from LocalStorage\")}},Q.prototype.saveEventData=function(){var t=C(\"localStorage\"),e=this.getStorageKey(),r=this.getStorageKey(\"uuid\");if(t)try{self.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w(\"Unable to write to LocalStorage\")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,n,i){var a=this;if(N.EVENTS_URL){var o=Z(N.EVENTS_URL);o.params.push(\"access_token=\"+(i||N.ACCESS_TOKEN||\"\"));var s={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:r,skuId:H,userId:this.anonId},l=e?f(s,e):s,u={url:K(o),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([l])};this.pendingRequest=At(u,(function(t){a.pendingRequest=null,n(t),a.saveEventData(),a.processRequests(i)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var tt,et,rt=function(t){function e(){t.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(N.EVENTS_URL&&n||N.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||W(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),g(this.anonId)||(this.anonId=d()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(Q),nt=function(t){function e(e){t.call(this,\"appUserTurnstile\"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){N.EVENTS_URL&&N.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||W(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=$(N.ACCESS_TOKEN),n=r?r.u:N.ACCESS_TOKEN,i=n!==this.eventData.tokenU;g(this.anonId)||(this.anonId=d(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{\"enabled.telemetry\":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(Q),it=new nt,at=it.postTurnstileEvent.bind(it),ot=new rt,st=ot.postMapLoadEvent.bind(ot),lt=\"mapbox-tiles\",ut=500,ct=50;function ft(){self.caches&&!tt&&(tt=self.caches.open(lt))}function ht(t,e,r){if(ft(),tt){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get(\"Cache-Control\")||\"\");i[\"no-store\"]||(i[\"max-age\"]&&n.headers.set(\"Expires\",new Date(r+1e3*i[\"max-age\"]).toUTCString()),new Date(n.headers.get(\"Expires\")).getTime()-r<42e4||function(t,e){if(void 0===et)try{new Response(new ReadableStream),et=!0}catch(t){et=!1}et?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);ft(),tt&&tt.then((function(e){return e.put(pt(t.url),r)})).catch((function(t){return w(t.message)}))})))}}function pt(t){var e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function dt(t,e){if(ft(),!tt)return e(null);var r=pt(t.url);tt.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get(\"Expires\")||0),r=A(t.headers.get(\"Cache-Control\")||\"\");return e>Date.now()&&!r[\"no-cache\"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var gt,vt=1/0;function mt(){return null==gt&&(gt=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext(\"2d\")&&\"function\"==typeof self.createImageBitmap),gt}var yt={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};\"function\"==typeof Object.freeze&&Object.freeze(yt);var xt=function(t){function e(e,r,n){401===r&&W(n)&&(e+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+\": \"+this.message+\" (\"+this.status+\"): \"+this.url},e}(Error),bt=M()?function(){return self.worker&&self.worker.referrer}:function(){return(\"blob:\"===self.location.protocol?self.parent:self).location.href};function _t(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||\"GET\",body:t.body,credentials:t.credentials,headers:t.headers,referrer:bt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf(\"sku=\")>0&&W(r);\"json\"===t.type&&i.headers.set(\"Accept\",\"application/json\");var l=function(r,n,a){if(!o){if(r&&\"SecurityError\"!==r.message&&w(r),n&&a)return u(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return u(r,n,l)}return e(new xt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},u=function(r,n,s){(\"arrayBuffer\"===t.type?r.arrayBuffer():\"json\"===t.type?r.json():r.text()).then((function(t){o||(n&&s&&ht(i,n,s),a=!0,e(null,t,r.headers.get(\"Cache-Control\"),r.headers.get(\"Expires\")))})).catch((function(t){o||e(new Error(t.message))}))};return s?dt(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var wt,kt,Tt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(bt())&&!/^\\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty(\"signal\"))return _t(t,e);if(M()&&self.worker&&self.worker.actor)return self.worker.actor.send(\"getResource\",t,e,void 0,!0)}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||\"GET\",t.url,!0),\"arrayBuffer\"===t.type&&(r.responseType=\"arraybuffer\"),t.headers)r.setRequestHeader(n,t.headers[n]);return\"json\"===t.type&&(r.responseType=\"text\",r.setRequestHeader(\"Accept\",\"application/json\")),r.withCredentials=\"include\"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if(\"json\"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader(\"Cache-Control\"),r.getResponseHeader(\"Expires\"))}else e(new xt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},Mt=function(t,e){return Tt(f(t,{type:\"arrayBuffer\"}),e)},At=function(t,e){return Tt(f(t,{method:\"POST\"}),e)};wt=[],kt=0;var St=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept=\"image/webp,*/*\"),kt>=N.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return wt.push(r),r}kt++;var n=!1,i=function(){if(!n)for(n=!0,kt--;wt.length&&kt<N.MAX_PARALLEL_IMAGE_REQUESTS;){var t=wt.shift(),e=t.requestParameters,r=t.callback;t.cancelled||(t.cancel=St(e,r).cancel)}},a=Mt(t,(function(t,r,n,a){i(),t?e(t):r&&(mt()?function(t,e){var r=new self.Blob([new Uint8Array(t)],{type:\"image/png\"});self.createImageBitmap(r).then((function(t){e(null,t)})).catch((function(t){e(new Error(\"Could not load image because of \"+t.message+\". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))}))}(r,e):function(t,e,r,n){var i=new self.Image,a=self.URL;i.onload=function(){e(null,i),a.revokeObjectURL(i.src)},i.onerror=function(){return e(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))};var o=new self.Blob([new Uint8Array(t)],{type:\"image/png\"});i.cacheControl=r,i.expires=n,i.src=t.byteLength?a.createObjectURL(o):\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\"}(r,e,n,a))}));return{cancel:function(){a.cancel(),i()}}};function Et(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function Ct(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}var Lt=function(t,e){void 0===e&&(e={}),f(this,e),this.type=t},Pt=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,\"error\",f({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Lt),Ot=function(){};Ot.prototype.on=function(t,e){return this._listeners=this._listeners||{},Et(t,e,this._listeners),this},Ot.prototype.off=function(t,e){return Ct(t,e,this._listeners),Ct(t,e,this._oneTimeListeners),this},Ot.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},Et(t,e,this._oneTimeListeners),this},Ot.prototype.fire=function(t,e){\"string\"==typeof t&&(t=new Lt(t,e||{}));var r=t.type;if(this.listens(r)){t.target=this;for(var n=0,i=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];n<i.length;n+=1)i[n].call(this,t);for(var a=0,o=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];a<o.length;a+=1){var s=o[a];Ct(r,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(f(t,\"function\"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof Pt&&console.error(t.error);return this},Ot.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Ot.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var It={$version:8,$root:{version:{required:!0,type:\"enum\",values:[8]},name:{type:\"string\"},metadata:{type:\"*\"},center:{type:\"array\",value:\"number\"},zoom:{type:\"number\"},bearing:{type:\"number\",default:0,period:360,units:\"degrees\"},pitch:{type:\"number\",default:0,units:\"degrees\"},light:{type:\"light\"},sources:{required:!0,type:\"sources\"},sprite:{type:\"string\"},glyphs:{type:\"string\"},transition:{type:\"transition\"},layers:{required:!0,type:\"array\",value:\"layer\"}},sources:{\"*\":{type:\"source\"}},source:[\"source_vector\",\"source_raster\",\"source_raster_dem\",\"source_geojson\",\"source_video\",\"source_image\"],source_vector:{type:{required:!0,type:\"enum\",values:{vector:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},\"*\":{type:\"*\"}},source_raster:{type:{required:!0,type:\"enum\",values:{raster:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},attribution:{type:\"string\"},\"*\":{type:\"*\"}},source_raster_dem:{type:{required:!0,type:\"enum\",values:{\"raster-dem\":{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},attribution:{type:\"string\"},encoding:{type:\"enum\",values:{terrarium:{},mapbox:{}},default:\"mapbox\"},\"*\":{type:\"*\"}},source_geojson:{type:{required:!0,type:\"enum\",values:{geojson:{}}},data:{type:\"*\"},maxzoom:{type:\"number\",default:18},attribution:{type:\"string\"},buffer:{type:\"number\",default:128,maximum:512,minimum:0},tolerance:{type:\"number\",default:.375},cluster:{type:\"boolean\",default:!1},clusterRadius:{type:\"number\",default:50,minimum:0},clusterMaxZoom:{type:\"number\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},source_video:{type:{required:!0,type:\"enum\",values:{video:{}}},urls:{required:!0,type:\"array\",value:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},source_image:{type:{required:!0,type:\"enum\",values:{image:{}}},url:{required:!0,type:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},layer:{id:{type:\"string\",required:!0},type:{type:\"enum\",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},\"fill-extrusion\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\"*\"},source:{type:\"string\"},\"source-layer\":{type:\"string\"},minzoom:{type:\"number\",minimum:0,maximum:24},maxzoom:{type:\"number\",minimum:0,maximum:24},filter:{type:\"filter\"},layout:{type:\"layout\"},paint:{type:\"paint\"}},layout:[\"layout_fill\",\"layout_line\",\"layout_circle\",\"layout_heatmap\",\"layout_fill-extrusion\",\"layout_symbol\",\"layout_raster\",\"layout_hillshade\",\"layout_background\"],layout_background:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:\"expression\"},stops:{type:\"array\",value:\"function_stop\"},base:{type:\"number\",default:1,minimum:0},property:{type:\"string\",default:\"$zoom\"},type:{type:\"enum\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\"exponential\"},colorSpace:{type:\"enum\",values:{rgb:{},lab:{},hcl:{}},default:\"rgb\"},default:{type:\"*\",required:!1}},function_stop:{type:\"array\",minimum:0,maximum:24,value:[\"number\",\"color\"],length:2},expression:{type:\"array\",value:\"*\",minimum:1},expression_name:{type:\"enum\",values:{let:{group:\"Variable binding\"},var:{group:\"Variable binding\"},literal:{group:\"Types\"},array:{group:\"Types\"},at:{group:\"Lookup\"},in:{group:\"Lookup\"},\"index-of\":{group:\"Lookup\"},slice:{group:\"Lookup\"},case:{group:\"Decision\"},match:{group:\"Decision\"},coalesce:{group:\"Decision\"},step:{group:\"Ramps, scales, curves\"},interpolate:{group:\"Ramps, scales, curves\"},\"interpolate-hcl\":{group:\"Ramps, scales, curves\"},\"interpolate-lab\":{group:\"Ramps, scales, curves\"},ln2:{group:\"Math\"},pi:{group:\"Math\"},e:{group:\"Math\"},typeof:{group:\"Types\"},string:{group:\"Types\"},number:{group:\"Types\"},boolean:{group:\"Types\"},object:{group:\"Types\"},collator:{group:\"Types\"},format:{group:\"Types\"},image:{group:\"Types\"},\"number-format\":{group:\"Types\"},\"to-string\":{group:\"Types\"},\"to-number\":{group:\"Types\"},\"to-boolean\":{group:\"Types\"},\"to-rgba\":{group:\"Color\"},\"to-color\":{group:\"Types\"},rgb:{group:\"Color\"},rgba:{group:\"Color\"},get:{group:\"Lookup\"},has:{group:\"Lookup\"},length:{group:\"Lookup\"},properties:{group:\"Feature data\"},\"feature-state\":{group:\"Feature data\"},\"geometry-type\":{group:\"Feature data\"},id:{group:\"Feature data\"},zoom:{group:\"Zoom\"},\"heatmap-density\":{group:\"Heatmap\"},\"line-progress\":{group:\"Feature data\"},accumulated:{group:\"Feature data\"},\"+\":{group:\"Math\"},\"*\":{group:\"Math\"},\"-\":{group:\"Math\"},\"/\":{group:\"Math\"},\"%\":{group:\"Math\"},\"^\":{group:\"Math\"},sqrt:{group:\"Math\"},log10:{group:\"Math\"},ln:{group:\"Math\"},log2:{group:\"Math\"},sin:{group:\"Math\"},cos:{group:\"Math\"},tan:{group:\"Math\"},asin:{group:\"Math\"},acos:{group:\"Math\"},atan:{group:\"Math\"},min:{group:\"Math\"},max:{group:\"Math\"},round:{group:\"Math\"},abs:{group:\"Math\"},ceil:{group:\"Math\"},floor:{group:\"Math\"},distance:{group:\"Math\"},\"==\":{group:\"Decision\"},\"!=\":{group:\"Decision\"},\">\":{group:\"Decision\"},\"<\":{group:\"Decision\"},\">=\":{group:\"Decision\"},\"<=\":{group:\"Decision\"},all:{group:\"Decision\"},any:{group:\"Decision\"},\"!\":{group:\"Decision\"},within:{group:\"Decision\"},\"is-supported-script\":{group:\"String\"},upcase:{group:\"String\"},downcase:{group:\"String\"},concat:{group:\"String\"},\"resolved-locale\":{group:\"String\"}}},light:{anchor:{type:\"enum\",default:\"viewport\",values:{map:{},viewport:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0}},paint:[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_heatmap\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_hillshade\",\"paint_background\"],paint_fill:{\"fill-antialias\":{type:\"boolean\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"heatmap-color\":{type:\"color\",default:[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,\"rgba(0, 0, 255, 0)\",.1,\"royalblue\",.3,\"cyan\",.5,\"lime\",.7,\"yellow\",1,\"red\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}},Dt=function(t,e,r,n){this.message=(t?t+\": \":\"\")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function zt(t){var e=t.key,r=t.value;return r?[new Dt(e,r,\"constants have been deprecated as of v8\")]:[]}function Rt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}function Ft(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Nt(t){if(Array.isArray(t))return t.map(Nt);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var r in t)e[r]=Nt(t[r]);return e}return Ft(t)}var Bt=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),jt=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],a=i[0],o=i[1];this.bindings[a]=o}};jt.prototype.concat=function(t){return new jt(this,t)},jt.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+\" not found in scope.\")},jt.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Ut={kind:\"null\"},Vt={kind:\"number\"},Ht={kind:\"string\"},qt={kind:\"boolean\"},Gt={kind:\"color\"},Yt={kind:\"object\"},Wt={kind:\"value\"},Xt={kind:\"collator\"},Zt={kind:\"formatted\"},Kt={kind:\"resolvedImage\"};function Jt(t,e){return{kind:\"array\",itemType:t,N:e}}function $t(t){if(\"array\"===t.kind){var e=$t(t.itemType);return\"number\"==typeof t.N?\"array<\"+e+\", \"+t.N+\">\":\"value\"===t.itemType.kind?\"array\":\"array<\"+e+\">\"}return t.kind}var Qt=[Ut,Vt,Ht,qt,Gt,Zt,Yt,Jt(Wt),Kt];function te(t,e){if(\"error\"===e.kind)return null;if(\"array\"===t.kind){if(\"array\"===e.kind&&(0===e.N&&\"value\"===e.itemType.kind||!te(t.itemType,e.itemType))&&(\"number\"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(\"value\"===t.kind)for(var r=0,n=Qt;r<n.length;r+=1)if(!te(n[r],e))return null}return\"Expected \"+$t(t)+\" but found \"+$t(e)+\" instead.\"}function ee(t,e){return e.some((function(e){return e.kind===t.kind}))}function re(t,e){return e.some((function(e){return\"null\"===e?null===t:\"array\"===e?Array.isArray(t):\"object\"===e?t&&!Array.isArray(t)&&\"object\"==typeof t:e===typeof t}))}var ne=e((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return\"%\"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return\"%\"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,\"\").toLowerCase();if(i in r)return r[i].slice();if(\"#\"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf(\"(\"),u=i.indexOf(\")\");if(-1!==l&&u+1===i.length){var c=i.substr(0,l),f=i.substr(l+1,u-(l+1)).split(\",\"),h=1;switch(c){case\"rgba\":if(4!==f.length)return null;h=o(f.pop());case\"rgb\":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case\"hsla\":if(4!==f.length)return null;h=o(f.pop());case\"hsl\":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),g=o(f[2]),v=g<=.5?g*(d+1):g+d-g*d,m=2*g-v;return[n(255*s(m,v,p+1/3)),n(255*s(m,v,p)),n(255*s(m,v,p-1/3)),h];default:return null}}return null}}catch(t){}})),ie=ne.parseCSSColor,ae=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};ae.parse=function(t){if(t){if(t instanceof ae)return t;if(\"string\"==typeof t){var e=ie(t);if(e)return new ae(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ae.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return\"rgba(\"+Math.round(e)+\",\"+Math.round(r)+\",\"+Math.round(n)+\",\"+i+\")\"},ae.prototype.toArray=function(){var t=this,e=t.r,r=t.g,n=t.b,i=t.a;return 0===i?[0,0,0,0]:[255*e/i,255*r/i,255*n/i,i]},ae.black=new ae(0,0,0,1),ae.white=new ae(1,1,1,1),ae.transparent=new ae(0,0,0,0),ae.red=new ae(1,0,0,1);var oe=function(t,e,r){this.sensitivity=t?e?\"variant\":\"case\":e?\"accent\":\"base\",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\"search\"})};oe.prototype.compare=function(t,e){return this.collator.compare(t,e)},oe.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var se=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},le=function(t){this.sections=t};le.fromString=function(t){return new le([new se(t,null,null,null,null)])},le.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},le.factory=function(t){return t instanceof le?t:le.fromString(t)},le.prototype.toString=function(){return 0===this.sections.length?\"\":this.sections.map((function(t){return t.text})).join(\"\")},le.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];if(n.image)t.push([\"image\",n.image.name]);else{t.push(n.text);var i={};n.fontStack&&(i[\"text-font\"]=[\"literal\",n.fontStack.split(\",\")]),n.scale&&(i[\"font-scale\"]=n.scale),n.textColor&&(i[\"text-color\"]=[\"rgba\"].concat(n.textColor.toArray())),t.push(i)}}return t};var ue=function(t){this.name=t.name,this.available=t.available};function ce(t,e,r,n){return\"number\"==typeof t&&t>=0&&t<=255&&\"number\"==typeof e&&e>=0&&e<=255&&\"number\"==typeof r&&r>=0&&r<=255?void 0===n||\"number\"==typeof n&&n>=0&&n<=1?null:\"Invalid rgba value [\"+[t,e,r,n].join(\", \")+\"]: 'a' must be between 0 and 1.\":\"Invalid rgba value [\"+(\"number\"==typeof n?[t,e,r,n]:[t,e,r]).join(\", \")+\"]: 'r', 'g', and 'b' must be between 0 and 255.\"}function fe(t){if(null===t)return!0;if(\"string\"==typeof t)return!0;if(\"boolean\"==typeof t)return!0;if(\"number\"==typeof t)return!0;if(t instanceof ae)return!0;if(t instanceof oe)return!0;if(t instanceof le)return!0;if(t instanceof ue)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1)if(!fe(r[e]))return!1;return!0}if(\"object\"==typeof t){for(var n in t)if(!fe(t[n]))return!1;return!0}return!1}function he(t){if(null===t)return Ut;if(\"string\"==typeof t)return Ht;if(\"boolean\"==typeof t)return qt;if(\"number\"==typeof t)return Vt;if(t instanceof ae)return Gt;if(t instanceof oe)return Xt;if(t instanceof le)return Zt;if(t instanceof ue)return Kt;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var a=he(i[n]);if(e){if(e===a)continue;e=Wt;break}e=a}return Jt(e||Wt,r)}return Yt}function pe(t){var e=typeof t;return null===t?\"\":\"string\"===e||\"number\"===e||\"boolean\"===e?String(t):t instanceof ae||t instanceof le||t instanceof ue?t.toString():JSON.stringify(t)}ue.prototype.toString=function(){return this.name},ue.fromString=function(t){return t?new ue({name:t,available:!1}):null},ue.prototype.serialize=function(){return[\"image\",this.name]};var de=function(t,e){this.type=t,this.value=e};de.parse=function(t,e){if(2!==t.length)return e.error(\"'literal' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(!fe(t[1]))return e.error(\"invalid value\");var r=t[1],n=he(r),i=e.expectedType;return\"array\"!==n.kind||0!==n.N||!i||\"array\"!==i.kind||\"number\"==typeof i.N&&0!==i.N||(n=i),new de(n,r)},de.prototype.evaluate=function(){return this.value},de.prototype.eachChild=function(){},de.prototype.outputDefined=function(){return!0},de.prototype.serialize=function(){return\"array\"===this.type.kind||\"object\"===this.type.kind?[\"literal\",this.value]:this.value instanceof ae?[\"rgba\"].concat(this.value.toArray()):this.value instanceof le?this.value.serialize():this.value};var ge=function(t){this.name=\"ExpressionEvaluationError\",this.message=t};ge.prototype.toJSON=function(){return this.message};var ve={string:Ht,number:Vt,boolean:qt,object:Yt},me=function(t,e){this.type=t,this.args=e};me.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r,n=1,i=t[0];if(\"array\"===i){var a,o;if(t.length>2){var s=t[1];if(\"string\"!=typeof s||!(s in ve)||\"object\"===s)return e.error('The item type argument of \"array\" must be one of string, number, boolean',1);a=ve[s],n++}else a=Wt;if(t.length>3){if(null!==t[2]&&(\"number\"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to \"array\" must be a positive integer literal',2);o=t[2],n++}r=Jt(a,o)}else r=ve[i];for(var l=[];n<t.length;n++){var u=e.parse(t[n],n,Wt);if(!u)return null;l.push(u)}return new me(r,l)},me.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!te(this.type,he(r)))return r;if(e===this.args.length-1)throw new ge(\"Expected value to be of type \"+$t(this.type)+\", but found \"+$t(he(r))+\" instead.\")}return null},me.prototype.eachChild=function(t){this.args.forEach(t)},me.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},me.prototype.serialize=function(){var t=this.type,e=[t.kind];if(\"array\"===t.kind){var r=t.itemType;if(\"string\"===r.kind||\"number\"===r.kind||\"boolean\"===r.kind){e.push(r.kind);var n=t.N;(\"number\"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var ye=function(t){this.type=Zt,this.sections=t};ye.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[1];if(!Array.isArray(r)&&\"object\"==typeof r)return e.error(\"First argument must be an image or text section.\");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&\"object\"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o[\"font-scale\"]&&!(s=e.parse(o[\"font-scale\"],1,Vt)))return null;var l=null;if(o[\"text-font\"]&&!(l=e.parse(o[\"text-font\"],1,Jt(Ht))))return null;var u=null;if(o[\"text-color\"]&&!(u=e.parse(o[\"text-color\"],1,Gt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var f=e.parse(t[a],1,Wt);if(!f)return null;var h=f.type.kind;if(\"string\"!==h&&\"value\"!==h&&\"null\"!==h&&\"resolvedImage\"!==h)return e.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new ye(n)},ye.prototype.evaluate=function(t){return new le(this.sections.map((function(e){var r=e.content.evaluate(t);return he(r)===Kt?new se(\"\",r,null,null,null):new se(pe(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(\",\"):null,e.textColor?e.textColor.evaluate(t):null)})))},ye.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor)}},ye.prototype.outputDefined=function(){return!1},ye.prototype.serialize=function(){for(var t=[\"format\"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t.push(n.content.serialize());var i={};n.scale&&(i[\"font-scale\"]=n.scale.serialize()),n.font&&(i[\"text-font\"]=n.font.serialize()),n.textColor&&(i[\"text-color\"]=n.textColor.serialize()),t.push(i)}return t};var xe=function(t){this.type=Kt,this.input=t};xe.parse=function(t,e){if(2!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Ht);return r?new xe(r):e.error(\"No image name provided.\")},xe.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=ue.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r},xe.prototype.eachChild=function(t){t(this.input)},xe.prototype.outputDefined=function(){return!1},xe.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var be={\"to-boolean\":qt,\"to-color\":Gt,\"to-number\":Vt,\"to-string\":Ht},_e=function(t,e){this.type=t,this.args=e};_e.parse=function(t,e){if(t.length<2)return e.error(\"Expected at least one argument.\");var r=t[0];if((\"to-boolean\"===r||\"to-string\"===r)&&2!==t.length)return e.error(\"Expected one argument.\");for(var n=be[r],i=[],a=1;a<t.length;a++){var o=e.parse(t[a],a,Wt);if(!o)return null;i.push(o)}return new _e(n,i)},_e.prototype.evaluate=function(t){if(\"boolean\"===this.type.kind)return Boolean(this.args[0].evaluate(t));if(\"color\"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1){if(r=null,(e=i[n].evaluate(t))instanceof ae)return e;if(\"string\"==typeof e){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?\"Invalid rbga value \"+JSON.stringify(e)+\": expected an array containing either three or four numeric values.\":ce(e[0],e[1],e[2],e[3])))return new ae(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ge(r||\"Could not parse color from value '\"+(\"string\"==typeof e?e:String(JSON.stringify(e)))+\"'\")}if(\"number\"===this.type.kind){for(var o=null,s=0,l=this.args;s<l.length;s+=1){if(null===(o=l[s].evaluate(t)))return 0;var u=Number(o);if(!isNaN(u))return u}throw new ge(\"Could not convert \"+JSON.stringify(o)+\" to number.\")}return\"formatted\"===this.type.kind?le.fromString(pe(this.args[0].evaluate(t))):\"resolvedImage\"===this.type.kind?ue.fromString(pe(this.args[0].evaluate(t))):pe(this.args[0].evaluate(t))},_e.prototype.eachChild=function(t){this.args.forEach(t)},_e.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},_e.prototype.serialize=function(){if(\"formatted\"===this.type.kind)return new ye([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(\"resolvedImage\"===this.type.kind)return new xe(this.args[0]).serialize();var t=[\"to-\"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var we=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],ke=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};ke.prototype.id=function(){return this.feature&&\"id\"in this.feature?this.feature.id:null},ke.prototype.geometryType=function(){return this.feature?\"number\"==typeof this.feature.type?we[this.feature.type]:this.feature.type:null},ke.prototype.geometry=function(){return this.feature&&\"geometry\"in this.feature?this.feature.geometry:null},ke.prototype.canonicalID=function(){return this.canonical},ke.prototype.properties=function(){return this.feature&&this.feature.properties||{}},ke.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=ae.parse(t)),e};var Te=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};Te.prototype.evaluate=function(t){return this._evaluate(t,this.args)},Te.prototype.eachChild=function(t){this.args.forEach(t)},Te.prototype.outputDefined=function(){return!1},Te.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},Te.parse=function(t,e){var r,n=t[0],i=Te.definitions[n];if(!i)return e.error('Unknown expression \"'+n+'\". If you wanted a literal array, use [\"literal\", [...]].',0);for(var a=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=o.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var f=c[u],h=f[0],p=f[1];l=new We(e.registry,e.path,null,e.scope);for(var d=[],g=!1,v=1;v<t.length;v++){var m=t[v],y=Array.isArray(h)?h[v-1]:h.type,x=l.parse(m,1+d.length,y);if(!x){g=!0;break}d.push(x)}if(!g)if(Array.isArray(h)&&h.length!==d.length)l.error(\"Expected \"+h.length+\" arguments, but found \"+d.length+\" instead.\");else{for(var b=0;b<d.length;b++){var _=Array.isArray(h)?h[b]:h.type,w=d[b];l.concat(b+1).checkSubtype(_,w.type)}if(0===l.errors.length)return new Te(n,a,p,d)}}if(1===s.length)(r=e.errors).push.apply(r,l.errors);else{for(var k=(s.length?s:o).map((function(t){return e=t[0],Array.isArray(e)?\"(\"+e.map($t).join(\", \")+\")\":\"(\"+$t(e.type)+\"...)\";var e})).join(\" | \"),T=[],M=1;M<t.length;M++){var A=e.parse(t[M],1+T.length);if(!A)return null;T.push($t(A.type))}e.error(\"Expected arguments of type \"+k+\", but found (\"+T.join(\", \")+\") instead.\")}return null},Te.register=function(t,e){for(var r in Te.definitions=e,e)t[r]=Te};var Me=function(t,e,r){this.type=Xt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};Me.parse=function(t,e){if(2!==t.length)return e.error(\"Expected one argument.\");var r=t[1];if(\"object\"!=typeof r||Array.isArray(r))return e.error(\"Collator options argument must be an object.\");var n=e.parse(void 0!==r[\"case-sensitive\"]&&r[\"case-sensitive\"],1,qt);if(!n)return null;var i=e.parse(void 0!==r[\"diacritic-sensitive\"]&&r[\"diacritic-sensitive\"],1,qt);if(!i)return null;var a=null;return r.locale&&!(a=e.parse(r.locale,1,Ht))?null:new Me(n,i,a)},Me.prototype.evaluate=function(t){return new oe(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Me.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Me.prototype.outputDefined=function(){return!1},Me.prototype.serialize=function(){var t={};return t[\"case-sensitive\"]=this.caseSensitive.serialize(),t[\"diacritic-sensitive\"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),[\"collator\",t]};var Ae=8192;function Se(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Ee(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Ce(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*Ae),Math.round(i*a*Ae)]}function Le(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Pe(t,e){for(var r=!1,n=0,i=e.length;n<i;n++)for(var a=e[n],o=0,s=a.length;o<s-1;o++){if(l=t,u=a[o],c=a[o+1],f=void 0,h=void 0,p=void 0,d=void 0,f=l[0]-u[0],h=l[1]-u[1],p=l[0]-c[0],d=l[1]-c[1],f*d-p*h==0&&f*p<=0&&h*d<=0)return!1;Le(t,a[o],a[o+1])&&(r=!r)}var l,u,c,f,h,p,d;return r}function Oe(t,e){for(var r=0;r<e.length;r++)if(Pe(t,e[r]))return!0;return!1}function Ie(t,e,r,n){var i=t[0]-r[0],a=t[1]-r[1],o=e[0]-r[0],s=e[1]-r[1],l=n[0]-r[0],u=n[1]-r[1],c=i*u-l*a,f=o*u-l*s;return c>0&&f<0||c<0&&f>0}function De(t,e,r){for(var n=0,i=r;n<i.length;n+=1)for(var a=i[n],o=0;o<a.length-1;++o)if(s=t,l=e,u=a[o],c=a[o+1],f=void 0,h=void 0,p=void 0,p=[l[0]-s[0],l[1]-s[1]],0!=(f=[c[0]-u[0],c[1]-u[1]],h=p,f[0]*h[1]-f[1]*h[0])&&Ie(s,l,u,c)&&Ie(u,c,s,l))return!0;var s,l,u,c,f,h,p;return!1}function ze(t,e){for(var r=0;r<t.length;++r)if(!Pe(t[r],e))return!1;for(var n=0;n<t.length-1;++n)if(De(t[n],t[n+1],e))return!1;return!0}function Re(t,e){for(var r=0;r<e.length;r++)if(ze(t,e[r]))return!0;return!1}function Fe(t,e,r){for(var n=[],i=0;i<t.length;i++){for(var a=[],o=0;o<t[i].length;o++){var s=Ce(t[i][o],r);Se(e,s),a.push(s)}n.push(a)}return n}function Ne(t,e,r){for(var n=[],i=0;i<t.length;i++){var a=Fe(t[i],e,r);n.push(a)}return n}function Be(t,e,r,n){if(t[0]<r[0]||t[0]>r[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}Se(e,t)}function je(t,e,r,n){for(var i=Math.pow(2,n.z)*Ae,a=[n.x*Ae,n.y*Ae],o=[],s=0,l=t;s<l.length;s+=1)for(var u=0,c=l[s];u<c.length;u+=1){var f=c[u],h=[f.x+a[0],f.y+a[1]];Be(h,e,r,i),o.push(h)}return o}function Ue(t,e,r,n){for(var i=Math.pow(2,n.z)*Ae,a=[n.x*Ae,n.y*Ae],o=[],s=0,l=t;s<l.length;s+=1){for(var u=[],c=0,f=l[s];c<f.length;c+=1){var h=f[c],p=[h.x+a[0],h.y+a[1]];Se(e,p),u.push(p)}o.push(u)}if(e[2]-e[0]<=i/2){(y=e)[0]=y[1]=1/0,y[2]=y[3]=-1/0;for(var d=0,g=o;d<g.length;d+=1)for(var v=0,m=g[d];v<m.length;v+=1)Be(m[v],e,r,i)}var y;return o}var Ve=function(t,e){this.type=qt,this.geojson=t,this.geometries=e};function He(t){if(t instanceof Te){if(\"get\"===t.name&&1===t.args.length)return!1;if(\"feature-state\"===t.name)return!1;if(\"has\"===t.name&&1===t.args.length)return!1;if(\"properties\"===t.name||\"geometry-type\"===t.name||\"id\"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Ve)return!1;var e=!0;return t.eachChild((function(t){e&&!He(t)&&(e=!1)})),e}function qe(t){if(t instanceof Te&&\"feature-state\"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!qe(t)&&(e=!1)})),e}function Ge(t,e){if(t instanceof Te&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ge(t,e)&&(r=!1)})),r}Ve.parse=function(t,e){if(2!==t.length)return e.error(\"'within' expression requires exactly one argument, but found \"+(t.length-1)+\" instead.\");if(fe(t[1])){var r=t[1];if(\"FeatureCollection\"===r.type)for(var n=0;n<r.features.length;++n){var i=r.features[n].geometry.type;if(\"Polygon\"===i||\"MultiPolygon\"===i)return new Ve(r,r.features[n].geometry)}else if(\"Feature\"===r.type){var a=r.geometry.type;if(\"Polygon\"===a||\"MultiPolygon\"===a)return new Ve(r,r.geometry)}else if(\"Polygon\"===r.type||\"MultiPolygon\"===r.type)return new Ve(r,r)}return e.error(\"'within' expression requires valid geojson object that contains polygon geometry type.\")},Ve.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if(\"Point\"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(\"Polygon\"===e.type){var a=Fe(e.coordinates,n,i),o=je(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var s=0,l=o;s<l.length;s+=1)if(!Pe(l[s],a))return!1}if(\"MultiPolygon\"===e.type){var u=Ne(e.coordinates,n,i),c=je(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var f=0,h=c;f<h.length;f+=1)if(!Oe(h[f],u))return!1}return!0}(t,this.geometries);if(\"LineString\"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if(\"Polygon\"===e.type){var a=Fe(e.coordinates,n,i),o=Ue(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var s=0,l=o;s<l.length;s+=1)if(!ze(l[s],a))return!1}if(\"MultiPolygon\"===e.type){var u=Ne(e.coordinates,n,i),c=Ue(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var f=0,h=c;f<h.length;f+=1)if(!Re(h[f],u))return!1}return!0}(t,this.geometries)}return!1},Ve.prototype.eachChild=function(){},Ve.prototype.outputDefined=function(){return!0},Ve.prototype.serialize=function(){return[\"within\",this.geojson]};var Ye=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Ye.parse=function(t,e){if(2!==t.length||\"string\"!=typeof t[1])return e.error(\"'var' expression requires exactly one string literal argument.\");var r=t[1];return e.scope.has(r)?new Ye(r,e.scope.get(r)):e.error('Unknown variable \"'+r+'\". Make sure \"'+r+'\" has been bound in an enclosing \"let\" expression before using it.',1)},Ye.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Ye.prototype.eachChild=function(){},Ye.prototype.outputDefined=function(){return!1},Ye.prototype.serialize=function(){return[\"var\",this.name]};var We=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new jt),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return\"[\"+t+\"]\"})).join(\"\"),this.scope=n,this.errors=i,this.expectedType=r};function Xe(t){if(t instanceof Ye)return Xe(t.boundExpression);if(t instanceof Te&&\"error\"===t.name)return!1;if(t instanceof Me)return!1;if(t instanceof Ve)return!1;var e=t instanceof _e||t instanceof me,r=!0;return t.eachChild((function(t){r=e?r&&Xe(t):r&&t instanceof de})),!!r&&He(t)&&Ge(t,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}function Ze(t,e){for(var r,n,i=t.length-1,a=0,o=i,s=0;a<=o;)if(r=t[s=Math.floor((a+o)/2)],n=t[s+1],r<=e){if(s===i||e<n)return s;a=s+1}else{if(!(r>e))throw new ge(\"Input is not a number.\");o=s-1}return 0}We.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},We.prototype._parse=function(t,e){function r(t,e,r){return\"assert\"===r?new me(e,[t]):\"coerce\"===r?new _e(e,[t]):t}if(null!==t&&\"string\"!=typeof t&&\"boolean\"!=typeof t&&\"number\"!=typeof t||(t=[\"literal\",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');var n=t[0];if(\"string\"!=typeof n)return this.error(\"Expression name must be a string, but found \"+typeof n+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if(\"string\"!==o.kind&&\"number\"!==o.kind&&\"boolean\"!==o.kind&&\"object\"!==o.kind&&\"array\"!==o.kind||\"value\"!==s.kind)if(\"color\"!==o.kind&&\"formatted\"!==o.kind&&\"resolvedImage\"!==o.kind||\"value\"!==s.kind&&\"string\"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||\"coerce\");else a=r(a,o,e.typeAnnotation||\"assert\")}if(!(a instanceof de)&&\"resolvedImage\"!==a.type.kind&&Xe(a)){var l=new ke;try{a=new de(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression \"'+n+'\". If you wanted a literal array, use [\"literal\", [...]].',0)}return void 0===t?this.error(\"'undefined' value invalid. Use null instead.\"):\"object\"==typeof t?this.error('Bare objects invalid. Use [\"literal\", {...}] instead.'):this.error(\"Expected an array, but found \"+typeof t+\" instead.\")},We.prototype.concat=function(t,e,r){var n=\"number\"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new We(this.registry,n,e||null,i,this.errors)},We.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=\"\"+this.key+e.map((function(t){return\"[\"+t+\"]\"})).join(\"\");this.errors.push(new Bt(n,t))},We.prototype.checkSubtype=function(t,e){var r=te(t,e);return r&&this.error(r),r};var Ke=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var a=i[n],o=a[0],s=a[1];this.labels.push(o),this.outputs.push(s)}};function Je(t,e,r){return t*(1-r)+e*r}Ke.parse=function(t,e){if(t.length-1<4)return e.error(\"Expected at least 4 arguments, but found only \"+(t.length-1)+\".\");if((t.length-1)%2!=0)return e.error(\"Expected an even number of arguments.\");var r=e.parse(t[1],1,Vt);if(!r)return null;var n=[],i=null;e.expectedType&&\"value\"!==e.expectedType.kind&&(i=e.expectedType);for(var a=1;a<t.length;a+=2){var o=1===a?-1/0:t[a],s=t[a+1],l=a,u=a+1;if(\"number\"!=typeof o)return e.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=o)return e.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,i);if(!c)return null;i=i||c.type,n.push([o,c])}return new Ke(i,r,n)},Ke.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[Ze(e,n)].evaluate(t)},Ke.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},Ke.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},Ke.prototype.serialize=function(){for(var t=[\"step\",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var $e=Object.freeze({__proto__:null,number:Je,color:function(t,e,r){return new ae(Je(t.r,e.r,r),Je(t.g,e.g,r),Je(t.b,e.b,r),Je(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return Je(t,e[n],r)}))}}),Qe=.95047,tr=1.08883,er=4/29,rr=6/29,nr=3*rr*rr,ir=Math.PI/180,ar=180/Math.PI;function or(t){return t>.008856451679035631?Math.pow(t,1/3):t/nr+er}function sr(t){return t>rr?t*t*t:nr*(t-er)}function lr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ur(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cr(t){var e=ur(t.r),r=ur(t.g),n=ur(t.b),i=or((.4124564*e+.3575761*r+.1804375*n)/Qe),a=or((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-or((.0193339*e+.119192*r+.9503041*n)/tr)),alpha:t.a}}function fr(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*sr(e),r=Qe*sr(r),n=tr*sr(n),new ae(lr(3.2404542*r-1.5371385*e-.4985314*n),lr(-.969266*r+1.8760108*e+.041556*n),lr(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function hr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var pr={forward:cr,reverse:fr,interpolate:function(t,e,r){return{l:Je(t.l,e.l,r),a:Je(t.a,e.a,r),b:Je(t.b,e.b,r),alpha:Je(t.alpha,e.alpha,r)}}},dr={forward:function(t){var e=cr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*ar;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*ir,r=t.c;return fr({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:hr(t.h,e.h,r),c:Je(t.c,e.c,r),l:Je(t.l,e.l,r),alpha:Je(t.alpha,e.alpha,r)}}},gr=Object.freeze({__proto__:null,lab:pr,hcl:dr}),vr=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a<o.length;a+=1){var s=o[a],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}};function mr(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}vr.interpolationFactor=function(t,e,r,i){var a=0;if(\"exponential\"===t.name)a=mr(e,t.base,r,i);else if(\"linear\"===t.name)a=mr(e,1,r,i);else if(\"cubic-bezier\"===t.name){var o=t.controlPoints;a=new n(o[0],o[1],o[2],o[3]).solve(mr(e,1,r,i))}return a},vr.parse=function(t,e){var r=t[0],n=t[1],i=t[2],a=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error(\"Expected an interpolation type expression.\",1);if(\"linear\"===n[0])n={name:\"linear\"};else if(\"exponential\"===n[0]){var o=n[1];if(\"number\"!=typeof o)return e.error(\"Exponential interpolation requires a numeric base.\",1,1);n={name:\"exponential\",base:o}}else{if(\"cubic-bezier\"!==n[0])return e.error(\"Unknown interpolation type \"+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(t){return\"number\"!=typeof t||t<0||t>1})))return e.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);n={name:\"cubic-bezier\",controlPoints:s}}if(t.length-1<4)return e.error(\"Expected at least 4 arguments, but found only \"+(t.length-1)+\".\");if((t.length-1)%2!=0)return e.error(\"Expected an even number of arguments.\");if(!(i=e.parse(i,2,Vt)))return null;var l=[],u=null;\"interpolate-hcl\"===r||\"interpolate-lab\"===r?u=Gt:e.expectedType&&\"value\"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<a.length;c+=2){var f=a[c],h=a[c+1],p=c+3,d=c+4;if(\"number\"!=typeof f)return e.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',p);if(l.length&&l[l.length-1][0]>=f)return e.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,u);if(!g)return null;u=u||g.type,l.push([f,g])}return\"number\"===u.kind||\"color\"===u.kind||\"array\"===u.kind&&\"number\"===u.itemType.kind&&\"number\"==typeof u.N?new vr(u,r,n,i,l):e.error(\"Type \"+$t(u)+\" is not interpolatable.\")},vr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=Ze(e,n),o=e[a],s=e[a+1],l=vr.interpolationFactor(this.interpolation,n,o,s),u=r[a].evaluate(t),c=r[a+1].evaluate(t);return\"interpolate\"===this.operator?$e[this.type.kind.toLowerCase()](u,c,l):\"interpolate-hcl\"===this.operator?dr.reverse(dr.interpolate(dr.forward(u),dr.forward(c),l)):pr.reverse(pr.interpolate(pr.forward(u),pr.forward(c),l))},vr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},vr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},vr.prototype.serialize=function(){var t;t=\"linear\"===this.interpolation.name?[\"linear\"]:\"exponential\"===this.interpolation.name?1===this.interpolation.base?[\"linear\"]:[\"exponential\",this.interpolation.base]:[\"cubic-bezier\"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var yr=function(t,e){this.type=t,this.args=e};yr.parse=function(t,e){if(t.length<2)return e.error(\"Expectected at least one argument.\");var r=null,n=e.expectedType;n&&\"value\"!==n.kind&&(r=n);for(var i=[],a=0,o=t.slice(1);a<o.length;a+=1){var s=o[a],l=e.parse(s,1+i.length,r,void 0,{typeAnnotation:\"omit\"});if(!l)return null;r=r||l.type,i.push(l)}var u=n&&i.some((function(t){return te(n,t.type)}));return new yr(u?Wt:r,i)},yr.prototype.evaluate=function(t){for(var e,r=null,n=0,i=0,a=this.args;i<a.length&&(n++,(r=a[i].evaluate(t))&&r instanceof ue&&!r.available&&(e||(e=r.name),r=null,n===this.args.length&&(r=e)),null===r);i+=1);return r},yr.prototype.eachChild=function(t){this.args.forEach(t)},yr.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},yr.prototype.serialize=function(){var t=[\"coalesce\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var xr=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};xr.prototype.evaluate=function(t){return this.result.evaluate(t)},xr.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},xr.parse=function(t,e){if(t.length<4)return e.error(\"Expected at least 3 arguments, but found \"+(t.length-1)+\" instead.\");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if(\"string\"!=typeof i)return e.error(\"Expected string, but found \"+typeof i+\" instead.\",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error(\"Variable names must contain only alphanumeric characters or '_'.\",n);var a=e.parse(t[n+1],n+1);if(!a)return null;r.push([i,a])}var o=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return o?new xr(r,o):null},xr.prototype.outputDefined=function(){return this.result.outputDefined()},xr.prototype.serialize=function(){for(var t=[\"let\"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t.push(i,a.serialize())}return t.push(this.result.serialize()),t};var br=function(t,e,r){this.type=t,this.index=e,this.input=r};br.parse=function(t,e){if(3!==t.length)return e.error(\"Expected 2 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Vt),n=e.parse(t[2],2,Jt(e.expectedType||Wt));if(!r||!n)return null;var i=n.type;return new br(i.itemType,r,n)},br.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new ge(\"Array index out of bounds: \"+e+\" < 0.\");if(e>=r.length)throw new ge(\"Array index out of bounds: \"+e+\" > \"+(r.length-1)+\".\");if(e!==Math.floor(e))throw new ge(\"Array index must be an integer, but found \"+e+\" instead.\");return r[e]},br.prototype.eachChild=function(t){t(this.index),t(this.input)},br.prototype.outputDefined=function(){return!1},br.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var _r=function(t,e){this.type=qt,this.needle=t,this.haystack=e};_r.parse=function(t,e){if(3!==t.length)return e.error(\"Expected 2 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Wt),n=e.parse(t[2],2,Wt);return r&&n?ee(r.type,[qt,Ht,Vt,Ut,Wt])?new _r(r,n):e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+$t(r.type)+\" instead\"):null},_r.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!re(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ge(\"Expected first argument to be of type boolean, string, number or null, but found \"+$t(he(e))+\" instead.\");if(!re(r,[\"string\",\"array\"]))throw new ge(\"Expected second argument to be of type array or string, but found \"+$t(he(r))+\" instead.\");return r.indexOf(e)>=0},_r.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},_r.prototype.outputDefined=function(){return!0},_r.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var wr=function(t,e,r){this.type=Vt,this.needle=t,this.haystack=e,this.fromIndex=r};wr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Wt),n=e.parse(t[2],2,Wt);if(!r||!n)return null;if(!ee(r.type,[qt,Ht,Vt,Ut,Wt]))return e.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+$t(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Vt);return i?new wr(r,n,i):null}return new wr(r,n)},wr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!re(e,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ge(\"Expected first argument to be of type boolean, string, number or null, but found \"+$t(he(e))+\" instead.\");if(!re(r,[\"string\",\"array\"]))throw new ge(\"Expected second argument to be of type array or string, but found \"+$t(he(r))+\" instead.\");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},wr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},wr.prototype.outputDefined=function(){return!1},wr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),t]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var kr=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};kr.parse=function(t,e){if(t.length<5)return e.error(\"Expected at least 4 arguments, but found only \"+(t.length-1)+\".\");if(t.length%2!=1)return e.error(\"Expected an even number of arguments.\");var r,n;e.expectedType&&\"value\"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;o<t.length-1;o+=2){var s=t[o],l=t[o+1];Array.isArray(s)||(s=[s]);var u=e.concat(o);if(0===s.length)return u.error(\"Expected at least one branch label.\");for(var c=0,f=s;c<f.length;c+=1){var h=f[c];if(\"number\"!=typeof h&&\"string\"!=typeof h)return u.error(\"Branch labels must be numbers or strings.\");if(\"number\"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return u.error(\"Branch labels must be integers no larger than \"+Number.MAX_SAFE_INTEGER+\".\");if(\"number\"==typeof h&&Math.floor(h)!==h)return u.error(\"Numeric branch labels must be integer values.\");if(r){if(u.checkSubtype(r,he(h)))return null}else r=he(h);if(void 0!==i[String(h)])return u.error(\"Branch labels must be unique.\");i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,Wt);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?\"value\"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new kr(r,n,d,i,a,g):null},kr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(he(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},kr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},kr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},kr.prototype.serialize=function(){for(var t=this,e=[\"match\",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i<a.length;i+=1){var o=a[i];void 0===(f=n[this.cases[o]])?(n[this.cases[o]]=r.length,r.push([this.cases[o],[o]])):r[f][1].push(o)}for(var s=function(e){return\"number\"===t.inputType.kind?Number(e):e},l=0,u=r;l<u.length;l+=1){var c=u[l],f=c[0],h=c[1];1===h.length?e.push(s(h[0])):e.push(h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Tr=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};Tr.parse=function(t,e){if(t.length<4)return e.error(\"Expected at least 3 arguments, but found only \"+(t.length-1)+\".\");if(t.length%2!=0)return e.error(\"Expected an odd number of arguments.\");var r;e.expectedType&&\"value\"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var a=e.parse(t[i],i,qt);if(!a)return null;var o=e.parse(t[i+1],i+1,r);if(!o)return null;n.push([a,o]),r=r||o.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Tr(r,n,s):null},Tr.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];if(i.evaluate(t))return a.evaluate(t)}return this.otherwise.evaluate(t)},Tr.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t(i),t(a)}t(this.otherwise)},Tr.prototype.outputDefined=function(){return this.branches.every((function(t){return t[0],t[1].outputDefined()}))&&this.otherwise.outputDefined()},Tr.prototype.serialize=function(){var t=[\"case\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Mr=function(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n};function Ar(t,e){return\"==\"===t||\"!=\"===t?\"boolean\"===e.kind||\"string\"===e.kind||\"number\"===e.kind||\"null\"===e.kind||\"value\"===e.kind:\"string\"===e.kind||\"number\"===e.kind||\"value\"===e.kind}function Sr(t,e,r,n){return 0===n.compare(e,r)}function Er(t,e,r){var n=\"==\"!==t&&\"!=\"!==t;return function(){function i(t,e,r){this.type=qt,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument=\"value\"===t.type.kind||\"value\"===e.type.kind}return i.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error(\"Expected two or three arguments.\");var r=t[0],a=e.parse(t[1],1,Wt);if(!a)return null;if(!Ar(r,a.type))return e.concat(1).error('\"'+r+\"\\\" comparisons are not supported for type '\"+$t(a.type)+\"'.\");var o=e.parse(t[2],2,Wt);if(!o)return null;if(!Ar(r,o.type))return e.concat(2).error('\"'+r+\"\\\" comparisons are not supported for type '\"+$t(o.type)+\"'.\");if(a.type.kind!==o.type.kind&&\"value\"!==a.type.kind&&\"value\"!==o.type.kind)return e.error(\"Cannot compare types '\"+$t(a.type)+\"' and '\"+$t(o.type)+\"'.\");n&&(\"value\"===a.type.kind&&\"value\"!==o.type.kind?a=new me(o.type,[a]):\"value\"!==a.type.kind&&\"value\"===o.type.kind&&(o=new me(a.type,[o])));var s=null;if(4===t.length){if(\"string\"!==a.type.kind&&\"string\"!==o.type.kind&&\"value\"!==a.type.kind&&\"value\"!==o.type.kind)return e.error(\"Cannot use collator to compare non-string types.\");if(!(s=e.parse(t[3],3,Xt)))return null}return new i(a,o,s)},i.prototype.evaluate=function(i){var a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=he(a),l=he(o);if(s.kind!==l.kind||\"string\"!==s.kind&&\"number\"!==s.kind)throw new ge('Expected arguments for \"'+t+'\" to be (string, string) or (number, number), but found ('+s.kind+\", \"+l.kind+\") instead.\")}if(this.collator&&!n&&this.hasUntypedArgument){var u=he(a),c=he(o);if(\"string\"!==u.kind||\"string\"!==c.kind)return e(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):e(i,a,o)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},i}()}Mr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error(\"Expected 3 or 4 arguments, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1,Wt),n=e.parse(t[2],2,Vt);if(!r||!n)return null;if(!ee(r.type,[Jt(Wt),Ht,Wt]))return e.error(\"Expected first argument to be of type array or string, but found \"+$t(r.type)+\" instead\");if(4===t.length){var i=e.parse(t[3],3,Vt);return i?new Mr(r.type,r,n,i):null}return new Mr(r.type,r,n)},Mr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!re(e,[\"string\",\"array\"]))throw new ge(\"Expected first argument to be of type array or string, but found \"+$t(he(e))+\" instead.\");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},Mr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),t]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};var Cr=Er(\"==\",(function(t,e,r){return e===r}),Sr),Lr=Er(\"!=\",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!Sr(0,e,r,n)})),Pr=Er(\"<\",(function(t,e,r){return e<r}),(function(t,e,r,n){return n.compare(e,r)<0})),Or=Er(\">\",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Ir=Er(\"<=\",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Dr=Er(\">=\",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),zr=function(t,e,r,n,i){this.type=Ht,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};zr.parse=function(t,e){if(3!==t.length)return e.error(\"Expected two arguments.\");var r=e.parse(t[1],1,Vt);if(!r)return null;var n=t[2];if(\"object\"!=typeof n||Array.isArray(n))return e.error(\"NumberFormat options argument must be an object.\");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Ht)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Ht)))return null;var o=null;if(n[\"min-fraction-digits\"]&&!(o=e.parse(n[\"min-fraction-digits\"],1,Vt)))return null;var s=null;return n[\"max-fraction-digits\"]&&!(s=e.parse(n[\"max-fraction-digits\"],1,Vt))?null:new zr(r,i,a,o,s)},zr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},zr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},zr.prototype.outputDefined=function(){return!1},zr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),t]};var Rr=function(t){this.type=Vt,this.input=t};Rr.parse=function(t,e){if(2!==t.length)return e.error(\"Expected 1 argument, but found \"+(t.length-1)+\" instead.\");var r=e.parse(t[1],1);return r?\"array\"!==r.type.kind&&\"string\"!==r.type.kind&&\"value\"!==r.type.kind?e.error(\"Expected argument of type string or array, but found \"+$t(r.type)+\" instead.\"):new Rr(r):null},Rr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(\"string\"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ge(\"Expected value to be of type string or array, but found \"+$t(he(e))+\" instead.\")},Rr.prototype.eachChild=function(t){t(this.input)},Rr.prototype.outputDefined=function(){return!1},Rr.prototype.serialize=function(){var t=[\"length\"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Fr={\"==\":Cr,\"!=\":Lr,\">\":Or,\"<\":Pr,\">=\":Dr,\"<=\":Ir,array:me,at:br,boolean:me,case:Tr,coalesce:yr,collator:Me,format:ye,image:xe,in:_r,\"index-of\":wr,interpolate:vr,\"interpolate-hcl\":vr,\"interpolate-lab\":vr,length:Rr,let:xr,literal:de,match:kr,number:me,\"number-format\":zr,object:me,slice:Mr,step:Ke,string:me,\"to-boolean\":_e,\"to-color\":_e,\"to-number\":_e,\"to-string\":_e,var:Ye,within:Ve};function Nr(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=ce(r,n,i,o);if(s)throw new ge(s);return new ae(r/255*o,n/255*o,i/255*o,o)}function Br(t,e){return t in e}function jr(t,e){var r=e[t];return void 0===r?null:r}function Ur(t){return{type:t}}function Vr(t){return{result:\"success\",value:t}}function Hr(t){return{result:\"error\",value:t}}function qr(t){return\"data-driven\"===t[\"property-type\"]||\"cross-faded-data-driven\"===t[\"property-type\"]}function Gr(t){return!!t.expression&&t.expression.parameters.indexOf(\"zoom\")>-1}function Yr(t){return!!t.expression&&t.expression.interpolated}function Wr(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}function Xr(t){return\"object\"==typeof t&&null!==t&&!Array.isArray(t)}function Zr(t){return t}function Kr(t,e){var r,n,i,a=\"color\"===e.type,o=t.stops&&\"object\"==typeof t.stops[0][0],s=o||void 0!==t.property,l=o||!s,u=t.type||(Yr(e)?\"exponential\":\"interval\");if(a&&((t=Rt({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],ae.parse(t[1])]}))),t.default?t.default=ae.parse(t.default):t.default=ae.parse(e.default)),t.colorSpace&&\"rgb\"!==t.colorSpace&&!gr[t.colorSpace])throw new Error(\"Unknown color space: \"+t.colorSpace);if(\"exponential\"===u)r=tn;else if(\"interval\"===u)r=Qr;else if(\"categorical\"===u){r=$r,n=Object.create(null);for(var c=0,f=t.stops;c<f.length;c+=1){var h=f[c];n[h[0]]=h[1]}i=typeof t.stops[0][0]}else{if(\"identity\"!==u)throw new Error('Unknown function type \"'+u+'\"');r=en}if(o){for(var p={},d=[],g=0;g<t.stops.length;g++){var v=t.stops[g],m=v[0].zoom;void 0===p[m]&&(p[m]={zoom:m,type:t.type,property:t.property,default:t.default,stops:[]},d.push(m)),p[m].stops.push([v[0].value,v[1]])}for(var y=[],x=0,b=d;x<b.length;x+=1){var _=b[x];y.push([p[_].zoom,Kr(p[_],e)])}var w={name:\"linear\"};return{kind:\"composite\",interpolationType:w,interpolationFactor:vr.interpolationFactor.bind(void 0,w),zoomStops:y.map((function(t){return t[0]})),evaluate:function(r,n){var i=r.zoom;return tn({stops:y,base:t.base},e,i).evaluate(i,n)}}}if(l){var k=\"exponential\"===u?{name:\"exponential\",base:void 0!==t.base?t.base:1}:null;return{kind:\"camera\",interpolationType:k,interpolationFactor:vr.interpolationFactor.bind(void 0,k),zoomStops:t.stops.map((function(t){return t[0]})),evaluate:function(a){var o=a.zoom;return r(t,e,o,n,i)}}}return{kind:\"source\",evaluate:function(a,o){var s=o&&o.properties?o.properties[t.property]:void 0;return void 0===s?Jr(t.default,e.default):r(t,e,s,n,i)}}}function Jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function $r(t,e,r,n,i){return Jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Qr(t,e,r){if(\"number\"!==Wr(r))return Jr(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=Ze(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function tn(t,e,r){var n=void 0!==t.base?t.base:1;if(\"number\"!==Wr(r))return Jr(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var a=Ze(t.stops.map((function(t){return t[0]})),r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],u=$e[e.type]||Zr;if(t.colorSpace&&\"rgb\"!==t.colorSpace){var c=gr[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),o))}}return\"function\"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return u(r,n,o)}}:u(s,l,o)}function en(t,e,r){return\"color\"===e.type?r=ae.parse(r):\"formatted\"===e.type?r=le.fromString(r.toString()):\"resolvedImage\"===e.type?r=ue.fromString(r.toString()):Wr(r)===e.type||\"enum\"===e.type&&e.values[r]||(r=void 0),Jr(r,t.default,e.default)}Te.register(Fr,{error:[{kind:\"error\"},[Ht],function(t,e){var r=e[0];throw new ge(r.evaluate(t))}],typeof:[Ht,[Wt],function(t,e){return $t(he(e[0].evaluate(t)))}],\"to-rgba\":[Jt(Vt,4),[Gt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Gt,[Vt,Vt,Vt],Nr],rgba:[Gt,[Vt,Vt,Vt,Vt],Nr],has:{type:qt,overloads:[[[Ht],function(t,e){return Br(e[0].evaluate(t),t.properties())}],[[Ht,Yt],function(t,e){var r=e[0],n=e[1];return Br(r.evaluate(t),n.evaluate(t))}]]},get:{type:Wt,overloads:[[[Ht],function(t,e){return jr(e[0].evaluate(t),t.properties())}],[[Ht,Yt],function(t,e){var r=e[0],n=e[1];return jr(r.evaluate(t),n.evaluate(t))}]]},\"feature-state\":[Wt,[Ht],function(t,e){return jr(e[0].evaluate(t),t.featureState||{})}],properties:[Yt,[],function(t){return t.properties()}],\"geometry-type\":[Ht,[],function(t){return t.geometryType()}],id:[Wt,[],function(t){return t.id()}],zoom:[Vt,[],function(t){return t.globals.zoom}],\"heatmap-density\":[Vt,[],function(t){return t.globals.heatmapDensity||0}],\"line-progress\":[Vt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Wt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],\"+\":[Vt,Ur(Vt),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1)r+=i[n].evaluate(t);return r}],\"*\":[Vt,Ur(Vt),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1)r*=i[n].evaluate(t);return r}],\"-\":{type:Vt,overloads:[[[Vt,Vt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[Vt],function(t,e){return-e[0].evaluate(t)}]]},\"/\":[Vt,[Vt,Vt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],\"%\":[Vt,[Vt,Vt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[Vt,[],function(){return Math.LN2}],pi:[Vt,[],function(){return Math.PI}],e:[Vt,[],function(){return Math.E}],\"^\":[Vt,[Vt,Vt],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[Vt,[Vt],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[Vt,[Vt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[Vt,[Vt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[Vt,[Vt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[Vt,[Vt],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[Vt,[Vt],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[Vt,[Vt],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[Vt,[Vt],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[Vt,[Vt],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[Vt,[Vt],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[Vt,Ur(Vt),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[Vt,Ur(Vt),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[Vt,[Vt],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[Vt,[Vt],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Vt,[Vt],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[Vt,[Vt],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],\"filter-==\":[qt,[Ht,Wt],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],\"filter-id-==\":[qt,[Wt],function(t,e){var r=e[0];return t.id()===r.value}],\"filter-type-==\":[qt,[Ht],function(t,e){var r=e[0];return t.geometryType()===r.value}],\"filter-<\":[qt,[Ht,Wt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<a}],\"filter-id-<\":[qt,[Wt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],\"filter->\":[qt,[Ht,Wt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],\"filter-id->\":[qt,[Wt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],\"filter-<=\":[qt,[Ht,Wt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],\"filter-id-<=\":[qt,[Wt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],\"filter->=\":[qt,[Ht,Wt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],\"filter-id->=\":[qt,[Wt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],\"filter-has\":[qt,[Wt],function(t,e){return e[0].value in t.properties()}],\"filter-has-id\":[qt,[],function(t){return null!==t.id()&&void 0!==t.id()}],\"filter-type-in\":[qt,[Jt(Ht)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],\"filter-id-in\":[qt,[Jt(Wt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],\"filter-in-small\":[qt,[Ht,Jt(Wt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],\"filter-in-large\":[qt,[Ht,Jt(Wt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:qt,overloads:[[[qt,qt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Ur(qt),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(!n[r].evaluate(t))return!1;return!0}]]},any:{type:qt,overloads:[[[qt,qt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Ur(qt),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(n[r].evaluate(t))return!0;return!1}]]},\"!\":[qt,[qt],function(t,e){return!e[0].evaluate(t)}],\"is-supported-script\":[qt,[Ht],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[Ht,[Ht],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Ht,[Ht],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Ht,Ur(Wt),function(t,e){return e.map((function(e){return pe(e.evaluate(t))})).join(\"\")}],\"resolved-locale\":[Ht,[Xt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var rn=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new ke,this._defaultValue=e?function(t){return\"color\"===t.type&&Xr(t.default)?new ae(0,0,0,0):\"color\"===t.type?ae.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&\"enum\"===e.type?e.values:null};function nn(t){return Array.isArray(t)&&t.length>0&&\"string\"==typeof t[0]&&t[0]in Fr}function an(t,e){var r=new We(Fr,[],e?function(t){var e={color:Gt,string:Ht,number:Vt,enum:Ht,boolean:qt,formatted:Zt,resolvedImage:Kt};return\"array\"===t.type?Jt(e[t.value]||Wt,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&\"string\"===e.type?{typeAnnotation:\"coerce\"}:void 0);return n?Vr(new rn(n,e)):Hr(r.errors)}rn.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},rn.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||\"number\"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ge(\"Expected value to be one of \"+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(\", \")+\", but found \"+JSON.stringify(o)+\" instead.\");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,\"undefined\"!=typeof console&&console.warn(t.message)),this._defaultValue}};var on=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=\"constant\"!==t&&!qe(e.expression)};on.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},on.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var sn=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=\"camera\"!==t&&!qe(e.expression),this.interpolationType=n};function ln(t,e){if(\"error\"===(t=an(t,e)).result)return t;var r=t.value.expression,n=He(r);if(!n&&!qr(e))return Hr([new Bt(\"\",\"data expressions not supported\")]);var i=Ge(r,[\"zoom\"]);if(!i&&!Gr(e))return Hr([new Bt(\"\",\"zoom expressions not supported\")]);var a=cn(r);if(!a&&!i)return Hr([new Bt(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);if(a instanceof Bt)return Hr([a]);if(a instanceof vr&&!Yr(e))return Hr([new Bt(\"\",'\"interpolate\" expressions cannot be used with this property')]);if(!a)return Vr(new on(n?\"constant\":\"source\",t.value));var o=a instanceof vr?a.interpolation:void 0;return Vr(new sn(n?\"camera\":\"composite\",t.value,a.labels,o))}sn.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},sn.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)},sn.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?vr.interpolationFactor(this.interpolationType,t,e,r):0};var un=function(t,e){this._parameters=t,this._specification=e,Rt(this,Kr(this._parameters,this._specification))};function cn(t){var e=null;if(t instanceof xr)e=cn(t.result);else if(t instanceof yr)for(var r=0,n=t.args;r<n.length;r+=1){var i=n[r];if(e=cn(i))break}else(t instanceof Ke||t instanceof vr)&&t.input instanceof Te&&\"zoom\"===t.input.name&&(e=t);return e instanceof Bt||t.eachChild((function(t){var r=cn(t);r instanceof Bt?e=r:!e&&r?e=new Bt(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'):e&&r&&e!==r&&(e=new Bt(\"\",'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'))})),e}function fn(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},a=t.style,o=t.styleSpec,s=[],l=Wr(r);if(\"object\"!==l)return[new Dt(e,r,\"object expected, \"+l+\" found\")];for(var u in r){var c=u.split(\".\")[0],f=n[c]||n[\"*\"],h=void 0;if(i[c])h=i[c];else if(n[c])h=Nn;else if(i[\"*\"])h=i[\"*\"];else{if(!n[\"*\"]){s.push(new Dt(e,r[u],'unknown property \"'+u+'\"'));continue}h=Nn}s=s.concat(h({key:(e?e+\".\":e)+u,value:r[u],valueSpec:f,style:a,styleSpec:o,object:r,objectKey:u},r))}for(var p in n)i[p]||n[p].required&&void 0===n[p].default&&void 0===r[p]&&s.push(new Dt(e,r,'missing required property \"'+p+'\"'));return s}function hn(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,a=t.key,o=t.arrayElementValidator||Nn;if(\"array\"!==Wr(e))return[new Dt(a,e,\"array expected, \"+Wr(e)+\" found\")];if(r.length&&e.length!==r.length)return[new Dt(a,e,\"array length \"+r.length+\" expected, length \"+e.length+\" found\")];if(r[\"min-length\"]&&e.length<r[\"min-length\"])return[new Dt(a,e,\"array length at least \"+r[\"min-length\"]+\" expected, length \"+e.length+\" found\")];var s={type:r.value,values:r.values};i.$version<7&&(s.function=r.function),\"object\"===Wr(r.value)&&(s=r.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(o({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:n,styleSpec:i,key:a+\"[\"+u+\"]\"}));return l}function pn(t){var e=t.key,r=t.value,n=t.valueSpec,i=Wr(r);return\"number\"===i&&r!=r&&(i=\"NaN\"),\"number\"!==i?[new Dt(e,r,\"number expected, \"+i+\" found\")]:\"minimum\"in n&&r<n.minimum?[new Dt(e,r,r+\" is less than the minimum value \"+n.minimum)]:\"maximum\"in n&&r>n.maximum?[new Dt(e,r,r+\" is greater than the maximum value \"+n.maximum)]:[]}function dn(t){var e,r,n,i=t.valueSpec,a=Ft(t.value.type),o={},s=\"categorical\"!==a&&void 0===t.value.property,l=!s,u=\"array\"===Wr(t.value.stops)&&\"array\"===Wr(t.value.stops[0])&&\"object\"===Wr(t.value.stops[0][0]),c=fn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if(\"identity\"===a)return[new Dt(t.key,t.value,'identity function may not have a \"stops\" property')];var e=[],r=t.value;return e=e.concat(hn({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),\"array\"===Wr(r)&&0===r.length&&e.push(new Dt(t.key,r,\"array must have at least one stop\")),e},default:function(t){return Nn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return\"identity\"===a&&s&&c.push(new Dt(t.key,t.value,'missing required property \"property\"')),\"identity\"===a||t.value.stops||c.push(new Dt(t.key,t.value,'missing required property \"stops\"')),\"exponential\"===a&&t.valueSpec.expression&&!Yr(t.valueSpec)&&c.push(new Dt(t.key,t.value,\"exponential functions not supported\")),t.styleSpec.$version>=8&&(l&&!qr(t.valueSpec)?c.push(new Dt(t.key,t.value,\"property functions not supported\")):s&&!Gr(t.valueSpec)&&c.push(new Dt(t.key,t.value,\"zoom functions not supported\"))),\"categorical\"!==a&&!u||void 0!==t.value.property||c.push(new Dt(t.key,t.value,'\"property\" property is required')),c;function f(t){var e=[],a=t.value,s=t.key;if(\"array\"!==Wr(a))return[new Dt(s,a,\"array expected, \"+Wr(a)+\" found\")];if(2!==a.length)return[new Dt(s,a,\"array length 2 expected, length \"+a.length+\" found\")];if(u){if(\"object\"!==Wr(a[0]))return[new Dt(s,a,\"object expected, \"+Wr(a[0])+\" found\")];if(void 0===a[0].zoom)return[new Dt(s,a,\"object stop key must have zoom\")];if(void 0===a[0].value)return[new Dt(s,a,\"object stop key must have value\")];if(n&&n>Ft(a[0].zoom))return[new Dt(s,a[0].zoom,\"stop zoom values must appear in ascending order\")];Ft(a[0].zoom)!==n&&(n=Ft(a[0].zoom),r=void 0,o={}),e=e.concat(fn({key:s+\"[0]\",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:pn,value:h}}))}else e=e.concat(h({key:s+\"[0]\",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return nn(Nt(a[1]))?e.concat([new Dt(s+\"[1]\",a[1],\"expressions are not allowed in function stops.\")]):e.concat(Nn({key:s+\"[1]\",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Wr(t.value),l=Ft(t.value),u=null!==t.value?t.value:n;if(e){if(s!==e)return[new Dt(t.key,u,s+\" stop domain type must match previous stop domain type \"+e)]}else e=s;if(\"number\"!==s&&\"string\"!==s&&\"boolean\"!==s)return[new Dt(t.key,u,\"stop domain value must be a number, string, or boolean\")];if(\"number\"!==s&&\"categorical\"!==a){var c=\"number expected, \"+s+\" found\";return qr(i)&&void 0===a&&(c+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new Dt(t.key,u,c)]}return\"categorical\"!==a||\"number\"!==s||isFinite(l)&&Math.floor(l)===l?\"categorical\"!==a&&\"number\"===s&&void 0!==r&&l<r?[new Dt(t.key,u,\"stop domain values must appear in ascending order\")]:(r=l,\"categorical\"===a&&l in o?[new Dt(t.key,u,\"stop domain values must be unique\")]:(o[l]=!0,[])):[new Dt(t.key,u,\"integer expected, found \"+l)]}}function gn(t){var e=(\"property\"===t.expressionContext?ln:an)(Nt(t.value),t.valueSpec);if(\"error\"===e.result)return e.value.map((function(e){return new Dt(\"\"+t.key+e.key,t.value,e.message)}));var r=e.value.expression||e.value._styleExpression.expression;if(\"property\"===t.expressionContext&&\"text-font\"===t.propertyKey&&!r.outputDefined())return[new Dt(t.key,t.value,'Invalid data expression for \"'+t.propertyKey+'\". Output values must be contained as literals within the expression.')];if(\"property\"===t.expressionContext&&\"layout\"===t.propertyType&&!qe(r))return[new Dt(t.key,t.value,'\"feature-state\" data expressions are not supported with layout properties.')];if(\"filter\"===t.expressionContext&&!qe(r))return[new Dt(t.key,t.value,'\"feature-state\" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf(\"cluster\")){if(!Ge(r,[\"zoom\",\"feature-state\"]))return[new Dt(t.key,t.value,'\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];if(\"cluster-initial\"===t.expressionContext&&!He(r))return[new Dt(t.key,t.value,\"Feature data expressions are not supported with initial expression part of cluster properties.\")]}return[]}function vn(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Ft(r))&&i.push(new Dt(e,r,\"expected one of [\"+n.values.join(\", \")+\"], \"+JSON.stringify(r)+\" found\")):-1===Object.keys(n.values).indexOf(Ft(r))&&i.push(new Dt(e,r,\"expected one of [\"+Object.keys(n.values).join(\", \")+\"], \"+JSON.stringify(r)+\" found\")),i}function mn(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case\"has\":return t.length>=2&&\"$id\"!==t[1]&&\"$type\"!==t[1];case\"in\":return t.length>=3&&(\"string\"!=typeof t[1]||Array.isArray(t[2]));case\"!in\":case\"!has\":case\"none\":return!1;case\"==\":case\"!=\":case\">\":case\">=\":case\"<\":case\"<=\":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case\"any\":case\"all\":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!mn(n)&&\"boolean\"!=typeof n)return!1}return!0;default:return!0}}un.deserialize=function(t){return new un(t._parameters,t._specification)},un.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var yn={type:\"boolean\",default:!1,transition:!1,\"property-type\":\"data-driven\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]}};function xn(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};mn(t)||(t=wn(t));var e=an(t,yn);if(\"error\"===e.result)throw new Error(e.value.map((function(t){return t.key+\": \"+t.message})).join(\", \"));return{filter:function(t,r,n){return e.value.evaluate(t,r,{},n)},needGeometry:_n(t)}}function bn(t,e){return t<e?-1:t>e?1:0}function _n(t){if(!Array.isArray(t))return!1;if(\"within\"===t[0])return!0;for(var e=1;e<t.length;e++)if(_n(t[e]))return!0;return!1}function wn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?\"any\"!==r:\"==\"===r?kn(t[1],t[2],\"==\"):\"!=\"===r?An(kn(t[1],t[2],\"==\")):\"<\"===r||\">\"===r||\"<=\"===r||\">=\"===r?kn(t[1],t[2],r):\"any\"===r?(e=t.slice(1),[\"any\"].concat(e.map(wn))):\"all\"===r?[\"all\"].concat(t.slice(1).map(wn)):\"none\"===r?[\"all\"].concat(t.slice(1).map(wn).map(An)):\"in\"===r?Tn(t[1],t.slice(2)):\"!in\"===r?An(Tn(t[1],t.slice(2))):\"has\"===r?Mn(t[1]):\"!has\"===r?An(Mn(t[1])):\"within\"!==r||t}function kn(t,e,r){switch(t){case\"$type\":return[\"filter-type-\"+r,e];case\"$id\":return[\"filter-id-\"+r,e];default:return[\"filter-\"+r,t,e]}}function Tn(t,e){if(0===e.length)return!1;switch(t){case\"$type\":return[\"filter-type-in\",[\"literal\",e]];case\"$id\":return[\"filter-id-in\",[\"literal\",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?[\"filter-in-large\",t,[\"literal\",e.sort(bn)]]:[\"filter-in-small\",t,[\"literal\",e]]}}function Mn(t){switch(t){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",t]}}function An(t){return[\"!\",t]}function Sn(t){return mn(Nt(t.value))?gn(Rt({},t,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):En(t)}function En(t){var e=t.value,r=t.key;if(\"array\"!==Wr(e))return[new Dt(r,e,\"array expected, \"+Wr(e)+\" found\")];var n,i=t.styleSpec,a=[];if(e.length<1)return[new Dt(r,e,\"filter array must have at least 1 element\")];switch(a=a.concat(vn({key:r+\"[0]\",value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Ft(e[0])){case\"<\":case\"<=\":case\">\":case\">=\":e.length>=2&&\"$type\"===Ft(e[1])&&a.push(new Dt(r,e,'\"$type\" cannot be use with operator \"'+e[0]+'\"'));case\"==\":case\"!=\":3!==e.length&&a.push(new Dt(r,e,'filter array for operator \"'+e[0]+'\" must have 3 elements'));case\"in\":case\"!in\":e.length>=2&&\"string\"!==(n=Wr(e[1]))&&a.push(new Dt(r+\"[1]\",e[1],\"string expected, \"+n+\" found\"));for(var o=2;o<e.length;o++)n=Wr(e[o]),\"$type\"===Ft(e[1])?a=a.concat(vn({key:r+\"[\"+o+\"]\",value:e[o],valueSpec:i.geometry_type,style:t.style,styleSpec:t.styleSpec})):\"string\"!==n&&\"number\"!==n&&\"boolean\"!==n&&a.push(new Dt(r+\"[\"+o+\"]\",e[o],\"string, number, or boolean expected, \"+n+\" found\"));break;case\"any\":case\"all\":case\"none\":for(var s=1;s<e.length;s++)a=a.concat(En({key:r+\"[\"+s+\"]\",value:e[s],style:t.style,styleSpec:t.styleSpec}));break;case\"has\":case\"!has\":n=Wr(e[1]),2!==e.length?a.push(new Dt(r,e,'filter array for \"'+e[0]+'\" operator must have 2 elements')):\"string\"!==n&&a.push(new Dt(r+\"[1]\",e[1],\"string expected, \"+n+\" found\"));break;case\"within\":n=Wr(e[1]),2!==e.length?a.push(new Dt(r,e,'filter array for \"'+e[0]+'\" operator must have 2 elements')):\"object\"!==n&&a.push(new Dt(r+\"[1]\",e[1],\"object expected, \"+n+\" found\"))}return a}function Cn(t,e){var r=t.key,n=t.style,i=t.styleSpec,a=t.value,o=t.objectKey,s=i[e+\"_\"+t.layerType];if(!s)return[];var l=o.match(/^(.*)-transition$/);if(\"paint\"===e&&l&&s[l[1]]&&s[l[1]].transition)return Nn({key:r,value:a,valueSpec:i.transition,style:n,styleSpec:i});var u,c=t.valueSpec||s[o];if(!c)return[new Dt(r,a,'unknown property \"'+o+'\"')];if(\"string\"===Wr(a)&&qr(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(a)))return[new Dt(r,a,'\"'+o+'\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": '+JSON.stringify(u[1])+\" }`.\")];var f=[];return\"symbol\"===t.layerType&&(\"text-field\"===o&&n&&!n.glyphs&&f.push(new Dt(r,a,'use of \"text-field\" requires a style \"glyphs\" property')),\"text-font\"===o&&Xr(Nt(a))&&\"identity\"===Ft(a.type)&&f.push(new Dt(r,a,'\"text-font\" does not support identity functions'))),f.concat(Nn({key:t.key,value:a,valueSpec:c,style:n,styleSpec:i,expressionContext:\"property\",propertyType:e,propertyKey:o}))}function Ln(t){return Cn(t,\"paint\")}function Pn(t){return Cn(t,\"layout\")}function On(t){var e=[],r=t.value,n=t.key,i=t.style,a=t.styleSpec;r.type||r.ref||e.push(new Dt(n,r,'either \"type\" or \"ref\" is required'));var o,s=Ft(r.type),l=Ft(r.ref);if(r.id)for(var u=Ft(r.id),c=0;c<t.arrayIndex;c++){var f=i.layers[c];Ft(f.id)===u&&e.push(new Dt(n,r.id,'duplicate layer id \"'+r.id+'\", previously used at line '+f.id.__line__))}if(\"ref\"in r)[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach((function(t){t in r&&e.push(new Dt(n,r[t],'\"'+t+'\" is prohibited for ref layers'))})),i.layers.forEach((function(t){Ft(t.id)===l&&(o=t)})),o?o.ref?e.push(new Dt(n,r.ref,\"ref cannot reference another ref layer\")):s=Ft(o.type):e.push(new Dt(n,r.ref,'ref layer \"'+l+'\" not found'));else if(\"background\"!==s)if(r.source){var h=i.sources&&i.sources[r.source],p=h&&Ft(h.type);h?\"vector\"===p&&\"raster\"===s?e.push(new Dt(n,r.source,'layer \"'+r.id+'\" requires a raster source')):\"raster\"===p&&\"raster\"!==s?e.push(new Dt(n,r.source,'layer \"'+r.id+'\" requires a vector source')):\"vector\"!==p||r[\"source-layer\"]?\"raster-dem\"===p&&\"hillshade\"!==s?e.push(new Dt(n,r.source,\"raster-dem source can only be used with layer type 'hillshade'.\")):\"line\"!==s||!r.paint||!r.paint[\"line-gradient\"]||\"geojson\"===p&&h.lineMetrics||e.push(new Dt(n,r,'layer \"'+r.id+'\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Dt(n,r,'layer \"'+r.id+'\" must specify a \"source-layer\"')):e.push(new Dt(n,r.source,'source \"'+r.source+'\" not found'))}else e.push(new Dt(n,r,'missing required property \"source\"'));return e=e.concat(fn({key:n,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(){return[]},type:function(){return Nn({key:n+\".type\",value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:\"type\"})},filter:Sn,layout:function(t){return fn({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return Pn(Rt({layerType:s},t))}}})},paint:function(t){return fn({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return Ln(Rt({layerType:s},t))}}})}}})),e}function In(t){var e=t.value,r=t.key,n=Wr(e);return\"string\"!==n?[new Dt(r,e,\"string expected, \"+n+\" found\")]:[]}var Dn={promoteId:function(t){var e=t.key,r=t.value;if(\"string\"===Wr(r))return In({key:e,value:r});var n=[];for(var i in r)n.push.apply(n,In({key:e+\".\"+i,value:r[i]}));return n}};function zn(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new Dt(r,e,'\"type\" is required')];var a,o=Ft(e.type);switch(o){case\"vector\":case\"raster\":case\"raster-dem\":return fn({key:r,value:e,valueSpec:n[\"source_\"+o.replace(\"-\",\"_\")],style:t.style,styleSpec:n,objectElementValidators:Dn});case\"geojson\":if(a=fn({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n,objectElementValidators:Dn}),e.cluster)for(var s in e.clusterProperties){var l=e.clusterProperties[s],u=l[0],c=l[1],f=\"string\"==typeof u?[u,[\"accumulated\"],[\"get\",s]]:u;a.push.apply(a,gn({key:r+\".\"+s+\".map\",value:c,expressionContext:\"cluster-map\"})),a.push.apply(a,gn({key:r+\".\"+s+\".reduce\",value:f,expressionContext:\"cluster-reduce\"}))}return a;case\"video\":return fn({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case\"image\":return fn({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case\"canvas\":return[new Dt(r,null,\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\",\"source.canvas\")];default:return vn({key:r+\".type\",value:e.type,valueSpec:{values:[\"vector\",\"raster\",\"raster-dem\",\"geojson\",\"video\",\"image\"]},style:i,styleSpec:n})}}function Rn(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,a=[],o=Wr(e);if(void 0===e)return a;if(\"object\"!==o)return a.concat([new Dt(\"light\",e,\"object expected, \"+o+\" found\")]);for(var s in e){var l=s.match(/^(.*)-transition$/);a=l&&n[l[1]]&&n[l[1]].transition?a.concat(Nn({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?a.concat(Nn({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):a.concat([new Dt(s,e[s],'unknown property \"'+s+'\"')])}return a}var Fn={\"*\":function(){return[]},array:hn,boolean:function(t){var e=t.value,r=t.key,n=Wr(e);return\"boolean\"!==n?[new Dt(r,e,\"boolean expected, \"+n+\" found\")]:[]},number:pn,color:function(t){var e=t.key,r=t.value,n=Wr(r);return\"string\"!==n?[new Dt(e,r,\"color expected, \"+n+\" found\")]:null===ie(r)?[new Dt(e,r,'color expected, \"'+r+'\" found')]:[]},constants:zt,enum:vn,filter:Sn,function:dn,layer:On,object:fn,source:zn,light:Rn,string:In,formatted:function(t){return 0===In(t).length?[]:gn(t)},resolvedImage:function(t){return 0===In(t).length?[]:gn(t)}};function Nn(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.expression&&Xr(Ft(e))?dn(t):r.expression&&nn(Nt(e))?gn(t):r.type&&Fn[r.type]?Fn[r.type](t):fn(Rt({},t,{valueSpec:r.type?n[r.type]:r}))}function Bn(t){var e=t.value,r=t.key,n=In(t);return n.length||(-1===e.indexOf(\"{fontstack}\")&&n.push(new Dt(r,e,'\"glyphs\" url must include a \"{fontstack}\" token')),-1===e.indexOf(\"{range}\")&&n.push(new Dt(r,e,'\"glyphs\" url must include a \"{range}\" token'))),n}function jn(t,e){void 0===e&&(e=It);var r=[];return r=r.concat(Nn({key:\"\",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Bn,\"*\":function(){return[]}}})),t.constants&&(r=r.concat(zt({key:\"constants\",value:t.constants,style:t,styleSpec:e}))),Un(r)}function Un(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function Vn(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Un(t.apply(this,e))}}jn.source=Vn(zn),jn.light=Vn(Rn),jn.layer=Vn(On),jn.filter=Vn(Sn),jn.paintProperty=Vn(Ln),jn.layoutProperty=Vn(Pn);var Hn=jn,qn=Hn.light,Gn=Hn.paintProperty,Yn=Hn.layoutProperty;function Wn(t,e){var r=!1;if(e&&e.length)for(var n=0,i=e;n<i.length;n+=1){var a=i[n];t.fire(new Pt(new Error(a.message))),r=!0}return r}var Xn=Zn;function Zn(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var o=i[3+a],s=i[3+a+1];n.push(o===s?null:i.subarray(o,s))}var l=i[3+n.length],u=i[3+n.length+1];this.keys=i.subarray(l,u),this.bboxes=i.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var f=r/e*t;this.min=-f,this.max=t+f}Zn.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Zn.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},Zn.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},Zn.prototype.query=function(t,e,r,n,i){var a=this.min,o=this.max;if(t<=a&&e<=a&&o<=r&&o<=n&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,n,this._queryCell,s,{},i),s},Zn.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=this.cells[i];if(null!==l)for(var u=this.keys,c=this.bboxes,f=0;f<l.length;f++){var h=l[f];if(void 0===o[h]){var p=4*h;(s?s(c[p+0],c[p+1],c[p+2],c[p+3]):t<=c[p+2]&&e<=c[p+3]&&r>=c[p+0]&&n>=c[p+1])?(o[h]=!0,a.push(u[h])):o[h]=!1}}},Zn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=c;h++)for(var p=u;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Zn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Zn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Zn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var a=e,o=0;o<t.length;o++){var s=t[o];i[3+o]=a,i.set(s,a),a+=s.length}return i[3+t.length]=a,i.set(this.keys,a),a+=this.keys.length,i[3+t.length+1]=a,i.set(this.bboxes,a),a+=this.bboxes.length,i.buffer};var Kn=self.ImageData,Jn=self.ImageBitmap,$n={};function Qn(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,\"_classRegistryKey\",{value:t,writeable:!1}),$n[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var ti in Qn(\"Object\",Object),Xn.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),{buffer:r}},Xn.deserialize=function(t){return new Xn(t.buffer)},Qn(\"Grid\",Xn),Qn(\"Color\",ae),Qn(\"Error\",Error),Qn(\"ResolvedImage\",ue),Qn(\"StylePropertyFunction\",un),Qn(\"StyleExpression\",rn,{omit:[\"_evaluator\"]}),Qn(\"ZoomDependentExpression\",sn),Qn(\"ZoomConstantExpression\",on),Qn(\"CompoundExpression\",Te,{omit:[\"_evaluate\"]}),Fr)Fr[ti]._classRegistryKey||Qn(\"Expression_\"+ti,Fr[ti]);function ei(t){return t&&\"undefined\"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&\"ArrayBuffer\"===t.constructor.name)}function ri(t){return Jn&&t instanceof Jn}function ni(t,e){if(null==t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(ei(t)||ri(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof Kn)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,a=t;i<a.length;i+=1){var o=a[i];n.push(ni(o,e))}return n}if(\"object\"==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error(\"can't serialize object of unregistered class\");var u=s.serialize?s.serialize(t,e):{};if(!s.serialize){for(var c in t)if(t.hasOwnProperty(c)&&!($n[l].omit.indexOf(c)>=0)){var f=t[c];u[c]=$n[l].shallow.indexOf(c)>=0?f:ni(f,e)}t instanceof Error&&(u.message=t.message)}if(u.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return\"Object\"!==l&&(u.$name=l),u}throw new Error(\"can't serialize object of type \"+typeof t)}function ii(t){if(null==t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||ei(t)||ri(t)||ArrayBuffer.isView(t)||t instanceof Kn)return t;if(Array.isArray(t))return t.map(ii);if(\"object\"==typeof t){var e=t.$name||\"Object\",r=$n[e].klass;if(!r)throw new Error(\"can't deserialize unregistered class \"+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i<a.length;i+=1){var o=a[i];if(\"$name\"!==o){var s=t[o];n[o]=$n[e].shallow.indexOf(o)>=0?s:ii(s)}}return n}throw new Error(\"can't deserialize object of type \"+typeof t)}var ai=function(){this.first=!0};ai.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var oi={\"Latin-1 Supplement\":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},\"Arabic Supplement\":function(t){return t>=1872&&t<=1919},\"Arabic Extended-A\":function(t){return t>=2208&&t<=2303},\"Hangul Jamo\":function(t){return t>=4352&&t<=4607},\"Unified Canadian Aboriginal Syllabics\":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},\"Unified Canadian Aboriginal Syllabics Extended\":function(t){return t>=6320&&t<=6399},\"General Punctuation\":function(t){return t>=8192&&t<=8303},\"Letterlike Symbols\":function(t){return t>=8448&&t<=8527},\"Number Forms\":function(t){return t>=8528&&t<=8591},\"Miscellaneous Technical\":function(t){return t>=8960&&t<=9215},\"Control Pictures\":function(t){return t>=9216&&t<=9279},\"Optical Character Recognition\":function(t){return t>=9280&&t<=9311},\"Enclosed Alphanumerics\":function(t){return t>=9312&&t<=9471},\"Geometric Shapes\":function(t){return t>=9632&&t<=9727},\"Miscellaneous Symbols\":function(t){return t>=9728&&t<=9983},\"Miscellaneous Symbols and Arrows\":function(t){return t>=11008&&t<=11263},\"CJK Radicals Supplement\":function(t){return t>=11904&&t<=12031},\"Kangxi Radicals\":function(t){return t>=12032&&t<=12255},\"Ideographic Description Characters\":function(t){return t>=12272&&t<=12287},\"CJK Symbols and Punctuation\":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},\"Hangul Compatibility Jamo\":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},\"Bopomofo Extended\":function(t){return t>=12704&&t<=12735},\"CJK Strokes\":function(t){return t>=12736&&t<=12783},\"Katakana Phonetic Extensions\":function(t){return t>=12784&&t<=12799},\"Enclosed CJK Letters and Months\":function(t){return t>=12800&&t<=13055},\"CJK Compatibility\":function(t){return t>=13056&&t<=13311},\"CJK Unified Ideographs Extension A\":function(t){return t>=13312&&t<=19903},\"Yijing Hexagram Symbols\":function(t){return t>=19904&&t<=19967},\"CJK Unified Ideographs\":function(t){return t>=19968&&t<=40959},\"Yi Syllables\":function(t){return t>=40960&&t<=42127},\"Yi Radicals\":function(t){return t>=42128&&t<=42191},\"Hangul Jamo Extended-A\":function(t){return t>=43360&&t<=43391},\"Hangul Syllables\":function(t){return t>=44032&&t<=55215},\"Hangul Jamo Extended-B\":function(t){return t>=55216&&t<=55295},\"Private Use Area\":function(t){return t>=57344&&t<=63743},\"CJK Compatibility Ideographs\":function(t){return t>=63744&&t<=64255},\"Arabic Presentation Forms-A\":function(t){return t>=64336&&t<=65023},\"Vertical Forms\":function(t){return t>=65040&&t<=65055},\"CJK Compatibility Forms\":function(t){return t>=65072&&t<=65103},\"Small Form Variants\":function(t){return t>=65104&&t<=65135},\"Arabic Presentation Forms-B\":function(t){return t>=65136&&t<=65279},\"Halfwidth and Fullwidth Forms\":function(t){return t>=65280&&t<=65519}};function si(t){for(var e=0,r=t;e<r.length;e+=1)if(li(r[e].charCodeAt(0)))return!0;return!1}function li(t){return!(746!==t&&747!==t&&(t<4352||!(oi[\"Bopomofo Extended\"](t)||oi.Bopomofo(t)||oi[\"CJK Compatibility Forms\"](t)&&!(t>=65097&&t<=65103)||oi[\"CJK Compatibility Ideographs\"](t)||oi[\"CJK Compatibility\"](t)||oi[\"CJK Radicals Supplement\"](t)||oi[\"CJK Strokes\"](t)||!(!oi[\"CJK Symbols and Punctuation\"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||oi[\"CJK Unified Ideographs Extension A\"](t)||oi[\"CJK Unified Ideographs\"](t)||oi[\"Enclosed CJK Letters and Months\"](t)||oi[\"Hangul Compatibility Jamo\"](t)||oi[\"Hangul Jamo Extended-A\"](t)||oi[\"Hangul Jamo Extended-B\"](t)||oi[\"Hangul Jamo\"](t)||oi[\"Hangul Syllables\"](t)||oi.Hiragana(t)||oi[\"Ideographic Description Characters\"](t)||oi.Kanbun(t)||oi[\"Kangxi Radicals\"](t)||oi[\"Katakana Phonetic Extensions\"](t)||oi.Katakana(t)&&12540!==t||!(!oi[\"Halfwidth and Fullwidth Forms\"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!oi[\"Small Form Variants\"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||oi[\"Unified Canadian Aboriginal Syllabics\"](t)||oi[\"Unified Canadian Aboriginal Syllabics Extended\"](t)||oi[\"Vertical Forms\"](t)||oi[\"Yijing Hexagram Symbols\"](t)||oi[\"Yi Syllables\"](t)||oi[\"Yi Radicals\"](t))))}function ui(t){return!(li(t)||function(t){return!!(oi[\"Latin-1 Supplement\"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||oi[\"General Punctuation\"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||oi[\"Letterlike Symbols\"](t)||oi[\"Number Forms\"](t)||oi[\"Miscellaneous Technical\"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||oi[\"Control Pictures\"](t)&&9251!==t||oi[\"Optical Character Recognition\"](t)||oi[\"Enclosed Alphanumerics\"](t)||oi[\"Geometric Shapes\"](t)||oi[\"Miscellaneous Symbols\"](t)&&!(t>=9754&&t<=9759)||oi[\"Miscellaneous Symbols and Arrows\"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||oi[\"CJK Symbols and Punctuation\"](t)||oi.Katakana(t)||oi[\"Private Use Area\"](t)||oi[\"CJK Compatibility Forms\"](t)||oi[\"Small Form Variants\"](t)||oi[\"Halfwidth and Fullwidth Forms\"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function ci(t){return oi.Arabic(t)||oi[\"Arabic Supplement\"](t)||oi[\"Arabic Extended-A\"](t)||oi[\"Arabic Presentation Forms-A\"](t)||oi[\"Arabic Presentation Forms-B\"](t)}function fi(t){return t>=1424&&t<=2303||oi[\"Arabic Presentation Forms-A\"](t)||oi[\"Arabic Presentation Forms-B\"](t)}function hi(t,e){return!(!e&&fi(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||oi.Khmer(t))}function pi(t){for(var e=0,r=t;e<r.length;e+=1)if(fi(r[e].charCodeAt(0)))return!0;return!1}var di=\"deferred\",gi=\"loading\",vi=\"loaded\",mi=\"error\",yi=null,xi=\"unavailable\",bi=null,_i=function(t){t&&\"string\"==typeof t&&t.indexOf(\"NetworkError\")>-1&&(xi=mi),yi&&yi(t)};function wi(){ki.fire(new Lt(\"pluginStateChange\",{pluginStatus:xi,pluginURL:bi}))}var ki=new Ot,Ti=function(){return xi},Mi=function(){if(xi!==di||!bi)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");xi=gi,wi(),bi&&Mt({url:bi},(function(t){t?_i(t):(xi=vi,wi())}))},Ai={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xi===vi||null!=Ai.applyArabicShaping},isLoading:function(){return xi===gi},setState:function(t){xi=t.pluginStatus,bi=t.pluginURL},isParsed:function(){return null!=Ai.applyArabicShaping&&null!=Ai.processBidirectionalText&&null!=Ai.processStyledBidirectionalText},getPluginURL:function(){return bi}},Si=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ai,this.transition={})};Si.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r<n.length;r+=1)if(!hi(n[r].charCodeAt(0),e))return!1;return!0}(t,Ai.isLoaded())},Si.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Si.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var Ei=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Xr(t))return new un(t,e);if(nn(t)){var r=ln(t,e);if(\"error\"===r.result)throw new Error(r.value.map((function(t){return t.key+\": \"+t.message})).join(\", \"));return r.value}var n=t;return\"string\"==typeof t&&\"color\"===e.type&&(n=ae.parse(t)),{kind:\"constant\",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};Ei.prototype.isDataDriven=function(){return\"source\"===this.expression.kind||\"composite\"===this.expression.kind},Ei.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var Ci=function(t){this.property=t,this.value=new Ei(t,void 0)};Ci.prototype.transitioned=function(t,e){return new Pi(this.property,this.value,e,f({},t.transition,this.transition),t.now)},Ci.prototype.untransitioned=function(){return new Pi(this.property,this.value,null,{},0)};var Li=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Li.prototype.getValue=function(t){return b(this._values[t].value.value)},Li.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ci(this._values[t].property)),this._values[t].value=new Ei(this._values[t].property,null===e?void 0:b(e))},Li.prototype.getTransition=function(t){return b(this._values[t].transition)},Li.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ci(this._values[t].property)),this._values[t].transition=b(e)||void 0},Li.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);var a=this.getTransition(n);void 0!==a&&(t[n+\"-transition\"]=a)}return t},Li.prototype.transitioned=function(t,e){for(var r=new Oi(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var a=i[n];r._values[a]=this._values[a].transitioned(t,e._values[a])}return r},Li.prototype.untransitioned=function(){for(var t=new Oi(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var Pi=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};Pi.prototype.possiblyEvaluate=function(t,e,r){var n=t.now||0,i=this.value.possiblyEvaluate(t,e,r),a=this.prior;if(a){if(n>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n<this.begin)return a.possiblyEvaluate(t,e,r);var o=(n-this.begin)/(this.end-this.begin);return this.property.interpolate(a.possiblyEvaluate(t,e,r),i,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var Oi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Oi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new zi(this._properties),i=0,a=Object.keys(this._values);i<a.length;i+=1){var o=a[i];n._values[o]=this._values[o].possiblyEvaluate(t,e,r)}return n},Oi.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Ii=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Ii.prototype.getValue=function(t){return b(this._values[t].value)},Ii.prototype.setValue=function(t,e){this._values[t]=new Ei(this._values[t].property,null===e?void 0:b(e))},Ii.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i)}return t},Ii.prototype.possiblyEvaluate=function(t,e,r){for(var n=new zi(this._properties),i=0,a=Object.keys(this._values);i<a.length;i+=1){var o=a[i];n._values[o]=this._values[o].possiblyEvaluate(t,e,r)}return n};var Di=function(t,e,r){this.property=t,this.value=e,this.parameters=r};Di.prototype.isConstant=function(){return\"constant\"===this.value.kind},Di.prototype.constantOr=function(t){return\"constant\"===this.value.kind?this.value.value:t},Di.prototype.evaluate=function(t,e,r,n){return this.property.evaluate(this.value,this.parameters,t,e,r,n)};var zi=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};zi.prototype.get=function(t){return this._values[t]};var Ri=function(t){this.specification=t};Ri.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Ri.prototype.interpolate=function(t,e,r){var n=$e[this.specification.type];return n?n(t,e,r):t};var Fi=function(t,e){this.specification=t,this.overrides=e};Fi.prototype.possiblyEvaluate=function(t,e,r,n){return\"constant\"===t.expression.kind||\"camera\"===t.expression.kind?new Di(this,{kind:\"constant\",value:t.expression.evaluate(e,null,{},r,n)},e):new Di(this,t.expression,e)},Fi.prototype.interpolate=function(t,e,r){if(\"constant\"!==t.value.kind||\"constant\"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Di(this,{kind:\"constant\",value:void 0},t.parameters);var n=$e[this.specification.type];return n?new Di(this,{kind:\"constant\",value:n(t.value.value,e.value.value,r)},t.parameters):t},Fi.prototype.evaluate=function(t,e,r,n,i,a){return\"constant\"===t.kind?t.value:t.evaluate(e,r,n,i,a)};var Ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0===t.value)return new Di(this,{kind:\"constant\",value:void 0},e);if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n),a=\"resolvedImage\"===t.property.specification.type&&\"string\"!=typeof i?i.name:i,o=this._calculate(a,a,a,e);return new Di(this,{kind:\"constant\",value:o},e)}if(\"camera\"===t.expression.kind){var s=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new Di(this,{kind:\"constant\",value:s},e)}return new Di(this,t.expression,e)},e.prototype.evaluate=function(t,e,r,n,i,a){if(\"source\"===t.kind){var o=t.evaluate(e,r,n,i,a);return this._calculate(o,o,o,e)}return\"composite\"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,n),t.evaluate({zoom:Math.floor(e.zoom)},r,n),t.evaluate({zoom:Math.floor(e.zoom)+1},r,n),e):t.value},e.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Fi),Bi=function(t){this.specification=t};Bi.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if(\"constant\"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new Si(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Si(Math.floor(e.zoom),e)),t.expression.evaluate(new Si(Math.floor(e.zoom+1),e)),e)}},Bi.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Bi.prototype.interpolate=function(t){return t};var ji=function(t){this.specification=t};ji.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},ji.prototype.interpolate=function(){return!1};var Ui=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new Ei(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Ci(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Qn(\"DataDrivenProperty\",Fi),Qn(\"DataConstantProperty\",Ri),Qn(\"CrossFadedDataDrivenProperty\",Ni),Qn(\"CrossFadedProperty\",Bi),Qn(\"ColorRampProperty\",ji);var Vi=\"-transition\",Hi=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},\"custom\"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,\"background\"!==e.type&&(this.source=e.source,this.sourceLayer=e[\"source-layer\"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new Ii(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Li(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new zi(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return\"visibility\"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".layout.\"+t;if(this._validate(Yn,n,t,e,r))return}\"visibility\"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return m(t,Vi)?this._transitionablePaint.getTransition(t.slice(0,-Vi.length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n=\"layers.\"+this.id+\".paint.\"+t;if(this._validate(Gn,n,t,e,r))return!1}if(m(t,Vi))return this._transitionablePaint.setTransition(t.slice(0,-Vi.length),e||void 0),!1;var i=this._transitionablePaint._values[t],a=\"cross-faded-data-driven\"===i.property.specification[\"property-type\"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||\"none\"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,\"source-layer\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),x(t,(function(t,e){return!(void 0===t||\"layout\"===e&&!Object.keys(t).length||\"paint\"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Wn(this,t.call(Hn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:It,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof Di&&qr(e.property.specification)&&(\"source\"===e.value.kind||\"composite\"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(Ot),qi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Gi=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Yi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Wi(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,qi[i].BYTES_PER_ELEMENT),o=r=Xi(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}})),size:Xi(r,Math.max(n,e)),alignment:e}}function Xi(t,e){return Math.ceil(t/e)*e}Yi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Yi.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Yi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Yi.prototype.clear=function(){this.length=0},Yi.prototype.resize=function(t){this.reserve(t),this.length=t},Yi.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Yi.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};var Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Yi);Zi.prototype.bytesPerElement=4,Qn(\"StructArrayLayout2i4\",Zi);var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Yi);Ki.prototype.bytesPerElement=8,Qn(\"StructArrayLayout4i8\",Ki);var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Yi);Ji.prototype.bytesPerElement=12,Qn(\"StructArrayLayout2i4i12\",Ji);var $i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Yi);$i.prototype.bytesPerElement=8,Qn(\"StructArrayLayout2i4ub8\",$i);var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l,u)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=u,this.uint8[h+17]=c,t},e}(Yi);Qi.prototype.bytesPerElement=18,Qn(\"StructArrayLayout8ui2ub18\",Qi);var ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,u,c,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Yi);ta.prototype.bytesPerElement=24,Qn(\"StructArrayLayout4i4ui4i24\",ta);var ea=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Yi);ea.prototype.bytesPerElement=12,Qn(\"StructArrayLayout3f12\",ea);var ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Yi);ra.prototype.bytesPerElement=4,Qn(\"StructArrayLayout1ul4\",ra);var na=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u){var c=10*t,f=5*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.int16[c+4]=a,this.int16[c+5]=o,this.uint32[f+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(Yi);na.prototype.bytesPerElement=20,Qn(\"StructArrayLayout6i1ul2ui20\",na);var ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Yi);ia.prototype.bytesPerElement=12,Qn(\"StructArrayLayout2i2i2i12\",ia);var aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Yi);aa.prototype.bytesPerElement=16,Qn(\"StructArrayLayout2f1f2i16\",aa);var oa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Yi);oa.prototype.bytesPerElement=12,Qn(\"StructArrayLayout2ub2f12\",oa);var sa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Yi);sa.prototype.bytesPerElement=6,Qn(\"StructArrayLayout3ui6\",sa);var la=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v){var m=this.length;return this.resize(m+1),this.emplace(m,t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v,m){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=u,this.uint16[y+12]=c,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=v,this.int16[y+22]=m,t},e}(Yi);la.prototype.bytesPerElement=48,Qn(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",la);var ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v,m,y,x,b,_,w,k,T,M,A,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v,m,y,x,b,_,w,k,T,M,A,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v,m,y,x,b,_,w,k,T,M,A,S,E){var C=34*t,L=17*t;return this.int16[C+0]=e,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=u,this.uint16[C+9]=c,this.uint16[C+10]=f,this.uint16[C+11]=h,this.uint16[C+12]=p,this.uint16[C+13]=d,this.uint16[C+14]=g,this.uint16[C+15]=v,this.uint16[C+16]=m,this.uint16[C+17]=y,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=k,this.uint32[L+12]=T,this.float32[L+13]=M,this.float32[L+14]=A,this.float32[L+15]=S,this.float32[L+16]=E,t},e}(Yi);ua.prototype.bytesPerElement=68,Qn(\"StructArrayLayout8i15ui1ul4f68\",ua);var ca=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Yi);ca.prototype.bytesPerElement=4,Qn(\"StructArrayLayout1f4\",ca);var fa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Yi);fa.prototype.bytesPerElement=6,Qn(\"StructArrayLayout3i6\",fa);var ha=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Yi);ha.prototype.bytesPerElement=8,Qn(\"StructArrayLayout1ul2ui8\",ha);var pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Yi);pa.prototype.bytesPerElement=4,Qn(\"StructArrayLayout2ui4\",pa);var da=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Yi);da.prototype.bytesPerElement=2,Qn(\"StructArrayLayout1ui2\",da);var ga=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Yi);ga.prototype.bytesPerElement=8,Qn(\"StructArrayLayout2f8\",ga);var va=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Yi);va.prototype.bytesPerElement=16,Qn(\"StructArrayLayout4f16\",va);var ma=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Gi);ma.prototype.size=20;var ya=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new ma(this,t)},e}(na);Qn(\"CollisionBoxArray\",ya);var xa=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Gi);xa.prototype.size=48;var ba=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new xa(this,t)},e}(la);Qn(\"PlacedSymbolArray\",ba);var _a=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Gi);_a.prototype.size=68;var wa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new _a(this,t)},e}(ua);Qn(\"SymbolInstanceArray\",wa);var ka=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(ca);Qn(\"GlyphOffsetArray\",ka);var Ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(fa);Qn(\"SymbolLineVertexArray\",Ta);var Ma=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Gi);Ma.prototype.size=8;var Aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Ma(this,t)},e}(ha);Qn(\"FeatureIndexArray\",Aa);var Sa=Wi([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,Ea=function(t){void 0===t&&(t=[]),this.segments=t};function Ca(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}Ea.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>Ea.MAX_VERTEX_ARRAY_LENGTH&&w(\"Max vertices per segment is \"+Ea.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+t),(!i||i.vertexLength+t>Ea.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Ea.prototype.get=function(){return this.segments},Ea.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy()}},Ea.simpleSegment=function(t,e,r,n){return new Ea([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])},Ea.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Qn(\"SegmentVector\",Ea);var La=Wi([{name:\"a_pattern_from\",components:4,type:\"Uint16\"},{name:\"a_pattern_to\",components:4,type:\"Uint16\"},{name:\"a_pixel_ratio_from\",components:1,type:\"Uint8\"},{name:\"a_pixel_ratio_to\",components:1,type:\"Uint8\"}]),Pa=e((function(t){t.exports=function(t,e){var r,n,i,a,o,s,l,u;for(r=3&t.length,n=t.length-r,i=e,o=3432918353,s=461845907,u=0;u<n;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,i=27492+(65535&(a=5*(65535&(i=(i^=l=(65535&(l=(l=(65535&l)*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),Oa=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),Ia=Pa,Da=Pa,za=Oa;Ia.murmur3=Da,Ia.murmur2=za;var Ra=function(){this.ids=[],this.positions=[],this.indexed=!1};Ra.prototype.add=function(t,e,r,n){this.ids.push(Na(t)),this.positions.push(e,r,n)},Ra.prototype.getPositions=function(t){for(var e=Na(t),r=0,n=this.ids.length-1;r<n;){var i=r+n>>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},Ra.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Ba(r,n,0,r.length-1),e&&e.push(r.buffer,n.buffer),{ids:r,positions:n}},Ra.deserialize=function(t){var e=new Ra;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var Fa=Math.pow(2,53)-1;function Na(t){var e=+t;return!isNaN(e)&&e<=Fa?e:Ia(String(t))}function Ba(t,e,r,n){for(;r<n;){for(var i=t[r+n>>1],a=r-1,o=n+1;;){do{a++}while(t[a]<i);do{o--}while(t[o]>i);if(a>=o)break;ja(t,a,o),ja(e,3*a,3*o),ja(e,3*a+1,3*o+1),ja(e,3*a+2,3*o+2)}o-r<n-o?(Ba(t,e,r,o),r=o+1):(Ba(t,e,o+1,n),n=o)}}function ja(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}Qn(\"FeaturePositionMap\",Ra);var Ua=function(t,e){this.gl=t.gl,this.location=e},Va=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Ua),Ha=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Ua),qa=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Ua),Ga=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Ua),Ya=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Ua),Wa=function(t){function e(e,r){t.call(this,e,r),this.current=ae.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Ua),Xa=new Float32Array(16),Za=function(t){function e(e,r){t.call(this,e,r),this.current=Xa}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Ua);function Ka(t){return[Ca(255*t.r,255*t.g),Ca(255*t.b,255*t.a)]}var Ja=function(t,e,r){this.value=t,this.uniformNames=e.map((function(t){return\"u_\"+t})),this.type=r};Ja.prototype.setUniform=function(t,e,r){t.set(r.constantOr(this.value))},Ja.prototype.getBinding=function(t,e,r){return\"color\"===this.type?new Wa(t,e):new Ha(t,e)};var $a=function(t,e){this.uniformNames=e.map((function(t){return\"u_\"+t})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};$a.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr},$a.prototype.setUniform=function(t,e,r,n){var i=\"u_pattern_to\"===n?this.patternTo:\"u_pattern_from\"===n?this.patternFrom:\"u_pixel_ratio_to\"===n?this.pixelRatioTo:\"u_pixel_ratio_from\"===n?this.pixelRatioFrom:null;i&&t.set(i)},$a.prototype.getBinding=function(t,e,r){return\"u_pattern\"===r.substr(0,9)?new Ya(t,e):new Ha(t,e)};var Qa=function(t,e,r,n){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map((function(t){return{name:\"a_\"+t,type:\"Float32\",components:\"color\"===r?2:1,offset:0}})),this.paintVertexArray=new n};Qa.prototype.populatePaintArray=function(t,e,r,n,i){var a=this.paintVertexArray.length,o=this.expression.evaluate(new Si(0),e,{},n,[],i);this.paintVertexArray.resize(t),this._setPaintValue(a,t,o)},Qa.prototype.updatePaintArray=function(t,e,r,n){var i=this.expression.evaluate({zoom:0},r,n);this._setPaintValue(t,e,i)},Qa.prototype._setPaintValue=function(t,e,r){if(\"color\"===this.type)for(var n=Ka(r),i=t;i<e;i++)this.paintVertexArray.emplace(i,n[0],n[1]);else{for(var a=t;a<e;a++)this.paintVertexArray.emplace(a,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}},Qa.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Qa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var to=function(t,e,r,n,i,a){this.expression=t,this.uniformNames=e.map((function(t){return\"u_\"+t+\"_t\"})),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=e.map((function(t){return{name:\"a_\"+t,type:\"Float32\",components:\"color\"===r?4:2,offset:0}})),this.paintVertexArray=new a};to.prototype.populatePaintArray=function(t,e,r,n,i){var a=this.expression.evaluate(new Si(this.zoom),e,{},n,[],i),o=this.expression.evaluate(new Si(this.zoom+1),e,{},n,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,a,o)},to.prototype.updatePaintArray=function(t,e,r,n){var i=this.expression.evaluate({zoom:this.zoom},r,n),a=this.expression.evaluate({zoom:this.zoom+1},r,n);this._setPaintValue(t,e,i,a)},to.prototype._setPaintValue=function(t,e,r,n){if(\"color\"===this.type)for(var i=Ka(r),a=Ka(n),o=t;o<e;o++)this.paintVertexArray.emplace(o,i[0],i[1],a[0],a[1]);else{for(var s=t;s<e;s++)this.paintVertexArray.emplace(s,r,n);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(n))}},to.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},to.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},to.prototype.setUniform=function(t,e){var r=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,n=u(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);t.set(n)},to.prototype.getBinding=function(t,e,r){return new Ha(t,e)};var eo=function(t,e,r,n,i,a){this.expression=t,this.type=e,this.useIntegerZoom=r,this.zoom=n,this.layerId=a,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i};eo.prototype.populatePaintArray=function(t,e,r){var n=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(n,t,e.patterns&&e.patterns[this.layerId],r)},eo.prototype.updatePaintArray=function(t,e,r,n,i){this._setPaintValues(t,e,r.patterns&&r.patterns[this.layerId],i)},eo.prototype._setPaintValues=function(t,e,r,n){if(n&&r){var i=r.min,a=r.mid,o=r.max,s=n[i],l=n[a],u=n[o];if(s&&l&&u)for(var c=t;c<e;c++)this.zoomInPaintVertexArray.emplace(c,l.tl[0],l.tl[1],l.br[0],l.br[1],s.tl[0],s.tl[1],s.br[0],s.br[1],l.pixelRatio,s.pixelRatio),this.zoomOutPaintVertexArray.emplace(c,l.tl[0],l.tl[1],l.br[0],l.br[1],u.tl[0],u.tl[1],u.br[0],u.br[1],l.pixelRatio,u.pixelRatio)}},eo.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,La.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,La.members,this.expression.isStateDependent))},eo.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var ro=function(t,e,r,n){this.binders={},this.layoutAttributes=n,this._buffers=[];var i=[];for(var a in t.paint._values)if(r(a)){var o=t.paint.get(a);if(o instanceof Di&&qr(o.property.specification)){var s=io(a,t.type),l=o.value,u=o.property.specification.type,c=o.property.useIntegerZoom,f=o.property.specification[\"property-type\"],h=\"cross-faded\"===f||\"cross-faded-data-driven\"===f;if(\"constant\"===l.kind)this.binders[a]=h?new $a(l.value,s):new Ja(l.value,s,u),i.push(\"/u_\"+a);else if(\"source\"===l.kind||h){var p=ao(a,u,\"source\");this.binders[a]=h?new eo(l,u,c,e,p,t.id):new Qa(l,s,u,p),i.push(\"/a_\"+a)}else{var d=ao(a,u,\"composite\");this.binders[a]=new to(l,s,u,c,e,d),i.push(\"/z_\"+a)}}}this.cacheKey=i.sort().join(\"\")};ro.prototype.getMaxValue=function(t){var e=this.binders[t];return e instanceof Qa||e instanceof to?e.maxValue:0},ro.prototype.populatePaintArrays=function(t,e,r,n,i){for(var a in this.binders){var o=this.binders[a];(o instanceof Qa||o instanceof to||o instanceof eo)&&o.populatePaintArray(t,e,r,n,i)}},ro.prototype.setConstantPatternPositions=function(t,e){for(var r in this.binders){var n=this.binders[r];n instanceof $a&&n.setConstantPatternPositions(t,e)}},ro.prototype.updatePaintArrays=function(t,e,r,n,i){var a=!1;for(var o in t)for(var s=0,l=e.getPositions(o);s<l.length;s+=1){var u=l[s],c=r.feature(u.index);for(var f in this.binders){var h=this.binders[f];if((h instanceof Qa||h instanceof to||h instanceof eo)&&!0===h.expression.isStateDependent){var p=n.paint.get(f);h.expression=p.value,h.updatePaintArray(u.start,u.end,c,t[o],i),a=!0}}}return a},ro.prototype.defines=function(){var t=[];for(var e in this.binders){var r=this.binders[e];(r instanceof Ja||r instanceof $a)&&t.push.apply(t,r.uniformNames.map((function(t){return\"#define HAS_UNIFORM_\"+t})))}return t},ro.prototype.getPaintVertexBuffers=function(){return this._buffers},ro.prototype.getUniforms=function(t,e){var r=[];for(var n in this.binders){var i=this.binders[n];if(i instanceof Ja||i instanceof $a||i instanceof to)for(var a=0,o=i.uniformNames;a<o.length;a+=1){var s=o[a];if(e[s]){var l=i.getBinding(t,e[s],s);r.push({name:s,property:n,binding:l})}}}return r},ro.prototype.setUniforms=function(t,e,r,n){for(var i=0,a=e;i<a.length;i+=1){var o=a[i],s=o.name,l=o.property,u=o.binding;this.binders[l].setUniform(u,n,r.get(l),s)}},ro.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var r=this.binders[e];if(t&&r instanceof eo){var n=2===t.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;n&&this._buffers.push(n)}else(r instanceof Qa||r instanceof to)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},ro.prototype.upload=function(t){for(var e in this.binders){var r=this.binders[e];(r instanceof Qa||r instanceof to||r instanceof eo)&&r.upload(t)}this.updatePaintBuffers()},ro.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof Qa||e instanceof to||e instanceof eo)&&e.destroy()}};var no=function(t,e,r,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var i=0,a=e;i<a.length;i+=1){var o=a[i];this.programConfigurations[o.id]=new ro(o,r,n,t)}this.needsUpload=!1,this._featureMap=new Ra,this._bufferOffset=0};function io(t,e){return{\"text-opacity\":[\"opacity\"],\"icon-opacity\":[\"opacity\"],\"text-color\":[\"fill_color\"],\"icon-color\":[\"fill_color\"],\"text-halo-color\":[\"halo_color\"],\"icon-halo-color\":[\"halo_color\"],\"text-halo-blur\":[\"halo_blur\"],\"icon-halo-blur\":[\"halo_blur\"],\"text-halo-width\":[\"halo_width\"],\"icon-halo-width\":[\"halo_width\"],\"line-gap-width\":[\"gapwidth\"],\"line-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-extrusion-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"]}[t]||[t.replace(e+\"-\",\"\").replace(/-/g,\"_\")]}function ao(t,e,r){var n={color:{source:ga,composite:va},number:{source:ca,composite:ga}},i=function(t){return{\"line-pattern\":{source:Qi,composite:Qi},\"fill-pattern\":{source:Qi,composite:Qi},\"fill-extrusion-pattern\":{source:Qi,composite:Qi}}[t]}(t);return i&&i[r]||n[e][r]}no.prototype.populatePaintArrays=function(t,e,r,n,i,a){for(var o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(t,e,n,i,a);void 0!==e.id&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0},no.prototype.updatePaintArrays=function(t,e,r,n){for(var i=0,a=r;i<a.length;i+=1){var o=a[i];this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(t,this._featureMap,e,o,n)||this.needsUpload}},no.prototype.get=function(t){return this.programConfigurations[t]},no.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},no.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Qn(\"ConstantBinder\",Ja),Qn(\"CrossFadedConstantBinder\",$a),Qn(\"SourceExpressionBinder\",Qa),Qn(\"CrossFadedCompositeBinder\",eo),Qn(\"CompositeExpressionBinder\",to),Qn(\"ProgramConfiguration\",ro,{omit:[\"_buffers\"]}),Qn(\"ProgramConfigurationSet\",no);var oo,so=8192,lo=(oo=15,{min:-1*Math.pow(2,oo-1),max:Math.pow(2,oo-1)-1});function uo(t){for(var e=so/t.extent,r=t.loadGeometry(),n=0;n<r.length;n++)for(var i=r[n],a=0;a<i.length;a++){var o=i[a];o.x=Math.round(o.x*e),o.y=Math.round(o.y*e),(o.x<lo.min||o.x>lo.max||o.y<lo.min||o.y>lo.max)&&(w(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\"),o.x=u(o.x,lo.min,lo.max),o.y=u(o.y,lo.min,lo.max))}return r}function co(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var fo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Zi,this.indexArray=new sa,this.segments=new Ea,this.programConfigurations=new no(Sa,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function ho(t,e){for(var r=0;r<t.length;r++)if(wo(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(wo(t,e[n]))return!0;return!!mo(t,e)}function po(t,e,r){return!!wo(t,e)||!!xo(e,t,r)}function go(t,e){if(1===t.length)return _o(e,t[0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(wo(t,n[i]))return!0;for(var a=0;a<t.length;a++)if(_o(e,t[a]))return!0;for(var o=0;o<e.length;o++)if(mo(t,e[o]))return!0;return!1}function vo(t,e,r){if(t.length>1){if(mo(t,e))return!0;for(var n=0;n<e.length;n++)if(xo(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(xo(t[i],e,r))return!0;return!1}function mo(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],a=0;a<e.length-1;a++)if(yo(n,i,e[a],e[a+1]))return!0;return!1}function yo(t,e,r,n){return k(t,r,n)!==k(e,r,n)&&k(t,e,r)!==k(t,e,n)}function xo(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++)if(bo(t,e[i-1],e[i])<n)return!0;return!1}function bo(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function _o(t,e){for(var r,n,i,a=!1,o=0;o<t.length;o++)for(var s=0,l=(r=t[o]).length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function wo(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var a=t[n],o=t[i];a.y>e.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function ko(t,e,r){var n=r[0],i=r[2];if(t.x<n.x&&e.x<n.x||t.x>i.x&&e.x>i.x||t.y<n.y&&e.y<n.y||t.y>i.y&&e.y>i.y)return!1;var a=k(t,e,r[0]);return a!==k(t,e,r[1])||a!==k(t,e,r[2])||a!==k(t,e,r[3])}function To(t,e,r){var n=e.paint.get(t).value;return\"constant\"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Mo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ao(t,e,r,n,i){if(!e[0]&&!e[1])return t;var o=a.convert(e)._mult(i);\"viewport\"===r&&o._rotate(-n);for(var s=[],l=0;l<t.length;l++){var u=t[l];s.push(u.sub(o))}return s}fo.prototype.populate=function(t,e,r){var n=this.layers[0],i=[],a=null;\"circle\"===n.type&&(a=n.layout.get(\"circle-sort-key\"));for(var o=0,s=t;o<s.length;o+=1){var l=s[o],u=l.feature,c=l.id,f=l.index,h=l.sourceLayerIndex,p=this.layers[0]._featureFilter.needGeometry,d={type:u.type,id:c,properties:u.properties,geometry:p?uo(u):[]};if(this.layers[0]._featureFilter.filter(new Si(this.zoom),d,r)){p||(d.geometry=uo(u));var g=a?a.evaluate(d,{},r):void 0,v={id:c,properties:u.properties,type:u.type,sourceLayerIndex:h,index:f,geometry:d.geometry,patterns:{},sortKey:g};i.push(v)}}a&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var m=0,y=i;m<y.length;m+=1){var x=y[m],b=x,_=b.geometry,w=b.index,k=b.sourceLayerIndex,T=t[w].feature;this.addFeature(x,_,w,r),e.featureIndex.insert(T,_,w,k,this.index)}},fo.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},fo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},fo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},fo.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Sa),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},fo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},fo.prototype.addFeature=function(t,e,r,n){for(var i=0,a=e;i<a.length;i+=1)for(var o=0,s=a[i];o<s.length;o+=1){var l=s[o],u=l.x,c=l.y;if(!(u<0||u>=so||c<0||c>=so)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;co(this.layoutVertexArray,u,c,-1,-1),co(this.layoutVertexArray,u,c,1,-1),co(this.layoutVertexArray,u,c,1,1),co(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Qn(\"CircleBucket\",fo,{omit:[\"layers\"]});var So=new Ui({\"circle-sort-key\":new Fi(It.layout_circle[\"circle-sort-key\"])}),Eo={paint:new Ui({\"circle-radius\":new Fi(It.paint_circle[\"circle-radius\"]),\"circle-color\":new Fi(It.paint_circle[\"circle-color\"]),\"circle-blur\":new Fi(It.paint_circle[\"circle-blur\"]),\"circle-opacity\":new Fi(It.paint_circle[\"circle-opacity\"]),\"circle-translate\":new Ri(It.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new Ri(It.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new Ri(It.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new Ri(It.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new Fi(It.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new Fi(It.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new Fi(It.paint_circle[\"circle-stroke-opacity\"])}),layout:So},Co=\"undefined\"!=typeof Float32Array?Float32Array:Array;function Lo(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}function Po(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*v,t[2]=x*a+b*u+_*p+w*m,t[3]=x*o+b*c+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*v,t[6]=x*a+b*u+_*p+w*m,t[7]=x*o+b*c+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*v,t[10]=x*a+b*u+_*p+w*m,t[11]=x*o+b*c+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*v,t[14]=x*a+b*u+_*p+w*m,t[15]=x*o+b*c+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var Oo,Io=Po,Do=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};function zo(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}Oo=new Co(3),Co!=Float32Array&&(Oo[0]=0,Oo[1]=0,Oo[2]=0),function(){var t=new Co(4);Co!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var Ro=function(t){var e=t[0],r=t[1];return e*e+r*r},Fo=(function(){var t=new Co(2);Co!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,Eo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new fo(t)},e.prototype.queryRadius=function(t){var e=t;return To(\"circle-radius\",this,e)+To(\"circle-stroke-width\",this,e)+Mo(this.paint.get(\"circle-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=Ao(t,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),a.angle,o),u=this.paint.get(\"circle-radius\").evaluate(e,r)+this.paint.get(\"circle-stroke-width\").evaluate(e,r),c=\"map\"===this.paint.get(\"circle-pitch-alignment\"),f=c?l:function(t,e){return t.map((function(t){return No(t,e)}))}(l,s),h=c?u*o:u,p=0,d=n;p<d.length;p+=1)for(var g=0,v=d[p];g<v.length;g+=1){var m=v[g],y=c?m:No(m,s),x=h,b=zo([],[m.x,m.y,0,1],s);if(\"viewport\"===this.paint.get(\"circle-pitch-scale\")&&\"map\"===this.paint.get(\"circle-pitch-alignment\")?x*=b[3]/a.cameraToCenterDistance:\"map\"===this.paint.get(\"circle-pitch-scale\")&&\"viewport\"===this.paint.get(\"circle-pitch-alignment\")&&(x*=a.cameraToCenterDistance/b[3]),po(f,y,x))return!0}return!1},e}(Hi));function No(t,e){var r=zo([],[t.x,t.y,0,1],e);return new a(r[0]/r[3],r[1]/r[3])}var Bo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(fo);function jo(t,e,r,n){var i=e.width,a=e.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==i*a*r)throw new RangeError(\"mismatched image size\")}else n=new Uint8Array(i*a*r);return t.width=i,t.height=a,t.data=n,t}function Uo(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var a=jo({},{width:n,height:i},r);Vo(t,a,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=a.data}}function Vo(t,e,r,n,i,a){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError(\"out of range source coordinates for image copy\");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError(\"out of range destination coordinates for image copy\");for(var o=t.data,s=e.data,l=0;l<i.height;l++)for(var u=((r.y+l)*t.width+r.x)*a,c=((n.y+l)*e.width+n.x)*a,f=0;f<i.width*a;f++)s[c+f]=o[u+f];return e}Qn(\"HeatmapBucket\",Bo,{omit:[\"layers\"]});var Ho=function(t,e){jo(this,t,1,e)};Ho.prototype.resize=function(t){Uo(this,t,1)},Ho.prototype.clone=function(){return new Ho({width:this.width,height:this.height},new Uint8Array(this.data))},Ho.copy=function(t,e,r,n,i){Vo(t,e,r,n,i,1)};var qo=function(t,e){jo(this,t,4,e)};qo.prototype.resize=function(t){Uo(this,t,4)},qo.prototype.replace=function(t,e){e?this.data.set(t):t instanceof Uint8ClampedArray?this.data=new Uint8Array(t.buffer):this.data=t},qo.prototype.clone=function(){return new qo({width:this.width,height:this.height},new Uint8Array(this.data))},qo.copy=function(t,e,r,n,i){Vo(t,e,r,n,i,4)},Qn(\"AlphaImage\",Ho),Qn(\"RGBAImage\",qo);var Go={paint:new Ui({\"heatmap-radius\":new Fi(It.paint_heatmap[\"heatmap-radius\"]),\"heatmap-weight\":new Fi(It.paint_heatmap[\"heatmap-weight\"]),\"heatmap-intensity\":new Ri(It.paint_heatmap[\"heatmap-intensity\"]),\"heatmap-color\":new ji(It.paint_heatmap[\"heatmap-color\"]),\"heatmap-opacity\":new Ri(It.paint_heatmap[\"heatmap-opacity\"])})};function Yo(t,e){for(var r=new Uint8Array(1024),n={},i=0,a=0;i<256;i++,a+=4){n[e]=i/255;var o=t.evaluate(n);r[a+0]=Math.floor(255*o.r/o.a),r[a+1]=Math.floor(255*o.g/o.a),r[a+2]=Math.floor(255*o.b/o.a),r[a+3]=Math.floor(255*o.a)}return new qo({width:256,height:1},r)}var Wo=function(t){function e(e){t.call(this,e,Go),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Bo(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"heatmap-color\"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values[\"heatmap-color\"].value.expression;this.colorRamp=Yo(t,\"heatmapDensity\"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\"heatmap-opacity\")&&\"none\"!==this.visibility},e}(Hi),Xo={paint:new Ui({\"hillshade-illumination-direction\":new Ri(It.paint_hillshade[\"hillshade-illumination-direction\"]),\"hillshade-illumination-anchor\":new Ri(It.paint_hillshade[\"hillshade-illumination-anchor\"]),\"hillshade-exaggeration\":new Ri(It.paint_hillshade[\"hillshade-exaggeration\"]),\"hillshade-shadow-color\":new Ri(It.paint_hillshade[\"hillshade-shadow-color\"]),\"hillshade-highlight-color\":new Ri(It.paint_hillshade[\"hillshade-highlight-color\"]),\"hillshade-accent-color\":new Ri(It.paint_hillshade[\"hillshade-accent-color\"])})},Zo=function(t){function e(e){t.call(this,e,Xo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get(\"hillshade-exaggeration\")&&\"none\"!==this.visibility},e}(Hi),Ko=Wi([{name:\"a_pos\",components:2,type:\"Int16\"}],4).members,Jo=Qo,$o=Qo;function Qo(t,e,r){r=r||2;var n,i,a,o,s,l,u,c=e&&e.length,f=c?e[0]*r:t.length,h=ts(t,0,f,r,!0),p=[];if(!h||h.next===h.prev)return p;if(c&&(h=function(t,e,r,n){var i,a,o,s=[];for(i=0,a=e.length;i<a;i++)(o=ts(t,e[i]*n,i<a-1?e[i+1]*n:t.length,n,!1))===o.next&&(o.steiner=!0),s.push(fs(o));for(s.sort(ss),i=0;i<s.length;i++)ls(s[i],r),r=es(r,r.next);return r}(t,e,h,r)),t.length>80*r){n=a=t[0],i=o=t[1];for(var d=r;d<f;d+=r)(s=t[d])<n&&(n=s),(l=t[d+1])<i&&(i=l),s>a&&(a=s),l>o&&(o=l);u=0!==(u=Math.max(a-n,o-i))?1/u:0}return rs(h,p,r,n,i,u),p}function ts(t,e,r,n,i){var a,o;if(i===Ts(t,e,r,n)>0)for(a=e;a<r;a+=n)o=_s(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=_s(a,t[a],t[a+1],o);return o&&gs(o,o.next)&&(ws(o),o=o.next),o}function es(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!gs(n,n.next)&&0!==ds(n.prev,n,n.next))n=n.next;else{if(ws(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function rs(t,e,r,n,i,a,o){if(t){!o&&a&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=cs(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ);e++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(t,n,i,a);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?is(t,n,i,a):ns(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),ws(t),t=l.next,u=l.next;else if((t=l)===u){o?1===o?rs(t=as(es(t),e,r),e,r,n,i,a,2):2===o&&os(t,e,r,n,i,a):rs(es(t),e,r,n,i,a,1);break}}}function ns(t){var e=t.prev,r=t,n=t.next;if(ds(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(hs(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&ds(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function is(t,e,r,n){var i=t.prev,a=t,o=t.next;if(ds(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,u=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=cs(s,l,e,r,n),h=cs(u,c,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=f&&d&&d.z<=h;){if(p!==t.prev&&p!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&ds(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ds(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&ds(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ds(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function as(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!gs(i,a)&&vs(i,n,n.next,a)&&xs(i,a)&&xs(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),ws(n),ws(n.next),n=t=a),n=n.next}while(n!==t);return es(n)}function os(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&ps(o,s)){var l=bs(o,s);return o=es(o,o.next),l=es(l,l.next),rs(o,e,r,n,i,a),void rs(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function ss(t,e){return t.x-e.x}function ls(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r;var l,u=r,c=r.x,f=r.y,h=1/0;n=r;do{i>=n.x&&n.x>=c&&i!==n.x&&hs(a<f?i:o,a,c,f,a<f?o:i,a,n.x,n.y)&&(l=Math.abs(a-n.y)/(i-n.x),xs(n,t)&&(l<h||l===h&&(n.x>r.x||n.x===r.x&&us(r,n)))&&(r=n,h=l)),n=n.next}while(n!==u);return r}(t,e)){var r=bs(e,t);es(e,e.next),es(r,r.next)}}function us(t,e){return ds(t.prev,t,e.prev)<0&&ds(e.next,t,t.next)<0}function cs(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function fs(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function hs(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function ps(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&vs(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(xs(t,e)&&xs(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(ds(t.prev,t,e.prev)||ds(t,e.prev,e))||gs(t,e)&&ds(t.prev,t,t.next)>0&&ds(e.prev,e,e.next)>0)}function ds(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function gs(t,e){return t.x===e.x&&t.y===e.y}function vs(t,e,r,n){var i=ys(ds(t,e,r)),a=ys(ds(t,e,n)),o=ys(ds(r,n,t)),s=ys(ds(r,n,e));return i!==a&&o!==s||!(0!==i||!ms(t,r,e))||!(0!==a||!ms(t,n,e))||!(0!==o||!ms(r,t,n))||!(0!==s||!ms(r,e,n))}function ms(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function ys(t){return t>0?1:t<0?-1:0}function xs(t,e){return ds(t.prev,t,t.next)<0?ds(t,e,t.next)>=0&&ds(t,t.prev,e)>=0:ds(t,e,t.prev)<0||ds(t,t.next,e)<0}function bs(t,e){var r=new ks(t.i,t.x,t.y),n=new ks(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function _s(t,e,r,n){var i=new ks(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ws(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ks(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ts(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}function Ms(t,e,r,n,i){As(t,e,r||0,n||t.length-1,i||Es)}function As(t,e,r,n,i){for(;n>r;){if(n-r>600){var a=n-r+1,o=e-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);As(t,e,Math.max(r,Math.floor(e-o*l/a+u)),Math.min(n,Math.floor(e+(a-o)*l/a+u)),i)}var c=t[e],f=r,h=n;for(Ss(t,r,e),i(t[n],c)>0&&Ss(t,r,n);f<h;){for(Ss(t,f,h),f++,h--;i(t[f],c)<0;)f++;for(;i(t[h],c)>0;)h--}0===i(t[r],c)?Ss(t,r,h):Ss(t,++h,n),h<=e&&(r=h+1),e<=h&&(n=h-1)}}function Ss(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Es(t,e){return t<e?-1:t>e?1:0}function Cs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o<r;o++){var s=T(t[o]);0!==s&&(t[o].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(n&&a.push(n),n=[t[o]]):n.push(t[o]))}if(n&&a.push(n),e>1)for(var l=0;l<a.length;l++)a[l].length<=e||(Ms(a[l],e,1,a[l].length-1,Ls),a[l]=a[l].slice(0,e));return a}function Ls(t,e){return e.area-t.area}function Ps(t,e,r){for(var n=r.patternDependencies,i=!1,a=0,o=e;a<o.length;a+=1){var s=o[a].paint.get(t+\"-pattern\");s.isConstant()||(i=!0);var l=s.constantOr(null);l&&(i=!0,n[l.to]=!0,n[l.from]=!0)}return i}function Os(t,e,r,n,i){for(var a=i.patternDependencies,o=0,s=e;o<s.length;o+=1){var l=s[o],u=l.paint.get(t+\"-pattern\").value;if(\"constant\"!==u.kind){var c=u.evaluate({zoom:n-1},r,{},i.availableImages),f=u.evaluate({zoom:n},r,{},i.availableImages),h=u.evaluate({zoom:n+1},r,{},i.availableImages);c=c&&c.name?c.name:c,f=f&&f.name?f.name:f,h=h&&h.name?h.name:h,a[c]=!0,a[f]=!0,a[h]=!0,r.patterns[l.id]={min:c,mid:f,max:h}}}return r}Qo.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(Ts(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;o-=Math.abs(Ts(t,u,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;f+=Math.abs((t[h]-t[d])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[d+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},Qo.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r},Jo.default=$o;var Is=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Zi,this.indexArray=new sa,this.indexArray2=new pa,this.programConfigurations=new no(Ko,t.layers,t.zoom),this.segments=new Ea,this.segments2=new Ea,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};Is.prototype.populate=function(t,e,r){this.hasPattern=Ps(\"fill\",this.layers,e);for(var n=this.layers[0].layout.get(\"fill-sort-key\"),i=[],a=0,o=t;a<o.length;a+=1){var s=o[a],l=s.feature,u=s.id,c=s.index,f=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,p={type:l.type,id:u,properties:l.properties,geometry:h?uo(l):[]};if(this.layers[0]._featureFilter.filter(new Si(this.zoom),p,r)){h||(p.geometry=uo(l));var d=n?n.evaluate(p,{},r,e.availableImages):void 0,g={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:p.geometry,patterns:{},sortKey:d};i.push(g)}}n&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var v=0,m=i;v<m.length;v+=1){var y=m[v],x=y,b=x.geometry,_=x.index,w=x.sourceLayerIndex;if(this.hasPattern){var k=Os(\"fill\",this.layers,y,this.zoom,e);this.patternFeatures.push(k)}else this.addFeature(y,b,_,r,{});var T=t[_].feature;e.featureIndex.insert(T,b,_,w,this.index)}},Is.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Is.prototype.addFeatures=function(t,e,r){for(var n=0,i=this.patternFeatures;n<i.length;n+=1){var a=i[n];this.addFeature(a,a.geometry,a.index,e,r)}},Is.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Is.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Is.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ko),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},Is.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Is.prototype.addFeature=function(t,e,r,n,i){for(var a=0,o=Cs(e,500);a<o.length;a+=1){for(var s=o[a],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),h=f.vertexLength,p=[],d=[],g=0,v=s;g<v.length;g+=1){var m=v[g];if(0!==m.length){m!==s[0]&&d.push(p.length/2);var y=this.segments2.prepareSegment(m.length,this.layoutVertexArray,this.indexArray2),x=y.vertexLength;this.layoutVertexArray.emplaceBack(m[0].x,m[0].y),this.indexArray2.emplaceBack(x+m.length-1,x),p.push(m[0].x),p.push(m[0].y);for(var b=1;b<m.length;b++)this.layoutVertexArray.emplaceBack(m[b].x,m[b].y),this.indexArray2.emplaceBack(x+b-1,x+b),p.push(m[b].x),p.push(m[b].y);y.vertexLength+=m.length,y.primitiveLength+=m.length}}for(var _=Jo(p,d),w=0;w<_.length;w+=3)this.indexArray.emplaceBack(h+_[w],h+_[w+1],h+_[w+2]);f.vertexLength+=l,f.primitiveLength+=_.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,n)},Qn(\"FillBucket\",Is,{omit:[\"layers\",\"patternFeatures\"]});var Ds=new Ui({\"fill-sort-key\":new Fi(It.layout_fill[\"fill-sort-key\"])}),zs={paint:new Ui({\"fill-antialias\":new Ri(It.paint_fill[\"fill-antialias\"]),\"fill-opacity\":new Fi(It.paint_fill[\"fill-opacity\"]),\"fill-color\":new Fi(It.paint_fill[\"fill-color\"]),\"fill-outline-color\":new Fi(It.paint_fill[\"fill-outline-color\"]),\"fill-translate\":new Ri(It.paint_fill[\"fill-translate\"]),\"fill-translate-anchor\":new Ri(It.paint_fill[\"fill-translate-anchor\"]),\"fill-pattern\":new Ni(It.paint_fill[\"fill-pattern\"])}),layout:Ds},Rs=function(t){function e(e){t.call(this,e,zs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r);var n=this.paint._values[\"fill-outline-color\"];\"constant\"===n.value.kind&&void 0===n.value.value&&(this.paint._values[\"fill-outline-color\"]=this.paint._values[\"fill-color\"])},e.prototype.createBucket=function(t){return new Is(t)},e.prototype.queryRadius=function(){return Mo(this.paint.get(\"fill-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){return go(Ao(t,this.paint.get(\"fill-translate\"),this.paint.get(\"fill-translate-anchor\"),a.angle,o),n)},e.prototype.isTileClipped=function(){return!0},e}(Hi),Fs=Wi([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal_ed\",components:4,type:\"Int16\"}],4).members,Ns=Bs;function Bs(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(js,this,e)}function js(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function Us(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}Bs.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],Bs.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,o=0,s=0,l=[];t.pos<r;){if(i<=0){var u=t.readVarint();n=7&u,i=u>>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new a(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Bs.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(n<=0){var c=t.readVarint();r=7&c,n=c>>3}if(n--,1===r||2===r)(i+=t.readSVarint())<o&&(o=i),i>s&&(s=i),(a+=t.readSVarint())<l&&(l=a),a>u&&(u=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,u]},Bs.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=Bs.types[this.type];function c(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+s)/a;t[e]=[360*(r.x+o)/a-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(n=0;n<l.length;n++)f[n]=l[n][0];c(l=f);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],a=0;a<e;a++){var o=Us(t[a]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&i.push(r),r=[t[a]]):r.push(t[a]))}return r&&i.push(r),i}(l),n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)c(l[n][i])}1===l.length?l=l[0]:u=\"Multi\"+u;var h={type:\"Feature\",geometry:{type:u,coordinates:l},properties:this.properties};return\"id\"in this&&(h.id=this.id),h};var Vs=Hs;function Hs(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(qs,this,e),this.length=this._features.length}function qs(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function Gs(t,e,r){if(3===t){var n=new Vs(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Hs.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Ns(this._pbf,e,this.extent,this._keys,this._values)};var Ys={VectorTile:function(t,e){this.layers=t.readFields(Gs,{},e)},VectorTileFeature:Ns,VectorTileLayer:Vs},Ws=Ys.VectorTileFeature.types,Xs=Math.pow(2,13);function Zs(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Xs)+o,i*Xs*2,a*Xs*2,Math.round(s))}var Ks=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ji,this.indexArray=new sa,this.programConfigurations=new no(Fs,t.layers,t.zoom),this.segments=new Ea,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Js(t,e){return t.x===e.x&&(t.x<0||t.x>so)||t.y===e.y&&(t.y<0||t.y>so)}Ks.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=Ps(\"fill-extrusion\",this.layers,e);for(var n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.feature,s=a.id,l=a.index,u=a.sourceLayerIndex,c=this.layers[0]._featureFilter.needGeometry,f={type:o.type,id:s,properties:o.properties,geometry:c?uo(o):[]};if(this.layers[0]._featureFilter.filter(new Si(this.zoom),f,r)){var h={id:s,sourceLayerIndex:u,index:l,geometry:c?f.geometry:uo(o),properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(h.id=o.id),this.hasPattern?this.features.push(Os(\"fill-extrusion\",this.layers,h,this.zoom,e)):this.addFeature(h,h.geometry,l,r,{}),e.featureIndex.insert(o,h.geometry,l,u,this.index,!0)}}},Ks.prototype.addFeatures=function(t,e,r){for(var n=0,i=this.features;n<i.length;n+=1){var a=i[n],o=a.geometry;this.addFeature(a,o,a.index,e,r)}},Ks.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Ks.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ks.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ks.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Fs),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Ks.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ks.prototype.addFeature=function(t,e,r,n,i){for(var a=0,o=Cs(e,500);a<o.length;a+=1){for(var s=o[a],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=0,p=s;h<p.length;h+=1){var d=p[h];if(0!==d.length&&!((O=d).every((function(t){return t.x<0}))||O.every((function(t){return t.x>so}))||O.every((function(t){return t.y<0}))||O.every((function(t){return t.y>so}))))for(var g=0,v=0;v<d.length;v++){var m=d[v];if(v>=1){var y=d[v-1];if(!Js(m,y)){f.vertexLength+4>Ea.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=m.sub(y)._perp()._unit(),b=y.dist(m);g+b>32768&&(g=0),Zs(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,0,g),Zs(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,1,g),g+=b,Zs(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g),Zs(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>Ea.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),\"Polygon\"===Ws[t.type]){for(var w=[],k=[],T=f.vertexLength,M=0,A=s;M<A.length;M+=1){var S=A[M];if(0!==S.length){S!==s[0]&&k.push(w.length/2);for(var E=0;E<S.length;E++){var C=S[E];Zs(this.layoutVertexArray,C.x,C.y,0,0,1,1,0),w.push(C.x),w.push(C.y)}}}for(var L=Jo(w,k),P=0;P<L.length;P+=3)this.indexArray.emplaceBack(T+L[P],T+L[P+2],T+L[P+1]);f.primitiveLength+=L.length/3,f.vertexLength+=l}}var O;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,n)},Qn(\"FillExtrusionBucket\",Ks,{omit:[\"layers\",\"features\"]});var $s={paint:new Ui({\"fill-extrusion-opacity\":new Ri(It[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]),\"fill-extrusion-color\":new Fi(It[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]),\"fill-extrusion-translate\":new Ri(It[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]),\"fill-extrusion-translate-anchor\":new Ri(It[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]),\"fill-extrusion-pattern\":new Ni(It[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]),\"fill-extrusion-height\":new Fi(It[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]),\"fill-extrusion-base\":new Fi(It[\"paint_fill-extrusion\"][\"fill-extrusion-base\"]),\"fill-extrusion-vertical-gradient\":new Ri(It[\"paint_fill-extrusion\"][\"fill-extrusion-vertical-gradient\"])})},Qs=function(t){function e(e){t.call(this,e,$s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Ks(t)},e.prototype.queryRadius=function(){return Mo(this.paint.get(\"fill-extrusion-translate\"))},e.prototype.is3D=function(){return!0},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,s,l){var u=Ao(t,this.paint.get(\"fill-extrusion-translate\"),this.paint.get(\"fill-extrusion-translate-anchor\"),o.angle,s),c=this.paint.get(\"fill-extrusion-height\").evaluate(e,r),f=this.paint.get(\"fill-extrusion-base\").evaluate(e,r),h=function(t,e,r,n){for(var i=[],o=0,s=t;o<s.length;o+=1){var l=s[o],u=[l.x,l.y,n,1];zo(u,u,e),i.push(new a(u[0]/u[3],u[1]/u[3]))}return i}(u,l,0,0),p=function(t,e,r,n){for(var i=[],o=[],s=n[8]*e,l=n[9]*e,u=n[10]*e,c=n[11]*e,f=n[8]*r,h=n[9]*r,p=n[10]*r,d=n[11]*r,g=0,v=t;g<v.length;g+=1){for(var m=[],y=[],x=0,b=v[g];x<b.length;x+=1){var _=b[x],w=_.x,k=_.y,T=n[0]*w+n[4]*k+n[12],M=n[1]*w+n[5]*k+n[13],A=n[2]*w+n[6]*k+n[14],S=n[3]*w+n[7]*k+n[15],E=A+u,C=S+c,L=T+f,P=M+h,O=A+p,I=S+d,D=new a((T+s)/C,(M+l)/C);D.z=E/C,m.push(D);var z=new a(L/I,P/I);z.z=O/I,y.push(z)}i.push(m),o.push(y)}return[i,o]}(n,f,c,l);return function(t,e,r){var n=1/0;go(r,e)&&(n=el(r,e[0]));for(var i=0;i<e.length;i++)for(var a=e[i],o=t[i],s=0;s<a.length-1;s++){var l=a[s],u=a[s+1],c=o[s],f=[l,u,o[s+1],c,l];ho(r,f)&&(n=Math.min(n,el(r,f)))}return n!==1/0&&n}(p[0],p[1],h)},e}(Hi);function tl(t,e){return t.x*e.x+t.y*e.y}function el(t,e){if(1===t.length){for(var r,n=0,i=e[n++];!r||i.equals(r);)if(!(r=e[n++]))return 1/0;for(;n<e.length;n++){var a=e[n],o=t[0],s=r.sub(i),l=a.sub(i),u=o.sub(i),c=tl(s,s),f=tl(s,l),h=tl(l,l),p=tl(u,s),d=tl(u,l),g=c*h-f*f,v=(h*p-f*d)/g,m=(c*d-f*p)/g,y=1-v-m,x=i.z*y+r.z*v+a.z*m;if(isFinite(x))return x}return 1/0}for(var b=1/0,_=0,w=e;_<w.length;_+=1){var k=w[_];b=Math.min(b,k.z)}return b}var rl=Wi([{name:\"a_pos_normal\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}],4).members,nl=Ys.VectorTileFeature.types,il=Math.cos(Math.PI/180*37.5),al=Math.pow(2,14)/.5,ol=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new $i,this.indexArray=new sa,this.programConfigurations=new no(rl,t.layers,t.zoom),this.segments=new Ea,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ol.prototype.populate=function(t,e,r){this.hasPattern=Ps(\"line\",this.layers,e);for(var n=this.layers[0].layout.get(\"line-sort-key\"),i=[],a=0,o=t;a<o.length;a+=1){var s=o[a],l=s.feature,u=s.id,c=s.index,f=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,p={type:l.type,id:u,properties:l.properties,geometry:h?uo(l):[]};if(this.layers[0]._featureFilter.filter(new Si(this.zoom),p,r)){h||(p.geometry=uo(l));var d=n?n.evaluate(p,{},r):void 0,g={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:p.geometry,patterns:{},sortKey:d};i.push(g)}}n&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var v=0,m=i;v<m.length;v+=1){var y=m[v],x=y,b=x.geometry,_=x.index,w=x.sourceLayerIndex;if(this.hasPattern){var k=Os(\"line\",this.layers,y,this.zoom,e);this.patternFeatures.push(k)}else this.addFeature(y,b,_,r,{});var T=t[_].feature;e.featureIndex.insert(T,b,_,w,this.index)}},ol.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},ol.prototype.addFeatures=function(t,e,r){for(var n=0,i=this.patternFeatures;n<i.length;n+=1){var a=i[n];this.addFeature(a,a.geometry,a.index,e,r)}},ol.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ol.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ol.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,rl),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},ol.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ol.prototype.addFeature=function(t,e,r,n,i){for(var a=this.layers[0].layout,o=a.get(\"line-join\").evaluate(t,{}),s=a.get(\"line-cap\"),l=a.get(\"line-miter-limit\"),u=a.get(\"line-round-limit\"),c=0,f=e;c<f.length;c+=1){var h=f[c];this.addLine(h,t,o,s,l,u)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,n)},ol.prototype.addLine=function(t,e,r,n,i,a){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e.properties&&e.properties.hasOwnProperty(\"mapbox_clip_start\")&&e.properties.hasOwnProperty(\"mapbox_clip_end\")){this.clipStart=+e.properties.mapbox_clip_start,this.clipEnd=+e.properties.mapbox_clip_end;for(var o=0;o<t.length-1;o++)this.totalDistance+=t[o].dist(t[o+1]);this.updateScaledDistance()}for(var s=\"Polygon\"===nl[e.type],l=t.length;l>=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u<l-1&&t[u].equals(t[u+1]);)u++;if(!(l<(s?3:2))){\"bevel\"===r&&(i=1.05);var c,f=this.overscaling<=16?122880/(512*this.overscaling):0,h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray),p=void 0,d=void 0,g=void 0,v=void 0;this.e1=this.e2=-1,s&&(c=t[l-2],v=t[u].sub(c)._unit()._perp());for(var m=u;m<l;m++)if(!(d=m===l-1?s?t[u+1]:void 0:t[m+1])||!t[m].equals(d)){v&&(g=v),c&&(p=c),c=t[m],v=d?d.sub(c)._unit()._perp():g;var y=(g=g||v).add(v);0===y.x&&0===y.y||y._unit();var x=g.x*v.x+g.y*v.y,b=y.x*v.x+y.y*v.y,_=0!==b?1/b:1/0,w=2*Math.sqrt(2-2*b),k=b<il&&p&&d,T=g.x*v.y-g.y*v.x>0;if(k&&m>u){var M=c.dist(p);if(M>2*f){var A=c.sub(c.sub(p)._mult(f/M)._round());this.updateDistance(p,A),this.addCurrentVertex(A,g,0,0,h),p=A}}var S=p&&d,E=S?r:s?\"butt\":n;if(S&&\"round\"===E&&(_<a?E=\"miter\":_<=2&&(E=\"fakeround\")),\"miter\"===E&&_>i&&(E=\"bevel\"),\"bevel\"===E&&(_>2&&(E=\"flipbevel\"),_<i&&(E=\"miter\")),p&&this.updateDistance(p,c),\"miter\"===E)y._mult(_),this.addCurrentVertex(c,y,0,0,h);else if(\"flipbevel\"===E){if(_>100)y=v.mult(-1);else{var C=_*g.add(v).mag()/g.sub(v).mag();y._perp()._mult(C*(T?-1:1))}this.addCurrentVertex(c,y,0,0,h),this.addCurrentVertex(c,y.mult(-1),0,0,h)}else if(\"bevel\"===E||\"fakeround\"===E){var L=-Math.sqrt(_*_-1),P=T?L:0,O=T?0:L;if(p&&this.addCurrentVertex(c,g,P,O,h),\"fakeround\"===E)for(var I=Math.round(180*w/Math.PI/20),D=1;D<I;D++){var z=D/I;if(.5!==z){var R=z-.5;z+=z*R*(z-1)*((1.0904+x*(x*(3.55645-1.43519*x)-3.2452))*R*R+(.848013+x*(.215638*x-1.06021)))}var F=v.sub(g)._mult(z)._add(g)._unit()._mult(T?-1:1);this.addHalfVertex(c,F.x,F.y,!1,T,0,h)}d&&this.addCurrentVertex(c,v,-P,-O,h)}else if(\"butt\"===E)this.addCurrentVertex(c,y,0,0,h);else if(\"square\"===E){var N=p?1:-1;this.addCurrentVertex(c,y,N,N,h)}else\"round\"===E&&(p&&(this.addCurrentVertex(c,g,0,0,h),this.addCurrentVertex(c,g,1,1,h,!0)),d&&(this.addCurrentVertex(c,v,-1,-1,h,!0),this.addCurrentVertex(c,v,0,0,h)));if(k&&m<l-1){var B=c.dist(d);if(B>2*f){var j=c.add(d.sub(c)._mult(f/B)._round());this.updateDistance(c,j),this.addCurrentVertex(j,v,0,0,h),c=j}}}}},ol.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,u=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,u,a,!0,-n,i),this.distance>al/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},ol.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,u=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&u)<<2,u>>6);var c=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),o.primitiveLength++),i?this.e2=c:this.e1=c},ol.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(al-1):this.distance},ol.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Qn(\"LineBucket\",ol,{omit:[\"layers\",\"patternFeatures\"]});var sl=new Ui({\"line-cap\":new Ri(It.layout_line[\"line-cap\"]),\"line-join\":new Fi(It.layout_line[\"line-join\"]),\"line-miter-limit\":new Ri(It.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new Ri(It.layout_line[\"line-round-limit\"]),\"line-sort-key\":new Fi(It.layout_line[\"line-sort-key\"])}),ll={paint:new Ui({\"line-opacity\":new Fi(It.paint_line[\"line-opacity\"]),\"line-color\":new Fi(It.paint_line[\"line-color\"]),\"line-translate\":new Ri(It.paint_line[\"line-translate\"]),\"line-translate-anchor\":new Ri(It.paint_line[\"line-translate-anchor\"]),\"line-width\":new Fi(It.paint_line[\"line-width\"]),\"line-gap-width\":new Fi(It.paint_line[\"line-gap-width\"]),\"line-offset\":new Fi(It.paint_line[\"line-offset\"]),\"line-blur\":new Fi(It.paint_line[\"line-blur\"]),\"line-dasharray\":new Bi(It.paint_line[\"line-dasharray\"]),\"line-pattern\":new Ni(It.paint_line[\"line-pattern\"]),\"line-gradient\":new ji(It.paint_line[\"line-gradient\"])}),layout:sl},ul=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Si(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=f({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Fi),cl=new ul(ll.paint.properties[\"line-width\"].specification);cl.useIntegerZoom=!0;var fl=function(t){function e(e){t.call(this,e,ll)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){\"line-gradient\"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.gradient=Yo(t,\"lineProgress\"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values[\"line-floorwidth\"]=cl.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,e)},e.prototype.createBucket=function(t){return new ol(t)},e.prototype.queryRadius=function(t){var e=t,r=hl(To(\"line-width\",this,e),To(\"line-gap-width\",this,e)),n=To(\"line-offset\",this,e);return r/2+Math.abs(n)+Mo(this.paint.get(\"line-translate\"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,s){var l=Ao(t,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),o.angle,s),u=s/2*hl(this.paint.get(\"line-width\").evaluate(e,r),this.paint.get(\"line-gap-width\").evaluate(e,r)),c=this.paint.get(\"line-offset\").evaluate(e,r);return c&&(n=function(t,e){for(var r=[],n=new a(0,0),i=0;i<t.length;i++){for(var o=t[i],s=[],l=0;l<o.length;l++){var u=o[l-1],c=o[l],f=o[l+1],h=0===l?n:c.sub(u)._unit()._perp(),p=l===o.length-1?n:f.sub(c)._unit()._perp(),d=h._add(p)._unit(),g=d.x*p.x+d.y*p.y;d._mult(1/g),s.push(d._mult(e)._add(c))}r.push(s)}return r}(n,c*s)),function(t,e,r){for(var n=0;n<e.length;n++){var i=e[n];if(t.length>=3)for(var a=0;a<i.length;a++)if(wo(t,i[a]))return!0;if(vo(t,i,r))return!0}return!1}(l,n,u)},e.prototype.isTileClipped=function(){return!0},e}(Hi);function hl(t,e){return e>0?e+2*t:t}var pl=Wi([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),dl=Wi([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),gl=(Wi([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Wi([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}])),vl=(Wi([{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"}]),Wi([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4)),ml=Wi([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);function yl(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get(\"text-transform\").evaluate(r,{});return\"uppercase\"===n?t=t.toLocaleUpperCase():\"lowercase\"===n&&(t=t.toLocaleLowerCase()),Ai.applyArabicShaping&&(t=Ai.applyArabicShaping(t)),t}(t.text,e,r)})),t}Wi([{name:\"triangle\",components:3,type:\"Uint16\"}]),Wi([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Uint16\",name:\"glyphStartIndex\"},{type:\"Uint16\",name:\"numGlyphs\"},{type:\"Uint32\",name:\"vertexStartIndex\"},{type:\"Uint32\",name:\"lineStartIndex\"},{type:\"Uint32\",name:\"lineLength\"},{type:\"Uint16\",name:\"segment\"},{type:\"Uint16\",name:\"lowerSize\"},{type:\"Uint16\",name:\"upperSize\"},{type:\"Float32\",name:\"lineOffsetX\"},{type:\"Float32\",name:\"lineOffsetY\"},{type:\"Uint8\",name:\"writingMode\"},{type:\"Uint8\",name:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Wi([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Wi([{type:\"Float32\",name:\"offsetX\"}]),Wi([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);var xl={\"!\":\"︕\",\"#\":\"#\",$:\"$\",\"%\":\"%\",\"&\":\"&\",\"(\":\"︵\",\")\":\"︶\",\"*\":\"*\",\"+\":\"+\",\",\":\"︐\",\"-\":\"︲\",\".\":\"・\",\"/\":\"/\",\":\":\"︓\",\";\":\"︔\",\"<\":\"︿\",\"=\":\"=\",\">\":\"﹀\",\"?\":\"︖\",\"@\":\"@\",\"[\":\"﹇\",\"\\\\\":\"\\",\"]\":\"﹈\",\"^\":\"^\",_:\"︳\",\"`\":\"`\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"~\":\"~\",\"¢\":\"¢\",\"£\":\"£\",\"¥\":\"¥\",\"¦\":\"¦\",\"¬\":\"¬\",\"¯\":\" ̄\",\"–\":\"︲\",\"—\":\"︱\",\"‘\":\"﹃\",\"’\":\"﹄\",\"“\":\"﹁\",\"”\":\"﹂\",\"…\":\"︙\",\"‧\":\"・\",\"₩\":\"₩\",\"、\":\"︑\",\"。\":\"︒\",\"〈\":\"︿\",\"〉\":\"﹀\",\"《\":\"︽\",\"》\":\"︾\",\"「\":\"﹁\",\"」\":\"﹂\",\"『\":\"﹃\",\"』\":\"﹄\",\"【\":\"︻\",\"】\":\"︼\",\"〔\":\"︹\",\"〕\":\"︺\",\"〖\":\"︗\",\"〗\":\"︘\",\"!\":\"︕\",\"(\":\"︵\",\")\":\"︶\",\",\":\"︐\",\"-\":\"︲\",\".\":\"・\",\":\":\"︓\",\";\":\"︔\",\"<\":\"︿\",\">\":\"﹀\",\"?\":\"︖\",\"[\":\"﹇\",\"]\":\"﹈\",\"_\":\"︳\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"⦅\":\"︵\",\"⦆\":\"︶\",\"。\":\"︒\",\"「\":\"﹁\",\"」\":\"﹂\"},bl=24,_l=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},wl=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*g},kl=Tl;function Tl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Tl.Varint=0,Tl.Fixed64=1,Tl.Bytes=2,Tl.Fixed32=5;var Ml=4294967296,Al=1/Ml,Sl=\"undefined\"==typeof TextDecoder?null:new TextDecoder(\"utf8\");function El(t){return t.type===Tl.Bytes?t.readVarint()+t.pos:t.pos+1}function Cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Ll(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Pl(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function Ol(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function Il(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function Dl(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function zl(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function Rl(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function Fl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function Nl(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function Bl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function jl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Ul(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function Vl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function Hl(t,e,r){1===t&&r.readMessage(ql,e)}function ql(t,e,r){if(3===t){var n=r.readMessage(Gl,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,u=n.top,c=n.advance;e.push({id:i,bitmap:new Ho({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:u,advance:c}})}}function Gl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function Yl(t){for(var e=0,r=0,n=0,i=t;n<i.length;n+=1){var a=i[n];e+=a.w*a.h,r=Math.max(r,a.w)}t.sort((function(t,e){return e.h-t.h}));for(var o=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,l=0,u=0,c=t;u<c.length;u+=1)for(var f=c[u],h=o.length-1;h>=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h<o.length&&(o[h]=d)}else f.h===p.h?(p.x+=f.w,p.w-=f.w):f.w===p.w?(p.y+=f.h,p.h-=f.h):(o.push({x:p.x+f.w,y:p.y,w:p.w-f.w,h:f.h}),p.y+=f.h,p.h-=f.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}Tl.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=jl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Vl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=jl(this.buf,this.pos)+jl(this.buf,this.pos+4)*Ml;return this.pos+=8,t},readSFixed64:function(){var t=jl(this.buf,this.pos)+Vl(this.buf,this.pos+4)*Ml;return this.pos+=8,t},readFloat:function(){var t=_l(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=_l(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return Cl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return Cl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return Cl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return Cl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return Cl(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return Cl(t,n,e);throw new Error(\"Expected varint not more than 10 bytes\")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Sl?function(t,e,r){return Sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n=\"\",i=e;i<r;){var a,o,s,l=t[i],u=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(a=t[i+1]))&&(u=(31&l)<<6|63&a)<=127&&(u=null):3===c?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((u=(15&l)<<12|(63&a)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),i+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Tl.Bytes)return t.push(this.readVarint(e));var r=El(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Tl.Bytes)return t.push(this.readSVarint());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Tl.Bytes)return t.push(this.readBoolean());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Tl.Bytes)return t.push(this.readFloat());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Tl.Bytes)return t.push(this.readDouble());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Tl.Bytes)return t.push(this.readFixed32());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Tl.Bytes)return t.push(this.readSFixed32());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Tl.Bytes)return t.push(this.readFixed64());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Tl.Bytes)return t.push(this.readSFixed64());var e=El(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Tl.Varint)for(;this.buf[this.pos++]>127;);else if(e===Tl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Tl.Fixed32)this.pos+=4;else{if(e!==Tl.Fixed64)throw new Error(\"Unimplemented type: \"+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Ul(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Ul(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Ul(this.buf,-1&t,this.pos),Ul(this.buf,Math.floor(t*Al),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Ul(this.buf,-1&t,this.pos),Ul(this.buf,Math.floor(t*Al),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error(\"Given varint doesn't fit into 10 bytes\");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a<e.length;a++){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Ll(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),wl(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),wl(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&Ll(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,Tl.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Pl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ol,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,zl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Il,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Rl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Fl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Nl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Bl,e)},writeBytesField:function(t,e){this.writeTag(t,Tl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Tl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Tl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Tl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Tl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Tl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Tl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Tl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Tl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Tl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Wl=function(t,e){var r=e.pixelRatio,n=e.version,i=e.stretchX,a=e.stretchY,o=e.content;this.paddedRect=t,this.pixelRatio=r,this.stretchX=i,this.stretchY=a,this.content=o,this.version=n},Xl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Xl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Xl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Xl.tlbr.get=function(){return this.tl.concat(this.br)},Xl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Wl.prototype,Xl);var Zl=function(t,e){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,r,i),this.addImages(e,n,i);var a=Yl(i),o=a.w,s=a.h,l=new qo({width:o||1,height:s||1});for(var u in t){var c=t[u],f=r[u].paddedRect;qo.copy(c.data,l,{x:0,y:0},{x:f.x+1,y:f.y+1},c.data)}for(var h in e){var p=e[h],d=n[h].paddedRect,g=d.x+1,v=d.y+1,m=p.data.width,y=p.data.height;qo.copy(p.data,l,{x:0,y:0},{x:g,y:v},p.data),qo.copy(p.data,l,{x:0,y:y-1},{x:g,y:v-1},{width:m,height:1}),qo.copy(p.data,l,{x:0,y:0},{x:g,y:v+y},{width:m,height:1}),qo.copy(p.data,l,{x:m-1,y:0},{x:g-1,y:v},{width:1,height:y}),qo.copy(p.data,l,{x:0,y:0},{x:g+m,y:v},{width:1,height:y})}this.image=l,this.iconPositions=r,this.patternPositions=n};Zl.prototype.addImages=function(t,e,r){for(var n in t){var i=t[n],a={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(a),e[n]=new Wl(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},Zl.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},Zl.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var n=t.tl,i=n[0],a=n[1];r.update(e.data,void 0,{x:i,y:a})}},Qn(\"ImagePosition\",Wl),Qn(\"ImageAtlas\",Zl);var Kl={horizontal:1,vertical:2,horizontalOnly:3},Jl=-17,$l=function(){this.scale=1,this.fontStack=\"\",this.imageName=null};$l.forText=function(t,e){var r=new $l;return r.scale=t||1,r.fontStack=e,r},$l.forImage=function(t){var e=new $l;return e.imageName=t,e};var Ql=function(){this.text=\"\",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function tu(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g){var v,m=Ql.fromFeature(t,i);f===Kl.vertical&&m.verticalizePunctuation();var y=Ai.processBidirectionalText,x=Ai.processStyledBidirectionalText;if(y&&1===m.sections.length){v=[];for(var b=0,_=y(m.toString(),lu(m,u,a,e,n,p,d));b<_.length;b+=1){var w=_[b],k=new Ql;k.text=w,k.sections=m.sections;for(var T=0;T<w.length;T++)k.sectionIndex.push(0);v.push(k)}}else if(x){v=[];for(var M=0,A=x(m.text,m.sectionIndex,lu(m,u,a,e,n,p,d));M<A.length;M+=1){var S=A[M],E=new Ql;E.text=S[0],E.sectionIndex=S[1],E.sections=m.sections,v.push(E)}}else v=function(t,e){for(var r=[],n=t.text,i=0,a=0,o=e;a<o.length;a+=1){var s=o[a];r.push(t.substring(i,s)),i=s}return i<n.length&&r.push(t.substring(i,n.length)),r}(m,lu(m,u,a,e,n,p,d));var C=[],L={positionedLines:C,text:m.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:f,iconsInText:!1,verticalizable:!1};return function(t,e,r,n,i,a,o,s,l,u,c,f){for(var h=0,p=Jl,d=0,g=0,v=\"right\"===s?1:\"left\"===s?0:.5,m=0,y=0,x=i;y<x.length;y+=1){var b=x[y];b.trim();var _=b.getMaxScale(),w=(_-1)*bl,k={positionedGlyphs:[],lineOffset:0};t.positionedLines[m]=k;var T=k.positionedGlyphs,M=0;if(b.length()){for(var A=0;A<b.length();A++){var S=b.getSection(A),E=b.getSectionIndex(A),C=b.getCharCode(A),L=0,P=null,O=null,I=null,D=bl,z=!(l===Kl.horizontal||!c&&!li(C)||c&&(eu[C]||ci(C)));if(S.imageName){var R=n[S.imageName];if(!R)continue;I=S.imageName,t.iconsInText=t.iconsInText||!0,O=R.paddedRect;var F=R.displaySize;S.scale=S.scale*bl/f,P={width:F[0],height:F[1],left:1,top:-3,advance:z?F[1]:F[0]},L=w+(bl-F[1]*S.scale),D=P.advance;var N=z?F[0]*S.scale-bl*_:F[1]*S.scale-bl*_;N>0&&N>M&&(M=N)}else{var B=r[S.fontStack],j=B&&B[C];if(j&&j.rect)O=j.rect,P=j.metrics;else{var U=e[S.fontStack],V=U&&U[C];if(!V)continue;P=V.metrics}L=(_-S.scale)*bl}z?(t.verticalizable=!0,T.push({glyph:C,imageName:I,x:h,y:p+L,vertical:z,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:O}),h+=D*S.scale+u):(T.push({glyph:C,imageName:I,x:h,y:p+L,vertical:z,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:O}),h+=P.advance*S.scale+u)}if(0!==T.length){var H=h-u;d=Math.max(H,d),cu(T,0,T.length-1,v,M)}h=0;var q=a*_+M;k.lineOffset=Math.max(M,w),p+=q,g=Math.max(q,g),++m}else p+=a,++m}var G=p-Jl,Y=uu(o),W=Y.horizontalAlign,X=Y.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var u=(e-r)*i,c=0;c=a!==o?-s*n-Jl:(-n*l+.5)*o;for(var f=0,h=t;f<h.length;f+=1)for(var p=0,d=h[f].positionedGlyphs;p<d.length;p+=1){var g=d[p];g.x+=u,g.y+=c}})(t.positionedLines,v,W,X,d,g,a,G,i.length),t.top+=-X*G,t.bottom=t.top+G,t.left+=-W*d,t.right=t.left+d}(L,e,r,n,v,o,s,l,f,u,h,g),!function(t){for(var e=0,r=t;e<r.length;e+=1)if(0!==r[e].positionedGlyphs.length)return!1;return!0}(C)&&L}Ql.fromFeature=function(t,e){for(var r=new Ql,n=0;n<t.sections.length;n++){var i=t.sections[n];i.image?r.addImageSection(i):r.addTextSection(i,e)}return r},Ql.prototype.length=function(){return this.text.length},Ql.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},Ql.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},Ql.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},Ql.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e=\"\",r=0;r<t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&&ui(n)&&!xl[t[r+1]]||i&&ui(i)&&!xl[t[r-1]]||!xl[t[r]]?e+=t[r]:e+=xl[t[r]]}return e}(this.text)},Ql.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&eu[this.text.charCodeAt(e)];e++)t++;for(var r=this.text.length,n=this.text.length-1;n>=0&&n>=t&&eu[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Ql.prototype.substring=function(t,e){var r=new Ql;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Ql.prototype.toString=function(){return this.text},Ql.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Ql.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push($l.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n<t.text.length;++n)this.sectionIndex.push(r)},Ql.prototype.addImageSection=function(t){var e=t.image?t.image.name:\"\";if(0!==e.length){var r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push($l.forImage(e)),this.sectionIndex.push(this.sections.length-1)):w(\"Reached maximum number of images 6401\")}else w(\"Can't add FormattedSection with an empty image.\")},Ql.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var eu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ru={};function nu(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*bl/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function iu(t,e,r,n){var i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function au(t,e,r){var n=0;return 10===t&&(n-=1e4),r&&(n+=150),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function ou(t,e,r,n,i,a){for(var o=null,s=iu(e,r,i,a),l=0,u=n;l<u.length;l+=1){var c=u[l],f=iu(e-c.x,r,i,a)+c.badness;f<=s&&(o=c,s=f)}return{index:t,x:e,priorBreak:o,badness:s}}function su(t){return t?su(t.priorBreak).concat(t.index):[]}function lu(t,e,r,n,i,a,o){if(\"point\"!==a)return[];if(!t)return[];for(var s=[],l=function(t,e,r,n,i,a){for(var o=0,s=0;s<t.length();s++){var l=t.getSection(s);o+=nu(t.getCharCode(s),l,n,i,e,a)}return o/Math.max(1,Math.ceil(o/r))}(t,e,r,n,i,o),u=t.text.indexOf(\"​\")>=0,c=0,f=0;f<t.length();f++){var h=t.getSection(f),p=t.getCharCode(f);if(eu[p]||(c+=nu(p,h,n,i,e,o)),f<t.length()-1){var d=!((g=p)<11904||!(oi[\"Bopomofo Extended\"](g)||oi.Bopomofo(g)||oi[\"CJK Compatibility Forms\"](g)||oi[\"CJK Compatibility Ideographs\"](g)||oi[\"CJK Compatibility\"](g)||oi[\"CJK Radicals Supplement\"](g)||oi[\"CJK Strokes\"](g)||oi[\"CJK Symbols and Punctuation\"](g)||oi[\"CJK Unified Ideographs Extension A\"](g)||oi[\"CJK Unified Ideographs\"](g)||oi[\"Enclosed CJK Letters and Months\"](g)||oi[\"Halfwidth and Fullwidth Forms\"](g)||oi.Hiragana(g)||oi[\"Ideographic Description Characters\"](g)||oi[\"Kangxi Radicals\"](g)||oi[\"Katakana Phonetic Extensions\"](g)||oi.Katakana(g)||oi[\"Vertical Forms\"](g)||oi[\"Yi Radicals\"](g)||oi[\"Yi Syllables\"](g)));(ru[p]||d||h.imageName)&&s.push(ou(f+1,c,l,s,au(p,t.getCharCode(f+1),d&&u),!1))}}var g;return su(ou(t.length(),c,l,s,0,!0))}function uu(t){var e=.5,r=.5;switch(t){case\"right\":case\"top-right\":case\"bottom-right\":e=1;break;case\"left\":case\"top-left\":case\"bottom-left\":e=0}switch(t){case\"bottom\":case\"bottom-right\":case\"bottom-left\":r=1;break;case\"top\":case\"top-right\":case\"top-left\":r=0}return{horizontalAlign:e,verticalAlign:r}}function cu(t,e,r,n,i){if(n||i)for(var a=t[r],o=a.metrics.advance*a.scale,s=(t[r].x+o)*n,l=e;l<=r;l++)t[l].x-=s,t[l].y+=i}function fu(t,e,r,n,i,a){var o,s=t.image;if(s.content){var l=s.content,u=s.pixelRatio||1;o=[l[0]/u,l[1]/u,s.displaySize[0]-l[2]/u,s.displaySize[1]-l[3]/u]}var c,f,h,p,d=e.left*a,g=e.right*a;\"width\"===r||\"both\"===r?(p=i[0]+d-n[3],f=i[0]+g+n[1]):f=(p=i[0]+(d+g-s.displaySize[0])/2)+s.displaySize[0];var v=e.top*a,m=e.bottom*a;return\"height\"===r||\"both\"===r?(c=i[1]+v-n[0],h=i[1]+m+n[2]):h=(c=i[1]+(v+m-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:c,right:f,bottom:h,left:p,collisionPadding:o}}ru[10]=!0,ru[32]=!0,ru[38]=!0,ru[40]=!0,ru[41]=!0,ru[43]=!0,ru[45]=!0,ru[47]=!0,ru[173]=!0,ru[183]=!0,ru[8203]=!0,ru[8208]=!0,ru[8211]=!0,ru[8231]=!0;var hu=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(a);Qn(\"Anchor\",hu);var pu=128;function du(t,e){var r=e.expression;if(\"constant\"===r.kind)return{kind:\"constant\",layoutSize:r.evaluate(new Si(t+1))};if(\"source\"===r.kind)return{kind:\"source\"};for(var n=r.zoomStops,i=r.interpolationType,a=0;a<n.length&&n[a]<=t;)a++;for(var o=a=Math.max(0,a-1);o<n.length&&n[o]<t+1;)o++;o=Math.min(n.length-1,o);var s=n[a],l=n[o];return\"composite\"===r.kind?{kind:\"composite\",minZoom:s,maxZoom:l,interpolationType:i}:{kind:\"camera\",minZoom:s,maxZoom:l,minSize:r.evaluate(new Si(s)),maxSize:r.evaluate(new Si(l)),interpolationType:i}}function gu(t,e,r){var n=e.uSize,i=e.uSizeT,a=r.lowerSize,o=r.upperSize;return\"source\"===t.kind?a/pu:\"composite\"===t.kind?Je(a/pu,o/pu,i):n}function vu(t,e){var r=0,n=0;if(\"constant\"===t.kind)n=t.layoutSize;else if(\"source\"!==t.kind){var i=t.interpolationType,a=t.minZoom,o=t.maxZoom,s=i?u(vr.interpolationFactor(i,e,a,o),0,1):0;\"camera\"===t.kind?n=Je(t.minSize,t.maxSize,s):r=s}return{uSizeT:r,uSize:n}}var mu=Object.freeze({__proto__:null,getSizeData:du,evaluateSizeForFeature:gu,evaluateSizeForZoom:vu,SIZE_PACK_FACTOR:pu});function yu(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s>-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;s<r/2;){var c=t[o-1],f=t[o],h=t[o+1];if(!h)return!1;var p=c.angleTo(f)-f.angleTo(h);for(p=Math.abs((p+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:p}),u+=p;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=f.dist(h)}return!0}function xu(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function bu(t,e,r){return t?.6*e*r:0}function _u(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function wu(t,e,r,n,i,a){for(var o=bu(r,i,a),s=_u(r,n)*a,l=0,u=xu(t)/2,c=0;c<t.length-1;c++){var f=t[c],h=t[c+1],p=f.dist(h);if(l+p>u){var d=(u-l)/p,g=Je(f.x,h.x,d),v=Je(f.y,h.y,d),m=new hu(g,v,h.angleTo(f),c);return m._round(),!o||yu(t,m,s,o,e)?m:void 0}l+=p}}function ku(t,e,r,n,i,a,o,s,l){var u=bu(n,a,o),c=_u(n,i),f=c*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f<e/4&&(e=f+e/4),Tu(t,h?e/2*s%e:(c/2+2*a)*o*s%e,e,u,r,f,h,!1,l)}function Tu(t,e,r,n,i,a,o,s,l){for(var u=a/2,c=xu(t),f=0,h=e-r,p=[],d=0;d<t.length-1;d++){for(var g=t[d],v=t[d+1],m=g.dist(v),y=v.angleTo(g);h+r<f+m;){var x=((h+=r)-f)/m,b=Je(g.x,v.x,x),_=Je(g.y,v.y,x);if(b>=0&&b<l&&_>=0&&_<l&&h-u>=0&&h+u<=c){var w=new hu(b,_,y,d);w._round(),n&&!yu(t,w,a,n,i)||p.push(w)}}f+=m}return s||p.length||o||(p=Tu(t,f/2,r,n,i,a,o,!0,l)),p}function Mu(t,e,r,n,i){for(var o=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var f=l[c],h=l[c+1];f.x<e&&h.x<e||(f.x<e?f=new a(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round():h.x<e&&(h=new a(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round()),f.y<r&&h.y<r||(f.y<r?f=new a(f.x+(h.x-f.x)*((r-f.y)/(h.y-f.y)),r)._round():h.y<r&&(h=new a(f.x+(h.x-f.x)*((r-f.y)/(h.y-f.y)),r)._round()),f.x>=n&&h.x>=n||(f.x>=n?f=new a(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new a(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=i&&h.y>=i||(f.y>=i?f=new a(f.x+(h.x-f.x)*((i-f.y)/(h.y-f.y)),i)._round():h.y>=i&&(h=new a(f.x+(h.x-f.x)*((i-f.y)/(h.y-f.y)),i)._round()),u&&f.equals(u[u.length-1])||(u=[f],o.push(u)),u.push(h)))))}return o}function Au(t,e,r,n){var i=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,u=o.paddedRect.h-2,c=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),v=p.reduce(d,0),m=l-g,y=u-v,x=0,b=g,_=0,w=v,k=0,T=m,M=0,A=y;if(o.content&&n){var S=o.content;x=Su(h,0,S[0]),_=Su(p,0,S[1]),b=Su(h,S[0],S[2]),w=Su(p,S[1],S[3]),k=S[0]-x,M=S[1]-_,T=S[2]-S[0]-b,A=S[3]-S[1]-w}var E=function(n,i,l,u){var h=Cu(n.stretch-x,b,c,t.left),p=Lu(n.fixed-k,T,n.stretch,g),d=Cu(i.stretch-_,w,f,t.top),m=Lu(i.fixed-M,A,i.stretch,v),y=Cu(l.stretch-x,b,c,t.left),S=Lu(l.fixed-k,T,l.stretch,g),E=Cu(u.stretch-_,w,f,t.top),C=Lu(u.fixed-M,A,u.stretch,v),L=new a(h,d),P=new a(y,d),O=new a(y,E),I=new a(h,E),D=new a(p/s,m/s),z=new a(S/s,C/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),N=Math.cos(R),B=[N,-F,F,N];L._matMult(B),P._matMult(B),I._matMult(B),O._matMult(B)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=i.stretch+i.fixed,H=u.stretch+u.fixed;return{tl:L,tr:P,bl:I,br:O,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:z,minFontScaleX:T/s/c,minFontScaleY:A/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var C=Eu(h,m,g),L=Eu(p,y,v),P=0;P<C.length-1;P++)for(var O=C[P],I=C[P+1],D=0;D<L.length-1;D++){var z=L[D],R=L[D+1];i.push(E(O,z,I,R))}else i.push(E({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:u+1}));return i}function Su(t,e,r){for(var n=0,i=0,a=t;i<a.length;i+=1){var o=a[i];n+=Math.max(e,Math.min(r,o[1]))-Math.max(e,Math.min(r,o[0]))}return n}function Eu(t,e,r){for(var n=[{fixed:-1,stretch:0}],i=0,a=t;i<a.length;i+=1){var o=a[i],s=o[0],l=o[1],u=n[n.length-1];n.push({fixed:s-u.stretch,stretch:u.stretch}),n.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return n.push({fixed:e+1,stretch:r}),n}function Cu(t,e,r,n){return t/e*r+n}function Lu(t,e,r,n){return t-e*r/n}var Pu=function(t,e,r,n,i,o,s,l,u,c){if(this.boxStartIndex=t.length,u){var f=o.top,h=o.bottom,p=o.collisionPadding;p&&(f-=p[1],h+=p[3]);var d=h-f;d>0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,v=o.bottom*s+l,m=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(m-=x[0]*s,g-=x[1]*s,y+=x[2]*s,v+=x[3]*s),c){var b=new a(m,g),_=new a(y,g),w=new a(m,v),k=new a(y,v),T=c*Math.PI/180;b._rotate(T),_._rotate(T),w._rotate(T),k._rotate(T),m=Math.min(b.x,_.x,w.x,k.x),y=Math.max(b.x,_.x,w.x,k.x),g=Math.min(b.y,_.y,w.y,k.y),v=Math.max(b.y,_.y,w.y,k.y)}t.emplaceBack(e.x,e.y,m,g,y,v,r,n,i)}this.boxEndIndex=t.length},Ou=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Iu),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Iu(t,e){return t<e?-1:t>e?1:0}function Du(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=t[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<n)&&(n=c.x),(!u||c.y<i)&&(i=c.y),(!u||c.x>o)&&(o=c.x),(!u||c.y>s)&&(s=c.y)}var f=o-n,h=s-i,p=Math.min(f,h),d=p/2,g=new Ou([],zu);if(0===p)return new a(n,i);for(var v=n;v<o;v+=p)for(var m=i;m<s;m+=p)g.push(new Ru(v+d,m+d,d,t));for(var y=function(t){for(var e=0,r=0,n=0,i=t[0],a=0,o=i.length,s=o-1;a<o;s=a++){var l=i[a],u=i[s],c=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*c,n+=(l.y+u.y)*c,e+=3*c}return new Ru(r/e,n/e,0,t)}(t),x=g.length;g.length;){var b=g.pop();(b.d>y.d||!y.d)&&(y=b,r&&console.log(\"found best %d after %d probes\",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,g.push(new Ru(b.p.x-d,b.p.y-d,d,t)),g.push(new Ru(b.p.x+d,b.p.y-d,d,t)),g.push(new Ru(b.p.x-d,b.p.y+d,d,t)),g.push(new Ru(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log(\"num probes: \"+x),console.log(\"best distance: \"+y.d)),y.p}function zu(t,e){return e.max-t.max}function Ru(t,e,r,n){this.p=new a(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;i<e.length;i++)for(var a=e[i],o=0,s=a.length,l=s-1;o<s;l=o++){var u=a[o],c=a[l];u.y>t.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(r=!r),n=Math.min(n,bo(t,u,c))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}Ou.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Ou.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Ou.prototype.peek=function(){return this.data[0]},Ou.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,a=e[i];if(r(n,a)>=0)break;e[t]=a,t=i}e[t]=n},Ou.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t<n;){var a=1+(t<<1),o=e[a],s=a+1;if(s<this.length&&r(e[s],o)<0&&(a=s,o=e[s]),r(o,i)>=0)break;e[t]=o,t=a}e[t]=i};var Fu=Number.POSITIVE_INFINITY;function Nu(t,e){return e[1]!==Fu?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case\"top-right\":case\"top-left\":case\"top\":i=r-7;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":i=7-r}switch(t){case\"top-right\":case\"bottom-right\":case\"right\":n=-e;break;case\"top-left\":case\"bottom-left\":case\"left\":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case\"top-right\":case\"top-left\":n=i-7;break;case\"bottom-right\":case\"bottom-left\":n=7-i;break;case\"bottom\":n=7-e;break;case\"top\":n=e-7}switch(t){case\"top-right\":case\"bottom-right\":r=-i;break;case\"top-left\":case\"bottom-left\":r=i;break;case\"left\":r=e;break;case\"right\":r=-e}return[r,n]}(t,e[0])}function Bu(t){switch(t){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}var ju=32640;function Uu(t,e,r,n,i,o,s,l,u,c,f,h,p,d,g){var v=function(t,e,r,n,i,o,s,l){for(var u=n.layout.get(\"text-rotate\").evaluate(o,{})*Math.PI/180,c=[],f=0,h=e.positionedLines;f<h.length;f+=1)for(var p=h[f],d=0,g=p.positionedGlyphs;d<g.length;d+=1){var v=g[d];if(v.rect){var m=v.rect||{},y=4,x=!0,b=1,_=0,w=(i||l)&&v.vertical,k=v.metrics.advance*v.scale/2;if(l&&e.verticalizable){var T=(v.scale-1)*bl,M=(bl-v.metrics.width*v.scale)/2;_=p.lineOffset/2-(v.imageName?-M:T)}if(v.imageName){var A=s[v.imageName];x=A.sdf,y=1/(b=A.pixelRatio)}var S=i?[v.x+k,v.y]:[0,0],E=i?[0,0]:[v.x+k+r[0],v.y+r[1]-_],C=[0,0];w&&(C=E,E=[0,0]);var L=(v.metrics.left-y)*v.scale-k+E[0],P=(-v.metrics.top-y)*v.scale+E[1],O=L+m.w*v.scale/b,I=P+m.h*v.scale/b,D=new a(L,P),z=new a(O,P),R=new a(L,I),F=new a(O,I);if(w){var N=new a(-k,k-Jl),B=-Math.PI/2,j=12-k,U=v.imageName?j:0,V=new a(22-j,-U),H=new(Function.prototype.bind.apply(a,[null].concat(C)));D._rotateAround(B,N)._add(V)._add(H),z._rotateAround(B,N)._add(V)._add(H),R._rotateAround(B,N)._add(V)._add(H),F._rotateAround(B,N)._add(V)._add(H)}if(u){var q=Math.sin(u),G=Math.cos(u),Y=[G,-q,q,G];D._matMult(Y),z._matMult(Y),R._matMult(Y),F._matMult(Y)}var W=new a(0,0),X=new a(0,0);c.push({tl:D,tr:z,bl:R,br:F,tex:m,writingMode:e.writingMode,glyphOffset:S,sectionIndex:v.sectionIndex,isSDF:x,pixelOffsetTL:W,pixelOffsetBR:X,minFontScaleX:0,minFontScaleY:0})}}return c}(0,r,l,i,o,s,n,t.allowVerticalPlacement),m=t.textSizeData,y=null;\"source\"===m.kind?(y=[pu*i.layout.get(\"text-size\").evaluate(s,{})])[0]>ju&&w(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'):\"composite\"===m.kind&&((y=[pu*d.compositeTextSizes[0].evaluate(s,{},g),pu*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>ju||y[1]>ju)&&w(t.layerIds[0]+': Value for \"text-size\" is >= 255. Reduce your \"text-size\".'),t.addSymbols(t.text,v,y,l,o,s,c,e,u.lineStartIndex,u.lineLength,p,g);for(var x=0,b=f;x<b.length;x+=1)h[b[x]]=t.text.placedSymbolArray.length-1;return 4*v.length}function Vu(t){for(var e in t)return t[e];return null}function Hu(t,e,r,n){var i=t.compareText;if(e in i){for(var a=i[e],o=a.length-1;o>=0;o--)if(n.dist(a[o])<r)return!0}else i[e]=[];return i[e].push(n),!1}var qu=Ys.VectorTileFeature.types,Gu=[{name:\"a_fade_opacity\",components:1,type:\"Uint8\",offset:0}];function Yu(t,e,r,n,i,a,o,s,l,u,c,f,h){var p=s?Math.min(ju,Math.round(s[0])):0,d=s?Math.min(ju,Math.round(s[1])):0;t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),a,o,(p<<1)+(l?1:0),d,16*u,16*c,256*f,256*h)}function Wu(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}function Xu(t){for(var e=0,r=t.sections;e<r.length;e+=1)if(pi(r[e].text))return!0;return!1}var Zu=function(t){this.layoutVertexArray=new ta,this.indexArray=new sa,this.programConfigurations=t,this.segments=new Ea,this.dynamicLayoutVertexArray=new ea,this.opacityVertexArray=new ra,this.placedSymbolArray=new ba};Zu.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},Zu.prototype.upload=function(t,e,r,n){this.isEmpty()||(r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,pl.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,dl.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,Gu,!0),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(t))},Zu.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Qn(\"SymbolBuffers\",Zu);var Ku=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Ea,this.collisionVertexArray=new oa};Ku.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,gl.members,!0)},Ku.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Qn(\"CollisionBuffers\",Ku);var Ju=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Lo([]),this.placementViewportMatrix=Lo([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=du(this.zoom,e[\"text-size\"]),this.iconSizeData=du(this.zoom,e[\"icon-size\"]);var r=this.layers[0].layout,n=r.get(\"symbol-sort-key\"),i=r.get(\"symbol-z-order\");this.sortFeaturesByKey=\"viewport-y\"!==i&&void 0!==n.constantOr(1);var a=\"viewport-y\"===i||\"auto\"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&(r.get(\"text-allow-overlap\")||r.get(\"icon-allow-overlap\")||r.get(\"text-ignore-placement\")||r.get(\"icon-ignore-placement\")),\"point\"===r.get(\"symbol-placement\")&&(this.writingModes=r.get(\"text-writing-mode\").map((function(t){return Kl[t]}))),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id})),this.sourceID=t.sourceID};Ju.prototype.createArrays=function(){this.text=new Zu(new no(pl.members,this.layers,this.zoom,(function(t){return/^text/.test(t)}))),this.icon=new Zu(new no(pl.members,this.layers,this.zoom,(function(t){return/^icon/.test(t)}))),this.glyphOffsetArray=new ka,this.lineVertexArray=new Ta,this.symbolInstances=new wa},Ju.prototype.calculateGlyphDependencies=function(t,e,r,n,i){for(var a=0;a<t.length;a++)if(e[t.charCodeAt(a)]=!0,(r||n)&&i){var o=xl[t.charAt(a)];o&&(e[o.charCodeAt(0)]=!0)}},Ju.prototype.populate=function(t,e,r){var n=this.layers[0],i=n.layout,a=i.get(\"text-font\"),o=i.get(\"text-field\"),s=i.get(\"icon-image\"),l=(\"constant\"!==o.value.kind||o.value.value instanceof le&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&(\"constant\"!==a.value.kind||a.value.value.length>0),u=\"constant\"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get(\"symbol-sort-key\");if(this.features=[],l||u){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new Si(this.zoom),g=0,v=t;g<v.length;g+=1){var m=v[g],y=m.feature,x=m.id,b=m.index,_=m.sourceLayerIndex,w=n._featureFilter.needGeometry,k={type:y.type,id:x,properties:y.properties,geometry:w?uo(y):[]};if(n._featureFilter.filter(d,k,r)){w||(k.geometry=uo(y));var T=void 0;if(l){var M=n.getValueAndResolveTokens(\"text-field\",k,r,p),A=le.factory(M);Xu(A)&&(this.hasRTLText=!0),(!this.hasRTLText||\"unavailable\"===Ti()||this.hasRTLText&&Ai.isParsed())&&(T=yl(A,n,k))}var S=void 0;if(u){var E=n.getValueAndResolveTokens(\"icon-image\",k,r,p);S=E instanceof ue?E:ue.fromString(E)}if(T||S){var C=this.sortFeaturesByKey?c.evaluate(k,{},r):void 0,L={id:x,text:T,icon:S,index:b,sourceLayerIndex:_,geometry:uo(y),properties:y.properties,type:qu[y.type],sortKey:C};if(this.features.push(L),S&&(f[S.name]=!0),T){var P=a.evaluate(k,{},r).join(\",\"),O=\"map\"===i.get(\"text-rotation-alignment\")&&\"point\"!==i.get(\"symbol-placement\");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Kl.vertical)>=0;for(var I=0,D=T.sections;I<D.length;I+=1){var z=D[I];if(z.image)f[z.image.name]=!0;else{var R=si(T.toString()),F=z.fontStack||P,N=h[F]=h[F]||{};this.calculateGlyphDependencies(z.text,N,O,this.allowVerticalPlacement,R)}}}}}}\"line\"===i.get(\"symbol-placement\")&&(this.features=function(t){var e={},r={},n=[],i=0;function a(e){n.push(t[e]),i++}function o(t,e,i){var a=r[t];return delete r[t],r[e]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(t,r,i){var a=e[r];return delete e[r],e[t]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+\":\"+n.x+\":\"+n.y}for(var u=0;u<t.length;u++){var c=t[u],f=c.geometry,h=c.text?c.text.toString():null;if(h){var p=l(h,f),d=l(h,f,!0);if(p in r&&d in e&&r[p]!==e[d]){var g=s(p,d,f),v=o(p,d,n[g].geometry);delete e[p],delete r[d],r[l(h,n[v].geometry,!0)]=v,n[g].geometry=null}else p in r?o(p,d,f):d in e?s(p,d,f):(a(u),e[p]=i-1,r[d]=i-1)}else a(u)}return n.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}))}},Ju.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},Ju.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},Ju.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Ju.prototype.upload=function(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Ju.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Ju.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Ju.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),a={},o=t.segment+1;o<e.length;o++)a[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:n},o<e.length-1&&(n+=e[o+1].dist(e[o]));for(var s=t.segment||0;s>=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var u=a[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Ju.prototype.addSymbols=function(t,e,r,n,i,a,o,s,l,u,c,f){for(var h=t.indexArray,p=t.layoutVertexArray,d=t.segments.prepareSegment(4*e.length,p,h,a.sortKey),g=this.glyphOffsetArray.length,v=d.vertexLength,m=this.allowVerticalPlacement&&o===Kl.vertical?Math.PI/2:0,y=a.text&&a.text.sections,x=0;x<e.length;x++){var b=e[x],_=b.tl,w=b.tr,k=b.bl,T=b.br,M=b.tex,A=b.pixelOffsetTL,S=b.pixelOffsetBR,E=b.minFontScaleX,C=b.minFontScaleY,L=b.glyphOffset,P=b.isSDF,O=b.sectionIndex,I=d.vertexLength,D=L[1];Yu(p,s.x,s.y,_.x,D+_.y,M.x,M.y,r,P,A.x,A.y,E,C),Yu(p,s.x,s.y,w.x,D+w.y,M.x+M.w,M.y,r,P,S.x,A.y,E,C),Yu(p,s.x,s.y,k.x,D+k.y,M.x,M.y+M.h,r,P,A.x,S.y,E,C),Yu(p,s.x,s.y,T.x,D+T.y,M.x+M.w,M.y+M.h,r,P,S.x,S.y,E,C),Wu(t.dynamicLayoutVertexArray,s,m),h.emplaceBack(I,I+1,I+2),h.emplaceBack(I+1,I+2,I+3),d.vertexLength+=4,d.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(L[0]),x!==e.length-1&&O===e[x+1].sectionIndex||t.programConfigurations.populatePaintArrays(p.length,a,a.index,{},f,y&&y[O])}t.placedSymbolArray.emplaceBack(s.x,s.y,g,this.glyphOffsetArray.length-g,v,l,u,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,0,!1,0,c)},Ju.prototype._addCollisionDebugVertex=function(t,e,r,n,i,a){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n,i,Math.round(a.x),Math.round(a.y))},Ju.prototype.addCollisionDebugVertices=function(t,e,r,n,i,o,s){var l=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=l.vertexLength,c=i.layoutVertexArray,f=i.collisionVertexArray,h=s.anchorX,p=s.anchorY;this._addCollisionDebugVertex(c,f,o,h,p,new a(t,e)),this._addCollisionDebugVertex(c,f,o,h,p,new a(r,e)),this._addCollisionDebugVertex(c,f,o,h,p,new a(r,n)),this._addCollisionDebugVertex(c,f,o,h,p,new a(t,n)),l.vertexLength+=4;var d=i.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),l.primitiveLength+=4},Ju.prototype.addDebugCollisionBoxes=function(t,e,r,n){for(var i=t;i<e;i++){var a=this.collisionBoxArray.get(i),o=a.x1,s=a.y1,l=a.x2,u=a.y2;this.addCollisionDebugVertices(o,s,l,u,n?this.textCollisionBox:this.iconCollisionBox,a.anchorPoint,r)}},Ju.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Ku(ia,vl.members,pa),this.iconCollisionBox=new Ku(ia,vl.members,pa);for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}},Ju.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,n,i,a,o,s,l){for(var u={},c=e;c<r;c++){var f=t.get(c);u.textBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.textFeatureIndex=f.featureIndex;break}for(var h=n;h<i;h++){var p=t.get(h);u.verticalTextBox={x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,anchorPointX:p.anchorPointX,anchorPointY:p.anchorPointY},u.verticalTextFeatureIndex=p.featureIndex;break}for(var d=a;d<o;d++){var g=t.get(d);u.iconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.iconFeatureIndex=g.featureIndex;break}for(var v=s;v<l;v++){var m=t.get(v);u.verticalIconBox={x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,anchorPointX:m.anchorPointX,anchorPointY:m.anchorPointY},u.verticalIconFeatureIndex=m.featureIndex;break}return u},Ju.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}},Ju.prototype.hasTextData=function(){return this.text.segments.get().length>0},Ju.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ju.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Ju.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Ju.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Ju.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i<n;i+=4)t.indexArray.emplaceBack(i,i+1,i+2),t.indexArray.emplaceBack(i+1,i+2,i+3)},Ju.prototype.getSortedSymbolIndexes=function(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(t),r=Math.cos(t),n=[],i=[],a=[],o=0;o<this.symbolInstances.length;++o){a.push(o);var s=this.symbolInstances.get(o);n.push(0|Math.round(e*s.anchorX+r*s.anchorY)),i.push(s.featureIndex)}return a.sort((function(t,e){return n[t]-n[e]||i[e]-i[t]})),a},Ju.prototype.addToSortKeyRanges=function(t,e){var r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})},Ju.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r<n.length;r+=1){var i=n[r],a=this.symbolInstances.get(i);this.featureSortOrder.push(a.featureIndex),[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t,r,n){t>=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Qn(\"SymbolBucket\",Ju,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Ju.MAX_GLYPHS=65535,Ju.addDynamicAttributes=Wu;var $u=new Ui({\"symbol-placement\":new Ri(It.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new Ri(It.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new Ri(It.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new Fi(It.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new Ri(It.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new Ri(It.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new Ri(It.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new Ri(It.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new Ri(It.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new Fi(It.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new Ri(It.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new Ri(It.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new Fi(It.layout_symbol[\"icon-image\"]),\"icon-rotate\":new Fi(It.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new Ri(It.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new Ri(It.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new Fi(It.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new Fi(It.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new Ri(It.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new Ri(It.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new Ri(It.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new Fi(It.layout_symbol[\"text-field\"]),\"text-font\":new Fi(It.layout_symbol[\"text-font\"]),\"text-size\":new Fi(It.layout_symbol[\"text-size\"]),\"text-max-width\":new Fi(It.layout_symbol[\"text-max-width\"]),\"text-line-height\":new Ri(It.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new Fi(It.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new Fi(It.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new Fi(It.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new Ri(It.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new Fi(It.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new Ri(It.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new Ri(It.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new Fi(It.layout_symbol[\"text-rotate\"]),\"text-padding\":new Ri(It.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new Ri(It.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new Fi(It.layout_symbol[\"text-transform\"]),\"text-offset\":new Fi(It.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new Ri(It.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new Ri(It.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new Ri(It.layout_symbol[\"text-optional\"])}),Qu={paint:new Ui({\"icon-opacity\":new Fi(It.paint_symbol[\"icon-opacity\"]),\"icon-color\":new Fi(It.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new Fi(It.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new Fi(It.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new Fi(It.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new Ri(It.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new Ri(It.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new Fi(It.paint_symbol[\"text-opacity\"]),\"text-color\":new Fi(It.paint_symbol[\"text-color\"],{runtimeType:Gt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),\"text-halo-color\":new Fi(It.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new Fi(It.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new Fi(It.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new Ri(It.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new Ri(It.paint_symbol[\"text-translate-anchor\"])}),layout:$u},tc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ut,this.defaultValue=t};tc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},tc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},tc.prototype.outputDefined=function(){return!1},tc.prototype.serialize=function(){return null},Qn(\"FormatSectionOverride\",tc,{omit:[\"defaultValue\"]});var ec=function(t){function e(e){t.call(this,e,Qu)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),\"auto\"===this.layout.get(\"icon-rotation-alignment\")&&(\"point\"!==this.layout.get(\"symbol-placement\")?this.layout._values[\"icon-rotation-alignment\"]=\"map\":this.layout._values[\"icon-rotation-alignment\"]=\"viewport\"),\"auto\"===this.layout.get(\"text-rotation-alignment\")&&(\"point\"!==this.layout.get(\"symbol-placement\")?this.layout._values[\"text-rotation-alignment\"]=\"map\":this.layout._values[\"text-rotation-alignment\"]=\"viewport\"),\"auto\"===this.layout.get(\"text-pitch-alignment\")&&(this.layout._values[\"text-pitch-alignment\"]=this.layout.get(\"text-rotation-alignment\")),\"auto\"===this.layout.get(\"icon-pitch-alignment\")&&(this.layout._values[\"icon-pitch-alignment\"]=this.layout.get(\"icon-rotation-alignment\")),\"point\"===this.layout.get(\"symbol-placement\")){var n=this.layout.get(\"text-writing-mode\");if(n){for(var i=[],a=0,o=n;a<o.length;a+=1){var s=o[a];i.indexOf(s)<0&&i.push(s)}this.layout._values[\"text-writing-mode\"]=i}else this.layout._values[\"text-writing-mode\"]=[\"horizontal\"]}this._setPaintOverrides()},e.prototype.getValueAndResolveTokens=function(t,e,r,n){var i=this.layout.get(t).evaluate(e,{},r,n),a=this._unevaluatedLayout._values[t];return a.isDataDriven()||nn(a.value)||!i?i:function(t,e){return e.replace(/{([^{}]+)}/g,(function(e,r){return r in t?String(t[r]):\"\"}))}(e.properties,i)},e.prototype.createBucket=function(t){return new Ju(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype._setPaintOverrides=function(){for(var t=0,r=Qu.paint.overridableProperties;t<r.length;t+=1){var n=r[t];if(e.hasPaintOverride(this.layout,n)){var i,a=this.paint.get(n),o=new tc(a),s=new rn(o,a.property.specification);i=\"constant\"===a.value.kind||\"source\"===a.value.kind?new on(\"source\",s):new sn(\"composite\",s,a.value.zoomStops,a.value._interpolationType),this.paint._values[n]=new Di(a.property,i,a.parameters)}}},e.prototype._handleOverridablePaintPropertyUpdate=function(t,r,n){return!(!this.layout||r.isDataDriven()||n.isDataDriven())&&e.hasPaintOverride(this.layout,t)},e.hasPaintOverride=function(t,e){var r=t.get(\"text-field\"),n=Qu.paint.properties[e],i=!1,a=function(t){for(var e=0,r=t;e<r.length;e+=1){var a=r[e];if(n.overrides&&n.overrides.hasOverride(a))return void(i=!0)}};if(\"constant\"===r.value.kind&&r.value.value instanceof le)a(r.value.value.sections);else if(\"source\"===r.value.kind){var o=function(t){if(!i)if(t instanceof de&&he(t.value)===Zt){var e=t.value;a(e.sections)}else t instanceof ye?a(t.sections):t.eachChild(o)},s=r.value;s._styleExpression&&o(s._styleExpression.expression)}return i},e}(Hi),rc={paint:new Ui({\"background-color\":new Ri(It.paint_background[\"background-color\"]),\"background-pattern\":new Bi(It.paint_background[\"background-pattern\"]),\"background-opacity\":new Ri(It.paint_background[\"background-opacity\"])})},nc=function(t){function e(e){t.call(this,e,rc)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Hi),ic={paint:new Ui({\"raster-opacity\":new Ri(It.paint_raster[\"raster-opacity\"]),\"raster-hue-rotate\":new Ri(It.paint_raster[\"raster-hue-rotate\"]),\"raster-brightness-min\":new Ri(It.paint_raster[\"raster-brightness-min\"]),\"raster-brightness-max\":new Ri(It.paint_raster[\"raster-brightness-max\"]),\"raster-saturation\":new Ri(It.paint_raster[\"raster-saturation\"]),\"raster-contrast\":new Ri(It.paint_raster[\"raster-contrast\"]),\"raster-resampling\":new Ri(It.paint_raster[\"raster-resampling\"]),\"raster-fade-duration\":new Ri(It.paint_raster[\"raster-fade-duration\"])})},ac=function(t){function e(e){t.call(this,e,ic)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Hi),oc=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.is3D=function(){return\"3d\"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},e}(Hi),sc={circle:Fo,heatmap:Wo,hillshade:Zo,fill:Rs,\"fill-extrusion\":Qs,line:fl,symbol:ec,background:nc,raster:ac},lc=self.HTMLImageElement,uc=self.HTMLCanvasElement,cc=self.HTMLVideoElement,fc=self.ImageData,hc=self.ImageBitmap,pc=function(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)};pc.prototype.update=function(t,e,r){var n=t.width,i=t.height,a=!(this.size&&this.size[0]===n&&this.size[1]===i||r),o=this.context,s=o.gl;if(this.useMipmap=Boolean(e&&e.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1),o.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!e||!1!==e.premultiply)),a)this.size=[n,i],t instanceof lc||t instanceof uc||t instanceof cc||t instanceof fc||hc&&t instanceof hc?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,n,i,0,this.format,s.UNSIGNED_BYTE,t.data);else{var l=r||{x:0,y:0},u=l.x,c=l.y;t instanceof lc||t instanceof uc||t instanceof cc||t instanceof fc||hc&&t instanceof hc?s.texSubImage2D(s.TEXTURE_2D,0,u,c,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,u,c,n,i,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},pc.prototype.bind=function(t,e,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},pc.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},pc.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var dc=function(t){var e=this;this._callback=t,this._triggered=!1,\"undefined\"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})};dc.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){t._triggered=!1,t._callback()}),0))},dc.prototype.remove=function(){delete this._channel,this._callback=function(){}};var gc=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},v([\"receive\",\"process\"],this),this.invoker=new dc(this.process),this.target.addEventListener(\"message\",this.receive,!1),this.globalScope=M()?t:self};function vc(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}gc.prototype.send=function(t,e,r,n,i){var a=this;void 0===i&&(i=!1);var o=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[o]=r);var s=E(this.globalScope)?void 0:[];return this.target.postMessage({id:o,type:t,hasCallback:!!r,targetMapId:n,mustQueue:i,sourceMapId:this.mapId,data:ni(e,s)},s),{cancel:function(){r&&delete a.callbacks[o],a.target.postMessage({id:o,type:\"<cancel>\",targetMapId:n,sourceMapId:a.mapId})}}},gc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(\"<cancel>\"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else M()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},gc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},gc.prototype.processTask=function(t,e){var r=this;if(\"<response>\"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(ii(e.error)):n(null,ii(e.data)))}else{var i=!1,a=E(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:\"<response>\",sourceMapId:r.mapId,error:e?ni(e):null,data:ni(n,a)},a)}:function(t){i=!0},s=null,l=ii(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var u=e.type.split(\".\");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,o)}else o(new Error(\"Could not find function \"+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},gc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};var mc=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};mc.prototype.setNorthEast=function(t){return this._ne=t instanceof xc?new xc(t.lng,t.lat):xc.convert(t),this},mc.prototype.setSouthWest=function(t){return this._sw=t instanceof xc?new xc(t.lng,t.lat):xc.convert(t),this},mc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof xc)e=t,r=t;else{if(!(t instanceof mc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(mc.convert(a))}var o=t;return this.extend(xc.convert(o))}return this}if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new xc(e.lng,e.lat),this._ne=new xc(r.lng,r.lat)),this},mc.prototype.getCenter=function(){return new xc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},mc.prototype.getSouthWest=function(){return this._sw},mc.prototype.getNorthEast=function(){return this._ne},mc.prototype.getNorthWest=function(){return new xc(this.getWest(),this.getNorth())},mc.prototype.getSouthEast=function(){return new xc(this.getEast(),this.getSouth())},mc.prototype.getWest=function(){return this._sw.lng},mc.prototype.getSouth=function(){return this._sw.lat},mc.prototype.getEast=function(){return this._ne.lng},mc.prototype.getNorth=function(){return this._ne.lat},mc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},mc.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},mc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},mc.prototype.contains=function(t){var e=xc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},mc.convert=function(t){return!t||t instanceof mc?t:new mc(t)};var yc=6371008.8,xc=function(t,e){if(isNaN(t)||isNaN(e))throw new Error(\"Invalid LngLat object: (\"+t+\", \"+e+\")\");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")};xc.prototype.wrap=function(){return new xc(c(this.lng,-180,180),this.lat)},xc.prototype.toArray=function(){return[this.lng,this.lat]},xc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},xc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return yc*Math.acos(Math.min(i,1))},xc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new mc(new xc(this.lng-r,this.lat-e),new xc(this.lng+r,this.lat+e))},xc.convert=function(t){if(t instanceof xc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new xc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&\"object\"==typeof t&&null!==t)return new xc(Number(\"lng\"in t?t.lng:t.lon),Number(t.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\")};var bc=2*Math.PI*yc;function _c(t){return bc*Math.cos(t*Math.PI/180)}function wc(t){return(180+t)/360}function kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Tc(t,e){return t/_c(e)}function Mc(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var Ac=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Ac.fromLngLat=function(t,e){void 0===e&&(e=0);var r=xc.convert(t);return new Ac(wc(r.lng),kc(r.lat),Tc(e,r.lat))},Ac.prototype.toLngLat=function(){return new xc(360*this.x-180,Mc(this.y))},Ac.prototype.toAltitude=function(){return t=this.z,e=this.y,t*_c(Mc(e));var t,e},Ac.prototype.meterInMercatorCoordinateUnits=function(){return 1/bc*(t=Mc(this.y),1/Math.cos(t*Math.PI/180));var t};var Sc=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Lc(0,t,t,e,r)};Sc.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Sc.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=vc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=vc(256*(r+1),256*(n+1),i),a[0]+\",\"+a[1]+\",\"+o[0]+\",\"+o[1]),l=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<<a-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(\"{prefix}\",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(\"{z}\",String(this.z)).replace(\"{x}\",String(this.x)).replace(\"{y}\",String(\"tms\"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace(\"{quadkey}\",l).replace(\"{bbox-epsg-3857}\",s)},Sc.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new a((t.x*e-this.x)*so,(t.y*e-this.y)*so)},Sc.prototype.toString=function(){return this.z+\"/\"+this.x+\"/\"+this.y};var Ec=function(t,e){this.wrap=t,this.canonical=e,this.key=Lc(t,e.z,e.z,e.x,e.y)},Cc=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Sc(r,+n,+i),this.key=Lc(e,t,r,n,i)};function Lc(t,e,r,n,i){(t*=2)<0&&(t=-1*t-1);var a=1<<r;return(a*a*t+a*i+n).toString(36)+r.toString(36)+e.toString(36)}Cc.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Cc.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Cc(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Cc(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Cc.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?Lc(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Lc(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},Cc.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},Cc.prototype.children=function(t){if(this.overscaledZ>=t)return[new Cc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Cc(e,this.wrap,e,r,n),new Cc(e,this.wrap,e,r+1,n),new Cc(e,this.wrap,e,r,n+1),new Cc(e,this.wrap,e,r+1,n+1)]},Cc.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},Cc.prototype.wrapped=function(){return new Cc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Cc.prototype.unwrapTo=function(t){return new Cc(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Cc.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Cc.prototype.toUnwrapped=function(){return new Ec(this.wrap,this.canonical)},Cc.prototype.toString=function(){return this.overscaledZ+\"/\"+this.canonical.x+\"/\"+this.canonical.y},Cc.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Ac(t.x-this.wrap,t.y))},Qn(\"CanonicalTileID\",Sc),Qn(\"OverscaledTileID\",Cc,{omit:[\"posMatrix\"]});var Pc=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError(\"DEM tiles must be square\");if(r&&\"mapbox\"!==r&&\"terrarium\"!==r)return w('\"'+r+'\" is not a valid encoding type. Valid types include \"mapbox\" and \"terrarium\".');this.stride=e.height;var n=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=r||\"mapbox\";for(var i=0;i<n;i++)this.data[this._idx(-1,i)]=this.data[this._idx(0,i)],this.data[this._idx(n,i)]=this.data[this._idx(n-1,i)],this.data[this._idx(i,-1)]=this.data[this._idx(i,0)],this.data[this._idx(i,n)]=this.data[this._idx(i,n-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(n,-1)]=this.data[this._idx(n-1,0)],this.data[this._idx(-1,n)]=this.data[this._idx(0,n-1)],this.data[this._idx(n,n)]=this.data[this._idx(n-1,n-1)]};Pc.prototype.get=function(t,e){var r=new Uint8Array(this.data.buffer),n=4*this._idx(t,e);return(\"terrarium\"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(r[n],r[n+1],r[n+2])},Pc.prototype.getUnpackVector=function(){return\"terrarium\"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Pc.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(e+1)*this.stride+(t+1)},Pc.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Pc.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Pc.prototype.getPixels=function(){return new qo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Pc.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error(\"dem dimension mismatch\");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,u=a;u<o;u++)for(var c=n;c<i;c++)this.data[this._idx(c,u)]=t.data[this._idx(c+s,u+l)]},Qn(\"DEMData\",Pc);var Oc=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Oc.prototype.encode=function(t){return this._stringToNumber[t]},Oc.prototype.decode=function(t){return this._numberToString[t]};var Ic=function(t,e,r,n,i){this.type=\"Feature\",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,this.id=i},Dc={geometry:{configurable:!0}};Dc.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Dc.geometry.set=function(t){this._geometry=t},Ic.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)\"_geometry\"!==e&&\"_vectorTileFeature\"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Ic.prototype,Dc);var zc=function(){this.state={},this.stateChanges={},this.deletedStates={}};zc.prototype.updateState=function(t,e,r){var n=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][n]=this.stateChanges[t][n]||{},f(this.stateChanges[t][n],r),null===this.deletedStates[t])for(var i in this.deletedStates[t]={},this.state[t])i!==n&&(this.deletedStates[t][i]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][n])for(var a in this.deletedStates[t][n]={},this.state[t][n])r[a]||(this.deletedStates[t][n][a]=null);else for(var o in r)this.deletedStates[t]&&this.deletedStates[t][n]&&null===this.deletedStates[t][n][o]&&delete this.deletedStates[t][n][o]},zc.prototype.removeFeatureState=function(t,e,r){if(null!==this.deletedStates[t]){var n=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&void 0!==e)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}},zc.prototype.getState=function(t,e){var r=String(e),n=this.state[t]||{},i=this.stateChanges[t]||{},a=f({},n[r],i[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var o=this.deletedStates[t][e];if(null===o)return{};for(var s in o)delete a[s]}return a},zc.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},zc.prototype.coalesceChanges=function(t,e){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var i={};for(var a in this.stateChanges[n])this.state[n][a]||(this.state[n][a]={}),f(this.state[n][a],this.stateChanges[n][a]),i[a]=this.state[n][a];r[n]=i}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var u in this.deletedStates[o]){if(null===this.deletedStates[o][u])this.state[o][u]={};else for(var c=0,h=Object.keys(this.deletedStates[o][u]);c<h.length;c+=1){var p=h[c];delete this.state[o][u][p]}s[u]=this.state[o][u]}r[o]=r[o]||{},f(r[o],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var d in t)t[d].setFeatureState(r,e)};var Rc=function(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Xn(so,16,0),this.grid3D=new Xn(so,16,0),this.featureIndexArray=new Aa,this.promoteId=e};function Fc(t,e,r,n,i){return y(t,(function(t,a){var o=e instanceof zi?e.get(a):null;return o&&o.evaluate?o.evaluate(r,n,i):o}))}function Nc(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0,o=t;a<o.length;a+=1){var s=o[a];e=Math.min(e,s.x),r=Math.min(r,s.y),n=Math.max(n,s.x),i=Math.max(i,s.y)}return{minX:e,minY:r,maxX:n,maxY:i}}function Bc(t,e){return e-t}Rc.prototype.insert=function(t,e,r,n,i,a){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var s=a?this.grid3D:this.grid,l=0;l<e.length;l++){for(var u=e[l],c=[1/0,1/0,-1/0,-1/0],f=0;f<u.length;f++){var h=u[f];c[0]=Math.min(c[0],h.x),c[1]=Math.min(c[1],h.y),c[2]=Math.max(c[2],h.x),c[3]=Math.max(c[3],h.y)}c[0]<so&&c[1]<so&&c[2]>=0&&c[3]>=0&&s.insert(o,c[0],c[1],c[2],c[3])}},Rc.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ys.VectorTile(new kl(this.rawTileData)).layers,this.sourceLayerCoder=new Oc(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},Rc.prototype.query=function(t,e,r,n){var i=this;this.loadVTLayers();for(var o=t.params||{},s=so/t.tileSize/t.scale,l=xn(o.filter),u=t.queryGeometry,c=t.queryPadding*s,f=Nc(u),h=this.grid.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c),p=Nc(t.cameraQueryGeometry),d=0,g=this.grid3D.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c,(function(e,r,n,i){return function(t,e,r,n,i){for(var o=0,s=t;o<s.length;o+=1){var l=s[o];if(e<=l.x&&r<=l.y&&n>=l.x&&i>=l.y)return!0}var u=[new a(e,r),new a(e,i),new a(n,i),new a(n,r)];if(t.length>2)for(var c=0,f=u;c<f.length;c+=1)if(wo(t,f[c]))return!0;for(var h=0;h<t.length-1;h++)if(ko(t[h],t[h+1],u))return!0;return!1}(t.cameraQueryGeometry,e-c,r-c,n+c,i+c)}));d<g.length;d+=1){var v=g[d];h.push(v)}h.sort(Bc);for(var m,y={},x=function(a){var c=h[a];if(c!==m){m=c;var f=i.featureIndexArray.get(c),p=null;i.loadMatchingFeature(y,f.bucketIndex,f.sourceLayerIndex,f.featureIndex,l,o.layers,o.availableImages,e,r,n,(function(e,r,n){return p||(p=uo(e)),r.queryIntersectsFeature(u,e,n,p,i.z,t.transform,s,t.pixelPosMatrix)}))}},b=0;b<h.length;b++)x(b);return y},Rc.prototype.loadMatchingFeature=function(t,e,r,n,i,a,o,s,l,u,c){var f=this.bucketLayerIDs[e];if(!a||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new Si(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;g<f.length;g++){var v=f[g];if(!(a&&a.indexOf(v)<0)){var m=s[v];if(m){var y={};void 0!==d&&u&&(y=u.getState(m.sourceLayer||\"_geojsonTileLayer\",d));var x=l[v];x.paint=Fc(x.paint,m.paint,p,y,o),x.layout=Fc(x.layout,m.layout,p,y,o);var b=!c||c(p,m,y);if(b){var _=new Ic(p,this.z,this.x,this.y,d);_.layer=x;var w=t[v];void 0===w&&(w=t[v]=[]),w.push({featureIndex:n,feature:_,intersectionZ:b})}}}}}},Rc.prototype.lookupSymbolFeatures=function(t,e,r,n,i,a,o,s){var l={};this.loadVTLayers();for(var u=xn(i),c=0,f=t;c<f.length;c+=1){var h=f[c];this.loadMatchingFeature(l,r,n,h,u,a,o,s,e)}return l},Rc.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var n=0,i=r[e];n<i.length;n+=1)if(t===i[n])return!0;return!1},Rc.prototype.getId=function(t,e){var r=t.id;if(this.promoteId){var n=\"string\"==typeof this.promoteId?this.promoteId:this.promoteId[e];\"boolean\"==typeof(r=t.properties[n])&&(r=Number(r))}return r},Qn(\"FeatureIndex\",Rc,{omit:[\"rawTileData\",\"sourceLayerCoder\"]});var jc=function(t,e){this.tileID=t,this.uid=p(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state=\"loading\"};jc.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<F.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},jc.prototype.wasRequested=function(){return\"errored\"===this.state||\"loaded\"===this.state||\"reloading\"===this.state},jc.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state=\"loaded\",t){for(var n in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var n=function(){var t=a[i],n=t.layerIds.map((function(t){return e.getLayer(t)})).filter(Boolean);if(0!==n.length){t.layers=n,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map((function(t){return n.filter((function(e){return e.id===t}))[0]})));for(var o=0,s=n;o<s.length;o+=1){var l=s[o];r[l.id]=t}}},i=0,a=t;i<a.length;i+=1)n();return r}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var i=this.buckets[n];if(i instanceof Ju){if(this.hasSymbolBuckets=!0,!r)break;i.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var a in this.buckets){var o=this.buckets[a];if(o instanceof Ju&&o.hasRTLText){this.hasRTLText=!0,Ai.isLoading()||Ai.isLoaded()||\"deferred\"!==Ti()||Mi();break}}for(var s in this.queryPadding=0,this.buckets){var l=this.buckets[s];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(s).queryRadius(l))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new ya},jc.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\"unloaded\"},jc.prototype.getBucket=function(t){return this.buckets[t.id]},jc.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new pc(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new pc(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},jc.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},jc.prototype.queryRenderedFeatures=function(t,e,r,n,i,a,o,s,l,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:n,cameraQueryGeometry:i,scale:a,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:o,queryPadding:this.queryPadding*l},t,e,r):{}},jc.prototype.querySourceFeatures=function(t,e){var r=this.latestFeatureIndex;if(r&&r.rawTileData){var n=r.loadVTLayers(),i=e?e.sourceLayer:\"\",a=n._geojsonTileLayer||n[i];if(a)for(var o=xn(e&&e.filter),s=this.tileID.canonical,l=s.z,u=s.x,c=s.y,f={z:l,x:u,y:c},h=0;h<a.length;h++){var p=a.feature(h);if(o.filter(new Si(this.tileID.overscaledZ),p)){var d=r.getId(p,i),g=new Ic(p,l,u,c,d);g.tile=f,t.push(g)}}}},jc.prototype.hasData=function(){return\"loaded\"===this.state||\"reloading\"===this.state||\"expired\"===this.state},jc.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},jc.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=A(t.cacheControl);r[\"max-age\"]&&(this.expirationTime=Date.now()+1e3*r[\"max-age\"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),i=!1;if(this.expirationTime>n)i=!1;else if(e)if(this.expirationTime<e)i=!0;else{var a=this.expirationTime-e;a?this.expirationTime=n+Math.max(a,3e4):i=!0}else i=!0;i?(this.expiredRequestCount++,this.state=\"expired\"):this.expiredRequestCount=0}},jc.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},jc.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var n in this.buckets)if(e.style.hasLayer(n)){var i=this.buckets[n],a=i.layers[0].sourceLayer||\"_geojsonTileLayer\",o=r[a],s=t[a];if(o&&s&&0!==Object.keys(s).length){i.update(s,o,this.imageAtlas&&this.imageAtlas.patternPositions||{});var l=e&&e.style&&e.style.getLayer(n);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(i)))}}}},jc.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},jc.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<F.now()},jc.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},jc.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=F.now()+t},jc.prototype.setDependencies=function(t,e){for(var r={},n=0,i=e;n<i.length;n+=1)r[i[n]]=!0;this.dependencies[t]=r},jc.prototype.hasDependency=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=this.dependencies[i];if(a)for(var o=0,s=e;o<s.length;o+=1)if(a[s[o]])return!0}return!1};var Uc=self.performance,Vc=function(t){this._marks={start:[t.url,\"start\"].join(\"#\"),end:[t.url,\"end\"].join(\"#\"),measure:t.url.toString()},Uc.mark(this._marks.start)};Vc.prototype.finish=function(){Uc.mark(this._marks.end);var t=Uc.getEntriesByName(this._marks.measure);return 0===t.length&&(Uc.measure(this._marks.measure,this._marks.start,this._marks.end),t=Uc.getEntriesByName(this._marks.measure),Uc.clearMarks(this._marks.start),Uc.clearMarks(this._marks.end),Uc.clearMeasures(this._marks.measure)),t},t.Actor=gc,t.AlphaImage=Ho,t.CanonicalTileID=Sc,t.CollisionBoxArray=ya,t.Color=ae,t.DEMData=Pc,t.DataConstantProperty=Ri,t.DictionaryCoder=Oc,t.EXTENT=so,t.ErrorEvent=Pt,t.EvaluationParameters=Si,t.Event=Lt,t.Evented=Ot,t.FeatureIndex=Rc,t.FillBucket=Is,t.FillExtrusionBucket=Ks,t.ImageAtlas=Zl,t.ImagePosition=Wl,t.LineBucket=ol,t.LngLat=xc,t.LngLatBounds=mc,t.MercatorCoordinate=Ac,t.ONE_EM=bl,t.OverscaledTileID=Cc,t.Point=a,t.Point$1=a,t.Properties=Ui,t.Protobuf=kl,t.RGBAImage=qo,t.RequestManager=q,t.RequestPerformance=Vc,t.ResourceType=yt,t.SegmentVector=Ea,t.SourceFeatureState=zc,t.StructArrayLayout1ui2=da,t.StructArrayLayout2f1f2i16=aa,t.StructArrayLayout2i4=Zi,t.StructArrayLayout3ui6=sa,t.StructArrayLayout4i8=Ki,t.SymbolBucket=Ju,t.Texture=pc,t.Tile=jc,t.Transitionable=Li,t.Uniform1f=Ha,t.Uniform1i=Va,t.Uniform2f=qa,t.Uniform3f=Ga,t.Uniform4f=Ya,t.UniformColor=Wa,t.UniformMatrix4f=Za,t.UnwrappedTileID=Ec,t.ValidationError=Dt,t.WritingMode=Kl,t.ZoomHistory=ai,t.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t},t.addDynamicAttributes=Wu,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach((function(t,o){e(t,(function(t,e){t&&(a=t),i[o]=e,0==--n&&r(a,i)}))}))},t.bezier=s,t.bindAll=v,t.browser=F,t.cacheEntryPossiblyAdded=function(t){++vt>ct&&(t.getActor().send(\"enforceCacheSizeLimit\",ut),vt=0)},t.clamp=u,t.clearTileCache=function(t){var e=self.caches.delete(lt);t&&e.catch(t).then((function(){return t()}))},t.clipLine=Mu,t.clone=function(t){var e=new Co(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},t.clone$1=b,t.clone$2=function(t){var e=new Co(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=ml,t.config=N,t.create=function(){var t=new Co(16);return Co!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new Co(9);return Co!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new Co(4);return Co!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=an,t.createLayout=Wi,t.createStyleLayer=function(t){return\"custom\"===t.type?new oc(t):new sc[t.type](t)},t.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if(\"object\"==typeof e&&null!==e&&null!==r){if(\"object\"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.dot$1=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},t.ease=l,t.emitValidationErrors=Wn,t.endsWith=m,t.enforceCacheSizeLimit=function(t){ft(),tt&&tt.then((function(e){e.keys().then((function(r){for(var n=0;n<r.length-t;n++)e.delete(r[n])}))}))},t.evaluateSizeForFeature=gu,t.evaluateSizeForZoom=vu,t.evaluateVariableOffset=Nu,t.evented=ki,t.extend=f,t.featureFilter=xn,t.filterObject=x,t.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=uu,t.getAnchorJustification=Bu,t.getArrayBuffer=Mt,t.getImage=St,t.getJSON=function(t,e){return Tt(f(t,{type:\"json\"}),e)},t.getRTLTextPluginStatus=Ti,t.getReferrer=bt,t.getVideo=function(t,e){var r,n,i=self.document.createElement(\"video\");i.muted=!0,i.onloadstart=function(){e(null,i)};for(var a=0;a<t.length;a++){var o=self.document.createElement(\"source\");r=t[a],n=void 0,(n=self.document.createElement(\"a\")).href=r,n.protocol===self.document.location.protocol&&n.host===self.document.location.host||(i.crossOrigin=\"Anonymous\"),o.src=t[a],i.appendChild(o)}return{cancel:function(){}}},t.identity=Lo,t.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,k=i*u-a*l,T=c*g-f*d,M=c*v-h*d,A=c*m-p*d,S=f*v-h*g,E=f*m-p*g,C=h*m-p*v,L=y*C-x*E+b*S+_*A-w*M+k*T;return L?(L=1/L,t[0]=(s*C-l*E+u*S)*L,t[1]=(i*E-n*C-a*S)*L,t[2]=(g*k-v*w+m*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*A-o*C-u*M)*L,t[5]=(r*C-i*A+a*M)*L,t[6]=(v*b-d*k-m*x)*L,t[7]=(c*k-h*b+p*x)*L,t[8]=(o*E-s*A+u*T)*L,t[9]=(n*A-r*E-a*T)*L,t[10]=(d*w-g*b+m*y)*L,t[11]=(f*b-c*w-p*y)*L,t[12]=(s*M-o*S-l*T)*L,t[13]=(r*S-n*M+i*T)*L,t[14]=(g*x-d*_-v*y)*L,t[15]=(c*_-f*x+h*y)*L,t):null},t.isChar=oi,t.isMapboxURL=G,t.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},t.makeRequest=Tt,t.mapObject=y,t.mercatorXfromLng=wc,t.mercatorYfromLat=kc,t.mercatorZfromAltitude=Tc,t.mul=Io,t.multiply=Po,t.mvt=Ys,t.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=Je,t.offscreenCanvasSupported=mt,t.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new kl(t).readFields(Hl,[])},t.pbf=kl,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=so/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,u=t.layers[0]._unevaluatedLayout._values,c={};if(\"composite\"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;c.compositeTextSizes=[u[\"text-size\"].possiblyEvaluate(new Si(h),o),u[\"text-size\"].possiblyEvaluate(new Si(p),o)]}if(\"composite\"===t.iconSizeData.kind){var d=t.iconSizeData,g=d.minZoom,v=d.maxZoom;c.compositeIconSizes=[u[\"icon-size\"].possiblyEvaluate(new Si(g),o),u[\"icon-size\"].possiblyEvaluate(new Si(v),o)]}c.layoutTextSize=u[\"text-size\"].possiblyEvaluate(new Si(t.zoom+1),o),c.layoutIconSize=u[\"icon-size\"].possiblyEvaluate(new Si(t.zoom+1),o),c.textMaxSize=u[\"text-size\"].possiblyEvaluate(new Si(18));for(var m=l.get(\"text-line-height\")*bl,y=\"map\"===l.get(\"text-rotation-alignment\")&&\"point\"!==l.get(\"symbol-placement\"),x=l.get(\"text-keep-upright\"),b=l.get(\"text-size\"),_=function(){var a=T[k],s=l.get(\"text-font\").evaluate(a,{},o).join(\",\"),u=b.evaluate(a,{},o),f=c.layoutTextSize.evaluate(a,{},o),h=c.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,g=[0,0];if(d){var v=d.toString(),_=l.get(\"text-letter-spacing\").evaluate(a,{},o)*bl,M=function(t){for(var e=0,r=t;e<r.length;e+=1)if(n=r[e].charCodeAt(0),oi.Arabic(n)||oi[\"Arabic Supplement\"](n)||oi[\"Arabic Extended-A\"](n)||oi[\"Arabic Presentation Forms-A\"](n)||oi[\"Arabic Presentation Forms-B\"](n))return!1;var n;return!0}(v)?_:0,A=l.get(\"text-anchor\").evaluate(a,{},o),S=l.get(\"text-variable-anchor\");if(!S){var E=l.get(\"text-radial-offset\").evaluate(a,{},o);g=E?Nu(A,[E*bl,Fu]):l.get(\"text-offset\").evaluate(a,{},o).map((function(t){return t*bl}))}var C=y?\"center\":l.get(\"text-justify\").evaluate(a,{},o),L=l.get(\"symbol-placement\"),P=\"point\"===L?l.get(\"text-max-width\").evaluate(a,{},o)*bl:0,O=function(){t.allowVerticalPlacement&&si(v)&&(p.vertical=tu(d,e,r,i,s,P,m,A,\"left\",M,g,Kl.vertical,!0,L,f,u))};if(!y&&S){for(var I=\"auto\"===C?S.map((function(t){return Bu(t)})):[C],D=!1,z=0;z<I.length;z++){var R=I[z];if(!p.horizontal[R])if(D)p.horizontal[R]=p.horizontal[0];else{var F=tu(d,e,r,i,s,P,m,\"center\",R,M,g,Kl.horizontal,!1,L,f,u);F&&(p.horizontal[R]=F,D=1===F.positionedLines.length)}}O()}else{\"auto\"===C&&(C=Bu(A));var N=tu(d,e,r,i,s,P,m,A,C,M,g,Kl.horizontal,!1,L,f,u);N&&(p.horizontal[C]=N),O(),si(v)&&y&&x&&(p.vertical=tu(d,e,r,i,s,P,m,A,C,M,g,Kl.vertical,!1,L,f,u))}}var B=void 0,j=!1;if(a.icon&&a.icon.name){var U=n[a.icon.name];U&&(B=function(t,e,r){var n=uu(r),i=n.horizontalAlign,a=n.verticalAlign,o=e[0],s=e[1],l=o-t.displaySize[0]*i,u=l+t.displaySize[0],c=s-t.displaySize[1]*a;return{image:t,top:c,bottom:c+t.displaySize[1],left:l,right:u}}(i[a.icon.name],l.get(\"icon-offset\").evaluate(a,{},o),l.get(\"icon-anchor\").evaluate(a,{},o)),j=U.sdf,void 0===t.sdfIcons?t.sdfIcons=U.sdf:t.sdfIcons!==U.sdf&&w(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),(U.pixelRatio!==t.pixelRatio||0!==l.get(\"icon-rotate\").constantOr(1))&&(t.iconsNeedLinear=!0))}var V=Vu(p.horizontal)||p.vertical;t.iconsInText=!!V&&V.iconsInText,(V||B)&&function(t,e,r,n,i,a,o,s,l,u,c){var f=a.textMaxSize.evaluate(e,{});void 0===f&&(f=o);var h,p=t.layers[0].layout,d=p.get(\"icon-offset\").evaluate(e,{},c),g=Vu(r.horizontal),v=24,m=o/v,y=t.tilePixelRatio*m,x=t.tilePixelRatio*f/v,b=t.tilePixelRatio*s,_=t.tilePixelRatio*p.get(\"symbol-spacing\"),k=p.get(\"text-padding\")*t.tilePixelRatio,T=p.get(\"icon-padding\")*t.tilePixelRatio,M=p.get(\"text-max-angle\")/180*Math.PI,A=\"map\"===p.get(\"text-rotation-alignment\")&&\"point\"!==p.get(\"symbol-placement\"),S=\"map\"===p.get(\"icon-rotation-alignment\")&&\"point\"!==p.get(\"symbol-placement\"),E=p.get(\"symbol-placement\"),C=_/2,L=p.get(\"icon-text-fit\");n&&\"none\"!==L&&(t.allowVerticalPlacement&&r.vertical&&(h=fu(n,r.vertical,L,p.get(\"icon-text-fit-padding\"),d,m)),g&&(n=fu(n,g,L,p.get(\"icon-text-fit-padding\"),d,m)));var P=function(s,f){f.x<0||f.x>=so||f.y<0||f.y>=so||function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v,m,y,x,b,_,k,T,M){var A,S,E,C,L,P=t.addToLineVertexArray(e,r),O=0,I=0,D=0,z=0,R=-1,F=-1,N={},B=Ia(\"\"),j=0,U=0;if(void 0===s._unevaluatedLayout.getValue(\"text-radial-offset\")?(j=(A=s.layout.get(\"text-offset\").evaluate(b,{},T).map((function(t){return t*bl})))[0],U=A[1]):(j=s.layout.get(\"text-radial-offset\").evaluate(b,{},T)*bl,U=Fu),t.allowVerticalPlacement&&n.vertical){var V=s.layout.get(\"text-rotate\").evaluate(b,{},T)+90,H=n.vertical;C=new Pu(l,e,u,c,f,H,h,p,d,V),o&&(L=new Pu(l,e,u,c,f,o,v,m,d,V))}if(i){var q=s.layout.get(\"icon-rotate\").evaluate(b,{}),G=\"none\"!==s.layout.get(\"icon-text-fit\"),Y=Au(i,q,k,G),W=o?Au(o,q,k,G):void 0;E=new Pu(l,e,u,c,f,i,v,m,!1,q),O=4*Y.length;var X=t.iconSizeData,Z=null;\"source\"===X.kind?(Z=[pu*s.layout.get(\"icon-size\").evaluate(b,{})])[0]>ju&&w(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'):\"composite\"===X.kind&&((Z=[pu*_.compositeIconSizes[0].evaluate(b,{},T),pu*_.compositeIconSizes[1].evaluate(b,{},T)])[0]>ju||Z[1]>ju)&&w(t.layerIds[0]+': Value for \"icon-size\" is >= 255. Reduce your \"icon-size\".'),t.addSymbols(t.icon,Y,Z,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,T),R=t.icon.placedSymbolArray.length-1,W&&(I=4*W.length,t.addSymbols(t.icon,W,Z,x,y,b,Kl.vertical,e,P.lineStartIndex,P.lineLength,-1,T),F=t.icon.placedSymbolArray.length-1)}for(var K in n.horizontal){var J=n.horizontal[K];if(!S){B=Ia(J.text);var $=s.layout.get(\"text-rotate\").evaluate(b,{},T);S=new Pu(l,e,u,c,f,J,h,p,d,$)}var Q=1===J.positionedLines.length;if(D+=Uu(t,e,J,a,s,d,b,g,P,n.vertical?Kl.horizontal:Kl.horizontalOnly,Q?Object.keys(n.horizontal):[K],N,R,_,T),Q)break}n.vertical&&(z+=Uu(t,e,n.vertical,a,s,d,b,g,P,Kl.vertical,[\"vertical\"],N,F,_,T));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=C?C.boxStartIndex:t.collisionBoxArray.length,nt=C?C.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=L?L.boxStartIndex:t.collisionBoxArray.length,st=L?L.boxEndIndex:t.collisionBoxArray.length,lt=-1,ut=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ut(S,lt),lt=ut(C,lt),lt=ut(E,lt);var ct=(lt=ut(L,lt))>-1?1:0;ct&&(lt*=M/bl),t.glyphOffsetArray.length>=Ju.MAX_GLYPHS&&w(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,N.right>=0?N.right:-1,N.center>=0?N.center:-1,N.left>=0?N.left:-1,N.vertical||-1,R,F,B,tt,et,rt,nt,it,at,ot,st,u,D,z,O,I,ct,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,y,k,A,l,b,T,S,d,e,a,u,c,o)};if(\"line\"===E)for(var O=0,I=Mu(e.geometry,0,0,so,so);O<I.length;O+=1)for(var D=I[O],z=0,R=ku(D,_,M,r.vertical||g,n,v,x,t.overscaling,so);z<R.length;z+=1){var F=R[z];g&&Hu(t,g.text,C,F)||P(D,F)}else if(\"line-center\"===E)for(var N=0,B=e.geometry;N<B.length;N+=1){var j=B[N];if(j.length>1){var U=wu(j,M,r.vertical||g,n,v,x);U&&P(j,U)}}else if(\"Polygon\"===e.type)for(var V=0,H=Cs(e.geometry,0);V<H.length;V+=1){var q=H[V],G=Du(q,16);P(q[0],new hu(G.x,G.y,0))}else if(\"LineString\"===e.type)for(var Y=0,W=e.geometry;Y<W.length;Y+=1){var X=W[Y];P(X,new hu(X[0].x,X[0].y,0))}else if(\"Point\"===e.type)for(var Z=0,K=e.geometry;Z<K.length;Z+=1)for(var J=0,$=K[Z];J<$.length;J+=1){var Q=$[J];P([Q],new hu(Q.x,Q.y,0))}}(t,a,p,B,n,c,f,h,g,j,o)},k=0,T=t.features;k<T.length;k+=1)_();a&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,r,n,i){var a,o=1/Math.tan(e/2);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(a=1/(n-i),t[10]=(i+n)*a,t[14]=2*i*n*a):(t[10]=-1,t[14]=-2*n),t},t.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r},t.plugin=Ai,t.polygonIntersectsPolygon=ho,t.postMapLoadEvent=st,t.postTurnstileEvent=at,t.potpack=Yl,t.refProperties=[\"type\",\"source\",\"source-layer\",\"minzoom\",\"maxzoom\",\"filter\",\"layout\"],t.register=Qn,t.registerForPluginStateChange=function(t){return t({pluginStatus:xi,pluginURL:bi}),ki.on(\"pluginStateChange\",t),t},t.rotate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+a*s,t[1]=i*l+o*s,t[2]=n*-s+a*l,t[3]=i*-s+o*l,t},t.rotateX=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t},t.rotateZ=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t},t.scale=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.scale$1=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},t.scale$2=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t},t.setCacheLimits=function(t,e){ut=t,ct=e},t.setRTLTextPlugin=function(t,e,r){if(void 0===r&&(r=!1),xi===di||xi===gi||xi===vi)throw new Error(\"setRTLTextPlugin cannot be called multiple times.\");bi=F.resolveURL(t),xi=di,yi=e,wi(),r||Mi()},t.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},t.sqrLen=Ro,t.styleSpec=It,t.sub=Do,t.symbolSize=mu,t.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},t.transformMat4=zo,t.translate=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,p,d,g=r[0],v=r[1],m=r[2];return e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*v+f*m+e[12],t[13]=i*g+l*v+h*m+e[13],t[14]=a*g+u*v+p*m+e[14],t[15]=o*g+c*v+d*m+e[15]),t},t.triggerPluginCompletionEvent=_i,t.uniqueId=p,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:\"layers.\"+r+': missing required property \"id\"'}),void 0===t.render&&e.push({message:\"layers.\"+r+': missing required method \"render\"'}),t.renderingMode&&\"2d\"!==t.renderingMode&&\"3d\"!==t.renderingMode&&e.push({message:\"layers.\"+r+': property \"renderingMode\" must be either \"2d\" or \"3d\"'}),e},t.validateLight=qn,t.validateStyle=Hn,t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.vectorTile=Ys,t.version=r,t.warnOnce=w,t.webpSupported=B,t.window=self,t.wrap=c})),n(0,(function(t){function e(t){var r=typeof t;if(\"number\"===r||\"boolean\"===r||\"string\"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var n=\"[\",i=0,a=t;i<a.length;i+=1)n+=e(a[i])+\",\";return n+\"]\"}for(var o=Object.keys(t).sort(),s=\"{\",l=0;l<o.length;l++)s+=JSON.stringify(o[l])+\":\"+e(t[o[l]])+\",\";return s+\"}\"}function r(r){for(var n=\"\",i=0,a=t.refProperties;i<a.length;i+=1)n+=\"/\"+e(r[a[i]]);return n}var n=function(t){this.keyCache={},t&&this.replace(t)};n.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},n.prototype.update=function(e,n){for(var i=this,a=0,o=e;a<o.length;a+=1){var s=o[a];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var u=0,c=n;u<c.length;u+=1){var f=c[u];delete this.keyCache[f],delete this._layerConfigs[f],delete this._layers[f]}this.familiesBySource={};for(var h=0,p=function(t,e){for(var n={},i=0;i<t.length;i++){var a=e&&e[t[i].id]||r(t[i]);e&&(e[t[i].id]=a);var o=n[a];o||(o=n[a]=[]),o.push(t[i])}var s=[];for(var l in n)s.push(n[l]);return s}(t.values(this._layerConfigs),this.keyCache);h<p.length;h+=1){var d=p[h].map((function(t){return i._layers[t.id]})),g=d[0];if(\"none\"!==g.visibility){var v=g.source||\"\",m=this.familiesBySource[v];m||(m=this.familiesBySource[v]={});var y=g.sourceLayer||\"_geojsonTileLayer\",x=m[y];x||(x=m[y]=[]),x.push(d)}}};var i=function(e){var r={},n=[];for(var i in e){var a=e[i],o=r[i]={};for(var s in a){var l=a[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var u={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};n.push(u),o[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(n),f=c.w,h=c.h,p=new t.AlphaImage({width:f||1,height:h||1});for(var d in e){var g=e[d];for(var v in g){var m=g[+v];if(m&&0!==m.bitmap.width&&0!==m.bitmap.height){var y=r[d][v].rect;t.AlphaImage.copy(m.bitmap,p,{x:0,y:0},{x:y.x+1,y:y.y+1},m.bitmap)}}}this.image=p,this.positions=r};t.register(\"GlyphAtlas\",i);var a=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId};function o(e,r,n){for(var i=new t.EvaluationParameters(r),a=0,o=e;a<o.length;a+=1)o[a].recalculate(i,n)}function s(e,r){var n=t.getArrayBuffer(e.request,(function(e,n,i,a){e?r(e):n&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(n)),rawData:n,cacheControl:i,expires:a})}));return function(){n.cancel(),r()}}a.prototype.parse=function(e,r,n,a,s){var l=this;this.status=\"parsing\",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var u=new t.DictionaryCoder(Object.keys(e.layers).sort()),c=new t.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];var f,h,p,d,g={},v={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:n},m=r.familiesBySource[this.source];for(var y in m){var x=e.layers[y];if(x){1===x.version&&t.warnOnce('Vector tile source \"'+this.source+'\" layer \"'+y+'\" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var b=u.encode(y),_=[],w=0;w<x.length;w++){var k=x.feature(w),T=c.getId(k,y);_.push({feature:k,id:T,index:w,sourceLayerIndex:b})}for(var M=0,A=m[y];M<A.length;M+=1){var S=A[M],E=S[0];E.minzoom&&this.zoom<Math.floor(E.minzoom)||E.maxzoom&&this.zoom>=E.maxzoom||\"none\"!==E.visibility&&(o(S,this.zoom,n),(g[E.id]=E.createBucket({index:c.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,v,this.tileID.canonical),c.bucketLayerIDs.push(S.map((function(t){return t.id}))))}}}var C=t.mapObject(v.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(C).length?a.send(\"getGlyphs\",{uid:this.uid,stacks:C},(function(t,e){f||(f=t,h=e,O.call(l))})):h={};var L=Object.keys(v.iconDependencies);L.length?a.send(\"getImages\",{icons:L,source:this.source,tileID:this.tileID,type:\"icons\"},(function(t,e){f||(f=t,p=e,O.call(l))})):p={};var P=Object.keys(v.patternDependencies);function O(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(v,this.tileID.canonical,r.patternPositions))}this.status=\"done\",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send(\"getImages\",{icons:P,source:this.source,tileID:this.tileID,type:\"patterns\"},(function(t,e){f||(f=t,d=e,O.call(l))})):d={},O.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status=\"done\",n.loaded[i]=s,r(e);var l=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl);var c={};if(o){var f=o.finish();f&&(c.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,u,c))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};\"parsing\"===o.status?o.reloadCallback=s:\"done\"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};c.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=u&&a instanceof u?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},c.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if(\"FeatureCollection\"===i)for(n=0;n<e.features.length;n++)t(e.features[n],r);else if(\"GeometryCollection\"===i)for(n=0;n<e.geometries.length;n++)t(e.geometries[n],r);else if(\"Feature\"===i)t(e.geometry,r);else if(\"Polygon\"===i)h(e.coordinates,r);else if(\"MultiPolygon\"===i)for(n=0;n<e.coordinates.length;n++)h(e.coordinates[n],r);return e};function h(t,e){if(0!==t.length){p(t[0],e);for(var r=1;r<t.length;r++)p(t[r],!e)}}function p(t,e){for(var r=0,n=0,i=t.length,a=i-1;n<i;a=n++)r+=(t[n][0]-t[a][0])*(t[a][1]+t[n][1]);r>=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,\"id\"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r<n.length;r+=1){var i=n[r];e.push([new t.Point$1(i[0],i[1])])}return e}for(var a=[],o=0,s=this._feature.geometry;o<s.length;o+=1){for(var l=[],u=0,c=s[o];u<c.length;u+=1){var f=c[u];l.push(new t.Point$1(f[0],f[1]))}a.push(l)}return a},g.prototype.toGeoJSON=function(t,e,r){return d.call(this,t,e,r)};var v=function(e){this.layers={_geojsonTileLayer:this},this.name=\"_geojsonTileLayer\",this.extent=t.EXTENT,this.length=e.length,this._features=e};v.prototype.feature=function(t){return new g(this._features[t])};var m=t.vectorTile.VectorTileFeature,y=x;function x(t,e){this.options=e||{},this.features=t,this.length=t.length}function b(t,e){this.id=\"number\"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}x.prototype.feature=function(t){return new b(this.features[t],this.options.extent)},b.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var n=e[r],i=[],a=0;a<n.length;a++)i.push(new t.Point$1(n[a][0],n[a][1]));this.geometry.push(i)}return this.geometry},b.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},b.prototype.toGeoJSON=m.prototype.toGeoJSON;var _=M,w=M,k=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new y(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return M({layers:r})},T=y;function M(e){var r=new t.pbf;return function(t,e){for(var r in t.layers)e.writeMessage(3,A,t.layers[r])}(e,r),r.finish()}function A(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||\"\"),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)n.feature=t.feature(r),e.writeMessage(2,S,n);var i=n.keys;for(r=0;r<i.length;r++)e.writeStringField(3,i[r]);var a=n.values;for(r=0;r<a.length;r++)e.writeMessage(4,O,a[r])}function S(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,E,t),e.writeVarintField(3,r.type),e.writeMessage(4,P,r)}function E(t,e){var r=t.feature,n=t.keys,i=t.values,a=t.keycache,o=t.valuecache;for(var s in r.properties){var l=a[s];void 0===l&&(n.push(s),l=n.length-1,a[s]=l),e.writeVarint(l);var u=r.properties[s],c=typeof u;\"string\"!==c&&\"boolean\"!==c&&\"number\"!==c&&(u=JSON.stringify(u));var f=c+\":\"+u,h=o[f];void 0===h&&(i.push(u),h=i.length-1,o[f]=h),e.writeVarint(h)}}function C(t,e){return(e<<3)+(7&t)}function L(t){return t<<1^t>>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s<o;s++){var l=r[s],u=1;1===n&&(u=l.length),e.writeVarint(C(1,u));for(var c=3===n?l.length-1:l.length,f=0;f<c;f++){1===f&&1!==n&&e.writeVarint(C(2,c-1));var h=l[f].x-i,p=l[f].y-a;e.writeVarint(L(h)),e.writeVarint(L(p)),i+=h,a+=p}3===n&&e.writeVarint(C(7,1))}}function O(t,e){var r=typeof t;\"string\"===r?e.writeStringField(1,t):\"boolean\"===r?e.writeBooleanField(7,t):\"number\"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function I(t,e,r,n,i,a){if(!(i-n<=r)){var o=n+i>>1;D(t,e,o,n,i,a%2),I(t,e,r,n,o-1,a+1),I(t,e,r,o+1,i,a+1)}}function D(t,e,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(o-u)/o)*(s-o/2<0?-1:1);D(t,e,r,Math.max(n,Math.floor(r-s*u/o+c)),Math.min(i,Math.floor(r+(o-s)*u/o+c)),a)}var f=e[2*r+a],h=n,p=i;for(z(t,e,n,r),e[2*i+a]>f&&z(t,e,n,i);h<p;){for(z(t,e,h,p),h++,p--;e[2*h+a]<f;)h++;for(;e[2*p+a]>f;)p--}e[2*n+a]===f?z(t,e,n,p):z(t,e,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}function z(t,e,r,n){R(t,r,n),R(e,2*r,2*n),R(e,2*r+1,2*n+1)}function R(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function F(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=k,_.GeoJSONWrapper=T;var N=function(t){return t[0]},B=function(t){return t[1]},j=function(t,e,r,n,i){void 0===e&&(e=N),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l<t.length;l++)o[l]=l,s[2*l]=e(t[l]),s[2*l+1]=r(t[l]);I(o,s,n,0,o.length-1,0)};j.prototype.range=function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var f=u.pop(),h=u.pop(),p=u.pop();if(h-p<=o)for(var d=p;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[d]);else{var g=Math.floor((p+h)/2);s=e[2*g],l=e[2*g+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[g]);var v=(f+1)%2;(0===f?r<=s:n<=l)&&(u.push(p),u.push(g-1),u.push(v)),(0===f?i>=s:a>=l)&&(u.push(g+1),u.push(h),u.push(v))}}return c}(this.ids,this.coords,t,e,r,n,this.nodeSize)},j.prototype.within=function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var u=o.pop(),c=o.pop(),f=o.pop();if(c-f<=a)for(var h=f;h<=c;h++)F(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var p=Math.floor((f+c)/2),d=e[2*p],g=e[2*p+1];F(d,g,r,n)<=l&&s.push(t[p]);var v=(u+1)%2;(0===u?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(v)),(0===u?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(c),o.push(v))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var U={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},V=function(t){this.options=Z(Object.create(U),t),this.trees=new Array(this.options.maxZoom+1)};function H(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function q(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:W(n),y:X(i),zoom:1/0,index:e,parentId:-1}}function G(t){return{type:\"Feature\",id:t.id,properties:Y(t),geometry:{type:\"Point\",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function Y(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return Z(Z({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function W(t){return t/360+.5}function X(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Z(t,e){for(var r in e)t[r]=e[r];return t}function K(t){return t.x}function J(t){return t.y}function $(t,e,r,n){for(var i,a=n,o=r-e>>1,s=r-e,l=t[e],u=t[e+1],c=t[r],f=t[r+1],h=e+3;h<r;h+=3){var p=Q(t[h],t[h+1],l,u,c,f);if(p>a)i=h,a=p;else if(p===a){var d=Math.abs(h-o);d<s&&(i=h,s=d)}}a>n&&(i-e>3&&$(t,e,i,n),t[i+2]=a,r-i>3&&$(t,i,r,n))}function Q(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function tt(t,e,r,n){var i={id:void 0===t?null:t,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if(\"Point\"===r||\"MultiPoint\"===r||\"LineString\"===r)et(t,e);else if(\"Polygon\"===r||\"MultiLineString\"===r)for(var n=0;n<e.length;n++)et(t,e[n]);else if(\"MultiPolygon\"===r)for(n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)et(t,e[n][i])}(i),i}function et(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function rt(t,e,r,n){if(e.geometry){var i=e.geometry.coordinates,a=e.geometry.type,o=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],l=e.id;if(r.promoteId?l=e.properties[r.promoteId]:r.generateId&&(l=n||0),\"Point\"===a)nt(i,s);else if(\"MultiPoint\"===a)for(var u=0;u<i.length;u++)nt(i[u],s);else if(\"LineString\"===a)it(i,s,o,!1);else if(\"MultiLineString\"===a){if(r.lineMetrics){for(u=0;u<i.length;u++)s=[],it(i[u],s,o,!1),t.push(tt(l,\"LineString\",s,e.properties));return}at(i,s,o,!1)}else if(\"Polygon\"===a)at(i,s,o,!0);else{if(\"MultiPolygon\"!==a){if(\"GeometryCollection\"===a){for(u=0;u<e.geometry.geometries.length;u++)rt(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},r,n);return}throw new Error(\"Input data is not a valid GeoJSON object.\")}for(u=0;u<i.length;u++){var c=[];at(i[u],c,o,!0),s.push(c)}}t.push(tt(l,a,s,e.properties))}}function nt(t,e){e.push(ot(t[0])),e.push(st(t[1])),e.push(0)}function it(t,e,r,n){for(var i,a,o=0,s=0;s<t.length;s++){var l=ot(t[s][0]),u=st(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(o+=n?(i*u-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-a,2))),i=l,a=u}var c=e.length-3;e[2]=1,$(e,0,c,r),e[c+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function at(t,e,r,n){for(var i=0;i<t.length;i++){var a=[];it(t[i],a,r,n),e.push(a)}}function ot(t){return t/360+.5}function st(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function lt(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o<n)return t;if(o<r||a>=n)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],f=c.geometry,h=c.type,p=0===i?c.minX:c.minY,d=0===i?c.maxX:c.maxY;if(p>=r&&d<n)l.push(c);else if(!(d<r||p>=n)){var g=[];if(\"Point\"===h||\"MultiPoint\"===h)ut(f,g,r,n,i);else if(\"LineString\"===h)ct(f,g,r,n,i,!1,s.lineMetrics);else if(\"MultiLineString\"===h)ht(f,g,r,n,i,!1);else if(\"Polygon\"===h)ht(f,g,r,n,i,!0);else if(\"MultiPolygon\"===h)for(var v=0;v<f.length;v++){var m=[];ht(f[v],m,r,n,i,!0),m.length&&g.push(m)}if(g.length){if(s.lineMetrics&&\"LineString\"===h){for(v=0;v<g.length;v++)l.push(tt(c.id,h,g[v],c.tags));continue}\"LineString\"!==h&&\"MultiLineString\"!==h||(1===g.length?(h=\"LineString\",g=g[0]):h=\"MultiLineString\"),\"Point\"!==h&&\"MultiPoint\"!==h||(h=3===g.length?\"Point\":\"MultiPoint\"),l.push(tt(c.id,h,g,c.tags))}}}return l.length?l:null}function ut(t,e,r,n,i){for(var a=0;a<t.length;a+=3){var o=t[a+i];o>=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function ct(t,e,r,n,i,a,o){for(var s,l,u=ft(t),c=0===i?dt:gt,f=t.start,h=0;h<t.length-3;h+=3){var p=t[h],d=t[h+1],g=t[h+2],v=t[h+3],m=t[h+4],y=0===i?p:d,x=0===i?v:m,b=!1;o&&(s=Math.sqrt(Math.pow(p-v,2)+Math.pow(d-m,2))),y<r?x>r&&(l=c(u,p,d,v,m,r),o&&(u.start=f+s*l)):y>n?x<n&&(l=c(u,p,d,v,m,n),o&&(u.start=f+s*l)):pt(u,p,d,g),x<r&&y>=r&&(l=c(u,p,d,v,m,r),b=!0),x>n&&y<=n&&(l=c(u,p,d,v,m,n),b=!0),!a&&b&&(o&&(u.end=f+s*l),e.push(u),u=ft(t)),o&&(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)>=r&&y<=n&&pt(u,p,d,g),_=u.length-3,a&&_>=3&&(u[_]!==u[0]||u[_+1]!==u[1])&&pt(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ft(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function ht(t,e,r,n,i,a){for(var o=0;o<t.length;o++)ct(t[o],e,r,n,i,a,!1)}function pt(t,e,r,n){t.push(e),t.push(r),t.push(n)}function dt(t,e,r,n,i,a){var o=(a-e)/(n-e);return t.push(a),t.push(r+(i-r)*o),t.push(1),o}function gt(t,e,r,n,i,a){var o=(a-r)/(i-r);return t.push(e+(n-e)*o),t.push(a),t.push(1),o}function vt(t,e){for(var r=[],n=0;n<t.length;n++){var i,a=t[n],o=a.type;if(\"Point\"===o||\"MultiPoint\"===o||\"LineString\"===o)i=mt(a.geometry,e);else if(\"MultiLineString\"===o||\"Polygon\"===o){i=[];for(var s=0;s<a.geometry.length;s++)i.push(mt(a.geometry[s],e))}else if(\"MultiPolygon\"===o)for(i=[],s=0;s<a.geometry.length;s++){for(var l=[],u=0;u<a.geometry[s].length;u++)l.push(mt(a.geometry[s][u],e));i.push(l)}r.push(tt(a.id,o,i,a.tags))}return r}function mt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var n=0;n<t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function yt(t,e){if(t.transformed)return t;var r,n,i,a=1<<t.z,o=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(n=0;n<u.length;n+=2)l.geometry.push(xt(u[n],u[n+1],e,a,o,s));else for(n=0;n<u.length;n++){var f=[];for(i=0;i<u[n].length;i+=2)f.push(xt(u[n][i],u[n][i+1],e,a,o,s));l.geometry.push(f)}}return t.transformed=!0,t}function xt(t,e,r,n,i,a){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-a))]}function bt(t,e,r,n,i){for(var a=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){o.numFeatures++,_t(o,t[s],a,i);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,f=t[s].maxY;l<o.minX&&(o.minX=l),u<o.minY&&(o.minY=u),c>o.maxX&&(o.maxX=c),f>o.maxY&&(o.maxY=f)}return o}function _t(t,e,r,n){var i=e.geometry,a=e.type,o=[];if(\"Point\"===a||\"MultiPoint\"===a)for(var s=0;s<i.length;s+=3)o.push(i[s]),o.push(i[s+1]),t.numPoints++,t.numSimplified++;else if(\"LineString\"===a)wt(o,i,t,r,!1,!1);else if(\"MultiLineString\"===a||\"Polygon\"===a)for(s=0;s<i.length;s++)wt(o,i[s],t,r,\"Polygon\"===a,0===s);else if(\"MultiPolygon\"===a)for(var l=0;l<i.length;l++){var u=i[l];for(s=0;s<u.length;s++)wt(o,u[s],t,r,!0,0===s)}if(o.length){var c=e.tags||null;if(\"LineString\"===a&&n.lineMetrics){for(var f in c={},e.tags)c[f]=e.tags[f];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var h={geometry:o,type:\"Polygon\"===a||\"MultiPolygon\"===a?3:\"LineString\"===a||\"MultiLineString\"===a?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function wt(t,e,r,n,i,a){var o=n*n;if(n>0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===n||e[l+2]>o)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n<i;a=n,n+=2)r+=(t[n]-t[a])*(t[n+1]+t[a+1]);if(r>0===e)for(n=0,i=t.length;n<i/2;n+=2){var o=t[n],s=t[n+1];t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=o,t[i-1-n]=s}}(s,a),t.push(s)}}function kt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time(\"preprocess data\"),e.maxZoom<0||e.maxZoom>24)throw new Error(\"maxZoom should be in the 0-24 range\");if(e.promoteId&&e.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var n=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var n=0;n<t.features.length;n++)rt(r,t.features[n],e,n);else\"Feature\"===t.type?rt(r,t,e):rt(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",e.indexMaxZoom,e.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),(n=function(t,e){var r=e.buffer/e.extent,n=t,i=lt(t,1,-1-r,r,0,-1,2,e),a=lt(t,1,1-r,2+r,0,-1,2,e);return(i||a)&&(n=lt(t,1,-r,1+r,0,-1,2,e)||[],i&&(n=vt(i,1).concat(n)),a&&(n=n.concat(vt(a,-1)))),n}(n,e)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log(\"features: %d, points: %d\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\"generate tiles\"),console.log(\"tiles generated:\",this.total,JSON.stringify(this.stats)))}function Tt(t,e,r){return 32*((1<<t)*r+e)+t}function Mt(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);var i=new v(n.features),a=_(i);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:i,rawData:a.buffer})}V.prototype.load=function(t){var e=this.options,r=e.log,n=e.minZoom,i=e.maxZoom,a=e.nodeSize;r&&console.time(\"total time\");var o=\"prepare \"+t.length+\" points\";r&&console.time(o),this.points=t;for(var s=[],l=0;l<t.length;l++)t[l].geometry&&s.push(q(t[l],l));this.trees[i+1]=new j(s,K,J,a,Float32Array),r&&console.timeEnd(o);for(var u=i;u>=n;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new j(s,K,J,a,Float32Array),r&&console.log(\"z%d: %d clusters in %dms\",u,s.length,+Date.now()-c)}return r&&console.timeEnd(\"total time\"),this},V.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,f=l.range(W(r),X(a),W(i),X(n));c<f.length;c+=1){var h=f[c],p=l.points[h];u.push(p.numPoints?G(p):this.points[p.index])}return u},V.prototype.getChildren=function(t){var e=this._getOriginId(t),r=this._getOriginZoom(t),n=\"No cluster with the specified id.\",i=this.trees[r];if(!i)throw new Error(n);var a=i.points[e];if(!a)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,u=i.within(a.x,a.y,o);l<u.length;l+=1){var c=u[l],f=i.points[c];f.parentId===t&&s.push(f.numPoints?G(f):this.points[f.index])}if(0===s.length)throw new Error(n);return s},V.prototype.getLeaves=function(t,e,r){e=e||10,r=r||0;var n=[];return this._appendLeaves(n,t,e,r,0),n},V.prototype.getTile=function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options,o=a.extent,s=a.radius/o,l=(r-s)/i,u=(r+1+s)/i,c={features:[]};return this._addTileFeatures(n.range((e-s)/i,l,(e+1+s)/i,u),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-s/i,l,1,u),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,l,s/i,u),n.points,-1,r,i,c),c.features.length?c:null},V.prototype.getClusterExpansionZoom=function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},V.prototype._appendLeaves=function(t,e,r,n,i){for(var a=0,o=this.getChildren(e);a<o.length;a+=1){var s=o[a],l=s.properties;if(l&&l.cluster?i+l.point_count<=n?i+=l.point_count:i=this._appendLeaves(t,l.cluster_id,r,n,i):i<n?i++:t.push(s),t.length===r)break}return i},V.prototype._addTileFeatures=function(t,e,r,n,i,a){for(var o=0,s=t;o<s.length;o+=1){var l=e[s[o]],u=l.numPoints,c={type:1,geometry:[[Math.round(this.options.extent*(l.x*i-r)),Math.round(this.options.extent*(l.y*i-n))]],tags:u?Y(l):this.points[l.index].properties},f=void 0;u?f=l.id:this.options.generateId?f=l.index:this.points[l.index].id&&(f=this.points[l.index].id),void 0!==f&&(c.id=f),a.features.push(c)}},V.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},V.prototype._cluster=function(t,e){for(var r=[],n=this.options,i=n.radius,a=n.extent,o=n.reduce,s=i/(a*Math.pow(2,e)),l=0;l<t.length;l++){var u=t[l];if(!(u.zoom<=e)){u.zoom=e;for(var c=this.trees[e+1],f=c.within(u.x,u.y,s),h=u.numPoints||1,p=u.x*h,d=u.y*h,g=o&&h>1?this._map(u,!0):null,v=(l<<5)+(e+1)+this.points.length,m=0,y=f;m<y.length;m+=1){var x=y[m],b=c.points[x];if(!(b.zoom<=e)){b.zoom=e;var _=b.numPoints||1;p+=b.x*_,d+=b.y*_,h+=_,b.parentId=v,o&&(g||(g=this._map(u,!0)),o(g,this._map(b)))}}1===h?r.push(u):(u.parentId=v,r.push(H(p/h,d/h,v,h,g)))}}return r},V.prototype._getOriginId=function(t){return t-this.points.length>>5},V.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},V.prototype._map=function(t,e){if(t.numPoints)return e?Z({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?Z({},n):n},kt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},kt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,u=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,f=Tt(e,r,n),h=this.tiles[f];if(!h&&(u>1&&console.time(\"creation\"),h=this.tiles[f]=bt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),u)){u>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd(\"creation\"));var p=\"z\"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<<i-e;if(r!==Math.floor(a/d)||n!==Math.floor(o/d))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){u>1&&console.time(\"clipping\");var g,v,m,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,k=.5+_,T=1+_;g=v=m=y=null,x=lt(t,c,r-_,r+k,0,h.minX,h.maxX,l),b=lt(t,c,r+w,r+T,0,h.minX,h.maxX,l),t=null,x&&(g=lt(x,c,n-_,n+k,1,h.minY,h.maxY,l),v=lt(x,c,n+w,n+T,1,h.minY,h.maxY,l),x=null),b&&(m=lt(b,c,n-_,n+k,1,h.minY,h.maxY,l),y=lt(b,c,n+w,n+T,1,h.minY,h.maxY,l),b=null),u>1&&console.timeEnd(\"clipping\"),s.push(g||[],e+1,2*r,2*n),s.push(v||[],e+1,2*r,2*n+1),s.push(m||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},kt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t<0||t>24)return null;var o=1<<t,s=Tt(t,e=(e%o+o)%o,r);if(this.tiles[s])return yt(this.tiles[s],i);a>1&&console.log(\"drilling down to z%d-%d-%d\",t,e,r);for(var l,u=t,c=e,f=r;!l&&u>0;)u--,c=Math.floor(c/2),f=Math.floor(f/2),l=this.tiles[Tt(u,c,f)];return l&&l.source?(a>1&&console.log(\"found parent tile z%d-%d-%d\",u,c,f),a>1&&console.time(\"drilling down\"),this.splitTile(l.source,u,c,f,t,e,r),a>1&&console.timeEnd(\"drilling down\"),this.tiles[s]?yt(this.tiles[s],i):null):null};var At=function(e){function r(t,r,n,i){e.call(this,t,r,n,Mt),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&\"Idle\"!==this._state?this._state=\"NeedsLoadData\":(this._state=\"Coalescing\",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if(\"object\"!=typeof o)return r(new Error(\"Input data given to '\"+n.source+\"' is not a valid GeoJSON object.\"));f(o,!0);try{e._geoJSONIndex=n.cluster?new V(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),u=0,c=l;u<c.length;u+=1){var f=c[u],h=n[f],p=h[0],d=h[1],g=t.createExpression(d),v=t.createExpression(\"string\"==typeof p?[p,[\"accumulated\"],[\"get\",f]]:p);i[f]=g.value,a[f]=v.value}return r.map=function(t){s.properties=t;for(var e={},r=0,n=l;r<n.length;r+=1){var a=n[r];e[a]=i[a].evaluate(o,s)}return e},r.reduce=function(t,e){s.properties=e;for(var r=0,n=l;r<n.length;r+=1){var i=n[r];o.accumulated=t[i],t[i]=a[i].evaluate(o,s)}},r}(n)).load(o.features):function(t,e){return new kt(t,e)}(o,n.geojsonVtOptions)}catch(a){return r(a)}e.loaded={};var s={};if(i){var l=i.finish();l&&(s.resourceTiming={},s.resourceTiming[n.source]=JSON.parse(JSON.stringify(l)))}r(null,s)}))}},r.prototype.coalesce=function(){\"Coalescing\"===this._state?this._state=\"Idle\":\"NeedsLoadData\"===this._state&&(this._state=\"Coalescing\",this._loadData())},r.prototype.reloadTile=function(t,r){var n=this.loaded,i=t.uid;return n&&n[i]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if(\"string\"!=typeof e.data)return r(new Error(\"Input data given to '\"+e.source+\"' is not a valid GeoJSON object.\"));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error(\"Input data given to '\"+e.source+\"' is not a valid GeoJSON object.\"))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},r}(l),St=function(e){var r=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:At},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name \"'+t+'\" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isParsed())throw new Error(\"RTL text plugin already registered.\");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return St.prototype.setReferrer=function(t,e){this.referrer=e},St.prototype.setImages=function(t,e,r){for(var n in this.availableImages[t]=e,this.workerSources[t]){var i=this.workerSources[t][n];for(var a in i)i[a].availableImages=e}r()},St.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},St.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},St.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},St.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},St.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},St.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},St.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},St.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},St.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}},St.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},St.prototype.syncRTLPluginState=function(e,r,n){try{t.plugin.setState(r);var i=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=i){this.self.importScripts(i);var a=t.plugin.isParsed();n(a?void 0:new Error(\"RTL Text Plugin failed to import scripts from \"+i),a)}}catch(t){n(t.toString())}},St.prototype.getAvailableImages=function(t){var e=this.availableImages[t];return e||(e=[]),e},St.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},St.prototype.getWorkerSource=function(t,e,r){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var i={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t),this.getAvailableImages(t))}return this.workerSources[t][e][r]},St.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new c),this.demWorkerSources[t][e]},St.prototype.enforceCacheSizeLimit=function(e,r){t.enforceCacheSizeLimit(r)},\"undefined\"!=typeof WorkerGlobalScope&&void 0!==t.window&&t.window instanceof WorkerGlobalScope&&(t.window.worker=new St(t.window)),St})),n(0,(function(t){var e=t.createCommonjsModule((function(t){function e(t){return!r(t)}function r(t){return\"undefined\"!=typeof window&&\"undefined\"!=typeof document?Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON?function(){if(!(\"Worker\"in window&&\"Blob\"in window&&\"URL\"in window))return!1;var t,e,r=new Blob([\"\"],{type:\"text/javascript\"}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(n),t}()?\"Uint8ClampedArray\"in window?ArrayBuffer.isView?function(){var t=document.createElement(\"canvas\");t.width=t.height=1;var e=t.getContext(\"2d\");if(!e)return!1;var r=e.getImageData(0,0,1,1);return r&&r.width===t.width}()?(r=t&&t.failIfMajorPerformanceCaveat,void 0===n[r]&&(n[r]=function(t){var r=function(t){var r=document.createElement(\"canvas\"),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext(\"webgl\",n)||r.probablySupportsContext(\"experimental-webgl\",n):r.supportsContext?r.supportsContext(\"webgl\",n)||r.supportsContext(\"experimental-webgl\",n):r.getContext(\"webgl\",n)||r.getContext(\"experimental-webgl\",n)}(t);if(!r)return!1;var n=r.createShader(r.VERTEX_SHADER);return!(!n||r.isContextLost())&&(r.shaderSource(n,\"void main() {}\"),r.compileShader(n),!0===r.getShaderParameter(n,r.COMPILE_STATUS))}(r)),n[r]?void 0:\"insufficient WebGL support\"):\"insufficient Canvas/getImageData support\":\"insufficient ArrayBuffer support\":\"insufficient Uint8ClampedArray support\":\"insufficient worker support\":\"insufficient JSON support\":\"insufficient Object support\":\"insufficient Function support\":\"insufficent Array support\":\"not a browser\";var r}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=r);var n={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),r={create:function(e,r,n){var i=t.window.document.createElement(e);return void 0!==r&&(i.className=r),n&&n.appendChild(i),i},createNS:function(e,r){return t.window.document.createElementNS(e,r)}},n=t.window.document.documentElement.style;function i(t){if(!n)return t[0];for(var e=0;e<t.length;e++)if(t[e]in n)return t[e];return t[0]}var a,o=i([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]);r.disableDrag=function(){n&&o&&(a=n[o],n[o]=\"none\")},r.enableDrag=function(){n&&o&&(n[o]=a)};var s=i([\"transform\",\"WebkitTransform\"]);r.setTransform=function(t,e){t.style[s]=e};var l=!1;try{var u=Object.defineProperty({},\"passive\",{get:function(){l=!0}});t.window.addEventListener(\"test\",u,u),t.window.removeEventListener(\"test\",u,u)}catch(t){l=!1}r.addEventListener=function(t,e,r,n){void 0===n&&(n={}),\"passive\"in n&&l?t.addEventListener(e,r,n):t.addEventListener(e,r,n.capture)},r.removeEventListener=function(t,e,r,n){void 0===n&&(n={}),\"passive\"in n&&l?t.removeEventListener(e,r,n):t.removeEventListener(e,r,n.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener(\"click\",c,!0)};function f(t){var e=t.userImage;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}r.suppressClick=function(){t.window.addEventListener(\"click\",c,!0),t.window.setTimeout((function(){t.window.removeEventListener(\"click\",c,!0)}),0)},r.mousePos=function(e,r){var n=e.getBoundingClientRect();return new t.Point(r.clientX-n.left-e.clientLeft,r.clientY-n.top-e.clientTop)},r.touchPos=function(e,r){for(var n=e.getBoundingClientRect(),i=[],a=0;a<r.length;a++)i.push(new t.Point(r[a].clientX-n.left-e.clientLeft,r[a].clientY-n.top-e.clientTop));return i},r.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var n=r[e],i=n.ids,a=n.callback;this._notify(i,a)}this.requestors=[]}},r.prototype.getImage=function(t){return this.images[t]},r.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},r.prototype._validate=function(e,r){var n=!0;return this._validateStretch(r.stretchX,r.data&&r.data.width)||(this.fire(new t.ErrorEvent(new Error('Image \"'+e+'\" has invalid \"stretchX\" value'))),n=!1),this._validateStretch(r.stretchY,r.data&&r.data.height)||(this.fire(new t.ErrorEvent(new Error('Image \"'+e+'\" has invalid \"stretchY\" value'))),n=!1),this._validateContent(r.content,r)||(this.fire(new t.ErrorEvent(new Error('Image \"'+e+'\" has invalid \"content\" value'))),n=!1),n},r.prototype._validateStretch=function(t,e){if(!t)return!0;for(var r=0,n=0,i=t;n<i.length;n+=1){var a=i[n];if(a[0]<r||a[1]<a[0]||e<a[1])return!1;r=a[1]}return!0},r.prototype._validateContent=function(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))},r.prototype.updateImage=function(t,e){var r=this.images[t];e.version=r.version+1,this.images[t]=e,this.updatedImages[t]=!0},r.prototype.removeImage=function(t){var e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()},r.prototype.listImages=function(){return Object.keys(this.images)},r.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var n=0,i=t;n<i.length;n+=1){var a=i[n];this.images[a]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},r.prototype._notify=function(e,r){for(var n={},i=0,a=e;i<a.length;i+=1){var o=a[i];this.images[o]||this.fire(new t.Event(\"styleimagemissing\",{id:o}));var s=this.images[o];s?n[o]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image \"'+o+'\" could not be loaded. Please make sure you have added the image with map.addImage() or a \"sprite\" property in your style. You can provide missing images by listening for the \"styleimagemissing\" map event.')}r(null,n)},r.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},r.prototype.getPattern=function(e){var r=this.patterns[e],n=this.getImage(e);if(!n)return null;if(r&&r.position.version===n.version)return r.position;if(r)r.position.version=n.version;else{var i={w:n.data.width+2,h:n.data.height+2,x:0,y:0},a=new t.ImagePosition(i,n);this.patterns[e]={bin:i,position:a}}return this._updatePatternAtlas(),this.patterns[e].position},r.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},r.prototype._updatePatternAtlas=function(){var e=[];for(var r in this.patterns)e.push(this.patterns[r].bin);var n=t.potpack(e),i=n.w,a=n.h,o=this.atlasImage;for(var s in o.resize({width:i||1,height:a||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,f=this.images[s].data,h=f.width,p=f.height;t.RGBAImage.copy(f,o,{x:0,y:0},{x:u,y:c},{width:h,height:p}),t.RGBAImage.copy(f,o,{x:0,y:p-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(f,o,{x:0,y:0},{x:u,y:c+p},{width:h,height:1}),t.RGBAImage.copy(f,o,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:p}),t.RGBAImage.copy(f,o,{x:0,y:0},{x:u+h,y:c},{width:1,height:p})}this.dirty=!0},r.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},r.prototype.dispatchRenderCallbacks=function(t){for(var e=0,r=t;e<r.length;e+=1){var n=r[e];if(!this.callbackDispatchedThisFrame[n]){this.callbackDispatchedThisFrame[n]=!0;var i=this.images[n];f(i)&&this.updateImage(n,i)}}},r}(t.Evented),p=v,d=v,g=1e20;function v(t,e,r,n,i,a){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||\"sans-serif\",this.fontWeight=a||\"normal\",this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement(\"canvas\"),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext(\"2d\"),this.ctx.font=this.fontWeight+\" \"+this.fontSize+\"px \"+this.fontFamily,this.ctx.textBaseline=\"middle\",this.ctx.fillStyle=\"black\",this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf(\"Gecko/\")>=0?1.2:1))}function m(t,e,r,n,i,a,o){for(var s=0;s<e;s++){for(var l=0;l<r;l++)n[l]=t[l*e+s];for(y(n,i,a,o,r),l=0;l<r;l++)t[l*e+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)n[s]=t[l*e+s];for(y(n,i,a,o,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(i[s])}}function y(t,e,r,n,i){r[0]=0,n[0]=-g,n[1]=+g;for(var a=1,o=0;a<i;a++){for(var s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=+g}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;e[a]=(a-r[o])*(a-r[o])+t[r[o]]}}v.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var i=e.data[4*n+3]/255;this.gridOuter[n]=1===i?0:0===i?g:Math.pow(Math.max(0,.5-i),2),this.gridInner[n]=1===i?g:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(m(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),m(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var a=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(a/this.radius+this.cutoff))))}return r},p.default=d;var x=function(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}};x.prototype.setURL=function(t){this.url=t},x.prototype.getGlyphs=function(e,r){var n=this,i=[];for(var a in e)for(var o=0,s=e[a];o<s.length;o+=1){var l=s[o];i.push({stack:a,id:l})}t.asyncAll(i,(function(t,e){var r=t.stack,i=t.id,a=n.entries[r];a||(a=n.entries[r]={glyphs:{},requests:{},ranges:{}});var o=a.glyphs[i];if(void 0===o){if(o=n._tinySDF(a,r,i))return a.glyphs[i]=o,void e(null,{stack:r,id:i,glyph:o});var s=Math.floor(i/256);if(256*s>65535)e(new Error(\"glyphs > 65535 not supported\"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i<o.length;i+=1)(0,o[i])(t,e);delete a.requests[s]}))),l.push((function(t,n){t?e(t):n&&e(null,{stack:r,id:i,glyph:n[i]||null})}))}}else e(null,{stack:r,id:i,glyph:o})}),(function(t,e){if(t)r(t);else if(e){for(var n={},i=0,a=e;i<a.length;i+=1){var o=a[i],s=o.stack,l=o.id,u=o.glyph;(n[s]||(n[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}r(null,n)}}))},x.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(t.isChar[\"CJK Unified Ideographs\"](e)||t.isChar[\"Hangul Syllables\"](e)||t.isChar.Hiragana(e)||t.isChar.Katakana(e))},x.prototype._tinySDF=function(e,r,n){var i=this.localIdeographFontFamily;if(i&&this._doesCharSupportLocalGlyph(n)){var a=e.tinySDF;if(!a){var o=\"400\";/bold/i.test(r)?o=\"900\":/medium/i.test(r)?o=\"500\":/light/i.test(r)&&(o=\"200\"),a=e.tinySDF=new x.TinySDF(24,3,8,.25,i,o)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},a.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},x.loadGlyphRange=function(e,r,n,i,a){var o=256*r,s=o+255,l=i.transformRequest(i.normalizeGlyphsURL(n).replace(\"{fontstack}\",e).replace(\"{range}\",o+\"-\"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,(function(e,r){if(e)a(e);else if(r){for(var n={},i=0,o=t.parseGlyphPBF(r);i<o.length;i+=1){var s=o[i];n[s.id]=s}a(null,n)}}))},x.TinySDF=p;var b=function(){this.specification=t.styleSpec.light.position};b.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},b.prototype.interpolate=function(e,r,n){return{x:t.number(e.x,r.x,n),y:t.number(e.y,r.y,n),z:t.number(e.z,r.z,n)}};var _=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new b,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),w=\"-transition\",k=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(_),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e,r){if(void 0===r&&(r={}),!this._validate(t.validateLight,e,r))for(var n in e){var i=e[n];t.endsWith(n,w)?this._transitionable.setTransition(n.slice(0,-w.length),i):this._transitionable.setValue(n,i)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r,n){return(!n||!1!==n.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},r}(t.Evented),T=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};T.prototype.getDash=function(t,e){var r=t.join(\",\")+String(e);return this.dashEntry[r]||(this.dashEntry[r]=this.addDash(t,e)),this.dashEntry[r]},T.prototype.getDashRanges=function(t,e,r){var n=[],i=t.length%2==1?-t[t.length-1]*r:0,a=t[0]*r,o=!0;n.push({left:i,right:a,isDash:o,zeroLength:0===t[0]});for(var s=t[0],l=1;l<t.length;l++){o=!o;var u=t[l];i=s*r,a=(s+=u)*r,n.push({left:i,right:a,isDash:o,zeroLength:0===u})}return n},T.prototype.addRoundDash=function(t,e,r){for(var n=e/2,i=-r;i<=r;i++)for(var a=this.nextRow+r+i,o=this.width*a,s=0,l=t[s],u=0;u<this.width;u++){u/l.right>1&&(l=t[++s]);var c=Math.abs(u-l.left),f=Math.abs(u-l.right),h=Math.min(c,f),p=void 0,d=i/r*(n+1);if(l.isDash){var g=n-Math.abs(d);p=Math.sqrt(h*h+g*g)}else p=n-Math.sqrt(h*h+d*d);this.data[o+u]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],u=0;u<this.width;u++){u/l.right>1&&(l=t[++s]);var c=Math.abs(u-l.left),f=Math.abs(u-l.right),h=Math.min(c,f),p=l.isDash?h:-h;this.data[o+u]=Math.max(0,Math.min(255,p+128))}},T.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce(\"LineAtlas out of space\"),null;for(var a=0,o=0;o<e.length;o++)a+=e[o];if(0!==a){var s=this.width/a,l=this.getDashRanges(e,this.width,s);r?this.addRoundDash(l,s,n):this.addRegularDash(l)}var u={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=i,this.dirty=!0,u},T.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))};var M=function e(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),a=0;a<i.length;a++){var o=i[a],s=new e.Actor(o,n,this.id);s.name=\"Worker \"+a,this.actors.push(s)}};function A(e,r,n){var i=function(i,a){if(i)return n(i);if(a){var o=t.pick(t.extend(a,e),[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\",\"mapbox_logo\",\"bounds\",\"scheme\",\"tileSize\",\"encoding\"]);a.vector_layers&&(o.vectorLayers=a.vector_layers,o.vectorLayerIds=o.vectorLayers.map((function(t){return t.id}))),o.tiles=r.canonicalizeTileset(o,e.url),n(null,o)}};return e.url?t.getJSON(r.transformRequest(r.normalizeSourceURL(e.url),t.ResourceType.Source),i):t.browser.frame((function(){return i(null,e)}))}M.prototype.broadcast=function(e,r,n){n=n||function(){},t.asyncAll(this.actors,(function(t,n){t.send(e,r,n)}),n)},M.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},M.prototype.remove=function(){this.actors.forEach((function(t){t.remove()})),this.actors=[],this.workerPool.release(this.id)},M.Actor=t.Actor;var S=function(e,r,n){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=n||24};S.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},S.prototype.contains=function(e){var r=Math.pow(2,e.z),n=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*r),i=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*r),a=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*r),o=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*r);return e.x>=n&&e.x<a&&e.y>=i&&e.y<o};var E=function(e){function r(r,n,i,a){if(e.call(this),this.id=r,this.dispatcher=i,this.type=\"vector\",this.minzoom=0,this.maxzoom=22,this.scheme=\"xyz\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(n,[\"url\",\"scheme\",\"tileSize\",\"promoteId\"])),this._options=t.extend({type:\"vector\"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error(\"vector tile sources must have a tileSize of 512\");this.setEventedParent(a)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=A(this._options,this.map._requestManager,(function(r,n){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new S(n.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(n.tiles,e.map._requestManager._customAccessToken),t.postMapLoadEvent(n.tiles,e.map._getMapId(),e.map._requestManager._skuToken,e.map._requestManager._customAccessToken),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),i={request:this.map._requestManager.transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function a(n,i){return delete e.request,e.aborted?r(null):n&&404!==n.status?r(n):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,e.actor&&\"expired\"!==e.state?\"loading\"===e.state?e.reloadCallback=r:e.request=e.actor.send(\"reloadTile\",i,a.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send(\"loadTile\",i,a.bind(this)))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send(\"abortTile\",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),C=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.setEventedParent(a),this.type=\"raster\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\"xyz\",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:\"raster\"},n),t.extend(this,t.pick(n,[\"url\",\"scheme\",\"tileSize\"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=A(this._options,this.map._requestManager,(function(r,n){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new S(n.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(n.tiles),t.postMapLoadEvent(n.tiles,e.map._getMapId(),e.map._requestManager._skuToken),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),e.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var n=this,i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(i,t.ResourceType.Tile),(function(i,a){if(delete e.request,e.aborted)e.state=\"unloaded\",r(null);else if(i)e.state=\"errored\",r(i);else if(a){n.map._refreshExpiredTiles&&e.setExpiryData(a),delete a.cacheControl,delete a.expires;var o=n.map.painter.context,s=o.gl;e.texture=n.map.painter.getTileTexture(a.width),e.texture?e.texture.update(a,{useMipmap:!0}):(e.texture=new t.Texture(o,a,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),o.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,o.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,o.extTextureFilterAnisotropicMax)),e.state=\"loaded\",t.cacheEntryPossiblyAdded(n.dispatcher),r(null)}}))},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),L=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),this.type=\"raster-dem\",this.maxzoom=22,this._options=t.extend({type:\"raster-dem\"},n),this.encoding=n.encoding||\"mapbox\"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:\"raster-dem\",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function i(t,n){t&&(e.state=\"errored\",r(t)),n&&(e.dem=n,e.needsHillshadePrepare=!0,e.state=\"loaded\",r(null))}e.request=t.getImage(this.map._requestManager.transformRequest(n,t.ResourceType.Tile),function(n,a){if(delete e.request,e.aborted)e.state=\"unloaded\",r(null);else if(n)e.state=\"errored\",r(n);else if(a){this.map._refreshExpiredTiles&&e.setExpiryData(a),delete a.cacheControl,delete a.expires;var o=t.window.ImageBitmap&&a instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported()?a:t.browser.getImageData(a,1),s={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.actor&&\"expired\"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send(\"loadDEMTile\",s,i.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1<n&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state=\"unloaded\",t.actor&&t.actor.send(\"removeDEMTile\",{uid:t.uid,source:this.id})},r}(C),P=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.type=\"geojson\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=i.getActor(),this.setEventedParent(a),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;var o=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(n.clusterRadius||50)*o,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties},n.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData((function(r){if(r)e.fire(new t.ErrorEvent(r));else{var n={dataType:\"source\",sourceDataType:\"metadata\"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event(\"data\",n))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var n={dataType:\"source\",sourceDataType:\"content\"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event(\"data\",n))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;\"string\"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+\".loadData\",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+\".coalesce\",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?\"reloadTile\":\"loadTile\";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,\"reloadTile\"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),O=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),I=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type=\"image\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var n=this;this._loaded=!1,this.fire(new t.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;o<s.length;o+=1){var l=s[o];r=Math.min(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.x),a=Math.max(a,l.y)}var u=i-r,c=a-n,f=Math.max(u,c),h=Math.max(0,Math.floor(-Math.log(f)/Math.LN2)),p=Math.pow(2,h);return new t.CanonicalTileID(h,Math.floor((r+i)/2*p),Math.floor((n+a)/2*p))}(n),this.minzoom=this.maxzoom=this.tileID.z;var i=n.map((function(t){return r.tileID.getTilePoint(t)._round()}));return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,O.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];\"loaded\"!==i.state&&(i.state=\"loaded\",i.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state=\"errored\",e(null))},r.prototype.serialize=function(){return{type:\"image\",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),D=function(e){function r(t,r,n,i){e.call(this,t,r,n,i),this.roundZoom=!0,this.type=\"video\",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1;var r=this.options;this.urls=[];for(var n=0,i=r.urls;n<i.length;n+=1){var a=i[n];this.urls.push(this.map._requestManager.transformRequest(a,t.ResourceType.Source).url)}t.getVideo(this.urls,(function(r,n){e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):n&&(e.video=n,e.video.loop=!0,e.video.addEventListener(\"playing\",(function(){e.map.triggerRepaint()})),e.map&&e.video.play(),e._finishLoading())}))},r.prototype.pause=function(){this.video&&this.video.pause()},r.prototype.play=function(){this.video&&this.video.play()},r.prototype.seek=function(e){if(this.video){var r=this.video.seekable;e<r.start(0)||e>r.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+r.start(0)+\" and \"+r.end(0)+\"-second mark.\"))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,O.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];\"loaded\"!==i.state&&(i.state=\"loaded\",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return\"number\"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"coordinates\"'))),n.animate&&\"boolean\"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'optional \"animate\" property must be a boolean value'))),n.canvas?\"string\"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError(\"sources.\"+r,null,'missing required property \"canvas\"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error(\"Canvas dimensions cannot be less than or equal to zero.\"))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,O.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];\"loaded\"!==a.state&&(a.state=\"loaded\",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:\"canvas\",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(I),R={vector:E,raster:C,\"raster-dem\":L,geojson:P,video:D,image:I,canvas:z};function F(e,r){var n=t.identity([]);return t.translate(n,n,[1,1,0]),t.scale(n,n,[.5*e.width,.5*e.height,1]),t.multiply(n,n,e.calculatePosMatrix(r.toUnwrapped()))}function N(t,e,r,n,i,a){var o=function(t,e,r){if(t)for(var n=0,i=t;n<i.length;n+=1){var a=e[i[n]];if(a&&a.source===r&&\"fill-extrusion\"===a.type)return!0}else for(var o in e){var s=e[o];if(s.source===r&&\"fill-extrusion\"===s.type)return!0}return!1}(i&&i.layers,e,t.id),s=a.maxPitchScaleFactor(),l=t.tilesIn(n,s,o);l.sort(B);for(var u=[],c=0,f=l;c<f.length;c+=1){var h=f[c];u.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(e,r,t._state,h.queryGeometry,h.cameraQueryGeometry,h.scale,i,a,s,F(t.transform,h.tileID))})}var p=function(t){for(var e={},r={},n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.queryResults,s=a.wrappedTileID,l=r[s]=r[s]||{};for(var u in o)for(var c=o[u],f=l[u]=l[u]||{},h=e[u]=e[u]||[],p=0,d=c;p<d.length;p+=1){var g=d[p];f[g.featureIndex]||(f[g.featureIndex]=!0,h.push(g))}}return e}(u);for(var d in p)p[d].forEach((function(e){var r=e.feature,n=t.getFeatureState(r.layer[\"source-layer\"],r.id);r.source=r.layer.source,r.layer[\"source-layer\"]&&(r.sourceLayer=r.layer[\"source-layer\"]),r.state=n}));return p}function B(t,e){var r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var j=function(t,e){this.max=t,this.onRemove=e,this.reset()};j.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var n=r[e];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},j.prototype.add=function(t,e,r){var n=this,i=t.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var a={value:e,timeout:void 0};if(void 0!==r&&(a.timeout=setTimeout((function(){n.remove(t,a)}),r)),this.data[i].push(a),this.order.push(i),this.order.length>this.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},j.prototype.has=function(t){return t.wrapped().key in this.data},j.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},j.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},j.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},j.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},j.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},j.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},j.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n<i.length;n+=1){var a=i[n];t(a.value)||e.push(a)}for(var o=0,s=e;o<s.length;o+=1){var l=s[o];this.remove(l.value.tileID,l)}};var U=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};U.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},U.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},U.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var V={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\",Int32:\"INT\",Uint32:\"UNSIGNED_INT\",Float32:\"FLOAT\"},H=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};H.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},H.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},H.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var n=this.attributes[r],i=e.attributes[n.name];void 0!==i&&t.enableVertexAttribArray(i)}},H.prototype.setVertexAttribPointers=function(t,e,r){for(var n=0;n<this.attributes.length;n++){var i=this.attributes[n],a=e.attributes[i.name];void 0!==a&&t.vertexAttribPointer(a,i.components,t[V[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}},H.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var q=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};q.prototype.get=function(){return this.current},q.prototype.set=function(t){},q.prototype.getDefault=function(){return this.default},q.prototype.setDefault=function(){this.set(this.default)};var G=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(q),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(q),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(q),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),Z=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(q),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(q),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(q),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(q),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(q),tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(q),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(q),nt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(q),it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),at=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(q),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(q),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(q),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(q),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(q),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(q),ft=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(q),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(q),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(q),gt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(q),vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(q),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(q),yt=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(q),xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(q),bt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),_t=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),wt=function(t){function e(e,r){t.call(this,e),this.context=e,this.parent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e}(q),kt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(wt),Tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(wt),Mt=function(t,e,r,n){this.context=t,this.width=e,this.height=r;var i=t.gl,a=this.framebuffer=i.createFramebuffer();this.colorAttachment=new kt(t,a),n&&(this.depthAttachment=new Tt(t,a))};Mt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r)}t.deleteFramebuffer(this.framebuffer)};var At=function(t,e,r){this.func=t,this.mask=e,this.range=r};At.ReadOnly=!1,At.ReadWrite=!0,At.disabled=new At(519,At.ReadOnly,[0,1]);var St=7680,Et=function(t,e,r,n,i,a){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=a};Et.disabled=new Et({func:519,mask:0},0,0,St,St,St);var Ct=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Ct.disabled=new Ct(Ct.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),Ct.unblended=new Ct(Ct.Replace,t.Color.transparent,[!0,!0,!0,!0]),Ct.alphaBlended=new Ct([1,771],t.Color.transparent,[!0,!0,!0,!0]);var Lt=function(t,e,r){this.enable=t,this.mode=e,this.frontFace=r};Lt.disabled=new Lt(!1,1029,2305),Lt.backCCW=new Lt(!0,1029,2305);var Pt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension(\"OES_vertex_array_object\"),this.clearColor=new G(this),this.clearDepth=new Y(this),this.clearStencil=new W(this),this.colorMask=new X(this),this.depthMask=new Z(this),this.stencilMask=new K(this),this.stencilFunc=new J(this),this.stencilOp=new $(this),this.stencilTest=new Q(this),this.depthRange=new tt(this),this.depthTest=new et(this),this.depthFunc=new rt(this),this.blend=new nt(this),this.blendFunc=new it(this),this.blendColor=new at(this),this.blendEquation=new ot(this),this.cullFace=new st(this),this.cullFaceSide=new lt(this),this.frontFace=new ut(this),this.program=new ct(this),this.activeTexture=new ft(this),this.viewport=new ht(this),this.bindFramebuffer=new pt(this),this.bindRenderbuffer=new dt(this),this.bindTexture=new gt(this),this.bindVertexBuffer=new vt(this),this.bindElementBuffer=new mt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new yt(this),this.pixelStoreUnpack=new xt(this),this.pixelStoreUnpackPremultiplyAlpha=new bt(this),this.pixelStoreUnpackFlipY=new _t(this),this.extTextureFilterAnisotropic=t.getExtension(\"EXT_texture_filter_anisotropic\")||t.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||t.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension(\"OES_texture_half_float\"),this.extTextureHalfFloat&&(t.getExtension(\"OES_texture_half_float_linear\"),this.extRenderToTextureHalfFloat=t.getExtension(\"EXT_color_buffer_half_float\")),this.extTimerQuery=t.getExtension(\"EXT_disjoint_timer_query\")};Pt.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Pt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Pt.prototype.createIndexBuffer=function(t,e){return new U(this,t,e)},Pt.prototype.createVertexBuffer=function(t,e,r){return new H(this,t,e,r)},Pt.prototype.createRenderbuffer=function(t,e,r){var n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i},Pt.prototype.createFramebuffer=function(t,e,r){return new Mt(this,t,e,r)},Pt.prototype.clear=function(t){var e=t.color,r=t.depth,n=this.gl,i=0;e&&(i|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(i|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(i)},Pt.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},Pt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Pt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Pt.prototype.setColorMode=function(e){t.deepEqual(e.blendFunction,Ct.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},Pt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ot=function(e){function r(r,n,i){var a=this;e.call(this),this.id=r,this.dispatcher=i,this.on(\"data\",(function(t){\"source\"===t.dataType&&\"metadata\"===t.sourceDataType&&(a._sourceLoaded=!0),a._sourceLoaded&&!a._paused&&\"source\"===t.dataType&&\"content\"===t.sourceDataType&&(a.reload(),a.transform&&a.update(a.transform))})),this.on(\"error\",(function(){a._sourceErrored=!0})),this._source=function(e,r,n,i){var a=new R[r.type](e,r,n,i);if(a.id!==e)throw new Error(\"Expected Source id to be \"+e+\" instead of \"+a.id);return t.bindAll([\"load\",\"abort\",\"unload\",\"serialize\",\"prepare\"],a),a}(r,n,i,this),this._tiles={},this._cache=new j(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var t in this._tiles){var e=this._tiles[t];if(\"loaded\"!==e.state&&\"errored\"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,(function(){}))},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,(function(){}))},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var r=this._tiles[e];r.upload(t),r.prepare(this.map.style.imageManager)}},r.prototype.getIds=function(){return t.values(this._tiles).map((function(t){return t.tileID})).sort(It).map((function(t){return t.key}))},r.prototype.getRenderableIds=function(e){var r=this,n=[];for(var i in this._tiles)this._isIdRenderable(i,e)&&n.push(this._tiles[i]);return e?n.sort((function(e,n){var i=e.tileID,a=n.tileID,o=new t.Point(i.canonical.x,i.canonical.y)._rotate(r.transform.angle),s=new t.Point(a.canonical.x,a.canonical.y)._rotate(r.transform.angle);return i.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x})).map((function(t){return t.tileID.key})):n.map((function(t){return t.tileID})).sort(It).map((function(t){return t.key}))},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)\"errored\"!==this._tiles[t].state&&this._reloadTile(t,\"reloading\")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&(\"loading\"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,n,i){if(i)return e.state=\"errored\",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),\"expired\"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),\"raster-dem\"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event(\"data\",{dataType:\"source\",tile:e,coord:e.tileID}))},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var n=e[r];if(t.neighboringTiles&&t.neighboringTiles[n]){var i=this.getTileByID(n);a(t,i),a(i,t)}}function a(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===r&&0===n||Math.abs(n)>1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n=\"number\"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(t){return n._source.hasTile(t)})))):i=[];var a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(Dt(this._source.type)){for(var u={},c={},f=0,h=Object.keys(l);f<h.length;f+=1){var p=h[f],d=l[p],g=this._tiles[p];if(g&&!(g.fadeEndTime&&g.fadeEndTime<=t.browser.now())){var v=this.findLoadedParent(d,o);v&&(this._addTile(v.tileID),u[v.tileID.key]=v.tileID),c[p]=d}}for(var m in this._retainLoadedChildren(c,a,s,l),u)l[m]||(this._coveredTiles[m]=!0,l[m]=u[m])}for(var y in l)this._tiles[y].clearFadeHold();for(var x=0,b=t.keysDifference(this._tiles,l);x<b.length;x+=1){var _=b[x],w=this._tiles[_];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(_)}this._updateLoadedParentTileCache()}},r.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},r.prototype._updateRetainedTiles=function(t,e){for(var n={},i={},a=Math.max(e-r.maxOverzooming,this._source.minzoom),o=Math.max(e+r.maxUnderzooming,this._source.minzoom),s={},l=0,u=t;l<u.length;l+=1){var c=u[l],f=this._addTile(c);n[c.key]=c,f.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,o,n);for(var h=0,p=t;h<p.length;h+=1){var d=p[h],g=this._tiles[d.key];if(!g.hasData()){if(e+1>this._source.maxzoom){var v=d.children(this._source.maxzoom)[0],m=this.getTile(v);if(m&&m.hasData()){n[v.key]=v;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a<o.length;a+=1){var s=o[a];this._loadedParentTiles[s]=r}}},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var n=Boolean(r);return n||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event(\"dataloading\",{tile:r,coord:r.tileID,dataType:\"source\"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout((function(){r._reloadTile(t,\"expired\"),delete r._timers[t]}),n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&\"reloading\"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),u=s.map((function(t){return o.pointCoordinate(t)})),c=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,v=u;g<v.length;g+=1){var m=v[g];f=Math.min(f,m.x),h=Math.min(h,m.y),p=Math.max(p,m.x),d=Math.max(d,m.y)}for(var y=function(e){var n=i._tiles[c[e]];if(!n.holdingForFade()){var s=n.tileID,g=Math.pow(2,o.zoom-n.tileID.overscaledZ),v=r*n.queryPadding*t.EXTENT/n.tileSize/g,m=[s.getTilePoint(new t.MercatorCoordinate(f,h)),s.getTilePoint(new t.MercatorCoordinate(p,d))];if(m[0].x-v<t.EXTENT&&m[0].y-v<t.EXTENT&&m[1].x+v>=0&&m[1].y+v>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=u.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x<c.length;x++)y(x);return a},r.prototype.getVisibleCoordinates=function(t){for(var e=this,r=this.getRenderableIds(t).map((function(t){return e._tiles[t].tileID})),n=0,i=r;n<i.length;n+=1){var a=i[n];a.posMatrix=this.transform.calculatePosMatrix(a.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Dt(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||\"_geojsonTileLayer\",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||\"_geojsonTileLayer\",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,\"reloading\");this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function It(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function Dt(t){return\"raster\"===t||\"image\"===t||\"video\"===t}function zt(){return new t.window.Worker(ta.workerUrl)}Ot.maxOverzooming=10,Ot.maxUnderzooming=3;var Rt=\"mapboxgl_preloaded_worker_pool\",Ft=function(){this.active={}};Ft.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<Ft.workerCount;)this.workers.push(new zt);return this.active[t]=!0,this.workers.slice()},Ft.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach((function(t){t.terminate()})),this.workers=null)},Ft.prototype.isPreloaded=function(){return!!this.active[Rt]},Ft.prototype.numActive=function(){return Object.keys(this.active).length};var Nt,Bt=Math.floor(t.browser.hardwareConcurrency/2);function jt(){return Nt||(Nt=new Ft),Nt}function Ut(e,r){var n={};for(var i in e)\"ref\"!==i&&(n[i]=e[i]);return t.refProperties.forEach((function(t){t in r&&(n[t]=r[t])})),n}function Vt(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)\"ref\"in t[n]&&(t[n]=Ut(t[n],e[t[n].ref]));return t}Ft.workerCount=Math.max(Math.min(Bt,6),1);var Ht={setStyle:\"setStyle\",addLayer:\"addLayer\",removeLayer:\"removeLayer\",setPaintProperty:\"setPaintProperty\",setLayoutProperty:\"setLayoutProperty\",setFilter:\"setFilter\",addSource:\"addSource\",removeSource:\"removeSource\",setGeoJSONSourceData:\"setGeoJSONSourceData\",setLayerZoomRange:\"setLayerZoomRange\",setLayerProperty:\"setLayerProperty\",setCenter:\"setCenter\",setZoom:\"setZoom\",setBearing:\"setBearing\",setPitch:\"setPitch\",setSprite:\"setSprite\",setGlyphs:\"setGlyphs\",setTransition:\"setTransition\",setLight:\"setLight\"};function qt(t,e,r){r.push({command:Ht.addSource,args:[t,e[t]]})}function Gt(t,e,r){e.push({command:Ht.removeSource,args:[t]}),r[t]=!0}function Yt(t,e,r,n){Gt(t,r,n),qt(t,e,r)}function Wt(e,r,n){var i;for(i in e[n])if(e[n].hasOwnProperty(i)&&\"data\"!==i&&!t.deepEqual(e[n][i],r[n][i]))return!1;for(i in r[n])if(r[n].hasOwnProperty(i)&&\"data\"!==i&&!t.deepEqual(e[n][i],r[n][i]))return!1;return!0}function Xt(e,r,n,i,a,o){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}))}function Zt(t){return t.id}function Kt(t,e){return t[e.id]=e,t}function Jt(e,r){if(!e)return[{command:Ht.setStyle,args:[r]}];var n=[];try{if(!t.deepEqual(e.version,r.version))return[{command:Ht.setStyle,args:[r]}];t.deepEqual(e.center,r.center)||n.push({command:Ht.setCenter,args:[r.center]}),t.deepEqual(e.zoom,r.zoom)||n.push({command:Ht.setZoom,args:[r.zoom]}),t.deepEqual(e.bearing,r.bearing)||n.push({command:Ht.setBearing,args:[r.bearing]}),t.deepEqual(e.pitch,r.pitch)||n.push({command:Ht.setPitch,args:[r.pitch]}),t.deepEqual(e.sprite,r.sprite)||n.push({command:Ht.setSprite,args:[r.sprite]}),t.deepEqual(e.glyphs,r.glyphs)||n.push({command:Ht.setGlyphs,args:[r.glyphs]}),t.deepEqual(e.transition,r.transition)||n.push({command:Ht.setTransition,args:[r.transition]}),t.deepEqual(e.light,r.light)||n.push({command:Ht.setLight,args:[r.light]});var i={},a=[];!function(e,r,n,i){var a;for(a in r=r||{},e=e||{})e.hasOwnProperty(a)&&(r.hasOwnProperty(a)||Gt(a,n,i));for(a in r)r.hasOwnProperty(a)&&(e.hasOwnProperty(a)?t.deepEqual(e[a],r[a])||(\"geojson\"===e[a].type&&\"geojson\"===r[a].type&&Wt(e,r,a)?n.push({command:Ht.setGeoJSONSourceData,args:[a,r[a].data]}):Yt(a,r,n,i)):qt(a,r,n))}(e.sources,r.sources,a,i);var o=[];e.layers&&e.layers.forEach((function(t){i[t.source]?n.push({command:Ht.removeLayer,args:[t.id]}):o.push(t)})),n=n.concat(a),function(e,r,n){r=r||[];var i,a,o,s,l,u,c,f=(e=e||[]).map(Zt),h=r.map(Zt),p=e.reduce(Kt,{}),d=r.reduce(Kt,{}),g=f.slice(),v=Object.create(null);for(i=0,a=0;i<f.length;i++)o=f[i],d.hasOwnProperty(o)?a++:(n.push({command:Ht.removeLayer,args:[o]}),g.splice(g.indexOf(o,a),1));for(i=0,a=0;i<h.length;i++)o=h[h.length-1-i],g[g.length-1-i]!==o&&(p.hasOwnProperty(o)?(n.push({command:Ht.removeLayer,args:[o]}),g.splice(g.lastIndexOf(o,g.length-a),1)):a++,u=g[g.length-i],n.push({command:Ht.addLayer,args:[d[o],u]}),g.splice(g.length-i,0,o),v[o]=!0);for(i=0;i<h.length;i++)if(s=p[o=h[i]],l=d[o],!v[o]&&!t.deepEqual(s,l))if(t.deepEqual(s.source,l.source)&&t.deepEqual(s[\"source-layer\"],l[\"source-layer\"])&&t.deepEqual(s.type,l.type)){for(c in Xt(s.layout,l.layout,n,o,null,Ht.setLayoutProperty),Xt(s.paint,l.paint,n,o,null,Ht.setPaintProperty),t.deepEqual(s.filter,l.filter)||n.push({command:Ht.setFilter,args:[o,l.filter]}),t.deepEqual(s.minzoom,l.minzoom)&&t.deepEqual(s.maxzoom,l.maxzoom)||n.push({command:Ht.setLayerZoomRange,args:[o,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&\"layout\"!==c&&\"paint\"!==c&&\"filter\"!==c&&\"metadata\"!==c&&\"minzoom\"!==c&&\"maxzoom\"!==c&&(0===c.indexOf(\"paint.\")?Xt(s[c],l[c],n,o,c.slice(6),Ht.setPaintProperty):t.deepEqual(s[c],l[c])||n.push({command:Ht.setLayerProperty,args:[o,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&\"layout\"!==c&&\"paint\"!==c&&\"filter\"!==c&&\"metadata\"!==c&&\"minzoom\"!==c&&\"maxzoom\"!==c&&(0===c.indexOf(\"paint.\")?Xt(s[c],l[c],n,o,c.slice(6),Ht.setPaintProperty):t.deepEqual(s[c],l[c])||n.push({command:Ht.setLayerProperty,args:[o,c,l[c]]}))}else n.push({command:Ht.removeLayer,args:[o]}),u=g[g.lastIndexOf(o)+1],n.push({command:Ht.addLayer,args:[l,u]})}(o,r.layers,n)}catch(t){console.warn(\"Unable to compute style diff:\",t),n=[{command:Ht.setStyle,args:[r]}]}return n}var $t=function(t,e){this.reset(t,e)};$t.prototype.reset=function(t,e){this.points=t||[],this._distances=[0];for(var r=1;r<this.points.length;r++)this._distances[r]=this._distances[r-1]+this.points[r].dist(this.points[r-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding},$t.prototype.lerp=function(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);for(var r=1,n=this._distances[r],i=e*this.paddedLength+this.padding;n<i&&r<this._distances.length;)n=this._distances[++r];var a=r-1,o=this._distances[a],s=n-o,l=s>0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Qt=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a<this.xCellCount*this.yCellCount;a++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};function te(e,r,n,i,a){var o=t.create();return r?(t.scale(o,o,[1/a,1/a,1]),n||t.rotateZ(o,o,i.angle)):t.multiply(o,i.labelPlaneMatrix,e),o}function ee(e,r,n,i,a){if(r){var o=t.clone(e);return t.scale(o,o,[a,a,1]),n||t.rotateZ(o,o,-i.angle),o}return i.glCoordMatrix}function re(e,r){var n=[e.x,e.y,0,1];pe(n,n,r);var i=n[3];return{point:new t.Point(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function ne(t,e){return.5+t/e*.5}function ie(t,e){var r=t[0]/t[3],n=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ae(e,r,n,i,a,o,s,l){var u=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,n.transform.zoom),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,v=!1,m=0;m<d.length;m++){var y=d.get(m);if(y.hidden||y.writingMode===t.WritingMode.vertical&&!v)he(y.numGlyphs,h);else{v=!1;var x=[y.anchorX,y.anchorY,0,1];if(t.transformMat4(x,x,r),ie(x,f)){var b=x[3],_=ne(n.transform.cameraToCenterDistance,b),w=t.evaluateSizeForFeature(u,c,y),k=s?w/_:w*_,T=new t.Point(y.anchorX,y.anchorY),M=re(T,a).point,A={},S=le(y,k,!1,l,r,a,o,e.glyphOffsetArray,p,h,M,T,A,g);v=S.useVertical,(S.notEnoughRoom||v||S.needsFlipping&&le(y,k,!0,l,r,a,o,e.glyphOffsetArray,p,h,M,T,A,g).notEnoughRoom)&&he(y.numGlyphs,h)}else he(y.numGlyphs,h)}}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function oe(t,e,r,n,i,a,o,s,l,u,c){var f=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,p=s.lineStartIndex+s.lineLength,d=e.getoffsetX(s.glyphStartIndex),g=e.getoffsetX(f-1),v=ce(t*d,r,n,i,a,o,s.segment,h,p,l,u,c);if(!v)return null;var m=ce(t*g,r,n,i,a,o,s.segment,h,p,l,u,c);return m?{first:v,last:m}:null}function se(e,r,n,i){return e===t.WritingMode.horizontal&&Math.abs(n.y-r.y)>Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<n.y:r.x>n.x)?{needsFlipping:!0}:null}function le(e,r,n,i,a,o,s,l,u,c,f,h,p,d){var g,v=r/24,m=e.lineOffsetX*v,y=e.lineOffsetY*v;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=oe(v,l,m,y,n,f,h,e,u,o,p);if(!w)return{notEnoughRoom:!0};var k=re(w.first.point,s).point,T=re(w.last.point,s).point;if(i&&!n){var M=se(e.writingMode,k,T,d);if(M)return M}g=[w.first];for(var A=e.glyphStartIndex+1;A<x-1;A++)g.push(ce(v*l.getoffsetX(A),m,y,n,f,h,e.segment,b,_,u,o,p));g.push(w.last)}else{if(i&&!n){var S=re(h,a).point,E=e.lineStartIndex+e.segment+1,C=new t.Point(u.getx(E),u.gety(E)),L=re(C,a),P=L.signedDistanceFromCamera>0?L.point:ue(h,C,S,1,a),O=se(e.writingMode,S,P,d);if(O)return O}var I=ce(v*l.getoffsetX(e.glyphStartIndex),m,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,o,p);if(!I)return{notEnoughRoom:!0};g=[I]}for(var D=0,z=g;D<z.length;D+=1){var R=z[D];t.addDynamicAttributes(c,R.point,R.angle)}return{}}function ue(t,e,r,n,i){var a=re(t.add(t.sub(e)._unit()),i).point,o=r.sub(a);return r.add(o._mult(n/o.mag()))}function ce(e,r,n,i,a,o,s,l,u,c,f,h){var p=i?e-r:e+r,d=p>0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var v=d>0?l+s:l+s+1,m=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((v+=d)<l||v>=u)return null;if(y=m,w.push(m),void 0===(m=h[v])){var k=new t.Point(c.getx(v),c.gety(v)),T=re(k,f);if(T.signedDistanceFromCamera>0)m=h[v]=T.point;else{var M=v-d;m=ue(0===x?o:new t.Point(c.getx(M),c.gety(M)),k,y,_-x+1,f)}}x+=b,b=y.dist(m)}var A=(_-x)/b,S=m.sub(y),E=S.mult(A)._add(y);E._add(S._unit()._perp()._mult(n*d));var C=g+Math.atan2(m.y-y.y,m.x-y.x);return w.push(E),{point:E,angle:C,path:w}}Qt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Qt.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Qt.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},Qt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Qt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Qt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s<this.boxKeys.length;s++)o.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var u=this.circles[3*l],c=this.circles[3*l+1],f=this.circles[3*l+2];o.push({key:this.circleKeys[l],x1:u-f,y1:c-f,x2:u+f,y2:c+f})}return a?o.filter(a):o}var h={hitTest:i,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,r,n,this._queryCell,o,h,a),i?o.length>0:o},Qt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var u=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,u,c,i),n?u.length>0:u},Qt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Qt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Qt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Qt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,f=0,h=u;f<h.length;f+=1){var p=h[f];if(!l.box[p]){l.box[p]=!0;var d=4*p;if(t<=c[d+2]&&e<=c[d+3]&&r>=c[d+0]&&n>=c[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var v=this.circles,m=0,y=g;m<y.length;m+=1){var x=y[m];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circleAndRectCollide(v[b],v[b+1],v[b+2],t,e,r,n)&&(!s||s(this.circleKeys[x]))){if(o.hitTest)return a.push(!0),!0;var _=v[b],w=v[b+1],k=v[b+2];a.push({key:this.circleKeys[x],x1:_-k,y1:w-k,x2:_+k,y2:w+k})}}}},Qt.prototype._queryCellCircle=function(t,e,r,n,i,a,o,s){var l=o.circle,u=o.seenUids,c=this.boxCells[i];if(null!==c)for(var f=this.bboxes,h=0,p=c;h<p.length;h+=1){var d=p[h];if(!u.box[d]){u.box[d]=!0;var g=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,f[g+0],f[g+1],f[g+2],f[g+3])&&(!s||s(this.boxKeys[d])))return a.push(!0),!0}}var v=this.circleCells[i];if(null!==v)for(var m=this.circles,y=0,x=v;y<x.length;y+=1){var b=x[y];if(!u.circle[b]){u.circle[b]=!0;var _=3*b;if(this._circlesCollide(m[_],m[_+1],m[_+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[b])))return a.push(!0),!0}}},Qt.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),f=this._convertToYCellCoord(n),h=l;h<=c;h++)for(var p=u;p<=f;p++){var d=this.xCellCount*p+h;if(i.call(this,t,e,r,n,d,a,o,s))return}},Qt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Qt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Qt.prototype._circlesCollide=function(t,e,r,n,i,a){var o=n-t,s=i-e,l=r+a;return l*l>o*o+s*s},Qt.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var u=(o-i)/2,c=Math.abs(e-(i+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var f=l-s,h=c-u;return f*f+h*h<=r*r};var fe=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function he(t,e){for(var r=0;r<t;r++){var n=e.length;e.resize(n+4),e.float32.set(fe,3*n)}}function pe(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}var de=100,ge=function(t,e,r){void 0===e&&(e=new Qt(t.width+200,t.height+200,25)),void 0===r&&(r=new Qt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+de,this.screenBottomBoundary=t.height+de,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function ve(e,r,n){return r*(t.EXTENT/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}ge.prototype.placeCollisionBox=function(t,e,r,n,i){var a=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),o=r*a.perspectiveRatio,s=t.x1*o+a.point.x,l=t.y1*o+a.point.y,u=t.x2*o+a.point.x,c=t.y2*o+a.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,i)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},ge.prototype.placeCollisionCircles=function(e,r,n,i,a,o,s,l,u,c,f,h,p){var d=[],g=new t.Point(r.anchorX,r.anchorY),v=re(g,o),m=ne(this.transform.cameraToCenterDistance,v.signedDistanceFromCamera),y=(c?a/m:a*m)/t.ONE_EM,x=re(g,s).point,b=oe(y,i,r.lineOffsetX*y,r.lineOffsetY*y,!1,x,g,r,n,s,{}),_=!1,w=!1,k=!0;if(b){for(var T=.5*h*m+p,M=new t.Point(-100,-100),A=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),S=new $t,E=b.first,C=b.last,L=[],P=E.path.length-1;P>=1;P--)L.push(E.path[P]);for(var O=1;O<C.path.length;O++)L.push(C.path[O]);var I=2.5*T;if(l){var D=L.map((function(t){return re(t,l)}));L=D.some((function(t){return t.signedDistanceFromCamera<=0}))?[]:D.map((function(t){return t.point}))}var z=[];if(L.length>0){for(var R=L[0].clone(),F=L[0].clone(),N=1;N<L.length;N++)R.x=Math.min(R.x,L[N].x),R.y=Math.min(R.y,L[N].y),F.x=Math.max(F.x,L[N].x),F.y=Math.max(F.y,L[N].y);z=R.x>=M.x&&F.x<=A.x&&R.y>=M.y&&F.y<=A.y?[L]:F.x<M.x||R.x>A.x||F.y<M.y||R.y>A.y?[]:t.clipLine([L],M.x,M.y,A.x,A.y)}for(var B=0,j=z;B<j.length;B+=1){var U,V=j[B];S.reset(V,.25*T),U=S.length<=.5*T?1:Math.ceil(S.paddedLength/I)+1;for(var H=0;H<U;H++){var q=H/Math.max(U-1,1),G=S.lerp(q),Y=G.x+de,W=G.y+de;d.push(Y,W,T,0);var X=Y-T,Z=W-T,K=Y+T,J=W+T;if(k=k&&this.isOffscreen(X,Z,K,J),w=w||this.isInsideGrid(X,Z,K,J),!e&&this.grid.hitTestCircle(Y,W,T,f)&&(_=!0,!u))return{circles:[],offscreen:!1,collisionDetected:_}}}}return{circles:!u&&_||!w?[]:d,offscreen:k,collisionDetected:_}},ge.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,i=1/0,a=-1/0,o=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t.Point(u.x+de,u.y+de);n=Math.min(n,c.x),i=Math.min(i,c.y),a=Math.max(a,c.x),o=Math.max(o,c.y),r.push(c)}for(var f={},h={},p=0,d=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o));p<d.length;p+=1){var g=d[p],v=g.key;if(void 0===f[v.bucketInstanceId]&&(f[v.bucketInstanceId]={}),!f[v.bucketInstanceId][v.featureIndex]){var m=[new t.Point(g.x1,g.y1),new t.Point(g.x2,g.y1),new t.Point(g.x2,g.y2),new t.Point(g.x1,g.y2)];t.polygonIntersectsPolygon(r,m)&&(f[v.bucketInstanceId][v.featureIndex]=!0,void 0===h[v.bucketInstanceId]&&(h[v.bucketInstanceId]=[]),h[v.bucketInstanceId].push(v.featureIndex))}}return h},ge.prototype.insertCollisionBox=function(t,e,r,n,i){var a={bucketInstanceId:r,featureIndex:n,collisionGroupID:i};(e?this.ignoredGrid:this.grid).insert(a,t[0],t[1],t[2],t[3])},ge.prototype.insertCollisionCircles=function(t,e,r,n,i){for(var a=e?this.ignoredGrid:this.grid,o={bucketInstanceId:r,featureIndex:n,collisionGroupID:i},s=0;s<t.length;s+=4)a.insertCircle(o,t[s],t[s+1],t[s+2])},ge.prototype.projectAndGetPerspectiveRatio=function(e,r,n){var i=[r,n,0,1];return pe(i,i,e),{point:new t.Point((i[0]/i[3]+1)/2*this.transform.width+de,(-i[1]/i[3]+1)/2*this.transform.height+de),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},ge.prototype.isOffscreen=function(t,e,r,n){return r<de||t>=this.screenRightBoundary||n<de||e>this.screenBottomBoundary},ge.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t<this.gridRightBoundary&&n>=0&&e<this.gridBottomBoundary},ge.prototype.getViewportMatrix=function(){var e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e};var me=function(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&r?1:0,this.placed=r};me.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var ye=function(t,e,r,n,i){this.text=new me(t?t.text:null,e,r,i),this.icon=new me(t?t.icon:null,e,n,i)};ye.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var xe=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},be=function(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]},_e=function(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i},we=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};function ke(e,r,n,i,a){var o=t.getAnchorAlignment(e),s=-(o.horizontalAlign-.5)*r,l=-(o.verticalAlign-.5)*n,u=t.evaluateVariableOffset(e,i);return new t.Point(s+u[0]*a,l+u[1]*a)}function Te(e,r,n,i,a,o){var s=e.x1,l=e.x2,u=e.y1,c=e.y2,f=e.anchorPointX,h=e.anchorPointY,p=new t.Point(r,n);return i&&p._rotate(a?o:-o),{x1:s+p.x,y1:u+p.y,x2:l+p.x,y2:c+p.y,anchorPointX:f,anchorPointY:h}}we.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var Me=function(t,e,r,n){this.transform=t.clone(),this.collisionIndex=new ge(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new we(r),this.collisionCircleArrays={},this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}};function Ae(t,e,r,n,i){t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0)}Me.prototype.getBucketParts=function(e,r,n,i){var a=n.getBucket(r),o=n.latestFeatureIndex;if(a&&o&&r.id===a.layerIds[0]){var s=n.collisionBoxArray,l=a.layers[0].layout,u=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),c=n.tileSize/t.EXTENT,f=this.transform.calculatePosMatrix(n.tileID.toUnwrapped()),h=\"map\"===l.get(\"text-pitch-alignment\"),p=\"map\"===l.get(\"text-rotation-alignment\"),d=ve(n,1,this.transform.zoom),g=te(f,h,p,this.transform,d),v=null;if(h){var m=ee(f,h,p,this.transform,d);v=t.multiply([],this.transform.labelPlaneMatrix,m)}this.retainedQueryData[a.bucketInstanceId]=new _e(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,n.tileID);var y={bucket:a,layout:l,posMatrix:f,textLabelPlaneMatrix:g,labelToScreenMatrix:v,scale:u,textPixelRatio:c,holdingForFade:n.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(i)for(var x=0,b=a.sortKeyRanges;x<b.length;x+=1){var _=b[x],w=_.sortKey,k=_.symbolInstanceStart,T=_.symbolInstanceEnd;e.push({sortKey:w,symbolInstanceStart:k,symbolInstanceEnd:T,parameters:y})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:y})}},Me.prototype.attemptAnchorPlacement=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d){var g,v=[f.textOffset0,f.textOffset1],m=ke(t,r,n,v,i),y=this.collisionIndex.placeCollisionBox(Te(e,m.x,m.y,a,o,this.transform.angle),c,s,l,u.predicate);if(!d||0!==this.collisionIndex.placeCollisionBox(Te(d,m.x,m.y,a,o,this.transform.angle),c,s,l,u.predicate).box.length)return y.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:v,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:m,placedGlyphBoxes:y}):void 0},Me.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,u=a.textLabelPlaneMatrix,c=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,v=s.get(\"text-optional\"),m=s.get(\"icon-optional\"),y=s.get(\"text-allow-overlap\"),x=s.get(\"icon-allow-overlap\"),b=\"map\"===s.get(\"text-rotation-alignment\"),_=\"map\"===s.get(\"text-pitch-alignment\"),w=\"none\"!==s.get(\"icon-text-fit\"),k=\"viewport-y\"===s.get(\"symbol-z-order\"),T=y&&(x||!o.hasIconData()||m),M=x&&(y||!o.hasTextData()||v);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var A=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new xe(!1,!1,!1);else{var p,k=!1,A=!1,S=!0,E=null,C={box:null,offscreen:null},L={box:null,offscreen:null},P=null,O=null,I=0,D=0,z=0;a.textFeatureIndex?I=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(I=e.featureIndex),a.verticalTextFeatureIndex&&(D=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},N=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i<s.length&&(s[i]===t.WritingMode.vertical?(C=n(),L=C):C=r(),!(C&&C.box&&C.box.length));i+=1);else C=r()};if(s.get(\"text-variable-anchor\")){var B=s.get(\"text-variable-anchor\");if(i.prevPlacement&&i.prevPlacement.variableOffsets[e.crossTileID]){var j=i.prevPlacement.variableOffsets[e.crossTileID];B.indexOf(j.anchor)>0&&(B=B.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*B.length:B.length,d=0;d<p;++d){var v=B[d%B.length],m=d>=B.length,T=i.attemptAnchorPlacement(v,t,a,s,u,b,_,f,l,g,m,e,o,n,c);if(T&&(h=T.placedGlyphBoxes)&&h.box&&h.box.length){k=!0,E=T.shift;break}}return h};N((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=C&&C.box&&C.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),C&&(k=C.box,S=C.offscreen);var V=F(C&&C.box);if(!k&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};N((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(C&&C.box&&C.box.length)}}if(k=(p=C)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get(\"text-padding\"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,u,c,n,_,g.predicate,X,W),k=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(z=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&E?Te(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};A=L&&L.box&&L.box.length&&a.verticalIconBox?(O=Z(a.verticalIconBox)).box.length>0:(O=Z(a.iconBox)).box.length>0,S=S&&O.offscreen}var K=v||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,J=m||0===e.numIconVertices;if(K||J?J?K||(A=A&&k):k=A&&k:A=k=A&&k,k&&p&&p.box&&(L&&L.box&&D?i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,D,g.ID):i.collisionIndex.insertCollisionBox(p.box,s.get(\"text-ignore-placement\"),o.bucketInstanceId,I,g.ID)),A&&O&&i.collisionIndex.insertCollisionBox(O.box,s.get(\"icon-ignore-placement\"),o.bucketInstanceId,z,g.ID),P&&(k&&i.collisionIndex.insertCollisionCircles(P.circles,s.get(\"text-ignore-placement\"),o.bucketInstanceId,I,g.ID),n)){var $=o.bucketInstanceId,Q=i.collisionCircleArrays[$];void 0===Q&&(Q=i.collisionCircleArrays[$]=new be);for(var tt=0;tt<P.circles.length;tt+=4)Q.circles.push(P.circles[tt+0]),Q.circles.push(P.circles[tt+1]),Q.circles.push(P.circles[tt+2]),Q.circles.push(P.collisionDetected?1:0)}i.placements[e.crossTileID]=new xe(k||T,A||M,S||o.justReloaded),r[e.crossTileID]=!0}};if(k)for(var S=o.getSortedSymbolIndexes(this.transform.angle),E=S.length-1;E>=0;--E){var C=S[E];A(o.symbolInstances.get(C),o.collisionArrays[C])}else for(var L=e.symbolInstanceStart;L<e.symbolInstanceEnd;L++)A(o.symbolInstances.get(L),o.collisionArrays[L]);if(n&&o.bucketInstanceId in this.collisionCircleArrays){var P=this.collisionCircleArrays[o.bucketInstanceId];t.invert(P.invProjMatrix,l),P.viewportMatrix=this.collisionIndex.getViewportMatrix()}o.justReloaded=!1},Me.prototype.markUsedJustification=function(e,r,n,i){var a,o={left:n.leftJustifiedTextSymbolIndex,center:n.centerJustifiedTextSymbolIndex,right:n.rightJustifiedTextSymbolIndex};a=i===t.WritingMode.vertical?n.verticalPlacedTextSymbolIndex:o[t.getAnchorJustification(r)];for(var s=0,l=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex,n.verticalPlacedTextSymbolIndex];s<l.length;s+=1){var u=l[s];u>=0&&(e.text.placedSymbolArray.get(u).crossTileID=a>=0&&u!==a?0:n.crossTileID)}},Me.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o<s.length;o+=1){var l=s[o];e.text.placedSymbolArray.get(l).placedOrientation=i}n.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=a)},Me.prototype.commit=function(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;var e=this.prevPlacement,r=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;var n=e?e.symbolFadeChange(t):1,i=e?e.opacities:{},a=e?e.variableOffsets:{},o=e?e.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],u=i[s];u?(this.opacities[s]=new ye(u,n,l.text,l.icon),r=r||l.text!==u.text.placed||l.icon!==u.icon.placed):(this.opacities[s]=new ye(null,n,l.text,l.icon,l.skipFade),r=r||l.text||l.icon)}for(var c in i){var f=i[c];if(!this.opacities[c]){var h=new ye(f,n,!1,!1);h.isHidden()||(this.opacities[c]=h,r=r||f.text.placed||f.icon.placed)}}for(var p in a)this.variableOffsets[p]||!this.opacities[p]||this.opacities[p].isHidden()||(this.variableOffsets[p]=a[p]);for(var d in o)this.placedOrientations[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.placedOrientations[d]=o[d]);r?this.lastPlacementChangeTime=t:\"number\"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},Me.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n<i.length;n+=1){var a=i[n],o=a.getBucket(t);o&&a.latestFeatureIndex&&t.id===o.layerIds[0]&&this.updateBucketOpacities(o,r,a.collisionBoxArray)}},Me.prototype.updateBucketOpacities=function(e,r,n){var i=this;e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();var a=e.layers[0].layout,o=new ye(null,0,!1,!1,!0),s=a.get(\"text-allow-overlap\"),l=a.get(\"icon-allow-overlap\"),u=a.get(\"text-variable-anchor\"),c=\"map\"===a.get(\"text-rotation-alignment\"),f=\"map\"===a.get(\"text-pitch-alignment\"),h=\"none\"!==a.get(\"icon-text-fit\"),p=new ye(null,0,s&&(l||!e.hasIconData()||a.get(\"icon-optional\")),l&&(s||!e.hasTextData()||a.get(\"text-optional\")),!0);!e.collisionArrays&&n&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(n);for(var d=function(t,e,r){for(var n=0;n<e/4;n++)t.opacityVertexArray.emplaceBack(r)},g=function(n){var a=e.symbolInstances.get(n),s=a.numHorizontalGlyphVertices,l=a.numVerticalGlyphVertices,g=a.crossTileID,v=r[g],m=i.opacities[g];v?m=o:m||(m=p,i.opacities[g]=m),r[g]=!0;var y=s>0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var k=De(m.text),T=_?ze:k;d(e.text,s,T);var M=w?ze:k;d(e.text,l,M);var A=m.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=A||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=A||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,\"left\",a,E),i.markUsedOrientation(e,E,a))}if(x){var C=De(m.icon),L=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=L?C:ze;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=m.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var O=L?ze:C;d(e.icon,a.numVerticalIconVertices,O),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=m.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var I=e.collisionArrays[n];if(I){var D=new t.Point(0,0);if(I.textBox||I.verticalTextBox){var z=!0;if(u){var R=i.variableOffsets[g];R?(D=ke(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),c&&D._rotate(f?i.transform.angle:-i.transform.angle)):z=!1}I.textBox&&Ae(e.textCollisionBox.collisionVertexArray,m.text.placed,!z||_,D.x,D.y),I.verticalTextBox&&Ae(e.textCollisionBox.collisionVertexArray,m.text.placed,!z||w,D.x,D.y)}var F=Boolean(!w&&I.verticalIconBox);I.iconBox&&Ae(e.iconCollisionBox.collisionVertexArray,m.icon.placed,F,h?D.x:0,h?D.y:0),I.verticalIconBox&&Ae(e.iconCollisionBox.collisionVertexArray,m.icon.placed,!F,h?D.x:0,h?D.y:0)}}},v=0;v<e.symbolInstances.length;v++)g(v);if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){var m=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=m.invProjMatrix,e.placementViewportMatrix=m.viewportMatrix,e.collisionCircleArray=m.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},Me.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Me.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},Me.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},Me.prototype.stillRecent=function(t,e){var r=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*r>t},Me.prototype.setStale=function(){this.stale=!0};var Se=Math.pow(2,25),Ee=Math.pow(2,24),Ce=Math.pow(2,17),Le=Math.pow(2,16),Pe=Math.pow(2,9),Oe=Math.pow(2,8),Ie=Math.pow(2,1);function De(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Se+e*Ee+r*Ce+e*Le+r*Pe+e*Oe+r*Ie+e}var ze=0,Re=function(t){this._sortAcrossTiles=\"viewport-y\"!==t.layout.get(\"symbol-z-order\")&&void 0!==t.layout.get(\"symbol-sort-key\").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Re.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.getBucketParts(a,n,o,this._sortAcrossTiles),this._currentTileIndex++,i())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,a.sort((function(t,e){return t.sortKey-e.sortKey})));this._currentPartIndex<a.length;){var s=a[this._currentPartIndex];if(e.placeLayerBucketPart(s,this._seenCrossTileIDs,r),this._currentPartIndex++,i())return!0}return!1};var Fe=function(t,e,r,n,i,a,o){this.placement=new Me(t,i,a,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};Fe.prototype.isDone=function(){return this._done},Fe.prototype.continuePlacement=function(e,r,n){for(var i=this,a=t.browser.now(),o=function(){var e=t.browser.now()-a;return!i._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if(\"symbol\"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Re(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Fe.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Ne=512/t.EXTENT/2,Be=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;n<e.length;n++){var i=e.get(n),a=i.key;this.indexedSymbolInstances[a]||(this.indexedSymbolInstances[a]=[]),this.indexedSymbolInstances[a].push({crossTileID:i.crossTileID,coord:this.getScaledCoordinates(i,t)})}};Be.prototype.getScaledCoordinates=function(e,r){var n=r.canonical.z-this.tileID.canonical.z,i=Ne/Math.pow(2,n);return{x:Math.floor((r.canonical.x*t.EXTENT+e.anchorX)*i),y:Math.floor((r.canonical.y*t.EXTENT+e.anchorY)*i)}},Be.prototype.findMatches=function(t,e,r){for(var n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0;i<t.length;i++){var a=t.get(i);if(!a.crossTileID){var o=this.indexedSymbolInstances[a.key];if(o)for(var s=this.getScaledCoordinates(a,e),l=0,u=o;l<u.length;l+=1){var c=u[l];if(Math.abs(c.coord.x-s.x)<=n&&Math.abs(c.coord.y-s.y)<=n&&!r[c.crossTileID]){r[c.crossTileID]=!0,a.crossTileID=c.crossTileID;break}}}}};var je=function(){this.maxCrossTileID=0};je.prototype.generate=function(){return++this.maxCrossTileID};var Ue=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Ue.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var n=this.indexes[r],i={};for(var a in n){var o=n[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+e),i[o.tileID.key]=o}this.indexes[r]=i}this.lng=t},Ue.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var n=0;n<e.symbolInstances.length;n++)e.symbolInstances.get(n).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var i=this.usedCrossTileIDs[t.overscaledZ];for(var a in this.indexes){var o=this.indexes[a];if(Number(a)>t.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var u=o[t.scaledTo(Number(a)).key];u&&u.findMatches(e.symbolInstances,t,i)}}for(var c=0;c<e.symbolInstances.length;c++){var f=e.symbolInstances.get(c);f.crossTileID||(f.crossTileID=r.generate(),i[f.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Be(t,e.symbolInstances,e.bucketInstanceId),!0},Ue.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var n=0,i=e.indexedSymbolInstances[r];n<i.length;n+=1){var a=i[n];delete this.usedCrossTileIDs[t][a.crossTileID]}},Ue.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var n=this.indexes[r];for(var i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e};var Ve=function(){this.layerIndexes={},this.crossTileIDs=new je,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ve.prototype.addLayer=function(t,e,r){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new Ue);var i=!1,a={};n.handleWrapJump(r);for(var o=0,s=e;o<s.length;o+=1){var l=s[o],u=l.getBucket(t);u&&t.id===u.layerIds[0]&&(u.bucketInstanceId||(u.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,u,this.crossTileIDs)&&(i=!0),a[u.bucketInstanceId]=!0)}return n.removeStaleBuckets(a)&&(i=!0),i},Ve.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach((function(t){e[t]=!0})),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var He=function(e,r){return t.emitValidationErrors(e,r&&r.filter((function(t){return\"source.canvas\"!==t.identifier})))},qe=t.pick(Ht,[\"addLayer\",\"removeLayer\",\"setPaintProperty\",\"setLayoutProperty\",\"setFilter\",\"addSource\",\"removeSource\",\"setLayerZoomRange\",\"setLight\",\"setTransition\",\"setGeoJSONSourceData\"]),Ge=t.pick(Ht,[\"setCenter\",\"setZoom\",\"setBearing\",\"setPitch\"]),Ye=function(){var e={},r=t.styleSpec.$version;for(var n in t.styleSpec.$root){var i,a=t.styleSpec.$root[n];if(a.required)null!=(i=\"version\"===n?r:\"array\"===a.type?[]:{})&&(e[n]=i)}return e}(),We=function(e){function r(n,i){var a=this;void 0===i&&(i={}),e.call(this),this.map=n,this.dispatcher=new M(jt(),this),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new x(n._requestManager,i.localIdeographFontFamily),this.lineAtlas=new T(256,512),this.crossTileSymbolIndex=new Ve,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast(\"setReferrer\",t.getReferrer());var o=this;this._rtlTextPluginCallback=r.registerForPluginStateChange((function(e){var r={pluginStatus:e.pluginStatus,pluginURL:e.pluginURL};o.dispatcher.broadcast(\"syncRTLPluginState\",r,(function(e,r){if(t.triggerPluginCompletionEvent(e),r&&r.every((function(t){return t})))for(var n in o.sourceCaches)o.sourceCaches[n].reload()}))})),this.on(\"data\",(function(t){if(\"source\"===t.dataType&&\"metadata\"===t.sourceDataType){var e=a.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var n in a._layers){var i=a._layers[n];i.source===r.id&&a._validateLayer(i)}}}}))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event(\"dataloading\",{dataType:\"style\"}));var i=\"boolean\"==typeof r.validate?r.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,r.accessToken);var a=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(a,(function(e,r){n._request=null,e?n.fire(new t.ErrorEvent(e)):r&&n._load(r,i)}))},r.prototype.loadJSON=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event(\"dataloading\",{dataType:\"style\"})),this._request=t.browser.frame((function(){n._request=null,n._load(e,!1!==r.validate)}))},r.prototype.loadEmpty=function(){this.fire(new t.Event(\"dataloading\",{dataType:\"style\"})),this._load(Ye,!1)},r.prototype._load=function(e,r){if(!r||!He(this,t.validateStyle(e))){for(var n in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(n,e.sources[n],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=Vt(this.stylesheet.layers);this._order=i.map((function(t){return t.id})),this._layers={},this._serializedLayers={};for(var a=0,o=i;a<o.length;a+=1){var s=o[a];(s=t.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast(\"setLayers\",this._serializeLayers(this._order)),this.light=new k(this.stylesheet.light),this.fire(new t.Event(\"data\",{dataType:\"style\"})),this.fire(new t.Event(\"style.load\"))}},r.prototype._loadSprite=function(e){var r=this;this._spriteRequest=function(e,r,n){var i,a,o,s=t.browser.devicePixelRatio>1?\"@2x\":\"\",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,\".json\"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,c())})),u=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,\".png\"),t.ResourceType.SpriteImage),(function(t,e){u=null,o||(o=t,a=e,c())}));function c(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],u=l.width,c=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,v=l.stretchY,m=l.content,y=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:u,height:c}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:v,content:m}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast(\"setImages\",r._availableImages),r.fire(new t.Event(\"data\",{dataType:\"style\"}))}))},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();(\"geojson\"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer \"'+n+'\" does not exist on source \"'+i.id+'\" as specified by style layer \"'+e.id+'\"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,n=t;r<n.length;r+=1){var i=n[r],a=this._layers[i];\"custom\"!==a.type&&e.push(a.serialize())}return e},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},r.prototype.update=function(e){if(this._loaded){var r=this._changed;if(this._changed){var n=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(var a in(n.length||i.length)&&this._updateWorkerLayers(n,i),this._updatedSources){var o=this._updatedSources[a];\"reload\"===o?this._reloadSource(a):\"clear\"===o&&this._clearSource(a)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var u=0,c=this._order;u<c.length;u+=1){var f=c[u],h=this._layers[f];h.recalculate(e,this._availableImages),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,r&&this.fire(new t.Event(\"data\",{dataType:\"style\"}))}},r.prototype._updateTilesForChangedImages=function(){var t=Object.keys(this._changedImages);if(t.length){for(var e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies([\"icons\",\"patterns\"],t);this._changedImages={}}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),He(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=Vt(e.layers);var n=Jt(this.serialize(),e).filter((function(t){return!(t.command in Ge)}));if(0===n.length)return!1;var i=n.filter((function(t){return!(t.command in qe)}));if(i.length>0)throw new Error(\"Unimplemented: \"+i.map((function(t){return t.command})).join(\", \")+\".\");return n.forEach((function(t){\"setTransition\"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\"An image with this name already exists.\")));this.imageManager.addImage(e,r),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error(\"No image with this name exists.\")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event(\"data\",{dataType:\"style\"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\"There is already a source with this ID\");if(!r.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(r).join(\", \")+\".\");if(!([\"vector\",\"raster\",\"geojson\",\"video\",\"image\"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,\"sources.\"+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Ot(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\"There is no source with this ID\");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source \"'+e+'\" cannot be removed while layer \"'+r+'\" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event(\"data\",{sourceDataType:\"metadata\",dataType:\"source\",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id \"'+i+'\" already exists on this map')));else{var a;if(\"custom\"===e.type){if(He(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id \"'+r+'\" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&\"custom\"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]=\"clear\":(this._updatedSources[a.source]=\"reload\",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id \"'+r+'\" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be moved.\")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be removed.\")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot have zoom extent.\")))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,\"layers.\"+i.id+\".filter\",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be filtered.\")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style.\")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;\"geojson\"===o&&i?this.fire(new t.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):\"vector\"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o=\"vector\"===a?e.sourceLayer:void 0;\"vector\"!==a||o?r&&\"string\"!=typeof e.id&&\"number\"!=typeof e.id?this.fire(new t.ErrorEvent(new Error(\"A feature id is requred to remove its specific state property.\"))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+n+\"' does not exist in the map's style.\")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if(\"vector\"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}else this.fire(new t.ErrorEvent(new Error(\"The source '\"+r+\"' does not exist in the map's style.\")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&\"raster\"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]=\"reload\",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return\"fill-extrusion\"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s<l.length;s+=1){var u=l[s][o];if(u)for(var c=0,f=u;c<f.length;c+=1){var h=f[c];i.push(h)}}}}i.sort((function(t,e){return e.intersectionZ-t.intersectionZ}));for(var p=[],d=this._order.length-1;d>=0;d--){var g=this._order[d];if(r(g))for(var v=i.length-1;v>=0;v--){var m=i[v].feature;if(n[m.layer.id]<d)break;p.push(m),i.pop()}else for(var y=0,x=t;y<x.length;y+=1){var b=x[y][g];if(b)for(var _=0,w=b;_<w.length;_+=1){var k=w[_];p.push(k.feature)}}}return p},r.prototype.queryRenderedFeatures=function(e,r,n){r&&r.filter&&this._validate(t.validateStyle.filter,\"queryRenderedFeatures.filter\",r.filter,null,r);var i={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error(\"parameters.layers must be an Array.\"))),[];for(var a=0,o=r.layers;a<o.length;a+=1){var s=o[a],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error(\"The layer '\"+s+\"' does not exist in the map's style and cannot be queried for features.\"))),[];i[l.source]=!0}}var u=[];for(var c in r.availableImages=this._availableImages,this.sourceCaches)r.layers&&!i[c]||u.push(N(this.sourceCaches[c],this._layers,this._serializedLayers,e,r,n));return this.placement&&u.push(function(t,e,r,n,i,a,o){for(var s={},l=a.queryRenderedSymbols(n),u=[],c=0,f=Object.keys(l).map(Number);c<f.length;c+=1){var h=f[c];u.push(o[h])}u.sort(B);for(var p=function(){var r=g[d],n=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],e,r.bucketIndex,r.sourceLayerIndex,i.filter,i.layers,i.availableImages,t);for(var a in n){var o=s[a]=s[a]||[],u=n[a];u.sort((function(t,e){var n=r.featureSortOrder;if(n){var i=n.indexOf(t.featureIndex);return n.indexOf(e.featureIndex)-i}return e.featureIndex-t.featureIndex}));for(var c=0,f=u;c<f.length;c+=1){var h=f[c];o.push(h)}}},d=0,g=u;d<g.length;d+=1)p();var v=function(e){s[e].forEach((function(n){var i=n.feature,a=t[e],o=r[a.source].getFeatureState(i.layer[\"source-layer\"],i.id);i.source=i.layer.source,i.layer[\"source-layer\"]&&(i.sourceLayer=i.layer[\"source-layer\"]),i.state=o}))};for(var m in s)v(m);return s}(this._layers,this._serializedLayers,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,\"querySourceFeatures.filter\",r.filter,null,r);var n=this.sourceCaches[e];return n?function(t,e){for(var r=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),n=[],i={},a=0;a<r.length;a++){var o=r[a],s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(n,e))}return n}(n,r):[]},r.prototype.addSourceType=function(t,e,n){return r.getSourceType(t)?n(new Error('A source type called \"'+t+'\" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(\"loadWorkerSource\",{name:t,url:e.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e,r){void 0===r&&(r={}),this._checkLoaded();var n=this.light.getLight(),i=!1;for(var a in e)if(!t.deepEqual(e[a],n[a])){i=!0;break}if(i){var o={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(o)}},r.prototype._validate=function(e,r,n,i,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&He(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:n,styleSpec:t.styleSpec},i)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off(\"pluginStateChange\",this._rtlTextPluginCallback),this._layers)this._layers[e].setEventedParent(null);for(var r in this.sourceCaches)this.sourceCaches[r].clearTiles(),this.sourceCaches[r].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,n,i,a){void 0===a&&(a=!1);for(var o=!1,s=!1,l={},u=0,c=this._order;u<c.length;u+=1){var f=c[u],h=this._layers[f];if(\"symbol\"===h.type){if(!l[h.source]){var p=this.sourceCaches[h.source];l[h.source]=p.getRenderableIds(!0).map((function(t){return p.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}))}var d=this.crossTileSymbolIndex.addLayer(h,l[h.source],e.center.lng);o=o||d}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((a=a||this._layerOrderChanged||0===n)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new Fe(e,this._order,a,r,n,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),o&&this.pauseablePlacement.placement.setStale()),s||o)for(var g=0,v=this._order;g<v.length;g+=1){var m=v[g],y=this._layers[m];\"symbol\"===y.type&&this.placement.updateLayerOpacities(y,l[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r),this._updateTilesForChangedImages();var n=this.sourceCaches[e.source];n&&n.setDependencies(e.tileID.key,e.type,e.icons)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r.prototype.getResource=function(e,r,n){return t.makeRequest(r,n)},r}(t.Evented);We.getSourceType=function(t){return R[t]},We.setSourceType=function(t,e){R[t]=e},We.registerForPluginStateChange=t.registerForPluginStateChange;var Xe=t.createLayout([{name:\"a_pos\",type:\"Int16\",components:2}]),Ze=_r(\"#ifdef GL_ES\\nprecision mediump float;\\n#else\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n#if !defined(highp)\\n#define highp\\n#endif\\n#endif\",\"#ifdef GL_ES\\nprecision highp float;\\n#else\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n#if !defined(highp)\\n#define highp\\n#endif\\n#endif\\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\"),Ke=_r(\"uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\"),Je=_r(\"uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}\"),$e=_r(\"varying vec3 v_data;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize mediump float radius\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize highp vec4 stroke_color\\n#pragma mapbox: initialize mediump float stroke_width\\n#pragma mapbox: initialize lowp float stroke_opacity\\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define highp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\nvoid main(void) {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize mediump float radius\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize highp vec4 stroke_color\\n#pragma mapbox: initialize mediump float stroke_width\\n#pragma mapbox: initialize lowp float stroke_opacity\\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}\"),Qe=_r(\"void main() {gl_FragColor=vec4(1.0);}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\"),tr=_r(\"uniform highp float u_intensity;varying vec2 v_extrude;\\n#pragma mapbox: define highp float weight\\n#define GAUSS_COEF 0.3989422804014327\\nvoid main() {\\n#pragma mapbox: initialize highp float weight\\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\\n#pragma mapbox: define highp float weight\\n#pragma mapbox: define mediump float radius\\nconst highp float ZERO=1.0/255.0/16.0;\\n#define GAUSS_COEF 0.3989422804014327\\nvoid main(void) {\\n#pragma mapbox: initialize highp float weight\\n#pragma mapbox: initialize mediump float radius\\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}\"),er=_r(\"uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(0.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}\"),rr=_r(\"varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),nr=_r(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),ir=_r(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\"),ar=_r(\"#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_FragColor=color*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);}\"),or=_r(\"varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\\n#pragma mapbox: define highp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 outline_color\\n#pragma mapbox: initialize lowp float opacity\\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),sr=_r(\"uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}\"),lr=_r(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}\"),ur=_r(\"varying vec4 v_color;void main() {gl_FragColor=v_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\\n#pragma mapbox: define highp float base\\n#pragma mapbox: define highp float height\\n#pragma mapbox: define highp vec4 color\\nvoid main() {\\n#pragma mapbox: initialize highp float base\\n#pragma mapbox: initialize highp float height\\n#pragma mapbox: initialize highp vec4 color\\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}\"),cr=_r(\"uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float base\\n#pragma mapbox: initialize lowp float height\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\\n? a_pos\\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}\"),fr=_r(\"#ifdef GL_ES\\nprecision highp float;\\n#endif\\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),hr=_r(\"uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\\n#define PI 3.141592653589793\\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),pr=_r(\"uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),dr=_r(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define MAX_LINE_DISTANCE 32767.0\\n#define scale 0.015873016\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}\"),gr=_r(\"uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\n#pragma mapbox: define lowp vec4 pattern_from\\n#pragma mapbox: define lowp vec4 pattern_to\\n#pragma mapbox: define lowp float pixel_ratio_from\\n#pragma mapbox: define lowp float pixel_ratio_to\\nvoid main() {\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\n#pragma mapbox: initialize mediump vec4 pattern_from\\n#pragma mapbox: initialize mediump vec4 pattern_to\\n#pragma mapbox: initialize lowp float pixel_ratio_from\\n#pragma mapbox: initialize lowp float pixel_ratio_to\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}\"),vr=_r(\"uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"\\n#define scale 0.015873016\\n#define LINE_DISTANCE_SCALE 2.0\\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\\n#pragma mapbox: define highp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float width\\n#pragma mapbox: define lowp float floorwidth\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 color\\n#pragma mapbox: initialize lowp float blur\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize mediump float gapwidth\\n#pragma mapbox: initialize lowp float offset\\n#pragma mapbox: initialize mediump float width\\n#pragma mapbox: initialize lowp float floorwidth\\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}\"),mr=_r(\"uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),yr=_r(\"uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\\n#pragma mapbox: define lowp float opacity\\nvoid main() {\\n#pragma mapbox: initialize lowp float opacity\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}\"),xr=_r(\"#define SDF_PX 8.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}\"),br=_r(\"#define SDF_PX 8.0\\n#define SDF 1.0\\n#define ICON 0.0\\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\\n#ifdef OVERDRAW_INSPECTOR\\ngl_FragColor=vec4(1.0);\\n#endif\\n}\",\"const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\\n#pragma mapbox: define highp vec4 fill_color\\n#pragma mapbox: define highp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\nvoid main() {\\n#pragma mapbox: initialize highp vec4 fill_color\\n#pragma mapbox: initialize highp vec4 halo_color\\n#pragma mapbox: initialize lowp float opacity\\n#pragma mapbox: initialize lowp float halo_width\\n#pragma mapbox: initialize lowp float halo_blur\\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\\ncamera_to_anchor_distance/u_camera_to_center_distance :\\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}\");function _r(t,e){var r=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"\\n#ifdef HAS_UNIFORM_u_\"+a+\"\\n    \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o=\"float\"===i?\"vec2\":\"vec4\",s=a.match(/color/)?\"color\":o;return n[a]?\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\nvarying \"+r+\" \"+i+\" \"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n    \"+a+\" = a_\"+a+\";\\n#else\\n    \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n    \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n    \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"define\"===e?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\nuniform lowp float u_\"+a+\"_t;\\nattribute \"+r+\" \"+o+\" a_\"+a+\";\\n#else\\nuniform \"+r+\" \"+i+\" u_\"+a+\";\\n#endif\\n\":\"vec4\"===s?\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n    \"+r+\" \"+i+\" \"+a+\" = a_\"+a+\";\\n#else\\n    \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\":\"\\n#ifndef HAS_UNIFORM_u_\"+a+\"\\n    \"+r+\" \"+i+\" \"+a+\" = unpack_mix_\"+s+\"(a_\"+a+\", u_\"+a+\"_t);\\n#else\\n    \"+r+\" \"+i+\" \"+a+\" = u_\"+a+\";\\n#endif\\n\"}))}}var wr=Object.freeze({__proto__:null,prelude:Ze,background:Ke,backgroundPattern:Je,circle:$e,clippingMask:Qe,heatmap:tr,heatmapTexture:er,collisionBox:rr,collisionCircle:nr,debug:ir,fill:ar,fillOutline:or,fillOutlinePattern:sr,fillPattern:lr,fillExtrusion:ur,fillExtrusionPattern:cr,hillshadePrepare:fr,hillshade:hr,line:pr,lineGradient:dr,linePattern:gr,lineSDF:vr,raster:mr,symbolIcon:yr,symbolSDF:xr,symbolTextAndIcon:br}),kr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};kr.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,u=0;!l&&u<n.length;u++)this.boundPaintVertexBuffers[u]!==n[u]&&(l=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==a||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,r,n,i,a,o,s):(t.bindVertexArrayOES.set(this.vao),o&&o.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},kr.prototype.freshBind=function(t,e,r,n,i,a,o){var s,l=t.numAttributes,u=this.context,c=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=o;else{s=u.currentNumAttributes||0;for(var f=l;f<s;f++)c.disableVertexAttribArray(f)}e.enableAttributes(c,t);for(var h=0,p=r;h<p.length;h+=1)p[h].enableAttributes(c,t);a&&a.enableAttributes(c,t),o&&o.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i);for(var d=0,g=r;d<g.length;d+=1){var v=g[d];v.bind(),v.setVertexAttribPointers(c,t,i)}a&&(a.bind(),a.setVertexAttribPointers(c,t,i)),n&&n.bind(),o&&(o.bind(),o.setVertexAttribPointers(c,t,i)),u.currentNumAttributes=l},kr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Tr=function(t,e,r,n,i){var a=t.gl;this.program=a.createProgram();var o=r?r.defines():[];i&&o.push(\"#define OVERDRAW_INSPECTOR;\");var s=o.concat(Ze.fragmentSource,e.fragmentSource).join(\"\\n\"),l=o.concat(Ze.vertexSource,e.vertexSource).join(\"\\n\"),u=a.createShader(a.FRAGMENT_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(u,s),a.compileShader(u),a.attachShader(this.program,u);var c=a.createShader(a.VERTEX_SHADER);if(a.isContextLost())this.failedToCreate=!0;else{a.shaderSource(c,l),a.compileShader(c),a.attachShader(this.program,c);for(var f=r?r.layoutAttributes:[],h=0;h<f.length;h++)a.bindAttribLocation(this.program,h,f[h].name);a.linkProgram(this.program),a.deleteShader(c),a.deleteShader(u),this.numAttributes=a.getProgramParameter(this.program,a.ACTIVE_ATTRIBUTES),this.attributes={};for(var p={},d=0;d<this.numAttributes;d++){var g=a.getActiveAttrib(this.program,d);g&&(this.attributes[g.name]=a.getAttribLocation(this.program,g.name))}for(var v=a.getProgramParameter(this.program,a.ACTIVE_UNIFORMS),m=0;m<v;m++){var y=a.getActiveUniform(this.program,m);y&&(p[y.name]=a.getUniformLocation(this.program,y.name))}this.fixedUniforms=n(t,p),this.binderUniforms=r?r.getUniforms(t,p):[]}}};function Mr(t,e,r){var n=1/ve(r,1,e.transform.tileZoom),i=Math.pow(2,r.tileID.overscaledZ),a=r.tileSize*Math.pow(2,e.transform.tileZoom)/i,o=a*(r.tileID.canonical.x+r.tileID.wrap*i),s=a*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[n,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[o>>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}Tr.prototype.draw=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g){var v,m=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(v={},v[m.LINES]=2,v[m.TRIANGLES]=3,v[m.LINE_STRIP]=1,v)[e],b=0,_=c.get();b<_.length;b+=1){var w=_[b],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new kr)).bind(t,this,l,p?p.getPaintVertexBuffers():[],u,w.vertexOffset,d,g),m.drawElements(e,w.primitiveLength*x,m.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Ar=function(e,r,n,i){var a=r.style.light,o=a.properties.get(\"position\"),s=[o.x,o.y,o.z],l=t.create$1();\"viewport\"===a.properties.get(\"anchor\")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var u=a.properties.get(\"color\");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get(\"intensity\"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+n,u_opacity:i}},Sr=function(e,r,n,i,a,o,s){return t.extend(Ar(e,r,n,i),Mr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Er=function(t){return{u_matrix:t}},Cr=function(e,r,n,i){return t.extend(Er(e),Mr(n,r,i))},Lr=function(t,e){return{u_matrix:t,u_world:e}},Pr=function(e,r,n,i,a){return t.extend(Cr(e,r,n,i),{u_world:a})},Or=function(e,r,n,i){var a,o,s=e.transform;if(\"map\"===i.paint.get(\"circle-pitch-alignment\")){var l=ve(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+(\"map\"===i.paint.get(\"circle-pitch-scale\")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get(\"circle-translate\"),i.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Ir=function(t,e,r){var n=ve(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Dr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},zr=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Rr=function(t){return{u_matrix:t}},Fr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:ve(e,1,r),u_intensity:n}},Nr=function(e,r,n){var i=e.transform;return{u_matrix:Hr(e,r,n),u_ratio:1/ve(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Br=function(e,r,n){return t.extend(Nr(e,r,n),{u_image:0})},jr=function(e,r,n,i){var a=e.transform,o=Vr(r,a);return{u_matrix:Hr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ve(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Ur=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=Vr(r,o),u=\"round\"===n.layout.get(\"line-cap\"),c=s.getDash(i.from,u),f=s.getDash(i.to,u),h=c.width*a.fromScale,p=f.width*a.toScale;return t.extend(Nr(e,r,n),{u_patternscale_a:[l/h,-c.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:f.y,u_mix:a.t})};function Vr(t,e){return 1/ve(t,1,e.tileZoom)}function Hr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get(\"line-translate\"),r.paint.get(\"line-translate-anchor\"))}var qr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get(\"raster-brightness-min\"),u_brightness_high:i.paint.get(\"raster-brightness-max\"),u_saturation_factor:(o=i.paint.get(\"raster-saturation\"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get(\"raster-contrast\"),a>0?1/(1-a):1+a),u_spin_weights:Gr(i.paint.get(\"raster-hue-rotate\"))};var a,o};function Gr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var Yr,Wr=function(t,e,r,n,i,a,o,s,l,u){var c=i.transform;return{u_is_size_zoom_constant:+(\"constant\"===t||\"source\"===t),u_is_size_feature_constant:+(\"constant\"===t||\"camera\"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},Xr=function(e,r,n,i,a,o,s,l,u,c,f){var h=a.transform;return t.extend(Wr(e,r,n,i,a,o,s,l,u,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Zr=function(e,r,n,i,a,o,s,l,u,c){return t.extend(Xr(e,r,n,i,a,o,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Kr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Jr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/u,f=c*(n.tileID.canonical.x+n.tileID.wrap*u),h=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/ve(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},$r={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Qr(e,r,n,i,a,o,s){for(var l=e.context,u=l.gl,c=e.useProgram(\"collisionBox\"),f=[],h=0,p=0,d=0;d<i.length;d++){var g=i[d],v=r.getTile(g),m=v.getBucket(n);if(m){var y=g.posMatrix;0===a[0]&&0===a[1]||(y=e.translatePosMatrix(g.posMatrix,v,a,o));var x=s?m.textCollisionBox:m.iconCollisionBox,b=m.collisionCircleArray;if(b.length>0){var _=t.create(),w=y;t.mul(_,m.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,m.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&c.draw(l,u.LINES,At.disabled,Et.disabled,e.colorModeForRenderPass(),Lt.disabled,Ir(y,e.transform,v),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var k=e.useProgram(\"collisionCircle\"),T=new t.StructArrayLayout2f1f2i16;T.resize(4*h),T._trim();for(var M=0,A=0,S=f;A<S.length;A+=1)for(var E=S[A],C=0;C<E.circleArray.length/4;C++){var L=4*C,P=E.circleArray[L+0],O=E.circleArray[L+1],I=E.circleArray[L+2],D=E.circleArray[L+3];T.emplace(M++,P,O,I,D,0),T.emplace(M++,P,O,I,D,1),T.emplace(M++,P,O,I,D,2),T.emplace(M++,P,O,I,D,3)}(!Yr||Yr.length<2*h)&&(Yr=function(e){var r=2*e,n=new t.StructArrayLayout3ui6;n.resize(r),n._trim();for(var i=0;i<r;i++){var a=6*i;n.uint16[a+0]=4*i+0,n.uint16[a+1]=4*i+1,n.uint16[a+2]=4*i+2,n.uint16[a+3]=4*i+2,n.uint16[a+4]=4*i+3,n.uint16[a+5]=4*i+0}return n}(h));for(var z=l.createIndexBuffer(Yr,!0),R=l.createVertexBuffer(T,t.collisionCircleLayout.members,!0),F=0,N=f;F<N.length;F+=1){var B=N[F],j=Dr(B.transform,B.invTransform,e.transform);k.draw(l,u.TRIANGLES,At.disabled,Et.disabled,e.colorModeForRenderPass(),Lt.disabled,j,n.id,R,z,t.SegmentVector.simpleSegment(0,2*B.circleOffset,B.circleArray.length,B.circleArray.length/2),null,e.transform.zoom,null,null,null)}R.destroy(),z.destroy()}}var tn=t.identity(new Float32Array(16));function en(e,r,n,i,a,o){var s=t.getAnchorAlignment(e),l=-(s.horizontalAlign-.5)*r,u=-(s.verticalAlign-.5)*n,c=t.evaluateVariableOffset(e,i);return new t.Point((l/a+c[0])*o,(u/a+c[1])*o)}function rn(e,r,n,i,a,o,s,l,u,c,f){var h=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,d=e.icon.dynamicLayoutVertexArray,g={};p.clear();for(var v=0;v<h.length;v++){var m=h.get(v),y=e.allowVerticalPlacement&&!m.placedOrientation,x=m.hidden||!m.crossTileID||y?null:i[m.crossTileID];if(x){var b=new t.Point(m.anchorX,m.anchorY),_=re(b,n?l:s),w=ne(o.cameraToCenterDistance,_.signedDistanceFromCamera),k=a.evaluateSizeForFeature(e.textSizeData,c,m)*w/t.ONE_EM;n&&(k*=e.tilePixelRatio/u);for(var T=x.width,M=x.height,A=en(x.anchor,T,M,x.textOffset,x.textBoxScale,k),S=n?re(b.add(A),s).point:_.point.add(r?A.rotate(-o.angle):A),E=e.allowVerticalPlacement&&m.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,C=0;C<m.numGlyphs;C++)t.addDynamicAttributes(p,S,E);f&&m.associatedIconIndex>=0&&(g[m.associatedIconIndex]={shiftedAnchor:S,angle:E})}else he(m.numGlyphs,p)}if(f){d.clear();for(var L=e.icon.placedSymbolArray,P=0;P<L.length;P++){var O=L.get(P);if(O.hidden)he(O.numGlyphs,d);else{var I=g[P];if(I)for(var D=0;D<O.numGlyphs;D++)t.addDynamicAttributes(d,I.shiftedAnchor,I.angle);else he(O.numGlyphs,d)}}e.icon.dynamicLayoutVertexBuffer.updateData(d)}e.text.dynamicLayoutVertexBuffer.updateData(p)}function nn(t,e,r){return r.iconsInText&&e?\"symbolTextAndIcon\":t?\"symbolSDF\":\"symbolIcon\"}function an(e,r,n,i,a,o,s,l,u,c,f,h){for(var p=e.context,d=p.gl,g=e.transform,v=\"map\"===l,m=\"map\"===u,y=v&&\"point\"!==n.layout.get(\"symbol-placement\"),x=v&&!m&&!y,b=void 0!==n.layout.get(\"symbol-sort-key\").constantOr(1),_=e.depthModeForSublayer(0,At.ReadOnly),w=n.layout.get(\"text-variable-anchor\"),k=[],T=0,M=i;T<M.length;T+=1){var A=M[T],S=r.getTile(A),E=S.getBucket(n);if(E){var C=a?E.text:E.icon;if(C&&C.segments.get().length){var L=C.programConfigurations.get(n.id),P=a||E.sdfIcons,O=a?E.textSizeData:E.iconSizeData,I=m||0!==g.pitch,D=e.useProgram(nn(P,a,E),L),z=t.evaluateSizeForZoom(O,g.zoom),R=void 0,F=[0,0],N=void 0,B=void 0,j=null,U=void 0;if(a){if(N=S.glyphAtlasTexture,B=d.LINEAR,R=S.glyphAtlasTexture.size,E.iconsInText){F=S.imageAtlasTexture.size,j=S.imageAtlasTexture;var V=\"composite\"===O.kind||\"camera\"===O.kind;U=I||e.options.rotating||e.options.zooming||V?d.LINEAR:d.NEAREST}}else{var H=1!==n.layout.get(\"icon-size\").constantOr(0)||E.iconsNeedLinear;N=S.imageAtlasTexture,B=P||e.options.rotating||e.options.zooming||H||I?d.LINEAR:d.NEAREST,R=S.imageAtlasTexture.size}var q=ve(S,1,e.transform.zoom),G=te(A.posMatrix,m,v,e.transform,q),Y=ee(A.posMatrix,m,v,e.transform,q),W=w&&E.hasTextData(),X=\"none\"!==n.layout.get(\"icon-text-fit\")&&W&&E.hasIconData();y&&ae(E,A.posMatrix,e,a,G,Y,m,c);var Z=e.translatePosMatrix(A.posMatrix,S,o,s),K=y||a&&w||X?tn:G,J=e.translatePosMatrix(Y,S,o,s,!0),$=P&&0!==n.paint.get(a?\"text-halo-width\":\"icon-halo-width\").constantOr(1),Q={program:D,buffers:C,uniformValues:P?E.iconsInText?Zr(O.kind,z,x,m,e,Z,K,J,R,F):Xr(O.kind,z,x,m,e,Z,K,J,a,R,!0):Wr(O.kind,z,x,m,e,Z,K,J,a,R),atlasTexture:N,atlasTextureIcon:j,atlasInterpolation:B,atlasInterpolationIcon:U,isSDF:P,hasHalo:$};if(b)for(var tt=0,et=C.segments.get();tt<et.length;tt+=1){var rt=et[tt];k.push({segments:new t.SegmentVector([rt]),sortKey:rt.sortKey,state:Q})}else k.push({segments:C.segments,sortKey:0,state:Q})}}}b&&k.sort((function(t,e){return t.sortKey-e.sortKey}));for(var nt=0,it=k;nt<it.length;nt+=1){var at=it[nt],ot=at.state;if(p.activeTexture.set(d.TEXTURE0),ot.atlasTexture.bind(ot.atlasInterpolation,d.CLAMP_TO_EDGE),ot.atlasTextureIcon&&(p.activeTexture.set(d.TEXTURE1),ot.atlasTextureIcon&&ot.atlasTextureIcon.bind(ot.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),ot.isSDF){var st=ot.uniformValues;ot.hasHalo&&(st.u_is_halo=1,on(ot.buffers,at.segments,n,e,ot.program,_,f,h,st)),st.u_is_halo=0}on(ot.buffers,at.segments,n,e,ot.program,_,f,h,ot.uniformValues)}}function on(t,e,r,n,i,a,o,s,l){var u=n.context,c=u.gl;i.draw(u,c.TRIANGLES,a,o,s,Lt.disabled,l,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,n.transform.zoom,t.programConfigurations.get(r.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function sn(t,e,r,n,i,a,o){var s,l,u,c,f,h=t.context.gl,p=r.paint.get(\"fill-pattern\"),d=p&&p.constantOr(1),g=r.getCrossfadeParameters();o?(l=d&&!r.getPaintProperty(\"fill-outline-color\")?\"fillOutlinePattern\":\"fillOutline\",s=h.LINES):(l=d?\"fillPattern\":\"fill\",s=h.TRIANGLES);for(var v=0,m=n;v<m.length;v+=1){var y=m[v],x=e.getTile(y);if(!d||x.patternsLoaded()){var b=x.getBucket(r);if(b){var _=b.programConfigurations.get(r.id),w=t.useProgram(l,_);d&&(t.context.activeTexture.set(h.TEXTURE0),x.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),_.updatePaintBuffers(g));var k=p.constantOr(null);if(k&&x.imageAtlas){var T=x.imageAtlas,M=T.patternPositions[k.to.toString()],A=T.patternPositions[k.from.toString()];M&&A&&_.setConstantPatternPositions(M,A)}var S=t.translatePosMatrix(y.posMatrix,x,r.paint.get(\"fill-translate\"),r.paint.get(\"fill-translate-anchor\"));if(o){c=b.indexBuffer2,f=b.segments2;var E=[h.drawingBufferWidth,h.drawingBufferHeight];u=\"fillOutlinePattern\"===l&&d?Pr(S,t,g,x,E):Lr(S,E)}else c=b.indexBuffer,f=b.segments,u=d?Cr(S,t,g,x):Er(S);w.draw(t.context,s,i,t.stencilModeForClipping(y),a,Lt.disabled,u,r.id,b.layoutVertexBuffer,c,f,r.paint,t.transform.zoom,_)}}}}function ln(t,e,r,n,i,a,o){for(var s=t.context,l=s.gl,u=r.paint.get(\"fill-extrusion-pattern\"),c=u.constantOr(1),f=r.getCrossfadeParameters(),h=r.paint.get(\"fill-extrusion-opacity\"),p=0,d=n;p<d.length;p+=1){var g=d[p],v=e.getTile(g),m=v.getBucket(r);if(m){var y=m.programConfigurations.get(r.id),x=t.useProgram(c?\"fillExtrusionPattern\":\"fillExtrusion\",y);c&&(t.context.activeTexture.set(l.TEXTURE0),v.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),y.updatePaintBuffers(f));var b=u.constantOr(null);if(b&&v.imageAtlas){var _=v.imageAtlas,w=_.patternPositions[b.to.toString()],k=_.patternPositions[b.from.toString()];w&&k&&y.setConstantPatternPositions(w,k)}var T=t.translatePosMatrix(g.posMatrix,v,r.paint.get(\"fill-extrusion-translate\"),r.paint.get(\"fill-extrusion-translate-anchor\")),M=r.paint.get(\"fill-extrusion-vertical-gradient\"),A=c?Sr(T,t,M,h,g,f,v):Ar(T,t,M,h);x.draw(s,s.gl.TRIANGLES,i,a,o,Lt.backCCW,A,r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,r.paint,t.transform.zoom,y)}}}function un(e,r,n,i,a,o){var s=e.context,l=s.gl,u=r.fbo;if(u){var c=e.useProgram(\"hillshade\");s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,u.colorAttachment.get());var f=function(e,r,n){var i=n.paint.get(\"hillshade-shadow-color\"),a=n.paint.get(\"hillshade-highlight-color\"),o=n.paint.get(\"hillshade-accent-color\"),s=n.paint.get(\"hillshade-illumination-direction\")*(Math.PI/180);\"viewport\"===n.paint.get(\"hillshade-illumination-anchor\")&&(s-=e.transform.angle);var l,u,c,f=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),f),u_image:0,u_latrange:(l=r.tileID,u=Math.pow(2,l.canonical.z),c=l.canonical.y,[new t.MercatorCoordinate(0,c/u).toLngLat().lat,new t.MercatorCoordinate(0,(c+1)/u).toLngLat().lat]),u_light:[n.paint.get(\"hillshade-exaggeration\"),s],u_shadow:i,u_highlight:a,u_accent:o}}(e,r,n);c.draw(s,l.TRIANGLES,i,a,o,Lt.disabled,f,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}function cn(e,r,n,i,a,o,s){var l=e.context,u=l.gl,c=r.dem;if(c&&c.data){var f=c.dim,h=c.stride,p=c.getPixels();if(l.activeTexture.set(u.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(h),r.demTexture){var d=r.demTexture;d.update(p,{premultiply:!1}),d.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else r.demTexture=new t.Texture(l,p,u.RGBA,{premultiply:!1}),r.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);l.activeTexture.set(u.TEXTURE0);var g=r.fbo;if(!g){var v=new t.Texture(l,{width:f,height:f,data:null},u.RGBA);v.bind(u.LINEAR,u.CLAMP_TO_EDGE),(g=r.fbo=l.createFramebuffer(f,f,!0)).colorAttachment.set(v.texture)}l.bindFramebuffer.set(g.framebuffer),l.viewport.set([0,0,f,f]),e.useProgram(\"hillshadePrepare\").draw(l,u.TRIANGLES,a,o,s,Lt.disabled,function(e,r,n){var i=r.stride,a=t.create();return t.ortho(a,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(a,a,[0,-t.EXTENT,0]),{u_matrix:a,u_image:1,u_dimension:[i,i],u_zoom:e.overscaledZ,u_maxzoom:n,u_unpack:r.getUnpackVector()}}(r.tileID,c,i),n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function fn(e,r,n,i,a){var o=i.paint.get(\"raster-fade-duration\");if(o>0){var s=t.browser.now(),l=(s-e.timeAdded)/o,u=r?(s-r.timeAdded)/o:-1,c=n.getSource(),f=a.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var hn=new t.Color(1,0,0,1),pn=new t.Color(0,1,0,1),dn=new t.Color(0,0,1,1),gn=new t.Color(1,0,1,1),vn=new t.Color(0,1,1,1);function mn(t){var e=t.transform.padding;yn(t,t.transform.height-(e.top||0),3,hn),yn(t,e.bottom||0,3,pn),xn(t,e.left||0,3,dn),xn(t,t.transform.width-(e.right||0),3,gn);var r=t.transform.centerPoint;!function(t,e,r,n){var i=20,a=2;bn(t,e-a/2,r-i/2,a,i,n),bn(t,e-i/2,r-a/2,i,a,n)}(t,r.x,t.transform.height-r.y,vn)}function yn(t,e,r,n){bn(t,0,e+r/2,t.transform.width,r,n)}function xn(t,e,r,n){bn(t,e-r/2,0,r,t.transform.height,n)}function bn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function _n(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram(\"debug\"),l=At.disabled,u=Et.disabled,c=e.colorModeForRenderPass(),f=\"$debug\";i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,u,c,Lt.disabled,zr(o,t.Color.red),f,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var h=r.getTileByID(n.key).latestRawTileData,p=h&&h.byteLength||0,d=Math.floor(p/1024),g=r.getTile(n).tileSize,v=512/Math.min(g,512)*(n.overscaledZ/e.transform.zoom)*.5,m=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(m+=\" => \"+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext(\"2d\");i.clearRect(0,0,r.width,r.height),i.shadowColor=\"white\",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle=\"white\",i.textBaseline=\"top\",i.font=\"bold 36px Open Sans, sans-serif\",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,m+\" \"+d+\"kb\"),s.draw(i,a.TRIANGLES,l,u,Ct.alphaBlended,Lt.disabled,zr(o,t.Color.transparent,v),f,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var wn={symbol:function(e,r,n,i,a){if(\"translucent\"===e.renderPass){var o=Et.disabled,s=e.colorModeForRenderPass();n.layout.get(\"text-variable-anchor\")&&function(e,r,n,i,a,o,s){for(var l=r.transform,u=\"map\"===a,c=\"map\"===o,f=0,h=e;f<h.length;f+=1){var p=h[f],d=i.getTile(p),g=d.getBucket(n);if(g&&g.text&&g.text.segments.get().length){var v=g.textSizeData,m=t.evaluateSizeForZoom(v,l.zoom),y=ve(d,1,r.transform.zoom),x=te(p.posMatrix,c,u,r.transform,y),b=\"none\"!==n.layout.get(\"icon-text-fit\")&&g.hasIconData();if(m){var _=Math.pow(2,l.zoom-d.tileID.overscaledZ);rn(g,u,c,s,t.symbolSize,l,x,p.posMatrix,_,m,b)}}}}(i,e,n,r,n.layout.get(\"text-rotation-alignment\"),n.layout.get(\"text-pitch-alignment\"),a),0!==n.paint.get(\"icon-opacity\").constantOr(1)&&an(e,r,n,i,!1,n.paint.get(\"icon-translate\"),n.paint.get(\"icon-translate-anchor\"),n.layout.get(\"icon-rotation-alignment\"),n.layout.get(\"icon-pitch-alignment\"),n.layout.get(\"icon-keep-upright\"),o,s),0!==n.paint.get(\"text-opacity\").constantOr(1)&&an(e,r,n,i,!0,n.paint.get(\"text-translate\"),n.paint.get(\"text-translate-anchor\"),n.layout.get(\"text-rotation-alignment\"),n.layout.get(\"text-pitch-alignment\"),n.layout.get(\"text-keep-upright\"),o,s),r.map.showCollisionBoxes&&(Qr(e,r,n,i,n.paint.get(\"text-translate\"),n.paint.get(\"text-translate-anchor\"),!0),Qr(e,r,n,i,n.paint.get(\"icon-translate\"),n.paint.get(\"icon-translate-anchor\"),!1))}},circle:function(e,r,n,i){if(\"translucent\"===e.renderPass){var a=n.paint.get(\"circle-opacity\"),o=n.paint.get(\"circle-stroke-width\"),s=n.paint.get(\"circle-stroke-opacity\"),l=void 0!==n.layout.get(\"circle-sort-key\").constantOr(1);if(0!==a.constantOr(1)||0!==o.constantOr(1)&&0!==s.constantOr(1)){for(var u=e.context,c=u.gl,f=e.depthModeForSublayer(0,At.ReadOnly),h=Et.disabled,p=e.colorModeForRenderPass(),d=[],g=0;g<i.length;g++){var v=i[g],m=r.getTile(v),y=m.getBucket(n);if(y){var x=y.programConfigurations.get(n.id),b={programConfiguration:x,program:e.useProgram(\"circle\",x),layoutVertexBuffer:y.layoutVertexBuffer,indexBuffer:y.indexBuffer,uniformValues:Or(e,v,m,n)};if(l)for(var _=0,w=y.segments.get();_<w.length;_+=1){var k=w[_];d.push({segments:new t.SegmentVector([k]),sortKey:k.sortKey,state:b})}else d.push({segments:y.segments,sortKey:0,state:b})}}l&&d.sort((function(t,e){return t.sortKey-e.sortKey}));for(var T=0,M=d;T<M.length;T+=1){var A=M[T],S=A.state,E=S.programConfiguration,C=S.program,L=S.layoutVertexBuffer,P=S.indexBuffer,O=S.uniformValues,I=A.segments;C.draw(u,c.TRIANGLES,f,h,p,Lt.disabled,O,n.id,L,P,I,n.paint,e.transform.zoom,E)}}}},heatmap:function(e,r,n,i){if(0!==n.paint.get(\"heatmap-opacity\"))if(\"offscreen\"===e.renderPass){var a=e.context,o=a.gl,s=Et.disabled,l=new Ct([o.ONE,o.ONE],t.Color.transparent,[!0,!0,!0,!0]);(function(t,e,r){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=r.heatmapFbo;if(i)n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var a=n.createTexture();n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),i=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),function(t,e,r,n){var i=t.gl,a=t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:i.UNSIGNED_BYTE;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,e.width/4,e.height/4,0,i.RGBA,a,null),n.colorAttachment.set(r)}(t,e,a,i)}})(a,e,n),a.clear({color:t.Color.transparent});for(var u=0;u<i.length;u++){var c=i[u];if(!r.hasRenderableParent(c)){var f=r.getTile(c),h=f.getBucket(n);if(h){var p=h.programConfigurations.get(n.id),d=e.useProgram(\"heatmap\",p),g=e.transform.zoom;d.draw(a,o.TRIANGLES,At.disabled,s,l,Lt.disabled,Fr(c.posMatrix,f,g,n.paint.get(\"heatmap-intensity\")),n.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,n.paint,e.transform.zoom,p)}}}a.viewport.set([0,0,e.width,e.height])}else\"translucent\"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var n=e.context,i=n.gl,a=r.heatmapFbo;if(a){n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1);var o=r.colorRampTexture;o||(o=r.colorRampTexture=new t.Texture(n,r.colorRamp,i.RGBA)),o.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram(\"heatmapTexture\").draw(n,i.TRIANGLES,At.disabled,Et.disabled,e.colorModeForRenderPass(),Lt.disabled,function(e,r,n,i){var a=t.create();t.ortho(a,0,e.width,e.height,0,0,1);var o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_color_ramp:i,u_opacity:r.paint.get(\"heatmap-opacity\")}}(e,r,0,1),r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom)}}(e,n))},line:function(e,r,n,i){if(\"translucent\"===e.renderPass){var a=n.paint.get(\"line-opacity\"),o=n.paint.get(\"line-width\");if(0!==a.constantOr(1)&&0!==o.constantOr(1)){var s=e.depthModeForSublayer(0,At.ReadOnly),l=e.colorModeForRenderPass(),u=n.paint.get(\"line-dasharray\"),c=n.paint.get(\"line-pattern\"),f=c.constantOr(1),h=n.paint.get(\"line-gradient\"),p=n.getCrossfadeParameters(),d=f?\"linePattern\":u?\"lineSDF\":h?\"lineGradient\":\"line\",g=e.context,v=g.gl,m=!0;if(h){g.activeTexture.set(v.TEXTURE0);var y=n.gradientTexture;if(!n.gradient)return;y||(y=n.gradientTexture=new t.Texture(g,n.gradient,v.RGBA)),y.bind(v.LINEAR,v.CLAMP_TO_EDGE)}for(var x=0,b=i;x<b.length;x+=1){var _=b[x],w=r.getTile(_);if(!f||w.patternsLoaded()){var k=w.getBucket(n);if(k){var T=k.programConfigurations.get(n.id),M=e.context.program.get(),A=e.useProgram(d,T),S=m||A.program!==M,E=c.constantOr(null);if(E&&w.imageAtlas){var C=w.imageAtlas,L=C.patternPositions[E.to.toString()],P=C.patternPositions[E.from.toString()];L&&P&&T.setConstantPatternPositions(L,P)}var O=f?jr(e,w,n,p):u?Ur(e,w,n,u,p):h?Br(e,w,n):Nr(e,w,n);f?(g.activeTexture.set(v.TEXTURE0),w.imageAtlasTexture.bind(v.LINEAR,v.CLAMP_TO_EDGE),T.updatePaintBuffers(p)):u&&(S||e.lineAtlas.dirty)&&(g.activeTexture.set(v.TEXTURE0),e.lineAtlas.bind(g)),A.draw(g,v.TRIANGLES,s,e.stencilModeForClipping(_),l,Lt.disabled,O,n.id,k.layoutVertexBuffer,k.indexBuffer,k.segments,n.paint,e.transform.zoom,T),m=!1}}}}}},fill:function(e,r,n,i){var a=n.paint.get(\"fill-color\"),o=n.paint.get(\"fill-opacity\");if(0!==o.constantOr(1)){var s=e.colorModeForRenderPass(),l=n.paint.get(\"fill-pattern\"),u=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===a.constantOr(t.Color.transparent).a&&1===o.constantOr(0)?\"opaque\":\"translucent\";if(e.renderPass===u){var c=e.depthModeForSublayer(1,\"opaque\"===e.renderPass?At.ReadWrite:At.ReadOnly);sn(e,r,n,i,c,s,!1)}if(\"translucent\"===e.renderPass&&n.paint.get(\"fill-antialias\")){var f=e.depthModeForSublayer(n.getPaintProperty(\"fill-outline-color\")?2:0,At.ReadOnly);sn(e,r,n,i,f,s,!0)}}},\"fill-extrusion\":function(t,e,r,n){var i=r.paint.get(\"fill-extrusion-opacity\");if(0!==i&&\"translucent\"===t.renderPass){var a=new At(t.context.gl.LEQUAL,At.ReadWrite,t.depthRangeFor3D);if(1!==i||r.paint.get(\"fill-extrusion-pattern\").constantOr(1))ln(t,e,r,n,a,Et.disabled,Ct.disabled),ln(t,e,r,n,a,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var o=t.colorModeForRenderPass();ln(t,e,r,n,a,Et.disabled,o)}}},hillshade:function(t,e,r,n){if(\"offscreen\"===t.renderPass||\"translucent\"===t.renderPass){for(var i=t.context,a=e.getSource().maxzoom,o=t.depthModeForSublayer(0,At.ReadOnly),s=t.colorModeForRenderPass(),l=\"translucent\"===t.renderPass?t.stencilConfigForOverlap(n):[{},n],u=l[0],c=0,f=l[1];c<f.length;c+=1){var h=f[c],p=e.getTile(h);p.needsHillshadePrepare&&\"offscreen\"===t.renderPass?cn(t,p,r,a,o,Et.disabled,s):\"translucent\"===t.renderPass&&un(t,p,r,o,u[h.overscaledZ],s)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,n){if(\"translucent\"===t.renderPass&&0!==r.paint.get(\"raster-opacity\")&&n.length)for(var i=t.context,a=i.gl,o=e.getSource(),s=t.useProgram(\"raster\"),l=t.colorModeForRenderPass(),u=o instanceof I?[{},n]:t.stencilConfigForOverlap(n),c=u[0],f=u[1],h=f[f.length-1].overscaledZ,p=!t.options.moving,d=0,g=f;d<g.length;d+=1){var v=g[d],m=t.depthModeForSublayer(v.overscaledZ-h,1===r.paint.get(\"raster-opacity\")?At.ReadWrite:At.ReadOnly,a.LESS),y=e.getTile(v),x=t.transform.calculatePosMatrix(v.toUnwrapped(),p);y.registerFadeDuration(r.paint.get(\"raster-fade-duration\"));var b=e.findLoadedParent(v,0),_=fn(y,b,e,r,t.transform),w=void 0,k=void 0,T=\"nearest\"===r.paint.get(\"raster-resampling\")?a.NEAREST:a.LINEAR;i.activeTexture.set(a.TEXTURE0),y.texture.bind(T,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),i.activeTexture.set(a.TEXTURE1),b?(b.texture.bind(T,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,b.tileID.overscaledZ-y.tileID.overscaledZ),k=[y.tileID.canonical.x*w%1,y.tileID.canonical.y*w%1]):y.texture.bind(T,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST);var M=qr(x,k||[0,0],w||1,_,r);o instanceof I?s.draw(i,a.TRIANGLES,m,Et.disabled,l,Lt.disabled,M,r.id,o.boundsBuffer,t.quadTriangleIndexBuffer,o.boundsSegments):s.draw(i,a.TRIANGLES,m,c[v.overscaledZ],l,Lt.disabled,M,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,r){var n=r.paint.get(\"background-color\"),i=r.paint.get(\"background-opacity\");if(0!==i){var a=t.context,o=a.gl,s=t.transform,l=s.tileSize,u=r.paint.get(\"background-pattern\");if(!t.isPatternMissing(u)){var c=!u&&1===n.a&&1===i&&t.opaquePassEnabledForLayer()?\"opaque\":\"translucent\";if(t.renderPass===c){var f=Et.disabled,h=t.depthModeForSublayer(0,\"opaque\"===c?At.ReadWrite:At.ReadOnly),p=t.colorModeForRenderPass(),d=t.useProgram(u?\"backgroundPattern\":\"background\"),g=s.coveringTiles({tileSize:l});u&&(a.activeTexture.set(o.TEXTURE0),t.imageManager.bind(t.context));for(var v=r.getCrossfadeParameters(),m=0,y=g;m<y.length;m+=1){var x=y[m],b=t.transform.calculatePosMatrix(x.toUnwrapped()),_=u?Jr(b,i,t,u,{tileID:x,tileSize:l},v):Kr(b,i,n);d.draw(a,o.TRIANGLES,h,f,p,Lt.disabled,_,r.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,r){for(var n=0;n<r.length;n++)_n(t,e,r[n])},custom:function(t,e,r){var n=t.context,i=r.implementation;if(\"offscreen\"===t.renderPass){var a=i.prerender;a&&(t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),a.call(i,n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState())}else if(\"translucent\"===t.renderPass){t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),n.setStencilMode(Et.disabled);var o=\"3d\"===i.renderingMode?new At(t.context.gl.LEQUAL,At.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,At.ReadOnly);n.setDepthMode(o),i.render(n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState(),n.bindFramebuffer.set(null)}}},kn=function(t,e){this.context=new Pt(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=Ot.maxUnderzooming+Ot.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ve,this.gpuTimers={}};kn.prototype.resize=function(e,r){if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n<i.length;n+=1){var a=i[n];this.style._layers[a].resize()}},kn.prototype.setup=function(){var e=this.context,r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(r,Xe.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var n=new t.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(t.EXTENT,0),n.emplaceBack(0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(n,Xe.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var i=new t.StructArrayLayout4i8;i.emplaceBack(0,0,0,0),i.emplaceBack(t.EXTENT,0,t.EXTENT,0),i.emplaceBack(0,t.EXTENT,0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(i,O.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout2i4;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,Xe.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout1ui2;o.emplaceBack(0),o.emplaceBack(1),o.emplaceBack(3),o.emplaceBack(2),o.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(o);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);var l=this.context.gl;this.stencilClearMode=new Et({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},kn.prototype.clearStencil=function(){var e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var n=t.create();t.ortho(n,0,this.width,this.height,0,0,1),t.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram(\"clippingMask\").draw(e,r.TRIANGLES,At.disabled,this.stencilClearMode,Ct.disabled,Lt.disabled,Rr(n),\"$clipping\",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},kn.prototype._renderTileClippingMasks=function(t,e){if(this.currentStencilSource!==t.source&&t.isTileClipped()&&e&&e.length){this.currentStencilSource=t.source;var r=this.context,n=r.gl;this.nextStencilID+e.length>256&&this.clearStencil(),r.setColorMode(Ct.disabled),r.setDepthMode(At.disabled);var i=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var a=0,o=e;a<o.length;a+=1){var s=o[a],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;i.draw(r,n.TRIANGLES,At.disabled,new Et({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),Ct.disabled,Lt.disabled,Rr(s.posMatrix),\"$clipping\",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},kn.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Et({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},kn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Et({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},kn.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s<a;s++)o[s+i]=new Et({func:r.GEQUAL,mask:255},s+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=a,[o,n]}return[(e={},e[i]=Et.disabled,e),n]},kn.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){var r=1/8;return new Ct([e.CONSTANT_COLOR,e.ONE],new t.Color(r,r,r,0),[!0,!0,!0,!0])}return\"opaque\"===this.renderPass?Ct.unblended:Ct.alphaBlended},kn.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return At.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new At(r||this.context.gl.LEQUAL,e,[n,n])},kn.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},kn.prototype.render=function(e,r){var n=this;this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var i=this.style._order,a=this.style.sourceCaches;for(var o in a){var s=a[o];s.used&&s.prepare(this.context)}var l,u,c={},f={},h={};for(var p in a){var d=a[p];c[p]=d.getVisibleCoordinates(),f[p]=c[p].slice().reverse(),h[p]=d.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var g=0;g<i.length;g++){var v=i[g];if(this.style._layers[v].is3D()){this.opaquePassCutoff=g;break}}this.renderPass=\"offscreen\";for(var m=0,y=i;m<y.length;m+=1){var x=y[m],b=this.style._layers[x];if(b.hasOffscreenPass()&&!b.isHidden(this.transform.zoom)){var _=f[b.source];(\"custom\"===b.type||_.length)&&this.renderLayer(this,a[b.source],b,_)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass=\"opaque\",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],k=a[w.source],T=c[w.source];this._renderTileClippingMasks(w,T),this.renderLayer(this,k,w,T)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var M=this.style._layers[i[this.currentLayer]],A=a[M.source],S=(\"symbol\"===M.type?h:f)[M.source];this._renderTileClippingMasks(M,c[M.source]),this.renderLayer(this,A,M,S)}this.options.showTileBoundaries&&(t.values(this.style._layers).forEach((function(t){t.source&&!t.isHidden(n.transform.zoom)&&(t.source!==(u&&u.id)&&(u=n.style.sourceCaches[t.source]),(!l||l.getSource().maxzoom<u.getSource().maxzoom)&&(l=u))})),l&&wn.debug(this,l,l.getVisibleCoordinates())),this.options.showPadding&&mn(this),this.context.setDefault()},kn.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||(\"background\"===r.type||\"custom\"===r.type||n.length)&&(this.id=r.id,this.gpuTimingStart(r),wn[r.type](t,e,r,n,this.style.placement.variableOffsets),this.gpuTimingEnd())},kn.prototype.gpuTimingStart=function(t){if(this.options.gpuTiming){var e=this.context.extTimerQuery,r=this.gpuTimers[t.id];r||(r=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}),r.calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,r.query)}},kn.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}},kn.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},kn.prototype.queryGpuTimers=function(t){var e={};for(var r in t){var n=t[r],i=this.context.extTimerQuery,a=i.getQueryObjectEXT(n.query,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(n.query),e[r]=a}return e},kn.prototype.translatePosMatrix=function(e,r,n,i,a){if(!n[0]&&!n[1])return e;var o=a?\"map\"===i?this.transform.angle:0:\"viewport\"===i?-this.transform.angle:0;if(o){var s=Math.sin(o),l=Math.cos(o);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var u=[a?n[0]:ve(r,n[0],this.transform.zoom),a?n[1]:ve(r,n[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},kn.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},kn.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},kn.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},kn.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=\"\"+t+(e?e.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[r]||(this.cache[r]=new Tr(this.context,wr[t],e,$r[t],this._showOverdrawInspector)),this.cache[r]},kn.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},kn.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},kn.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},kn.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Tn=function(t,e){this.points=t,this.planes=e};Tn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new Tn(a,o)};var Mn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Mn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a<r.length;a++)n[a]=r[a]?this.min[a]:this.center[a],i[a]=r[a]?this.center[a]:this.max[a];return i[2]=this.max[2],new Mn(n,i)},Mn.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},Mn.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},Mn.prototype.intersects=function(e){for(var r=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],n=!0,i=0;i<e.planes.length;i++){for(var a=e.planes[i],o=0,s=0;s<r.length;s++)o+=t.dot$1(a,r[s])>=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=0;f<e.points.length;f++){var h=e.points[f][l]-this.min[l];u=Math.min(u,h),c=Math.max(c,h)}if(c<0||u>this.max[l]-this.min[l])return 0}return 1};var An=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=t,this.bottom=e,this.left=r,this.right=n};An.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},An.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},An.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},An.prototype.clone=function(){return new An(this.top,this.bottom,this.left,this.right)},An.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Sn=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new An,this._posMatrixCache={},this._alignedPosMatrixCache={}},En={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Sn.prototype.clone=function(){var t=new Sn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},En.minZoom.get=function(){return this._minZoom},En.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},En.maxZoom.get=function(){return this._maxZoom},En.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},En.minPitch.get=function(){return this._minPitch},En.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},En.maxPitch.get=function(){return this._maxPitch},En.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},En.renderWorldCopies.get=function(){return this._renderWorldCopies},En.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},En.worldSize.get=function(){return this.tileSize*this.scale},En.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},En.size.get=function(){return new t.Point(this.width,this.height)},En.bearing.get=function(){return-this.angle/Math.PI*180},En.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},En.pitch.get=function(){return this._pitch/Math.PI*180},En.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},En.fov.get=function(){return this._fov/Math.PI*180},En.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},En.zoom.get=function(){return this._zoom},En.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},En.center.get=function(){return this._center},En.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},En.padding.get=function(){return this._edgeInsets.toJSON()},En.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},En.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Sn.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Sn.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},Sn.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Sn.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new t.UnwrappedTileID(u,e));return r},Sn.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=Tn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var u=function(t){return{aabb:new Mn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var g=c.pop(),v=g.x,m=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),k=3+(1<<h-g.zoom)-2;if(g.zoom===h||w>k&&g.zoom>=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,v,m),distanceSq:t.sqrLen([o[0]-.5-v,o[1]-.5-m])});else for(var T=0;T<4;T++){var M=(v<<1)+T%2,A=(m<<1)+(T>>1);c.push({aabb:g.aabb.quadrant(T),zoom:g.zoom+1,x:M,y:A,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Sn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},En.unmodified.get=function(){return this._unmodified},Sn.prototype.zoomScale=function(t){return Math.pow(2,t)},Sn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Sn.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},Sn.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},En.point.get=function(){return this.project(this.center)},Sn.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},Sn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Sn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Sn.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Sn.prototype.coordinateLocation=function(t){return t.toLngLat()},Sn.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,u=n[1]/a,c=r[2]/i,f=n[2]/a,h=c===f?0:(0-c)/(f-c);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,u,h)/this.worldSize)},Sn.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},Sn.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Sn.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Sn.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Sn.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},Sn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Sn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var f=this.latRange;a=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-a<u.y?u.y/(o-a):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,r=(l=t.mercatorXfromLng(h[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var p=this.point,d=Math.max(r||0,e||0);if(d)return this.center=this.unproject(new t.Point(r?(l+s)/2:p.x,e?(o+a)/2:p.y)),this.zoom+=this.scaleZoom(d),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var g=p.y,v=u.y/2;g-v<a&&(i=a+v),g+v>o&&(i=o-v)}if(this.lngRange){var m=p.x,y=u.x/2;m-y<s&&(n=s+y),m+y>l&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=c,this._constraining=!1}},Sn.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,u=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),c=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,c,u),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),g=Math.sin(this.angle),v=s-Math.round(s)+d*h+g*p,m=l-Math.round(l)+d*p+g*h,y=new Float64Array(f);if(t.translate(y,y,[v>.5?v-1:v,m>.5?m-1:m,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Sn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Sn.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},Sn.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s<l.length;s+=1){var u=l[s];n=Math.min(n,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),o=Math.max(o,u.y)}return[new t.Point(n,i),new t.Point(a,i),new t.Point(a,o),new t.Point(n,o),new t.Point(n,i)]},Object.defineProperties(Sn.prototype,En);var Cn=function(e){var r,n,i,a,o;this._hashName=e&&encodeURIComponent(e),t.bindAll([\"_getCurrentHash\",\"_onHashChange\",\"_updateHash\"],this),this._updateHash=(r=this._updateHashUnthrottled.bind(this),n=300,i=!1,a=null,o=function(){a=null,i&&(r(),a=setTimeout(o,n),i=!1)},function(){return i=!0,a||o(),a})};Cn.prototype.addTo=function(e){return this._map=e,t.window.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Cn.prototype.remove=function(){return t.window.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Cn.prototype.getHashString=function(e){var r=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,i=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),a=Math.pow(10,i),o=Math.round(r.lng*a)/a,s=Math.round(r.lat*a)/a,l=this._map.getBearing(),u=this._map.getPitch(),c=\"\";if(c+=e?\"/\"+o+\"/\"+s+\"/\"+n:n+\"/\"+s+\"/\"+o,(l||u)&&(c+=\"/\"+Math.round(10*l)/10),u&&(c+=\"/\"+Math.round(u)),this._hashName){var f=this._hashName,h=!1,p=t.window.location.hash.slice(1).split(\"&\").map((function(t){var e=t.split(\"=\")[0];return e===f?(h=!0,e+\"=\"+c):t})).filter((function(t){return t}));return h||p.push(f+\"=\"+c),\"#\"+p.join(\"&\")}return\"#\"+c},Cn.prototype._getCurrentHash=function(){var e,r=this,n=t.window.location.hash.replace(\"#\",\"\");return this._hashName?(n.split(\"&\").map((function(t){return t.split(\"=\")})).forEach((function(t){t[0]===r._hashName&&(e=t)})),(e&&e[1]||\"\").split(\"/\")):n.split(\"/\")},Cn.prototype._onHashChange=function(){var t=this._getCurrentHash();if(t.length>=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Cn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,\"\",e)}catch(t){}};var Ln={linearity:.3,easing:t.bezier(0,0,.3,1)},Pn=t.extend({deceleration:2500,maxSpeed:1400},Ln),On=t.extend({deceleration:20,maxSpeed:1400},Ln),In=t.extend({deceleration:1e3,maxSpeed:360},Ln),Dn=t.extend({deceleration:1e3,maxSpeed:90},Ln),zn=function(t){this._map=t,this.clear()};function Rn(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function Fn(e,r,n){var i=n.maxSpeed,a=n.linearity,o=n.deceleration,s=t.clamp(e*a/(r/1e3),-i,i),l=Math.abs(s)/(o*a);return{easing:n.easing,duration:1e3*l,amount:s*(l/2)}}zn.prototype.clear=function(){this._inertiaBuffer=[]},zn.prototype.record=function(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:e})},zn.prototype._drainInertiaBuffer=function(){for(var e=this._inertiaBuffer,r=t.browser.now();e.length>0&&r-e[0].time>160;)e.shift()},zn.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n<i.length;n+=1){var a=i[n].settings;r.zoom+=a.zoomDelta||0,r.bearing+=a.bearingDelta||0,r.pitch+=a.pitchDelta||0,a.panDelta&&r.pan._add(a.panDelta),a.around&&(r.around=a.around),a.pinchAround&&(r.pinchAround=a.pinchAround)}var o=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(r.pan.mag()){var l=Fn(r.pan.mag(),o,t.extend({},Pn,e||{}));s.offset=r.pan.mult(l.amount/r.pan.mag()),s.center=this._map.transform.center,Rn(s,l)}if(r.zoom){var u=Fn(r.zoom,o,On);s.zoom=this._map.transform.zoom+u.amount,Rn(s,u)}if(r.bearing){var c=Fn(r.bearing,o,In);s.bearing=this._map.transform.bearing+t.clamp(c.amount,-179,179),Rn(s,c)}if(r.pitch){var f=Fn(r.pitch,o,Dn);s.pitch=this._map.transform.pitch+f.amount,Rn(s,f)}if(s.zoom||s.bearing){var h=void 0===r.pinchAround?r.around:r.pinchAround;s.around=h?this._map.unproject(h):this._map.getCenter()}return this.clear(),t.extend(s,{noMoveStart:!0})}};var Nn=function(e){function n(n,i,a,o){void 0===o&&(o={});var s=r.mousePos(i.getCanvasContainer(),a),l=i.unproject(s);e.call(this,n,t.extend({point:s,lngLat:l,originalEvent:a},o)),this._defaultPrevented=!1,this.target=i}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),Bn=function(e){function n(n,i,a){var o=\"touchend\"===n?a.changedTouches:a.touches,s=r.touchPos(i.getCanvasContainer(),o),l=s.map((function(t){return i.unproject(t)})),u=s.reduce((function(t,e,r,n){return t.add(e.div(n.length))}),new t.Point(0,0)),c=i.unproject(u);e.call(this,n,{points:s,point:u,lngLats:l,lngLat:c,originalEvent:a}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),jn=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Un=function(t,e){this._map=t,this._clickTolerance=e.clickTolerance};Un.prototype.reset=function(){delete this._mousedownPos},Un.prototype.wheel=function(t){return this._firePreventable(new jn(t.type,this._map,t))},Un.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Nn(t.type,this._map,t))},Un.prototype.mouseup=function(t){this._map.fire(new Nn(t.type,this._map,t))},Un.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Nn(t.type,this._map,t))},Un.prototype.dblclick=function(t){return this._firePreventable(new Nn(t.type,this._map,t))},Un.prototype.mouseover=function(t){this._map.fire(new Nn(t.type,this._map,t))},Un.prototype.mouseout=function(t){this._map.fire(new Nn(t.type,this._map,t))},Un.prototype.touchstart=function(t){return this._firePreventable(new Bn(t.type,this._map,t))},Un.prototype.touchmove=function(t){this._map.fire(new Bn(t.type,this._map,t))},Un.prototype.touchend=function(t){this._map.fire(new Bn(t.type,this._map,t))},Un.prototype.touchcancel=function(t){this._map.fire(new Bn(t.type,this._map,t))},Un.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Un.prototype.isEnabled=function(){return!0},Un.prototype.isActive=function(){return!1},Un.prototype.enable=function(){},Un.prototype.disable=function(){};var Vn=function(t){this._map=t};Vn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Vn.prototype.mousemove=function(t){this._map.fire(new Nn(t.type,this._map,t))},Vn.prototype.mousedown=function(){this._delayContextMenu=!0},Vn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Nn(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Vn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Nn(t.type,this._map,t)),this._map.listens(\"contextmenu\")&&t.preventDefault()},Vn.prototype.isEnabled=function(){return!0},Vn.prototype.isActive=function(){return!1},Vn.prototype.enable=function(){},Vn.prototype.disable=function(){};var Hn=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function qn(t,e){for(var r={},n=0;n<t.length;n++)r[t[n].identifier]=e[n];return r}Hn.prototype.isEnabled=function(){return!!this._enabled},Hn.prototype.isActive=function(){return!!this._active},Hn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Hn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Hn.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(r.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},Hn.prototype.mousemoveWindow=function(t,e){if(this._active){var n=e;if(!(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=n,this._box||(this._box=r.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",t));var a=Math.min(i.x,n.x),o=Math.max(i.x,n.x),s=Math.min(i.y,n.y),l=Math.max(i.y,n.y);r.setTransform(this._box,\"translate(\"+a+\"px,\"+s+\"px)\"),this._box.style.width=o-a+\"px\",this._box.style.height=l-s+\"px\"}}},Hn.prototype.mouseupWindow=function(e,n){var i=this;if(this._active&&0===e.button){var a=this._startPos,o=n;if(this.reset(),r.suppressClick(),a.x!==o.x||a.y!==o.y)return this._map.fire(new t.Event(\"boxzoomend\",{originalEvent:e})),{cameraAnimation:function(t){return t.fitScreenCoordinates(a,o,i._map.getBearing(),{linear:!0})}};this._fireEvent(\"boxzoomcancel\",e)}},Hn.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent(\"boxzoomcancel\",t))},Hn.prototype.reset=function(){this._active=!1,this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},Hn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Gn=function(t){this.reset(),this.numTouches=t.numTouches};Gn.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Gn.prototype.touchstart=function(e,r,n){(this.centroid||n.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n<i.length;n+=1){var a=i[n];r._add(a)}return r.div(e.length)}(r),this.touches=qn(n,r)))},Gn.prototype.touchmove=function(t,e,r){if(!this.aborted&&this.centroid){var n=qn(r,e);for(var i in this.touches){var a=this.touches[i],o=n[i];(!o||o.dist(a)>30)&&(this.aborted=!0)}}},Gn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Yn=function(t){this.singleTap=new Gn(t),this.numTaps=t.numTaps,this.reset()};Yn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Yn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},Yn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},Yn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Wn=function(){this._zoomIn=new Yn({numTouches:1,numTaps:2}),this._zoomOut=new Yn({numTouches:2,numTaps:1}),this.reset()};Wn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Wn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Wn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Wn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Wn.prototype.touchcancel=function(){this.reset()},Wn.prototype.enable=function(){this._enabled=!0},Wn.prototype.disable=function(){this._enabled=!1,this.reset()},Wn.prototype.isEnabled=function(){return this._enabled},Wn.prototype.isActive=function(){return this._active};var Xn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Xn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Xn.prototype._correctButton=function(t,e){return!1},Xn.prototype._move=function(t,e){return{}},Xn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Xn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)<this._clickTolerance)))return this._moved=!0,this._lastPoint=e,this._move(r,e)},Xn.prototype.mouseupWindow=function(t){r.mouseButton(t)===this._eventButton&&(this._moved&&r.suppressClick(),this.reset())},Xn.prototype.enable=function(){this._enabled=!0},Xn.prototype.disable=function(){this._enabled=!1,this.reset()},Xn.prototype.isEnabled=function(){return this._enabled},Xn.prototype.isActive=function(){return this._active};var Zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.mousedown=function(e,r){t.prototype.mousedown.call(this,e,r),this._lastPoint&&(this._active=!0)},e.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},e.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},e}(Xn),Kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=.8*(e.x-t.x);if(r)return this._active=!0,{bearingDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(Xn),Jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=-.5*(e.y-t.y);if(r)return this._active=!0,{pitchDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(Xn),$n=function(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()};$n.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)},$n.prototype.touchstart=function(t,e,r){return this._calculateTransform(t,e,r)},$n.prototype.touchmove=function(t,e,r){if(this._active)return t.preventDefault(),this._calculateTransform(t,e,r)},$n.prototype.touchend=function(t,e,r){this._calculateTransform(t,e,r),this._active&&r.length<this._minTouches&&this.reset()},$n.prototype.touchcancel=function(){this.reset()},$n.prototype._calculateTransform=function(e,r,n){n.length>0&&(this._active=!0);var i=qn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var u=i[l],c=this._touches[l];c&&(a._add(u),o._add(u.sub(c)),s++,i[l]=u)}if(this._touches=i,!(s<this._minTouches)&&o.mag()){var f=o.div(s);if(this._sum._add(f),!(this._sum.mag()<this._clickTolerance))return{around:a.div(s),panDelta:f}}},$n.prototype.enable=function(){this._enabled=!0},$n.prototype.disable=function(){this._enabled=!1,this.reset()},$n.prototype.isEnabled=function(){return this._enabled},$n.prototype.isActive=function(){return this._active};var Qn=function(){this.reset()};function ti(t,e,r){for(var n=0;n<t.length;n++)if(t[n].identifier===r)return e[n]}function ei(t,e){return Math.log(t/e)/Math.LN2}Qn.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Qn.prototype._start=function(t){},Qn.prototype._move=function(t,e,r){return{}},Qn.prototype.touchstart=function(t,e,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([e[0],e[1]]))},Qn.prototype.touchmove=function(t,e,r){if(this._firstTwoTouches){t.preventDefault();var n=this._firstTwoTouches,i=n[0],a=n[1],o=ti(r,e,i),s=ti(r,e,a);if(o&&s){var l=this._aroundCenter?null:o.add(s).div(2);return this._move([o,s],l,t)}}},Qn.prototype.touchend=function(t,e,n){if(this._firstTwoTouches){var i=this._firstTwoTouches,a=i[0],o=i[1],s=ti(n,e,a),l=ti(n,e,o);s&&l||(this._active&&r.suppressClick(),this.reset())}},Qn.prototype.touchcancel=function(){this.reset()},Qn.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&\"center\"===t.around},Qn.prototype.disable=function(){this._enabled=!1,this.reset()},Qn.prototype.isEnabled=function(){return this._enabled},Qn.prototype.isActive=function(){return this._active};var ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._distance,delete this._startDistance},e.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(ei(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ei(this._distance,r),pinchAround:e}},e}(Qn);function ni(t,e){return 180*t.angleWith(e)/Math.PI}var ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},e.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:ni(this._vector,r),pinchAround:e}},e.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,r=ni(t,this._startVector);return Math.abs(r)<e},e}(Qn);function ai(t){return Math.abs(t.y)>Math.abs(t.x)}var oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ai(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ai(t)&&ai(e)&&a}},e}(Qn),si={panStep:100,bearingStep:15,pitchStep:10},li=function(){var t=si;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function ui(t){return t*(2-t)}li.prototype.reset=function(){this._active=!1},li.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:\"keyboardHandler\",easing:ui,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},li.prototype.enable=function(){this._enabled=!0},li.prototype.disable=function(){this._enabled=!1,this.reset()},li.prototype.isEnabled=function(){return this._enabled},li.prototype.isActive=function(){return this._active};var ci=4.000244140625,fi=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,t.bindAll([\"_onWheel\",\"_onTimeout\",\"_onScrollFrame\",\"_onScrollFinished\"],this)};fi.prototype.setZoomRate=function(t){this._defaultZoomRate=t},fi.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},fi.prototype.isEnabled=function(){return!!this._enabled},fi.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},fi.prototype.isZooming=function(){return!!this._zooming},fi.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},fi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},fi.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%ci==0?this._type=\"wheel\":0!==r&&Math.abs(r)<4?this._type=\"trackpad\":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}},fi.prototype._onTimeout=function(t){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(t)},fi.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},fi.prototype.renderFrame=function(){return this._onScrollFrame()},fi.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n=\"wheel\"===this._type&&Math.abs(this._delta)>ci?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a=\"number\"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),\"wheel\"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s=\"number\"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,u=this._easing,c=!1;if(\"wheel\"===this._type&&l&&u){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):c=!0}else o=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},fi.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},fi.prototype.reset=function(){this._active=!1};var hi=function(t,e){this._clickZoom=t,this._tapZoom=e};hi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},hi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},hi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},hi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var pi=function(){this.reset()};pi.prototype.reset=function(){this._active=!1},pi.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},pi.prototype.enable=function(){this._enabled=!0},pi.prototype.disable=function(){this._enabled=!1,this.reset()},pi.prototype.isEnabled=function(){return this._enabled},pi.prototype.isActive=function(){return this._active};var di=function(){this._tap=new Yn({numTouches:1,numTaps:1}),this.reset()};di.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},di.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},di.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},di.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},di.prototype.touchcancel=function(){this.reset()},di.prototype.enable=function(){this._enabled=!0},di.prototype.disable=function(){this._enabled=!1,this.reset()},di.prototype.isEnabled=function(){return this._enabled},di.prototype.isActive=function(){return this._active};var gi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};gi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},gi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},gi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},gi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var vi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};vi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},vi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},vi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},vi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var mi=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};mi.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},mi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},mi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},mi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},mi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},mi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var yi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.Event);function bi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var _i=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new zn(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var i=this._el;this._listeners=[[i,\"touchstart\",{passive:!1}],[i,\"touchmove\",{passive:!1}],[i,\"touchend\",void 0],[i,\"touchcancel\",void 0],[i,\"mousedown\",void 0],[i,\"mousemove\",void 0],[i,\"mouseup\",void 0],[t.window.document,\"mousemove\",{capture:!0}],[t.window.document,\"mouseup\",void 0],[i,\"mouseover\",void 0],[i,\"mouseout\",void 0],[i,\"dblclick\",void 0],[i,\"click\",void 0],[i,\"keydown\",{capture:!1}],[i,\"keyup\",void 0],[i,\"wheel\",{passive:!1}],[i,\"contextmenu\",void 0],[t.window,\"blur\",void 0]];for(var a=0,o=this._listeners;a<o.length;a+=1){var s=o[a],l=s[0],u=s[1],c=s[2];r.addEventListener(l,u,l===t.window.document?this.handleWindowEvent:this.handleEvent,c)}};_i.prototype.destroy=function(){for(var e=0,n=this._listeners;e<n.length;e+=1){var i=n[e],a=i[0],o=i[1],s=i[2];r.removeEventListener(a,o,a===t.window.document?this.handleWindowEvent:this.handleEvent,s)}},_i.prototype._addDefaultHandlers=function(t){var e=this._map,r=e.getCanvasContainer();this._add(\"mapEvent\",new Un(e,t));var n=e.boxZoom=new Hn(e,t);this._add(\"boxZoom\",n);var i=new Wn,a=new pi;e.doubleClickZoom=new hi(a,i),this._add(\"tapZoom\",i),this._add(\"clickZoom\",a);var o=new di;this._add(\"tapDragZoom\",o);var s=e.touchPitch=new oi;this._add(\"touchPitch\",s);var l=new Kn(t),u=new Jn(t);e.dragRotate=new vi(t,l,u),this._add(\"mouseRotate\",l,[\"mousePitch\"]),this._add(\"mousePitch\",u,[\"mouseRotate\"]);var c=new Zn(t),f=new $n(t);e.dragPan=new gi(r,c,f),this._add(\"mousePan\",c),this._add(\"touchPan\",f,[\"touchZoom\",\"touchRotate\"]);var h=new ii,p=new ri;e.touchZoomRotate=new mi(r,p,h,o),this._add(\"touchRotate\",h,[\"touchPan\",\"touchZoom\"]),this._add(\"touchZoom\",p,[\"touchPan\",\"touchRotate\"]);var d=e.scrollZoom=new fi(e,this);this._add(\"scrollZoom\",d,[\"mousePan\"]);var g=e.keyboard=new li;this._add(\"keyboard\",g),this._add(\"blockableMapEvent\",new Vn(e));for(var v=0,m=[\"boxZoom\",\"doubleClickZoom\",\"tapDragZoom\",\"touchPitch\",\"dragRotate\",\"dragPan\",\"touchZoomRotate\",\"scrollZoom\",\"keyboard\"];v<m.length;v+=1){var y=m[v];t.interactive&&t[y]&&e[y].enable(t[y])}},_i.prototype._add=function(t,e,r){this._handlers.push({handlerName:t,handler:e,allowed:r}),this._handlersById[t]=e},_i.prototype.stop=function(){if(!this._updatingCamera){for(var t=0,e=this._handlers;t<e.length;t+=1)e[t].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},_i.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},_i.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},_i.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},_i.prototype.isMoving=function(){return Boolean(yi(this._eventsInProgress))||this.isZooming()},_i.prototype._blockedByActive=function(t,e,r){for(var n in t)if(n!==r&&(!e||e.indexOf(n)<0))return!0;return!1},_i.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+\"Window\")},_i.prototype._getMapTouches=function(t){for(var e=[],r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.target;this._el.contains(a)&&e.push(i)}return e},_i.prototype.handleEvent=function(t,e){if(\"blur\"!==t.type){this._updatingCamera=!0;for(var n=\"renderFrame\"===t.type?void 0:t,i={needsRenderFrame:!1},a={},o={},s=t.touches?this._getMapTouches(t.touches):void 0,l=s?r.touchPos(this._el,s):r.mousePos(this._el,t),u=0,c=this._handlers;u<c.length;u+=1){var f=c[u],h=f.handlerName,p=f.handler,d=f.allowed;if(p.isEnabled()){var g=void 0;this._blockedByActive(o,d,h)?p.reset():p[e||t.type]&&(g=p[e||t.type](t,l,s),this.mergeHandlerResult(i,a,g,h,n),g&&g.needsRenderFrame&&this._triggerRenderFrame()),(g||p.isActive())&&(o[h]=p)}}var v={};for(var m in this._previousActiveHandlers)o[m]||(v[m]=n);this._previousActiveHandlers=o,(Object.keys(v).length||bi(i))&&(this._changes.push([i,a,v]),this._triggerRenderFrame()),(Object.keys(o).length||bi(i))&&this._map._stop(!0),this._updatingCamera=!1;var y=i.cameraAnimation;y&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],y(this._map))}else this.stop()},_i.prototype.mergeHandlerResult=function(e,r,n,i,a){if(n){t.extend(e,n);var o={handlerName:i,originalEvent:n.originalEvent||a};void 0!==n.zoomDelta&&(r.zoom=o),void 0!==n.panDelta&&(r.drag=o),void 0!==n.pitchDelta&&(r.pitch=o),void 0!==n.bearingDelta&&(r.rotate=o)}},_i.prototype._applyChanges=function(){for(var e={},r={},n={},i=0,a=this._changes;i<a.length;i+=1){var o=a[i],s=o[0],l=o[1],u=o[2];s.panDelta&&(e.panDelta=(e.panDelta||new t.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(e.around=s.around),void 0!==s.pinchAround&&(e.pinchAround=s.pinchAround),s.noInertia&&(e.noInertia=s.noInertia),t.extend(r,l),t.extend(n,u)}this._updateMapTransform(e,r,n),this._changes=[]},_i.prototype._updateMapTransform=function(t,e,r){var n=this._map,i=n.transform;if(!bi(t))return this._fireEvents(e,r);var a=t.panDelta,o=t.zoomDelta,s=t.bearingDelta,l=t.pitchDelta,u=t.around,c=t.pinchAround;void 0!==c&&(u=c),n._stop(!0),u=u||n.transform.centerPoint;var f=i.pointLocation(a?u.sub(a):u);s&&(i.bearing+=s),l&&(i.pitch+=l),o&&(i.zoom+=o),i.setLocationAtPoint(f,u),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,r)},_i.prototype._fireEvents=function(e,r){var n=this,i=yi(this._eventsInProgress),a=yi(e),o={};for(var s in e){var l=e[s].originalEvent;this._eventsInProgress[s]||(o[s+\"start\"]=l),this._eventsInProgress[s]=e[s]}for(var u in!i&&a&&this._fireEvent(\"movestart\",a.originalEvent),o)this._fireEvent(u,o[u]);for(var c in e.rotate&&(this._bearingChanged=!0),a&&this._fireEvent(\"move\",a.originalEvent),e){var f=e[c].originalEvent;this._fireEvent(c,f)}var h,p={};for(var d in this._eventsInProgress){var g=this._eventsInProgress[d],v=g.handlerName,m=g.originalEvent;this._handlersById[v].isActive()||(delete this._eventsInProgress[d],h=r[v]||m,p[d+\"end\"]=h)}for(var y in p)this._fireEvent(y,p[y]);var x=yi(this._eventsInProgress);if((i||a)&&!x){this._updatingCamera=!0;var b=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),_=function(t){return 0!==t&&-n._bearingSnap<t&&t<n._bearingSnap};b?(_(b.bearing||this._map.getBearing())&&(b.bearing=0),this._map.easeTo(b,{originalEvent:h})):(this._map.fire(new t.Event(\"moveend\",{originalEvent:h})),_(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},_i.prototype._fireEvent=function(e,r){this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},_i.prototype._triggerRenderFrame=function(){var t=this;void 0===this._frameId&&(this._frameId=this._map._requestRenderFrame((function(e){delete t._frameId,t.handleEvent(new xi(\"renderFrame\",{timeStamp:e})),t._applyChanges()})))};var wi=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll([\"_renderFrameCallback\"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.getPadding=function(){return this.transform.padding},r.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.resetNorthPitch=function(e,r){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,r)},r.prototype._cameraForBoxAndBearing=function(e,r,n,i){var a={top:0,bottom:0,right:0,left:0};if(\"number\"==typeof(i=t.extend({padding:a,offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){var o=i.padding;i.padding={top:o,bottom:o,right:o,left:o}}i.padding=t.extend(a,i.padding);var s=this.transform,l=s.padding,u=s.project(t.LngLat.convert(e)),c=s.project(t.LngLat.convert(r)),f=u.rotate(-n*Math.PI/180),h=c.rotate(-n*Math.PI/180),p=new t.Point(Math.max(f.x,h.x),Math.max(f.y,h.y)),d=new t.Point(Math.min(f.x,h.x),Math.min(f.y,h.y)),g=p.sub(d),v=(s.width-(l.left+l.right+i.padding.left+i.padding.right))/g.x,m=(s.height-(l.top+l.bottom+i.padding.top+i.padding.bottom))/g.y;if(!(m<0||v<0)){var y=Math.min(s.scaleZoom(s.scale*Math.min(v,m)),i.maxZoom),x=t.Point.convert(i.offset),b=(i.padding.left-i.padding.right)/2,_=(i.padding.top-i.padding.bottom)/2,w=new t.Point(x.x+b,x.y+_).mult(s.scale/s.zoomScale(y));return{center:s.unproject(u.add(c).div(2).sub(w)),zoom:y,bearing:n}}t.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,n,i,a){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),n,i),i,a)},r.prototype._fitInternal=function(e,r,n){return e?(delete(r=t.extend(e,r)).padding,r.linear?this.easeTo(r,n):this.flyTo(r,n)):this},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return\"zoom\"in e&&n.zoom!==+e.zoom&&(i=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=t.LngLat.convert(e.center)),\"bearing\"in e&&n.bearing!==+e.bearing&&(a=!0,n.bearing=+e.bearing),\"pitch\"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),null==e.padding||n.isPaddingEqual(e.padding)||(n.padding=e.padding),this.fire(new t.Event(\"movestart\",r)).fire(new t.Event(\"move\",r)),i&&this.fire(new t.Event(\"zoomstart\",r)).fire(new t.Event(\"zoom\",r)).fire(new t.Event(\"zoomend\",r)),a&&this.fire(new t.Event(\"rotatestart\",r)).fire(new t.Event(\"rotate\",r)).fire(new t.Event(\"rotateend\",r)),o&&this.fire(new t.Event(\"pitchstart\",r)).fire(new t.Event(\"pitch\",r)).fire(new t.Event(\"pitchend\",r)),this.fire(new t.Event(\"moveend\",r))},r.prototype.easeTo=function(e,r){var n=this;this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.browser.prefersReducedMotion)&&(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=this.getPadding(),u=\"zoom\"in e?+e.zoom:a,c=\"bearing\"in e?this._normalizeBearing(e.bearing,o):o,f=\"pitch\"in e?+e.pitch:s,h=\"padding\"in e?e.padding:i.padding,p=t.Point.convert(e.offset),d=i.centerPoint.add(p),g=i.pointLocation(d),v=t.LngLat.convert(e.center||g);this._normalizeCenter(v);var m,y,x=i.project(g),b=i.project(v).sub(x),_=i.zoomScale(u-a);e.around&&(m=t.LngLat.convert(e.around),y=i.locationPoint(m));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||u!==a,this._rotating=this._rotating||o!==c,this._pitching=this._pitching||f!==s,this._padding=!i.isPaddingEqual(h),this._easeId=e.easeId,this._prepareEase(r,e.noMoveStart,w),clearTimeout(this._easeEndTimeoutID),this._ease((function(e){if(n._zooming&&(i.zoom=t.number(a,u,e)),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,f,e)),n._padding&&(i.interpolatePadding(l,h,e),d=i.centerPoint.add(p)),m)i.setLocationAtPoint(m,y);else{var g=i.zoomScale(i.zoom-a),v=u>a?Math.min(2,_):Math.max(.5,_),w=Math.pow(v,1-e),k=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?k.wrap():k,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event(\"movestart\",e)),this._zooming&&!n.zooming&&this.fire(new t.Event(\"zoomstart\",e)),this._rotating&&!n.rotating&&this.fire(new t.Event(\"rotatestart\",e)),this._pitching&&!n.pitching&&this.fire(new t.Event(\"pitchstart\",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event(\"move\",e)),this._zooming&&this.fire(new t.Event(\"zoom\",e)),this._rotating&&this.fire(new t.Event(\"rotate\",e)),this._pitching&&this.fire(new t.Event(\"pitch\",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event(\"zoomend\",e)),i&&this.fire(new t.Event(\"rotateend\",e)),a&&this.fire(new t.Event(\"pitchend\",e)),this.fire(new t.Event(\"moveend\",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c=\"zoom\"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f=\"bearing\"in e?this._normalizeBearing(e.bearing,s):s,h=\"pitch\"in e?+e.pitch:l,p=\"padding\"in e?e.padding:a.padding,d=a.zoomScale(c-o),g=t.Point.convert(e.offset),v=a.centerPoint.add(g),m=a.pointLocation(v),y=t.LngLat.convert(e.center||m);this._normalizeCenter(y);var x=a.project(m),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),k=w/d,T=b.mag();if(\"minZoom\"in e){var M=t.clamp(Math.min(e.minZoom,o,c),a.minZoom,a.maxZoom),A=w/a.zoomScale(M-o);_=Math.sqrt(A/T*2)}var S=_*_;function E(t){var e=(k*k-w*w+(t?-1:1)*S*S*T*T)/(2*(t?k:w)*S*T);return Math.log(Math.sqrt(e*e+1)-e)}function C(t){return(Math.exp(t)-Math.exp(-t))/2}function L(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),O=function(t){return L(P)/L(P+_*t)},I=function(t){return w*((L(P)*(C(e=P+_*t)/L(e))-C(P))/S)/T;var e},D=(E(1)-P)/_;if(Math.abs(T)<1e-6||!isFinite(D)){if(Math.abs(w-k)<1e-6)return this.easeTo(e,r);var z=k<w?-1:1;D=Math.abs(Math.log(k/w))/_,I=function(){return 0},O=function(t){return Math.exp(z*_*t)}}if(\"duration\"in e)e.duration=+e.duration;else{var R=\"screenSpeed\"in e?+e.screenSpeed/_:+e.speed;e.duration=1e3*D/R}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*D,d=1/O(i);a.zoom=1===e?c:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(u,p,e),v=a.centerPoint.add(g));var m=1===e?y:a.unproject(x.add(b.mult(I(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?m.wrap():m,v),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)<n&&(e-=360),Math.abs(e+360-r)<n&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),ki=function(e){void 0===e&&(e={}),this.options=e,t.bindAll([\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};ki.prototype.getDefaultPosition=function(){return\"bottom-right\"},ki.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._innerContainer=r.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),e&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),this._map.on(\"sourcedata\",this._updateData),this._map.on(\"moveend\",this._updateEditLink),void 0===e&&(this._map.on(\"resize\",this._updateCompact),this._updateCompact()),this._container},ki.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},ki.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var r=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+\"=\"+e.value+(n<r.length-1?\"&\":\"\")),t}),\"?\");e.href=t.config.FEEDBACK_URL+\"/\"+n+(this._map._hash?this._map._hash.getHashString(!0):\"\"),e.rel=\"noopener nofollow\"}},ki.prototype._updateData=function(t){!t||\"metadata\"!==t.sourceDataType&&\"style\"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},ki.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((function(t){return\"string\"!=typeof t?\"\":t}))):\"string\"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n];if(i.used){var a=i.getSource();a.attribution&&t.indexOf(a.attribution)<0&&t.push(a.attribution)}}t.sort((function(t,e){return t.length-e.length}));var o=(t=t.filter((function(e,r){for(var n=r+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0}))).join(\" | \");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},ki.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\")};var Ti=function(){t.bindAll([\"_updateLogo\"],this),t.bindAll([\"_updateCompact\"],this)};Ti.prototype.onAdd=function(t){this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl\");var e=r.create(\"a\",\"mapboxgl-ctrl-logo\");return e.target=\"_blank\",e.rel=\"noopener nofollow\",e.href=\"https://www.mapbox.com/\",e.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),e.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(e),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},Ti.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},Ti.prototype.getDefaultPosition=function(){return\"bottom-left\"},Ti.prototype._updateLogo=function(t){t&&\"metadata\"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?\"block\":\"none\")},Ti.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},Ti.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add(\"mapboxgl-compact\"):e.classList.remove(\"mapboxgl-compact\")}};var Mi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Mi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Mi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;r<n.length;r+=1){var i=n[r];if(i.id===t)return void(i.cancelled=!0)}},Mi.prototype.run=function(t){void 0===t&&(t=0);var e=this._currentlyRunning=this._queue;this._queue=[];for(var r=0,n=e;r<n.length;r+=1){var i=n[r];if(!i.cancelled&&(i.callback(t),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Mi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Ai={\"FullscreenControl.Enter\":\"Enter fullscreen\",\"FullscreenControl.Exit\":\"Exit fullscreen\",\"GeolocateControl.FindMyLocation\":\"Find my location\",\"GeolocateControl.LocationNotAvailable\":\"Location not available\",\"LogoControl.Title\":\"Mapbox logo\",\"NavigationControl.ResetBearing\":\"Reset bearing to north\",\"NavigationControl.ZoomIn\":\"Zoom in\",\"NavigationControl.ZoomOut\":\"Zoom out\",\"ScaleControl.Feet\":\"ft\",\"ScaleControl.Meters\":\"m\",\"ScaleControl.Kilometers\":\"km\",\"ScaleControl.Miles\":\"mi\",\"ScaleControl.NauticalMiles\":\"nm\"},Si=t.window.HTMLImageElement,Ei=t.window.HTMLElement,Ci=t.window.ImageBitmap,Li=60,Pi={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:Li,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:\"sans-serif\",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Oi=function(n){function i(e){var r=this;if(null!=(e=t.extend({},Pi,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(null!=e.minPitch&&e.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(null!=e.maxPitch&&e.maxPitch>Li)throw new Error(\"maxPitch must be less than or equal to 60\");var i=new Sn(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new Mi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ai,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),\"string\"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else{if(!(e.container instanceof Ei))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",(function(){return r._update(!1)})),this.on(\"moveend\",(function(){return r._update(!1)})),this.on(\"zoom\",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener(\"online\",this._onWindowOnline,!1),t.window.addEventListener(\"resize\",this._onWindowResize,!1)),this.handlers=new _i(this,e);var a=\"string\"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Cn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new ki({customAttribution:e.customAttribution})),this.addControl(new Ti,e.logoPosition),this.on(\"style.load\",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on(\"data\",(function(e){r._update(\"style\"===e.dataType),r.fire(new t.Event(e.dataType+\"data\",e))})),this.on(\"dataloading\",(function(e){r.fire(new t.Event(e.dataType+\"dataloading\",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r=\"top-right\"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf(\"bottom\")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event(\"movestart\",e)).fire(new t.Event(\"move\",e))),this.fire(new t.Event(\"resize\",e)),a&&this.fire(new t.Event(\"moveend\",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error(\"minZoom must be between -2 and the current maxZoom, inclusive\")},i.prototype.getMinZoom=function(){return this.transform.minZoom},i.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error(\"minPitch must be between 0 and the current maxPitch, inclusive\")},i.prototype.getMinPitch=function(){return this.transform.minPitch},i.prototype.setMaxPitch=function(t){if((t=null==t?Li:t)>Li)throw new Error(\"maxPitch must be less than or equal to 60\");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if(\"mouseenter\"===t||\"mouseover\"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Nn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if(\"mouseleave\"===t||\"mouseout\"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Nn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Nn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;return void 0===r?n.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o<a.length;o++){var s=a[o];if(s.layer===e&&s.listener===r){for(var l in s.delegates)i.off(l,s.delegates[l]);return a.splice(o,1),i}}}(this._delegatedListeners),this)},i.prototype.queryRenderedFeatures=function(e,r){if(!this.style)return[];var n;if(void 0!==r||void 0===e||e instanceof t.Point||Array.isArray(e)||(r=e,e=void 0),r=r||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||\"number\"==typeof e[0])n=[t.Point.convert(e)];else{var i=t.Point.convert(e[0]),a=t.Point.convert(e[1]);n=[i,new t.Point(a.x,i.y),a,new t.Point(i.x,a.y),i]}return this.style.queryRenderedFeatures(n,r,this.transform)},i.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},i.prototype.setStyle=function(e,r){return!1!==(r=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))},i.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error(\"Missing UI string '\"+t+\"'\");return e},i.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new We(this,e||{}),this.style.setEventedParent(this,{style:this.style}),\"string\"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},i.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new We(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},i.prototype._diffStyle=function(e,r){var n=this;if(\"string\"==typeof e){var i=this._requestManager.normalizeStyleURL(e),a=this._requestManager.transformRequest(i,t.ResourceType.Style);t.getJSON(a,(function(e,i){e?n.fire(new t.ErrorEvent(e)):i&&n._updateDiff(i,r)}))}else\"object\"==typeof e&&this._updateDiff(e,r)},i.prototype._updateDiff=function(e,r){try{this.style.setState(e)&&this._update(!0)}catch(n){t.warnOnce(\"Unable to perform style diff: \"+(n.message||n.error||n)+\".  Rebuilding the style from scratch.\"),this._updateStyle(e,r)}},i.prototype.getStyle=function(){if(this.style)return this.style.serialize()},i.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce(\"There is no style added to the map.\")},i.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},i.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error(\"There is no source with ID '\"+e+\"'\")))},i.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var n in r){var i=r[n];if(\"loaded\"!==i.state&&\"errored\"!==i.state)return!1}}return!0},i.prototype.addSourceType=function(t,e,r){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,r)},i.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},i.prototype.getSource=function(t){return this.style.getSource(t)},i.prototype.addImage=function(e,r,n){void 0===n&&(n={});var i=n.pixelRatio;void 0===i&&(i=1);var a=n.sdf;void 0===a&&(a=!1);var o=n.stretchX,s=n.stretchY,l=n.content;if(this._lazyInitEmptyStyle(),r instanceof Si||Ci&&r instanceof Ci){var u=t.browser.getImageData(r),c=u.width,f=u.height,h=u.data;this.style.addImage(e,{data:new t.RGBAImage({width:c,height:f},h),pixelRatio:i,stretchX:o,stretchY:s,content:l,sdf:a,version:0})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error(\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));var p=r.width,d=r.height,g=r.data,v=r;this.style.addImage(e,{data:new t.RGBAImage({width:p,height:d},new Uint8Array(g)),pixelRatio:i,stretchX:o,stretchY:s,content:l,sdf:a,version:0,userImage:v}),v.onAdd&&v.onAdd(this,e)}},i.prototype.updateImage=function(e,r){var n=this.style.getImage(e);if(!n)return this.fire(new t.ErrorEvent(new Error(\"The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.\")));var i=r instanceof Si||Ci&&r instanceof Ci?t.browser.getImageData(r):r,a=i.width,o=i.height,s=i.data;if(void 0===a||void 0===o)return this.fire(new t.ErrorEvent(new Error(\"Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));if(a!==n.data.width||o!==n.data.height)return this.fire(new t.ErrorEvent(new Error(\"The width and height of the updated image must be that same as the previous version of the image\")));var l=!(r instanceof Si||Ci&&r instanceof Ci);n.data.replace(s,l),this.style.updateImage(e,n)},i.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error(\"Missing required image id\"))),!1)},i.prototype.removeImage=function(t){this.style.removeImage(t)},i.prototype.loadImage=function(e,r){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),r)},i.prototype.listImages=function(){return this.style.listImages()},i.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},i.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},i.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},i.prototype.getLayer=function(t){return this.style.getLayer(t)},i.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0)},i.prototype.setFilter=function(t,e,r){return void 0===r&&(r={}),this.style.setFilter(t,e,r),this._update(!0)},i.prototype.getFilter=function(t){return this.style.getFilter(t)},i.prototype.setPaintProperty=function(t,e,r,n){return void 0===n&&(n={}),this.style.setPaintProperty(t,e,r,n),this._update(!0)},i.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},i.prototype.setLayoutProperty=function(t,e,r,n){return void 0===n&&(n={}),this.style.setLayoutProperty(t,e,r,n),this._update(!0)},i.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},i.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},i.prototype.getLight=function(){return this.style.getLight()},i.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},i.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},i.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},i.prototype.getContainer=function(){return this._container},i.prototype.getCanvasContainer=function(){return this._canvasContainer},i.prototype.getCanvas=function(){return this._canvas},i.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},i.prototype._detectMissingCSS=function(){\"rgb(250, 128, 114)\"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue(\"background-color\")&&t.warnOnce(\"This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.\")},i.prototype._setupContainer=function(){var t=this._container;t.classList.add(\"mapboxgl-map\"),(this._missingCSSCanary=r.create(\"div\",\"mapboxgl-canary\",t)).style.visibility=\"hidden\",this._detectMissingCSS();var e=this._canvasContainer=r.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=r.create(\"canvas\",\"mapboxgl-canvas\",e),this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",\"0\"),this._canvas.setAttribute(\"aria-label\",\"Map\");var n=this._containerDimensions();this._resizeCanvas(n[0],n[1]);var i=this._controlContainer=r.create(\"div\",\"mapboxgl-control-container\",t),a=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach((function(t){a[t]=r.create(\"div\",\"mapboxgl-ctrl-\"+t,i)}))},i.prototype._resizeCanvas=function(e,r){var n=t.browser.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*r,this._canvas.style.width=e+\"px\",this._canvas.style.height=r+\"px\"},i.prototype._setupPainter=function(){var r=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._canvas.getContext(\"webgl\",r)||this._canvas.getContext(\"experimental-webgl\",r);n?(this.painter=new kn(n,this.transform),t.webpSupported.testSupport(n)):this.fire(new t.ErrorEvent(new Error(\"Failed to initialize WebGL\")))},i.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event(\"webglcontextlost\",{originalEvent:e}))},i.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event(\"webglcontextrestored\",{originalEvent:e}))},i.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},i.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},i.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},i.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},i.prototype._render=function(e){var r,n=this,i=0,a=this.painter.context.extTimerQuery;if(this.listens(\"gpu-timing-frame\")&&(r=a.createQueryEXT(),a.beginQueryEXT(a.TIME_ELAPSED_EXT,r),i=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),!this._removed){var o=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,l=t.browser.now();this.style.zoomHistory.update(s,l);var u=new t.EvaluationParameters(s,{now:l,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=u.crossFadingFactor();1===c&&c===this._crossFadingFactor||(o=!0,this._crossFadingFactor=c),this.style.update(u)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens(\"gpu-timing-layer\")}),this.fire(new t.Event(\"render\")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event(\"load\"))),this.style&&(this.style.hasTransitions()||o)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens(\"gpu-timing-frame\")){var f=t.browser.now()-i;a.endQueryEXT(a.TIME_ELAPSED_EXT,r),setTimeout((function(){var e=a.getQueryObjectEXT(r,a.QUERY_RESULT_EXT)/1e6;a.deleteQueryEXT(r),n.fire(new t.Event(\"gpu-timing-frame\",{cpuTime:f,gpuTime:e}))}),50)}if(this.listens(\"gpu-timing-layer\")){var h=this.painter.collectGpuTimers();setTimeout((function(){var e=n.painter.queryGpuTimers(h);n.fire(new t.Event(\"gpu-timing-layer\",{layerTimes:e}))}),50)}return this._sourcesDirty||this._styleDirty||this._placementDirty||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new t.Event(\"idle\"))),this}},i.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,r=this._controls;e<r.length;e+=1)r[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener(\"resize\",this._onWindowResize,!1),t.window.removeEventListener(\"online\",this._onWindowOnline,!1));var n=this.painter.context.gl.getExtension(\"WEBGL_lose_context\");n&&n.loseContext(),Ii(this._canvasContainer),Ii(this._controlContainer),Ii(this._missingCSSCanary),this._container.classList.remove(\"mapboxgl-map\"),this._removed=!0,this.fire(new t.Event(\"remove\"))},i.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame((function(t){e._frame=null,e._render(t)})))},i.prototype._onWindowOnline=function(){this._update()},i.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},a.showTileBoundaries.get=function(){return!!this._showTileBoundaries},a.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},a.showPadding.get=function(){return!!this._showPadding},a.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},a.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},a.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},a.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},a.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},a.repaint.get=function(){return!!this._repaint},a.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},a.vertices.get=function(){return!!this._vertices},a.vertices.set=function(t){this._vertices=t,this._update()},i.prototype._setCacheLimits=function(e,r){t.setCacheLimits(e,r)},a.version.get=function(){return t.version},Object.defineProperties(i.prototype,a),i}(wi);function Ii(t){t.parentNode&&t.parentNode.removeChild(t)}var Di={showCompass:!0,showZoom:!0,visualizePitch:!1},zi=function(e){var n=this;this.options=t.extend({},Di,e),this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this.options.showZoom&&(t.bindAll([\"_setButtonTitle\",\"_updateZoomButtons\"],this),this._zoomInButton=this._createButton(\"mapboxgl-ctrl-zoom-in\",(function(t){return n._map.zoomIn({},{originalEvent:t})})),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._zoomInButton).setAttribute(\"aria-hidden\",!0),this._zoomOutButton=this._createButton(\"mapboxgl-ctrl-zoom-out\",(function(t){return n._map.zoomOut({},{originalEvent:t})})),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._zoomOutButton).setAttribute(\"aria-hidden\",!0)),this.options.showCompass&&(t.bindAll([\"_rotateCompassArrow\"],this),this._compass=this._createButton(\"mapboxgl-ctrl-compass\",(function(t){n.options.visualizePitch?n._map.resetNorthPitch({},{originalEvent:t}):n._map.resetNorth({},{originalEvent:t})})),this._compassIcon=r.create(\"span\",\"mapboxgl-ctrl-icon\",this._compass),this._compassIcon.setAttribute(\"aria-hidden\",!0))};zi.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.disabled=t===this._map.getMaxZoom(),this._zoomOutButton.disabled=t===this._map.getMinZoom()},zi.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?\"scale(\"+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+\") rotateX(\"+this._map.transform.pitch+\"deg) rotateZ(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\":\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassIcon.style.transform=t},zi.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,\"ZoomIn\"),this._setButtonTitle(this._zoomOutButton,\"ZoomOut\"),this._map.on(\"zoom\",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,\"ResetBearing\"),this.options.visualizePitch&&this._map.on(\"pitch\",this._rotateCompassArrow),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ri(this._map,this._compass,this.options.visualizePitch)),this._container},zi.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off(\"zoom\",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off(\"pitch\",this._rotateCompassArrow),this._map.off(\"rotate\",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},zi.prototype._createButton=function(t,e){var n=r.create(\"button\",t,this._container);return n.type=\"button\",n.addEventListener(\"click\",e),n},zi.prototype._setButtonTitle=function(t,e){var r=this._map._getUIString(\"NavigationControl.\"+e);t.title=r,t.setAttribute(\"aria-label\",r)};var Ri=function(e,n,i){void 0===i&&(i=!1),this._clickTolerance=10,this.element=n,this.mouseRotate=new Kn({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,i&&(this.mousePitch=new Jn({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll([\"mousedown\",\"mousemove\",\"mouseup\",\"touchstart\",\"touchmove\",\"touchend\",\"reset\"],this),r.addEventListener(n,\"mousedown\",this.mousedown),r.addEventListener(n,\"touchstart\",this.touchstart,{passive:!1}),r.addEventListener(n,\"touchmove\",this.touchmove),r.addEventListener(n,\"touchend\",this.touchend),r.addEventListener(n,\"touchcancel\",this.reset)};function Fi(e,r,n){if(e=new t.LngLat(e.lng,e.lat),r){var i=new t.LngLat(e.lng-360,e.lat),a=new t.LngLat(e.lng+360,e.lat),o=n.locationPoint(e).distSqr(r);n.locationPoint(i).distSqr(r)<o?e=i:n.locationPoint(a).distSqr(r)<o&&(e=a)}for(;Math.abs(e.lng-n.center.lng)>180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ri.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ri.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ri.prototype.off=function(){var t=this.element;r.removeEventListener(t,\"mousedown\",this.mousedown),r.removeEventListener(t,\"touchstart\",this.touchstart,{passive:!1}),r.removeEventListener(t,\"touchmove\",this.touchmove),r.removeEventListener(t,\"touchend\",this.touchend),r.removeEventListener(t,\"touchcancel\",this.reset),this.offTemp()},Ri.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,\"mousemove\",this.mousemove),r.removeEventListener(t.window,\"mouseup\",this.mouseup)},Ri.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,\"mousemove\",this.mousemove),r.addEventListener(t.window,\"mouseup\",this.mouseup)},Ri.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ri.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ri.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ri.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ri.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ri.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var Ni={center:\"translate(-50%,-50%)\",top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"};function Bi(t,e,r){var n=t.classList;for(var i in Ni)n.remove(\"mapboxgl-\"+r+\"-anchor-\"+i);n.add(\"mapboxgl-\"+r+\"-anchor-\"+e)}var ji,Ui=function(e){function n(n,i){var a=this;if(e.call(this),(n instanceof t.window.HTMLElement||i)&&(n=t.extend({element:n},i)),t.bindAll([\"_update\",\"_onMove\",\"_onUp\",\"_addDragHandler\",\"_onMapClick\",\"_onKeyPress\"],this),this._anchor=n&&n.anchor||\"center\",this._color=n&&n.color||\"#3FB1CE\",this._draggable=n&&n.draggable||!1,this._state=\"inactive\",this._rotation=n&&n.rotation||0,this._rotationAlignment=n&&n.rotationAlignment||\"auto\",this._pitchAlignment=n&&n.pitchAlignment&&\"auto\"!==n.pitchAlignment?n.pitchAlignment:this._rotationAlignment,n&&n.element)this._element=n.element,this._offset=t.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create(\"div\"),this._element.setAttribute(\"aria-label\",\"Map marker\");var o=r.createNS(\"http://www.w3.org/2000/svg\",\"svg\");o.setAttributeNS(null,\"display\",\"block\"),o.setAttributeNS(null,\"height\",\"41px\"),o.setAttributeNS(null,\"width\",\"27px\"),o.setAttributeNS(null,\"viewBox\",\"0 0 27 41\");var s=r.createNS(\"http://www.w3.org/2000/svg\",\"g\");s.setAttributeNS(null,\"stroke\",\"none\"),s.setAttributeNS(null,\"stroke-width\",\"1\"),s.setAttributeNS(null,\"fill\",\"none\"),s.setAttributeNS(null,\"fill-rule\",\"evenodd\");var l=r.createNS(\"http://www.w3.org/2000/svg\",\"g\");l.setAttributeNS(null,\"fill-rule\",\"nonzero\");var u=r.createNS(\"http://www.w3.org/2000/svg\",\"g\");u.setAttributeNS(null,\"transform\",\"translate(3.0, 29.0)\"),u.setAttributeNS(null,\"fill\",\"#000000\");for(var c=0,f=[{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"9.5\",ry:\"4.77275007\"},{rx:\"8.5\",ry:\"4.29549936\"},{rx:\"7.5\",ry:\"3.81822308\"},{rx:\"6.5\",ry:\"3.34094679\"},{rx:\"5.5\",ry:\"2.86367051\"},{rx:\"4.5\",ry:\"2.38636864\"}];c<f.length;c+=1){var h=f[c],p=r.createNS(\"http://www.w3.org/2000/svg\",\"ellipse\");p.setAttributeNS(null,\"opacity\",\"0.04\"),p.setAttributeNS(null,\"cx\",\"10.5\"),p.setAttributeNS(null,\"cy\",\"5.80029008\"),p.setAttributeNS(null,\"rx\",h.rx),p.setAttributeNS(null,\"ry\",h.ry),u.appendChild(p)}var d=r.createNS(\"http://www.w3.org/2000/svg\",\"g\");d.setAttributeNS(null,\"fill\",this._color);var g=r.createNS(\"http://www.w3.org/2000/svg\",\"path\");g.setAttributeNS(null,\"d\",\"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z\"),d.appendChild(g);var v=r.createNS(\"http://www.w3.org/2000/svg\",\"g\");v.setAttributeNS(null,\"opacity\",\"0.25\"),v.setAttributeNS(null,\"fill\",\"#000000\");var m=r.createNS(\"http://www.w3.org/2000/svg\",\"path\");m.setAttributeNS(null,\"d\",\"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z\"),v.appendChild(m);var y=r.createNS(\"http://www.w3.org/2000/svg\",\"g\");y.setAttributeNS(null,\"transform\",\"translate(6.0, 7.0)\"),y.setAttributeNS(null,\"fill\",\"#FFFFFF\");var x=r.createNS(\"http://www.w3.org/2000/svg\",\"g\");x.setAttributeNS(null,\"transform\",\"translate(8.0, 8.0)\");var b=r.createNS(\"http://www.w3.org/2000/svg\",\"circle\");b.setAttributeNS(null,\"fill\",\"#000000\"),b.setAttributeNS(null,\"opacity\",\"0.25\"),b.setAttributeNS(null,\"cx\",\"5.5\"),b.setAttributeNS(null,\"cy\",\"5.5\"),b.setAttributeNS(null,\"r\",\"5.4999962\");var _=r.createNS(\"http://www.w3.org/2000/svg\",\"circle\");_.setAttributeNS(null,\"fill\",\"#FFFFFF\"),_.setAttributeNS(null,\"cx\",\"5.5\"),_.setAttributeNS(null,\"cy\",\"5.5\"),_.setAttributeNS(null,\"r\",\"5.4999962\"),x.appendChild(b),x.appendChild(_),l.appendChild(u),l.appendChild(d),l.appendChild(v),l.appendChild(y),l.appendChild(x),o.appendChild(l),this._element.appendChild(o),this._offset=t.Point.convert(n&&n.offset||[0,-14])}this._element.classList.add(\"mapboxgl-marker\"),this._element.addEventListener(\"dragstart\",(function(t){t.preventDefault()})),this._element.addEventListener(\"mousedown\",(function(t){t.preventDefault()})),this._element.addEventListener(\"focus\",(function(){var t=a._map.getContainer();t.scrollTop=0,t.scrollLeft=0})),Bi(this._element,this._anchor,\"marker\"),this._popup=null}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\"move\",this._update),t.on(\"moveend\",this._update),this.setDraggable(this._draggable),this._update(),this._map.on(\"click\",this._onMapClick),this},n.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler),this._map.off(\"mouseup\",this._onUp),this._map.off(\"touchend\",this._onUp),this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},n.prototype.getElement=function(){return this._element},n.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener(\"keypress\",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute(\"tabindex\")),t){if(!(\"offset\"in t.options)){var e=13.5,r=Math.sqrt(Math.pow(e,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],\"top-left\":[0,0],\"top-right\":[0,0],bottom:[0,-38.1],\"bottom-left\":[r,-1*(24.6+r)],\"bottom-right\":[-r,-1*(24.6+r)],left:[e,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute(\"tabindex\"),this._originalTabIndex||this._element.setAttribute(\"tabindex\",\"0\"),this._element.addEventListener(\"keypress\",this._onKeyPress)}return this},n.prototype._onKeyPress=function(t){var e=t.code,r=t.charCode||t.keyCode;\"Space\"!==e&&\"Enter\"!==e&&32!==r&&13!==r||this.togglePopup()},n.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},n.prototype.getPopup=function(){return this._popup},n.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},n.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Fi(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e=\"\";\"viewport\"===this._rotationAlignment||\"auto\"===this._rotationAlignment?e=\"rotateZ(\"+this._rotation+\"deg)\":\"map\"===this._rotationAlignment&&(e=\"rotateZ(\"+(this._rotation-this._map.getBearing())+\"deg)\");var n=\"\";\"viewport\"===this._pitchAlignment||\"auto\"===this._pitchAlignment?n=\"rotateX(0deg)\":\"map\"===this._pitchAlignment&&(n=\"rotateX(\"+this._map.getPitch()+\"deg)\"),t&&\"moveend\"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,Ni[this._anchor]+\" translate(\"+this._pos.x+\"px, \"+this._pos.y+\"px) \"+n+\" \"+e)}},n.prototype.getOffset=function(){return this._offset},n.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},n.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents=\"none\",\"pending\"===this._state&&(this._state=\"active\",this.fire(new t.Event(\"dragstart\"))),this.fire(new t.Event(\"drag\"))},n.prototype._onUp=function(){this._element.style.pointerEvents=\"auto\",this._positionDelta=null,this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),\"active\"===this._state&&this.fire(new t.Event(\"dragend\")),this._state=\"inactive\"},n.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state=\"pending\",this._map.on(\"mousemove\",this._onMove),this._map.on(\"touchmove\",this._onMove),this._map.once(\"mouseup\",this._onUp),this._map.once(\"touchend\",this._onUp))},n.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on(\"mousedown\",this._addDragHandler),this._map.on(\"touchstart\",this._addDragHandler)):(this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler))),this},n.prototype.isDraggable=function(){return this._draggable},n.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},n.prototype.getRotation=function(){return this._rotation},n.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||\"auto\",this._update(),this},n.prototype.getRotationAlignment=function(){return this._rotationAlignment},n.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&\"auto\"!==t?t:this._rotationAlignment,this._update(),this},n.prototype.getPitchAlignment=function(){return this._pitchAlignment},n}(t.Evented),Vi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Hi=0,qi=!1,Gi=function(e){function n(r){e.call(this),this.options=t.extend({},Vi,r),t.bindAll([\"_onSuccess\",\"_onError\",\"_onZoom\",\"_finish\",\"_setupUI\",\"_updateCamera\",\"_updateMarker\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(e){return this._map=e,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),n=this._setupUI,void 0!==ji?n(ji):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:\"geolocation\"}).then((function(t){ji=\"denied\"!==t.state,n(ji)})):(ji=!!t.window.navigator.geolocation,n(ji)),this._container;var n},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off(\"zoom\",this._onZoom),this._map=void 0,Hi=0,qi=!1},n.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),r=t.coords;return e&&(r.longitude<e.getWest()||r.longitude>e.getEast()||r.latitude<e.getSouth()||r.latitude>e.getNorth())},n.prototype._setErrorState=function(){switch(this._watchState){case\"WAITING_ACTIVE\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"ACTIVE_LOCK\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\");break;case\"BACKGROUND\":this._watchState=\"BACKGROUND_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event(\"outofmaxbounds\",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"BACKGROUND\":case\"BACKGROUND_ERROR\":this._watchState=\"BACKGROUND\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\")}this.options.showUserLocation&&\"OFF\"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&\"ACTIVE_LOCK\"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"geolocate\",e)),this._finish()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+\"px\",this._circleElement.style.height=i+\"px\"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.disabled=!0;var r=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=r,this._geolocateButton.setAttribute(\"aria-label\",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&qi)return;this._setErrorState()}\"OFF\"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new t.Event(\"error\",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener(\"contextmenu\",(function(t){return t.preventDefault()})),this._geolocateButton=r.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),r.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",!1===e){t.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var i=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute(\"aria-label\",i)}else{var a=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=a,this._geolocateButton.setAttribute(\"aria-label\",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=r.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Ui(this._dotElement),this._circleElement=r.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Ui({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",(function(e){var r=e.originalEvent&&\"resize\"===e.originalEvent.type;e.geolocateSource||\"ACTIVE_LOCK\"!==n._watchState||r||(n._watchState=\"BACKGROUND\",n._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),n._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),n.fire(new t.Event(\"trackuserlocationend\")))}))},n.prototype.trigger=function(){if(!this._setup)return t.warnOnce(\"Geolocate control triggered before added to a map\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\"OFF\":this._watchState=\"WAITING_ACTIVE\",this.fire(new t.Event(\"trackuserlocationstart\"));break;case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":case\"BACKGROUND_ERROR\":Hi--,qi=!1,this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this.fire(new t.Event(\"trackuserlocationend\"));break;case\"BACKGROUND\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event(\"trackuserlocationstart\"))}switch(this._watchState){case\"WAITING_ACTIVE\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_LOCK\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"BACKGROUND\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\");break;case\"BACKGROUND_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\")}if(\"OFF\"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),++Hi>1?(e={maximumAge:6e5,timeout:0},qi=!0):(e=this.options.positionOptions,qi=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this.options.showUserLocation&&this._updateMarker(null)},n}(t.Evented),Yi={maxWidth:100,unit:\"metric\"},Wi=function(e){this.options=t.extend({},Yi,e),t.bindAll([\"_onMove\",\"setUnit\"],this)};function Xi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&\"imperial\"===r.unit){var l=3.2808*s;l>5280?Zi(e,n,l/5280,t._getUIString(\"ScaleControl.Miles\")):Zi(e,n,l,t._getUIString(\"ScaleControl.Feet\"))}else r&&\"nautical\"===r.unit?Zi(e,n,s/1852,t._getUIString(\"ScaleControl.NauticalMiles\")):s>=1e3?Zi(e,n,s/1e3,t._getUIString(\"ScaleControl.Kilometers\")):Zi(e,n,s,t._getUIString(\"ScaleControl.Meters\"))}function Zi(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(\"\"+Math.floor(i)).length-1))*((o=i/a)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o))),l=s/r;t.style.width=e*l+\"px\",t.innerHTML=s+\"&nbsp;\"+n}Wi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Wi.prototype._onMove=function(){Xi(this._map,this._container,this.options)},Wi.prototype.onAdd=function(t){return this._map=t,this._container=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Wi.prototype.onRemove=function(){r.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Wi.prototype.setUnit=function(t){this.options.unit=t,Xi(this._map,this._container,this.options)};var Ki=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce(\"Full screen control 'container' must be a DOM element.\")),t.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in t.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in t.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in t.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in t.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};Ki.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",t.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},Ki.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ki.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Ki.prototype._setupUI=function(){var e=this._fullscreenButton=r.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);r.create(\"span\",\"mapboxgl-ctrl-icon\",e).setAttribute(\"aria-hidden\",!0),e.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ki.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",t),this._fullscreenButton.title=t},Ki.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},Ki.prototype._isFullscreen=function(){return this._fullscreen},Ki.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},Ki.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Ji={closeButton:!0,closeOnClick:!0,className:\"\",maxWidth:\"240px\"},$i=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Ji),r),t.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new t.Event(\"open\")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new t.Event(\"close\")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement(\"body\");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=r.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"&#215;\",this._closeButton.addEventListener(\"click\",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(t){var e=this,n=this._lngLat||this._trackPointer;if(this._map&&n&&this._content&&(this._container||(this._container=r.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=r.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach((function(t){return e._container.classList.add(t)})),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Fi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)){var i=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),a=this.options.anchor,o=Qi(this.options.offset);if(!a){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=i.y+o.bottom.y<u?[\"top\"]:i.y>this._map.transform.height-u?[\"bottom\"]:[],i.x<l/2?s.push(\"left\"):i.x>this._map.transform.width-l/2&&s.push(\"right\"),a=0===s.length?\"bottom\":s.join(\"-\")}var c=i.add(o[a]).round();r.setTransform(this._container,Ni[a]+\" translate(\"+c.x+\"px,\"+c.y+\"px)\"),Bi(this._container,a,\"popup\")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);function Qi(e){if(e){if(\"number\"==typeof e){var r=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new t.Point(0,0),top:new t.Point(0,e),\"top-left\":new t.Point(r,r),\"top-right\":new t.Point(-r,r),bottom:new t.Point(0,-e),\"bottom-left\":new t.Point(r,-r),\"bottom-right\":new t.Point(-r,-r),left:new t.Point(e,0),right:new t.Point(-e,0)}}if(e instanceof t.Point||Array.isArray(e)){var n=t.Point.convert(e);return{center:n,top:n,\"top-left\":n,\"top-right\":n,bottom:n,\"bottom-left\":n,\"bottom-right\":n,left:n,right:n}}return{center:t.Point.convert(e.center||[0,0]),top:t.Point.convert(e.top||[0,0]),\"top-left\":t.Point.convert(e[\"top-left\"]||[0,0]),\"top-right\":t.Point.convert(e[\"top-right\"]||[0,0]),bottom:t.Point.convert(e.bottom||[0,0]),\"bottom-left\":t.Point.convert(e[\"bottom-left\"]||[0,0]),\"bottom-right\":t.Point.convert(e[\"bottom-right\"]||[0,0]),left:t.Point.convert(e.left||[0,0]),right:t.Point.convert(e.right||[0,0])}}return Qi(new t.Point(0,0))}var ta={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Oi,NavigationControl:zi,GeolocateControl:Gi,AttributionControl:ki,ScaleControl:Wi,FullscreenControl:Ki,Popup:$i,Marker:Ui,Style:We,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){jt().acquire(Rt)},clearPrewarmedResources:function(){var t=Nt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Rt),Nt=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Ft.workerCount},set workerCount(t){Ft.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:\"\"};return ta})),r},\"object\"==typeof r&&void 0!==e?e.exports=i():(n=n||self).mapboxgl=i()},{}],240:[function(t,e,r){\"use strict\";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[function(t,e,r){\"use strict\";e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return\"altKey\"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),\"shiftKey\"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),\"ctrlKey\"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),\"metaKey\"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function u(t,s){var u=n.x(s),c=n.y(s);\"buttons\"in s&&(t=0|s.buttons),(t!==r||u!==i||c!==a||l(s))&&(r=0|t,i=u||0,a=c||0,e&&e(r,i,a,o))}function c(t){u(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?u(0,t):u(r,t)}function d(t){u(r|n.buttons(t),t)}function g(t){u(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener(\"mousemove\",p),t.addEventListener(\"mousedown\",d),t.addEventListener(\"mouseup\",g),t.addEventListener(\"mouseleave\",c),t.addEventListener(\"mouseenter\",c),t.addEventListener(\"mouseout\",c),t.addEventListener(\"mouseover\",c),t.addEventListener(\"blur\",f),t.addEventListener(\"keyup\",h),t.addEventListener(\"keydown\",h),t.addEventListener(\"keypress\",h),t!==window&&(window.addEventListener(\"blur\",f),window.addEventListener(\"keyup\",h),window.addEventListener(\"keydown\",h),window.addEventListener(\"keypress\",h)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener(\"mousemove\",p),t.removeEventListener(\"mousedown\",d),t.removeEventListener(\"mouseup\",g),t.removeEventListener(\"mouseleave\",c),t.removeEventListener(\"mouseenter\",c),t.removeEventListener(\"mouseout\",c),t.removeEventListener(\"mouseover\",c),t.removeEventListener(\"blur\",f),t.removeEventListener(\"keyup\",h),t.removeEventListener(\"keydown\",h),t.removeEventListener(\"keypress\",h),t!==window&&(window.removeEventListener(\"blur\",f),window.removeEventListener(\"keyup\",h),window.removeEventListener(\"keydown\",h),window.removeEventListener(\"keypress\",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t(\"mouse-event\")},{\"mouse-event\":243}],242:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i,a=t.clientX||0,o=t.clientY||0,s=(i=e)===window||i===document||i===document.body?n:i.getBoundingClientRect();return r[0]=a-s.left,r[1]=o-s.top,r}},{}],243:[function(t,e,r){\"use strict\";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(\"object\"==typeof t){if(\"buttons\"in t)return t.buttons;if(\"which\"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if(\"button\"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},r.element=n,r.x=function(t){if(\"object\"==typeof t){if(\"offsetX\"in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(\"object\"==typeof t){if(\"offsetY\"in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],244:[function(t,e,r){\"use strict\";var n=t(\"to-px\");e.exports=function(t,e,r){\"function\"==typeof t&&(r=!!e,e=t,t=window);var i=n(\"ex\",t),a=function(t){r&&t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=1;switch(t.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(a*=s,o*=s,(n*=s)||a||o)return e(n,a,o,t)};return t.addEventListener(\"wheel\",a),a}},{\"to-px\":315}],245:[function(t,e,n){(function(t,r){(function(){!function(t,n,i){n[t]=n[t]||function(){\"use strict\";var t,e,n,i=Object.prototype.toString,a=void 0!==r?function(t){return r(t)}:setTimeout;try{Object.defineProperty({},\"x\",{}),t=function(t,e,r,n){return Object.defineProperty(t,e,{value:r,writable:!0,configurable:!1!==n})}}catch(e){t=function(t,e,r){return t[e]=r,t}}function o(t,r){n.add(t,r),e||(e=a(n.drain))}function s(t){var e,r=typeof t;return null==t||\"object\"!=r&&\"function\"!=r||(e=t.then),\"function\"==typeof e&&e}function l(){for(var t=0;t<this.chain.length;t++)u(this,1===this.state?this.chain[t].success:this.chain[t].failure,this.chain[t]);this.chain.length=0}function u(t,e,r){var n,i;try{!1===e?r.reject(t.msg):(n=!0===e?t.msg:e.call(void 0,t.msg))===r.promise?r.reject(TypeError(\"Promise-chain cycle\")):(i=s(n))?i.call(n,r.resolve,r.reject):r.resolve(n)}catch(t){r.reject(t)}}function c(t){var e,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(e=s(t))?o((function(){var n=new p(r);try{e.call(t,(function(){c.apply(n,arguments)}),(function(){f.apply(n,arguments)}))}catch(t){f.call(n,t)}})):(r.msg=t,r.state=1,r.chain.length>0&&o(l,r))}catch(t){f.call(new p(r),t)}}}function f(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&o(l,e))}function h(t,e,r,n){for(var i=0;i<e.length;i++)!function(i){t.resolve(e[i]).then((function(t){r(i,t)}),n)}(i)}function p(t){this.def=t,this.triggered=!1}function d(t){this.promise=t,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(t){if(\"function\"!=typeof t)throw TypeError(\"Not a function\");if(0!==this.__NPO__)throw TypeError(\"Not a promise\");this.__NPO__=1;var e=new d(this);this.then=function(t,r){var n={success:\"function\"!=typeof t||t,failure:\"function\"==typeof r&&r};return n.promise=new this.constructor((function(t,e){if(\"function\"!=typeof t||\"function\"!=typeof e)throw TypeError(\"Not a function\");n.resolve=t,n.reject=e})),e.chain.push(n),0!==e.state&&o(l,e),n.promise},this.catch=function(t){return this.then(void 0,t)};try{t.call(void 0,(function(t){c.call(e,t)}),(function(t){f.call(e,t)}))}catch(t){f.call(e,t)}}n=function(){var t,r,n;function i(t,e){this.fn=t,this.self=e,this.next=void 0}return{add:function(e,a){n=new i(e,a),r?r.next=n:t=n,r=n,n=void 0},drain:function(){var n=t;for(t=r=e=void 0;n;)n.fn.call(n.self),n=n.next}}}();var v=t({},\"constructor\",g,!1);return g.prototype=v,t(v,\"__NPO__\",0,!1),t(g,\"resolve\",(function(t){var e=this;return t&&\"object\"==typeof t&&1===t.__NPO__?t:new e((function(e,r){if(\"function\"!=typeof e||\"function\"!=typeof r)throw TypeError(\"Not a function\");e(t)}))})),t(g,\"reject\",(function(t){return new this((function(e,r){if(\"function\"!=typeof e||\"function\"!=typeof r)throw TypeError(\"Not a function\");r(t)}))})),t(g,\"all\",(function(t){var e=this;return\"[object Array]\"!=i.call(t)?e.reject(TypeError(\"Not an array\")):0===t.length?e.resolve([]):new e((function(r,n){if(\"function\"!=typeof r||\"function\"!=typeof n)throw TypeError(\"Not a function\");var i=t.length,a=Array(i),o=0;h(e,t,(function(t,e){a[t]=e,++o===i&&r(a)}),n)}))})),t(g,\"race\",(function(t){var e=this;return\"[object Array]\"!=i.call(t)?e.reject(TypeError(\"Not an array\")):new e((function(r,n){if(\"function\"!=typeof r||\"function\"!=typeof n)throw TypeError(\"Not a function\");h(e,t,(function(t,e){r(e)}),n)}))})),g}(),void 0!==e&&e.exports&&(e.exports=n[t])}(\"Promise\",void 0!==t?t:this)}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{},t(\"timers\").setImmediate)},{timers:312}],246:[function(t,e,r){var n=Math.PI,i=u(120);function a(t,e,r,n){return[\"C\",t,e,r,n,r,n]}function o(t,e,r,n,i,a){return[\"C\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,u,c,f,h,p){if(p)k=p[0],T=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(f=(d=l(f,h,-o)).x))/2,v=(e-(h=d.y))/2,m=g*g/(r*r)+v*v/(a*a);m>1&&(r*=m=Math.sqrt(m),a*=m);var y=r*r,x=a*a,b=(u==c?-1:1)*Math.sqrt(Math.abs((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g)));b==1/0&&(b=1);var _=b*r*v/a+(t+f)/2,w=b*-a*g/r+(e+h)/2,k=Math.asin(((e-w)/a).toFixed(9)),T=Math.asin(((h-w)/a).toFixed(9));(k=t<_?n-k:k)<0&&(k=2*n+k),(T=f<_?n-T:T)<0&&(T=2*n+T),c&&k>T&&(k-=2*n),!c&&T>k&&(T-=2*n)}if(Math.abs(T-k)>i){var M=T,A=f,S=h;T=k+i*(c&&T>k?1:-1);var E=s(f=_+r*Math.cos(T),h=w+a*Math.sin(T),r,a,o,0,c,A,S,[T,M,_,w])}var C=Math.tan((T-k)/4),L=4/3*r*C,P=4/3*a*C,O=[2*t-(t+L*Math.sin(k)),2*e-(e-P*Math.cos(k)),f+L*Math.sin(T),h-P*Math.cos(T),f,h];if(p)return O;E&&(O=O.concat(E));for(var I=0;I<O.length;){var D=l(O[I],O[I+1],o);O[I++]=D.x,O[I++]=D.y}return O}function l(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function u(t){return t*(n/180)}e.exports=function(t){for(var e,r=[],n=0,i=0,l=0,c=0,f=null,h=null,p=0,d=0,g=0,v=t.length;g<v;g++){var m=t[g],y=m[0];switch(y){case\"M\":l=m[1],c=m[2];break;case\"A\":(m=s(p,d,m[1],m[2],u(m[3]),m[4],m[5],m[6],m[7])).unshift(\"C\"),m.length>7&&(r.push(m.splice(0,7)),m.unshift(\"C\"));break;case\"S\":var x=p,b=d;\"C\"!=e&&\"S\"!=e||(x+=x-n,b+=b-i),m=[\"C\",x,b,m[1],m[2],m[3],m[4]];break;case\"T\":\"Q\"==e||\"T\"==e?(f=2*p-f,h=2*d-h):(f=p,h=d),m=o(p,d,f,h,m[1],m[2]);break;case\"Q\":f=m[1],h=m[2],m=o(p,d,m[1],m[2],m[3],m[4]);break;case\"L\":m=a(p,d,m[1],m[2]);break;case\"H\":m=a(p,d,m[1],d);break;case\"V\":m=a(p,d,p,m[1]);break;case\"Z\":m=a(p,d,l,c)}e=y,p=m[m.length-2],d=m[m.length-1],m.length>4?(n=m[m.length-4],i=m[m.length-3]):(n=p,i=d),r.push(m)}return r}},{}],247:[function(t,e,r){\"use strict\";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(t)}e.exports=function(){try{if(!Object.assign)return!1;var t=new String(\"abc\");if(t[5]=\"de\",\"5\"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e[\"_\"+String.fromCharCode(r)]=r;if(\"0123456789\"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(\"\"))return!1;var n={};return\"abcdefghijklmnopqrst\".split(\"\").forEach((function(t){n[t]=t})),\"abcdefghijklmnopqrst\"===Object.keys(Object.assign({},n)).join(\"\")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=o(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(l[c]=r[c]);if(n){s=n(r);for(var f=0;f<s.length;f++)a.call(r,s[f])&&(l[s[f]]=r[s[f]])}}return l}},{}],248:[function(t,e,r){\"use strict\";function n(t,e){if(\"string\"!=typeof t)return[t];var r=[t];\"string\"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:[\"{}\",\"[]\",\"()\"],i=e.escape||\"___\",a=!!e.flat;n.forEach((function(t){var e=new RegExp([\"\\\\\",t[0],\"[^\\\\\",t[0],\"\\\\\",t[1],\"]*\\\\\",t[1]].join(\"\")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error(\"References have circular dependency. Please, check them.\");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp(\"(\\\\\"+i+r+\"\\\\\"+i+\")\",\"g\"),t[0]+\"$1\"+t[1])})),e}))}));var o=new RegExp(\"\\\\\"+i+\"([0-9]+)\\\\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error(\"Circular references in parenthesis\");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&&e.flat){var r,n=e&&e.escape||\"___\",i=t[0];if(!i)return\"\";for(var a=new RegExp(\"\\\\\"+n+\"([0-9]+)\\\\\"+n),o=0;i!=r;){if(o++>1e4)throw Error(\"Circular references in \"+t);r=i,i=i.replace(a,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,\"\")),e+r}),\"\");function s(e,r){if(null==t[r])throw Error(\"Reference \"+r+\"is undefined\");return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],249:[function(t,e,r){\"use strict\";var n=t(\"pick-by-alias\");e.exports=function(t){var e;return arguments.length>1&&(t=arguments),\"string\"==typeof t?t=t.split(/\\s/).map(parseFloat):\"number\"==typeof t&&(t=[t]),t.length&&\"number\"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{left:\"x l left Left\",top:\"y t top Top\",width:\"w width W Width\",height:\"h height W Width\",bottom:\"b bottom Bottom\",right:\"r right Right\"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},{\"pick-by-alias\":253}],250:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,(function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),\"m\"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o=\"l\",r=\"m\"==r?\"l\":\"L\");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length<n[o])throw new Error(\"malformed path data\");e.push([r].concat(i.splice(0,n[o])))}})),e};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi,a=/-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/gi},{}],251:[function(t,e,r){e.exports=function(t,e){e||(e=[0,\"\"]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\\d.\\-\\+]*\\s*(.*)/)[1]||\"\",e}},{}],252:[function(t,e,r){(function(t){(function(){(function(){var r,n,i,a,o,s;\"undefined\"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,a=(r=function(){var t;return 1e9*(t=n())[0]+t[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this)}).call(this,t(\"_process\"))},{_process:278}],253:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n,a,o={};if(\"string\"==typeof e&&(e=i(e)),Array.isArray(e)){var s={};for(a=0;a<e.length;a++)s[e[a]]=!0;e=s}for(n in e)e[n]=i(e[n]);var l={};for(n in e){var u=e[n];if(Array.isArray(u))for(a=0;a<u.length;a++){var c=u[a];if(r&&(l[c]=!0),c in t){if(o[n]=t[c],r)for(var f=a;f<u.length;f++)l[u[f]]=!0;break}}else n in t&&(e[n]&&(o[n]=t[n]),r&&(l[n]=!0))}if(r)for(n in t)l[n]||(o[n]=t[n]);return o};var n={};function i(t){return n[t]?n[t]:(\"string\"==typeof t&&(t=n[t]=t.split(/\\s*,\\s*|\\s+/)),t)}},{}],254:[function(t,e,r){e.exports=function(t,e,r,n){var i=t[0],a=t[1],o=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var s=n-r,l=0,u=s-1;l<s;u=l++){var c=e[l+r][0],f=e[l+r][1],h=e[u+r][0],p=e[u+r][1];f>a!=p>a&&i<(h-c)*(a-f)/(p-f)+c&&(o=!o)}return o}},{}],255:[function(t,e,r){var n,i=t(\"./lib/build-log\"),a=t(\"./lib/epsilon\"),o=t(\"./lib/intersecter\"),s=t(\"./lib/segment-chainer\"),l=t(\"./lib/segment-selector\"),u=t(\"./lib/geojson\"),c=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?c=i():!1===t&&(c=!1),!1!==c&&c.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,c);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,c).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,c),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,c),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,c),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,c),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,c),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,c),inverted:t.inverted}},polygonFromGeoJSON:function(t){return u.toPolygon(n,t)},polygonToGeoJSON:function(t){return u.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},\"object\"==typeof window&&(window.PolyBool=n),e.exports=n},{\"./lib/build-log\":256,\"./lib/epsilon\":257,\"./lib/geojson\":258,\"./lib/intersecter\":259,\"./lib/segment-chainer\":261,\"./lib/segment-selector\":262}],256:[function(t,e,r){e.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n(\"check\",{seg1:t,seg2:e})},segmentChop:function(t,e){return n(\"div_seg\",{seg:t,pt:e}),n(\"chop\",{seg:t,pt:e})},statusRemove:function(t){return n(\"pop_seg\",{seg:t})},segmentUpdate:function(t){return n(\"seg_update\",{seg:t})},segmentNew:function(t,e){return n(\"new_seg\",{seg:t,primary:e})},segmentRemove:function(t){return n(\"rem_seg\",{seg:t})},tempStatus:function(t,e,r){return n(\"temp_status\",{seg:t,above:e,below:r})},rewind:function(t){return n(\"rewind\",{seg:t})},status:function(t,e,r){return n(\"status\",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n(\"vert\",{x:e}))},log:function(t){return\"string\"!=typeof t&&(t=JSON.stringify(t,!1,\"  \")),n(\"log\",{txt:t})},reset:function(){return n(\"reset\")},selected:function(t){return n(\"selected\",{segs:t})},chainStart:function(t){return n(\"chain_start\",{seg:t})},chainRemoveHead:function(t,e){return n(\"chain_rem_head\",{index:t,pt:e})},chainRemoveTail:function(t,e){return n(\"chain_rem_tail\",{index:t,pt:e})},chainNew:function(t,e){return n(\"chain_new\",{pt1:t,pt2:e})},chainMatch:function(t){return n(\"chain_match\",{index:t})},chainClose:function(t){return n(\"chain_close\",{index:t})},chainAddHead:function(t,e){return n(\"chain_add_head\",{index:t,pt:e})},chainAddTail:function(t,e){return n(\"chain_add_tail\",{index:t,pt:e})},chainConnect:function(t,e){return n(\"chain_con\",{index1:t,index2:e})},chainReverse:function(t){return n(\"chain_rev\",{index:t})},chainJoin:function(t,e){return n(\"chain_join\",{index1:t,index2:e})},done:function(){return n(\"done\")}}}},{}],257:[function(t,e,r){e.exports=function(t){\"number\"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return\"number\"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l<t||l-(a*a+s*s)>-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])<t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])<t},pointsSame:function(t,r){return e.pointsSameX(t,r)&&e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]<r[1]?-1:1:t[0]<r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)<t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],u=a*l-o*s;if(Math.abs(u)<t)return!1;var c=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*c)/u,p=(a*f-o*c)/u,d={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return d.alongA=h<=-t?-2:h<t?-1:h-1<=-t?0:h-1<t?1:2,d.alongB=p<=-t?-2:p<t?-1:p-1<=-t?0:p-1<t?1:2,d},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var u=r[l][0],c=r[l][1];c-i>t!=o-i>t&&(a-u)*(i-c)/(o-c)+u-n>t&&(s=!s),a=u,o=c}return s}};return e}},{}],258:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i<e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if(\"Polygon\"===e.type)return t.polygon(r(e.coordinates));if(\"MultiPolygon\"===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i<e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error(\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\")},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}r=t.polygon(t.segments(r));var a=i(null);function o(t,e){for(var r=0;r<t.children.length;r++)if(n(e,(s=t.children[r]).region))return void o(s,e);var a=i(e);for(r=0;r<t.children.length;r++){var s;n((s=t.children[r]).region,e)&&(a.children.push(s),t.children.splice(r,1),r--)}t.children.push(a)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function u(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o<t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r<0!==e&&a.reverse(),a.push([a[0][0],a[0][1]]),a}var c=[];function f(t){var e=[u(t.region,!1)];c.push(e);for(var r=0;r<t.children.length;r++)e.push(h(t.children[r]))}function h(t){for(var e=0;e<t.children.length;e++)f(t.children[e]);return u(t.region,!0)}for(s=0;s<a.children.length;s++)f(a.children[s]);return c.length<=0?{type:\"Polygon\",coordinates:[]}:1==c.length?{type:\"Polygon\",coordinates:c[0]}:{type:\"MultiPolygon\",coordinates:c}}};e.exports=n},{}],259:[function(t,e,r){var n=t(\"./linked-list\");e.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(t,r){a.insertBefore(t,(function(n){return i=t.isStart,a=t.pt,o=r,s=n.isStart,l=n.pt,u=n.other.pt,(0!==(c=e.pointsCompare(a,l))?c:e.pointsSame(o,u)?0:i!==s?i?1:-1:e.pointAboveOrOnLine(o,s?l:u,s?u:l)?1:-1)<0;var i,a,o,s,l,u,c}))}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function u(i,o){var s=n.create();function u(t){return s.findTransition((function(r){return n=t,i=r.ev,a=n.seg.start,o=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(a,s,l)?e.pointsCollinear(o,s,l)||e.pointAboveOrOnLine(o,s,l)?1:-1:e.pointAboveOrOnLine(a,s,l)?1:-1)>0;var n,i,a,o,s,l}))}function c(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,u=a.start,c=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,u,c);if(!1===f){if(!e.pointsCollinear(o,s,u))return!1;if(e.pointsSame(o,c)||e.pointsSame(s,u))return!1;var h=e.pointsSame(o,u),p=e.pointsSame(s,c);if(h&&p)return n;var d=!h&&e.pointBetween(o,u,c),g=!p&&e.pointBetween(s,u,c);if(h)return g?l(n,s):l(t,c),n;d&&(p||(g?l(n,s):l(t,c)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,u):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,c)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var p=u(h),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function v(){if(d){var t=c(h,d);if(t)return t}return!!g&&c(h,g)}r&&r.tempStatus(h.seg,!!d&&d.seg,!!g&&g.seg);var m,y,x=v();if(x&&(t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(x.seg),h.other.remove(),h.remove()),a.getHead()!==h){r&&r.rewind(h.seg);continue}t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=g?g.seg.myFill.above:i,h.seg.myFill.above=y?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(m=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:m,below:m}),r&&r.status(h.seg,!!d&&d.seg,!!g&&g.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error(\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\");if(s.exists(b.prev)&&s.exists(b.next)&&c(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&&r.done(),f}return t?{addRegion:function(t){for(var n,i=t[t.length-1],a=0;a<t.length;a++){n=i,i=t[a];var o=e.pointsCompare(n,i);0!==o&&s((l=o<0?n:i,u=o<0?i:n,{id:r?r.segmentId():-1,start:l,end:u,myFill:{above:null,below:null},otherFill:null}),!0)}var l,u},calculate:function(t){return u(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach((function(t){s(i(t.start,t.end,t),!0)})),r.forEach((function(t){s(i(t.start,t.end,t),!1)})),u(e,n)}}}},{\"./linked-list\":260}],260:[function(t,e,r){e.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},{}],261:[function(t,e,r){e.exports=function(t,e,r){var n=[],i=[];return t.forEach((function(t){var a=t.start,o=t.end;if(e.pointsSame(a,o))console.warn(\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},u=s,c=0;c<n.length;c++){var f=(v=n[c])[0],h=(v[1],v[v.length-1]);if(v[v.length-2],e.pointsSame(f,a)){if(T(c,!0,!0))break}else if(e.pointsSame(f,o)){if(T(c,!0,!1))break}else if(e.pointsSame(h,a)){if(T(c,!1,!0))break}else if(e.pointsSame(h,o)&&T(c,!1,!1))break}if(u===s)return n.push([a,o]),void(r&&r.chainNew(a,o));if(u===l){r&&r.chainMatch(s.index);var p=s.index,d=s.matches_pt1?o:a,g=s.matches_head,v=n[p],m=g?v[0]:v[v.length-1],y=g?v[1]:v[v.length-2],x=g?v[v.length-1]:v[0],b=g?v[v.length-2]:v[1];return e.pointsCollinear(y,m,d)&&(g?(r&&r.chainRemoveHead(s.index,d),v.shift()):(r&&r.chainRemoveTail(s.index,d),v.pop()),m=y),e.pointsSame(x,d)?(n.splice(p,1),e.pointsCollinear(b,x,m)&&(g?(r&&r.chainRemoveTail(s.index,m),v.pop()):(r&&r.chainRemoveHead(s.index,m),v.shift())),r&&r.chainClose(s.index),void i.push(v)):void(g?(r&&r.chainAddHead(s.index,d),v.unshift(d)):(r&&r.chainAddTail(s.index,d),v.push(d)))}var _=s.index,w=l.index;r&&r.chainConnect(_,w);var k=n[_].length<n[w].length;s.matches_head?l.matches_head?k?(M(_),A(_,w)):(M(w),A(w,_)):A(w,_):l.matches_head?A(_,w):k?(M(_),A(w,_)):(M(w),A(_,w))}function T(t,e,r){return u.index=t,u.matches_head=e,u.matches_pt1=r,u===s?(u=l,!1):(u=null,!0)}function M(t){r&&r.chainReverse(t),n[t].reverse()}function A(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],u=o[0],c=o[1];e.pointsCollinear(l,s,u)&&(r&&r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,u,c)&&(r&&r.chainRemoveHead(i,u),o.shift()),r&&r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}})),i}},{}],262:[function(t,e,r){function n(t,e,r){var n=[];return t.forEach((function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})})),r&&r.selected(n),n}var i={union:function(t,e){return n(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],e)},intersect:function(t,e){return n(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],e)},difference:function(t,e){return n(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],e)},differenceRev:function(t,e){return n(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],e)},xor:function(t,e){return n(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],e)}};e.exports=i},{}],263:[function(t,e,r){\"use strict\";var n=t(\"stream\").Transform,i=t(\"stream-parser\");function a(){n.call(this,{readableObjectMode:!0})}function o(t,e,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\",this.name=this.constructor.name,this.message=t,e&&(this.code=e),r&&(this.statusCode=r)}a.prototype=Object.create(n.prototype),a.prototype.constructor=a,i(a.prototype),r.ParserStream=a,r.sliceEq=function(t,e,r){for(var n=e,i=0;i<r.length;)if(t[n++]!==r[i++])return!1;return!0},r.str2arr=function(t,e){var r=[],n=0;if(e&&\"hex\"===e)for(;n<t.length;)r.push(parseInt(t.slice(n,n+2),16)),n+=2;else for(;n<t.length;n++)r.push(255&t.charCodeAt(n));return r},r.readUInt16LE=function(t,e){return t[e]|t[e+1]<<8},r.readUInt16BE=function(t,e){return t[e+1]|t[e]<<8},r.readUInt32LE=function(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|16777216*t[e+3]},r.readUInt32BE=function(t,e){return t[e+3]|t[e+2]<<8|t[e+1]<<16|16777216*t[e]},o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,r.ProbeError=o},{stream:286,\"stream-parser\":302}],264:[function(t,e,r){\"use strict\";function n(t,e){var r=new Error(t);return r.code=e,r}function i(t){try{return decodeURIComponent(escape(t))}catch(e){return t}}function a(t,e,r){this.input=t.subarray(e,r),this.start=e;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if(\"II*\\0\"!==i&&\"MM\\0*\"!==i)throw n(\"invalid TIFF signature\",\"EBADDATA\");this.big_endian=\"M\"===i[0]}a.prototype.each=function(t){this.aborted=!1;var e=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:e}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return this.read_uint32(e);case 9:return 0|this.read_uint32(e);default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;o<a;o++){var s=this.read_uint16(e),l=this.read_uint16(e+2),u=this.read_uint32(e+4),c=this.exif_format_length(l),f=u*c,h=f<=4?e+8:this.read_uint32(e+8),p=!1;if(h+f>this.input.length)throw n(\"unexpected EOF\",\"EBADDATA\");for(var d=[],g=h,v=0;v<u;v++,g+=c){var m=this.exif_format_read(l,g);if(null===m){d=null;break}d.push(m)}if(Array.isArray(d)&&2===l&&(d=i(String.fromCharCode.apply(null,d)))&&\"\\0\"===d[d.length-1]&&(d=d.slice(0,-1)),this.is_subifd_link(t,s)&&Array.isArray(d)&&Number.isInteger(d[0])&&d[0]>0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:u,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],265:[function(t,e,r){\"use strict\";var n=t(\"./common\").readUInt16BE,i=t(\"./common\").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length<r+e||r<8?null:{boxtype:String.fromCharCode.apply(null,t.slice(e+4,e+8)),data:t.slice(e+8,e+r),end:e+r}}function o(t,e){for(var r=0;;){var n=a(t,r);if(!n)break;switch(n.boxtype){case\"ispe\":e.sizes.push({width:i(n.data,4),height:i(n.data,8)});break;case\"irot\":e.transforms.push({type:\"irot\",value:3&n.data[0]});break;case\"imir\":e.transforms.push({type:\"imir\",value:1&n.data[0]})}r=n.end}}function s(t,e,r){for(var n=0,i=0;i<r;i++)n=256*n+(t[e+i]||0);return n}function l(t,e){for(var r=t[4]>>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,u=0;u<o;u++){var c=n(t,l),f=n(t,l+=2),h=s(t,l+=2,a),p=n(t,l+=a);if(l+=2,0===f&&1===p){var d=s(t,l,r),g=s(t,l+r,i);e.item_loc[c]={length:g,offset:d+h}}l+=p*(r+i)}}function u(t,e){for(var r=n(t,4),i=6,o=0;o<r;o++){var s=a(t,i);if(!s)break;if(\"infe\"===s.boxtype){for(var l=n(s.data,4),u=\"\",c=8;c<s.data.length&&s.data[c];c++)u+=String.fromCharCode(s.data[c]);e.item_inf[u]=l}i=s.end}}function c(t,e){for(var r=0;;){var n=a(t,r);if(!n)break;\"ipco\"===n.boxtype&&o(n.data,e),r=n.end}}e.exports.unbox=a,e.exports.readSizeFromMeta=function(t){var e,r,n,i={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(function(t,e){for(var r=4;;){var n=a(t,r);if(!n)break;\"iprp\"===n.boxtype&&c(n.data,e),\"iloc\"===n.boxtype&&l(n.data,e),\"iinf\"===n.boxtype&&u(n.data,e),r=n.end}}(t,i),i.sizes.length){var o=(e=i.sizes,r=e.reduce((function(t,e){return t.width>e.width||t.width===e.width&&t.height>e.height?t:e})),n=e.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),r.width>n.height||r.width===n.height&&r.height>n.width?r:n),s=1;i.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(\"imir\"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),\"irot\"===t.type)for(var n=0;n<t.value;n++)s=e[s]}));var f=null;return i.item_inf.Exif&&(f=i.item_loc[i.item_inf.Exif]),{width:o.width,height:o.height,orientation:i.transforms.length?s:null,variants:i.sizes,exif_location:f}}},e.exports.getMimeType=function(t){var e=String.fromCharCode.apply(null,t.slice(0,4)),r={};r[e]=!0;for(var n=8;n<t.length;n+=4)r[String.fromCharCode.apply(null,t.slice(n,n+4))]=!0;if(r.mif1||r.msf1||r.miaf)return\"avif\"===e||\"avis\"===e||\"avio\"===e?{type:\"avif\",mime:\"image/avif\"}:\"heic\"===e||\"heix\"===e?{type:\"heic\",mime:\"image/heic\"}:\"hevc\"===e||\"hevx\"===e?{type:\"heic\",mime:\"image/heic-sequence\"}:r.avif||r.avis?{type:\"avif\",mime:\"image/avif\"}:r.heic||r.heix||r.hevc||r.hevx||r.heis?r.msf1?{type:\"heif\",mime:\"image/heif-sequence\"}:{type:\"heif\",mime:\"image/heif\"}:{type:\"avif\",mime:\"image/avif\"}}},{\"./common\":263}],266:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=t(\"../miaf_utils\"),s=t(\"../exif_utils\"),l=n(\"ftyp\");e.exports=function(t){if(i(t,4,l)){var e=o.unbox(t,0);if(e){var r=o.getMimeType(e.data);if(r){for(var n,u=e.end;;){var c=o.unbox(t,u);if(!c)break;if(u=c.end,\"mdat\"===c.boxtype)return;if(\"meta\"===c.boxtype){n=c.data;break}}if(n){var f=o.readSizeFromMeta(n);if(f){var h={width:f.width,height:f.height,type:r.type,mime:r.mime,wUnits:\"px\",hUnits:\"px\"};if(f.variants.length>1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),g=s.get_orientation(d);g>0&&(h.orientation=g)}return h}}}}}}},{\"../common\":263,\"../exif_utils\":264,\"../miaf_utils\":265}],267:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"BM\");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":263}],268:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=n(\"GIF87a\"),s=n(\"GIF89a\");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":263}],269:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;s<i;s++){var l=t[6+16*s]||256,u=t[6+16*s+1]||256,c={width:l,height:u};a.push(c),(l>o.width||u>o.height)&&(o=c)}return{width:o.width,height:o.height,variants:a,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}},{\"../common\":263}],270:[function(t,e,r){\"use strict\";var n=t(\"../common\").readUInt16BE,i=t(\"../common\").str2arr,a=t(\"../common\").sliceEq,o=t(\"../exif_utils\"),s=i(\"Exif\\0\\0\");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e<r)return;var u={width:n(t,e+3),height:n(t,e+1),type:\"jpg\",mime:\"image/jpeg\",wUnits:\"px\",hUnits:\"px\"};return i>0&&(u.orientation=i),u}e+=r}}},{\"../common\":263,\"../exif_utils\":264}],271:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"‰PNG\\r\\n\u001a\\n\"),s=n(\"IHDR\");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":263}],272:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt32BE,o=n(\"8BPS\\0\u0001\");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}},{\"../common\":263}],273:[function(t,e,r){\"use strict\";function n(t){return\"number\"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,o=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,s=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,l=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,u=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function c(t){return u.test(t)?t.match(u)[0]:\"px\"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r<n&&(32===(e=t[r])||9===e||13===e||10===e);)r++;return r!==n&&60===t[r]}(t)){for(var e=\"\",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);var u=(e.match(i)||[\"\"])[0];if(a.test(u)){var f=function(t){var e=t.match(o),r=t.match(s),n=t.match(l);return{width:e&&(e[1]||e[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}(u),h=parseFloat(f.width),p=parseFloat(f.height);if(f.width&&f.height){if(!n(h)||!n(p))return;return{width:h,height:p,type:\"svg\",mime:\"image/svg+xml\",wUnits:c(f.width),hUnits:c(f.height)}}var d=(f.viewbox||\"\").split(\" \"),g={width:d[2],height:d[3]},v=parseFloat(g.width),m=parseFloat(g.height);if(n(v)&&n(m)&&c(g.width)===c(g.height)){var y=v/m;if(f.width){if(!n(h))return;return{width:h,height:h/y,type:\"svg\",mime:\"image/svg+xml\",wUnits:c(f.width),hUnits:c(f.width)}}if(f.height){if(!n(p))return;return{width:p*y,height:p,type:\"svg\",mime:\"image/svg+xml\",wUnits:c(f.height),hUnits:c(f.height)}}return{width:v,height:m,type:\"svg\",mime:\"image/svg+xml\",wUnits:c(g.width),hUnits:c(g.height)}}}}}},{}],274:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=t(\"../common\").readUInt16BE,s=t(\"../common\").readUInt32LE,l=t(\"../common\").readUInt32BE,u=n(\"II*\\0\"),c=n(\"MM\\0*\");function f(t,e,r){return r?o(t,e):a(t,e)}function h(t,e,r){return r?l(t,e):s(t,e)}function p(t,e,r){var n=f(t,e+2,r);return 1!==h(t,e+4,r)||3!==n&&4!==n?null:3===n?f(t,e+8,r):h(t,e+8,r)}e.exports=function(t){if(!(t.length<8)&&(i(t,0,u)||i(t,0,c))){var e=77===t[0],r=h(t,4,e)-8;if(!(r<0)){var n=r+8;if(!(t.length-n<2)){var a=12*f(t,n+0,e);if(!(a<=0||(n+=2,t.length-n<a))){var o,s,l,d;for(o=0;o<a;o+=12)256===(d=f(t,n+o,e))?s=p(t,n+o,e):257===d&&(l=p(t,n+o,e));return s&&l?{width:s,height:l,type:\"tiff\",mime:\"image/tiff\",wUnits:\"px\",hUnits:\"px\"}:void 0}}}}}},{\"../common\":263}],275:[function(t,e,r){\"use strict\";var n=t(\"../common\").str2arr,i=t(\"../common\").sliceEq,a=t(\"../common\").readUInt16LE,o=t(\"../common\").readUInt32LE,s=t(\"../exif_utils\"),l=n(\"RIFF\"),u=n(\"WEBP\");function c(t,e){if(157===t[e+3]&&1===t[e+4]&&42===t[e+5])return{width:16383&a(t,e+6),height:16383&a(t,e+8),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}function f(t,e){if(47===t[e]){var r=o(t,e+1);return{width:1+(16383&r),height:1+(r>>14&16383),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<<e|t[e+8]<<8|t[e+7]),type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}e.exports=function(t){if(!(t.length<16)&&(i(t,0,l)||i(t,8,u))){var e=12,r=null,n=0,a=o(t,4)+8;if(!(a>t.length)){for(;e+8<a;)if(0!==t[e]){var p=String.fromCharCode.apply(null,t.slice(e,e+4)),d=o(t,e+4);\"VP8 \"===p&&d>=10?r=r||c(t,e+8):\"VP8L\"===p&&d>=9?r=r||f(t,e+8):\"VP8X\"===p&&d>=10?r=r||h(t,e+8):\"EXIF\"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{\"../common\":263,\"../exif_utils\":264}],276:[function(t,e,r){\"use strict\";e.exports={avif:t(\"./parse_sync/avif\"),bmp:t(\"./parse_sync/bmp\"),gif:t(\"./parse_sync/gif\"),ico:t(\"./parse_sync/ico\"),jpeg:t(\"./parse_sync/jpeg\"),png:t(\"./parse_sync/png\"),psd:t(\"./parse_sync/psd\"),svg:t(\"./parse_sync/svg\"),tiff:t(\"./parse_sync/tiff\"),webp:t(\"./parse_sync/webp\")}},{\"./parse_sync/avif\":266,\"./parse_sync/bmp\":267,\"./parse_sync/gif\":268,\"./parse_sync/ico\":269,\"./parse_sync/jpeg\":270,\"./parse_sync/png\":271,\"./parse_sync/psd\":272,\"./parse_sync/svg\":273,\"./parse_sync/tiff\":274,\"./parse_sync/webp\":275}],277:[function(t,e,r){\"use strict\";var n=t(\"./lib/parsers_sync\");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r<e.length;r++){var i=n[e[r]](t);if(i)return i}return null}(t)},e.exports.parsers=n},{\"./lib/parsers_sync\":276}],278:[function(t,e,r){var n,i,a=e.exports={};function o(){throw new Error(\"setTimeout has not been defined\")}function s(){throw new Error(\"clearTimeout has not been defined\")}function l(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{i=\"function\"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,c=[],f=!1,h=-1;function p(){f&&u&&(f=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!f){var t=l(p);f=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function v(){}a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new g(t,e)),1!==c.length||f||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title=\"browser\",a.browser=!0,a.env={},a.argv=[],a.version=\"\",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(t){return[]},a.binding=function(t){throw new Error(\"process.binding is not supported\")},a.cwd=function(){return\"/\"},a.chdir=function(t){throw new Error(\"process.chdir is not supported\")},a.umask=function(){return 0}},{}],279:[function(t,e,n){(function(r){(function(){for(var n=t(\"performance-now\"),i=\"undefined\"==typeof window?r:window,a=[\"moz\",\"webkit\"],o=\"AnimationFrame\",s=i[\"request\"+o],l=i[\"cancel\"+o]||i[\"cancelRequest\"+o],u=0;!s&&u<a.length;u++)s=i[a[u]+\"Request\"+o],l=i[a[u]+\"Cancel\"+o]||i[a[u]+\"CancelRequest\"+o];if(!s||!l){var c=0,f=0,h=[];s=function(t){if(0===h.length){var e=n(),r=Math.max(0,16.666666666666668-(e-c));c=r+e,setTimeout((function(){var t=h.slice(0);h.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(c)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(r))}return h.push({handle:++f,callback:t,cancelled:!1}),f},l=function(t){for(var e=0;e<h.length;e++)h[e].handle===t&&(h[e].cancelled=!0)}}e.exports=function(t){return s.call(i,t)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=s,t.cancelAnimationFrame=l}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"performance-now\":252}],280:[function(t,e,r){\"use strict\";var n=t(\"array-bounds\"),i=t(\"color-normalize\"),a=t(\"update-diff\"),o=t(\"pick-by-alias\"),s=t(\"object-assign\"),l=t(\"flatten-vertex-data\"),u=t(\"to-float32\"),c=u.float32,f=u.fract32;e.exports=function(t,e){if(\"function\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");var r,u,p,d,g,v,m=t._gl,y={color:\"black\",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:\"dynamic\",type:\"uint8\",data:new Uint8Array(0)}),u=t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),p=t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),g=t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),v=t.buffer({usage:\"static\",type:\"float\",data:h}),k(e),r=t({vert:\"\\n\\t\\tprecision highp float;\\n\\n\\t\\tattribute vec2 position, positionFract;\\n\\t\\tattribute vec4 error;\\n\\t\\tattribute vec4 color;\\n\\n\\t\\tattribute vec2 direction, lineOffset, capOffset;\\n\\n\\t\\tuniform vec4 viewport;\\n\\t\\tuniform float lineWidth, capSize;\\n\\t\\tuniform vec2 scale, scaleFract, translate, translateFract;\\n\\n\\t\\tvarying vec4 fragColor;\\n\\n\\t\\tvoid main() {\\n\\t\\t\\tfragColor = color / 255.;\\n\\n\\t\\t\\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\\n\\n\\t\\t\\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\\n\\n\\t\\t\\tvec2 position = position + dxy;\\n\\n\\t\\t\\tvec2 pos = (position + translate) * scale\\n\\t\\t\\t\\t+ (positionFract + translateFract) * scale\\n\\t\\t\\t\\t+ (position + translate) * scaleFract\\n\\t\\t\\t\\t+ (positionFract + translateFract) * scaleFract;\\n\\n\\t\\t\\tpos += pixelOffset / viewport.zw;\\n\\n\\t\\t\\tgl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\t\\t}\\n\\t\\t\",frag:\"\\n\\t\\tprecision highp float;\\n\\n\\t\\tvarying vec4 fragColor;\\n\\n\\t\\tuniform float opacity;\\n\\n\\t\\tvoid main() {\\n\\t\\t\\tgl_FragColor = fragColor;\\n\\t\\t\\tgl_FragColor.a *= opacity;\\n\\t\\t}\\n\\t\\t\",uniforms:{range:t.prop(\"range\"),lineWidth:t.prop(\"lineWidth\"),capSize:t.prop(\"capSize\"),opacity:t.prop(\"opacity\"),scale:t.prop(\"scale\"),translate:t.prop(\"translate\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:u,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,stride:24,offset:16}},primitive:\"triangles\",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop(\"viewport\")},viewport:t.prop(\"viewport\"),stencil:!1,instances:t.prop(\"count\"),count:h.length}),s(b,{update:k,draw:_,destroy:T,regl:t,gl:m,canvas:m.canvas,groups:x}),b;function b(t){t?k(t):null===t&&T(),_()}function _(e){if(\"number\"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach((function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)}))}function w(t){\"number\"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function k(t){if(t){null!=t.length?\"number\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map((function(t,u){var c=x[u];return t?(\"function\"==typeof t?t={after:t}:\"number\"==typeof t[0]&&(t={positions:t}),t=o(t,{color:\"color colors fill\",capSize:\"capSize cap capsize cap-size\",lineWidth:\"lineWidth line-width width line thickness\",opacity:\"opacity alpha\",range:\"range dataBox\",viewport:\"viewport viewBox\",errors:\"errors error\",positions:\"positions position data points\"}),c||(x[u]=c={id:u,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(c,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,\"float64\"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t=\"transparent\"),!Array.isArray(t)||\"number\"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a<r;a++)t[a]=n}if(t.length<r)throw Error(\"Not enough colors\");for(var o=new Uint8Array(4*r),s=0;s<r;s++){var l=i(t[s],\"uint8\");o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:m.drawingBufferWidth,height:m.drawingBufferHeight},e}}]),c):c})),e||r){var h=x.reduce((function(t,e,r){return t+(e?e.count:0)}),0),v=new Float64Array(2*h),_=new Uint8Array(4*h),w=new Float32Array(4*h);x.forEach((function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&&(_.set(a,4*i),w.set(o,4*i),v.set(r,2*i))}}));var k=c(v);u(k);var T=f(v,k);p(T),d(_),g(w)}}}function T(){u.destroy(),p.destroy(),d.destroy(),g.destroy(),v.destroy()}};var h=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{\"array-bounds\":71,\"color-normalize\":89,\"flatten-vertex-data\":191,\"object-assign\":247,\"pick-by-alias\":253,\"to-float32\":314,\"update-diff\":330}],281:[function(t,e,r){\"use strict\";var n=t(\"color-normalize\"),i=t(\"array-bounds\"),a=t(\"object-assign\"),o=t(\"glslify\"),s=t(\"pick-by-alias\"),l=t(\"flatten-vertex-data\"),u=t(\"earcut\"),c=t(\"array-normalize\"),f=t(\"to-float32\"),h=f.float32,p=f.fract32,d=t(\"es6-weak-map\"),g=t(\"parse-rect\"),v=t(\"array-find-index\");function m(t,e){if(!(this instanceof m))return new m(t,e);if(\"function\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=m.shaders.has(t)?m.shaders.get(t):m.shaders.set(t,m.createShaders(t)).get(t),this.update(e)}e.exports=m,m.dashMult=2,m.maxPatternLength=256,m.precisionThreshold=3e6,m.maxPoints=1e4,m.maxLines=2048,m.shaders=new d,m.createShaders=function(t){var e,r=t.buffer({usage:\"static\",type:\"float\",data:[0,1,0,0,1,1,1,0]}),n={primitive:\"triangle strip\",instances:t.prop(\"count\"),count:4,offset:0,uniforms:{miterMode:function(t,e){return\"round\"===e.join?2:1},miterLimit:t.prop(\"miterLimit\"),scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),translate:t.prop(\"translate\"),thickness:t.prop(\"thickness\"),dashTexture:t.prop(\"dashTexture\"),opacity:t.prop(\"opacity\"),pixelRatio:t.context(\"pixelRatio\"),id:t.prop(\"id\"),dashLength:t.prop(\"dashLength\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop(\"depth\")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop(\"viewport\")},viewport:t.prop(\"viewport\")},i=t(a({vert:o([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\\nattribute vec4 color;\\nattribute float lineEnd, lineTop;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float thickness, pixelRatio, id, depth;\\nuniform vec4 viewport;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\n\\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\\n\\t// the order is important\\n\\treturn position * scale + translate\\n       + positionFract * scale + translateFract\\n       + position * scaleFract\\n       + positionFract * scaleFract;\\n}\\n\\nvoid main() {\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineOffset = lineTop * 2. - 1.;\\n\\n\\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\\n\\ttangent = normalize(diff * scale * viewport.zw);\\n\\tvec2 normal = vec2(-tangent.y, tangent.x);\\n\\n\\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\\n\\t\\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\\n\\n\\t\\t+ thickness * normal * .5 * lineOffset / viewport.zw;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tfragColor = color / 255.;\\n}\\n\"]),frag:o([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform float dashLength, pixelRatio, thickness, opacity, id;\\nuniform sampler2D dashTexture;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\n\\nvoid main() {\\n\\tfloat alpha = 1.;\\n\\n\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\\n\\n\\tgl_FragColor = fragColor;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop(\"positionBuffer\"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(\"positionBuffer\"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop(\"positionFractBuffer\"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop(\"positionFractBuffer\"),stride:8,offset:16,divisor:1},color:{buffer:t.prop(\"colorBuffer\"),stride:4,offset:0,divisor:1}}},n));try{e=t(a({cull:{enable:!0,face:\"back\"},vert:o([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\\nattribute vec4 aColor, bColor;\\nattribute float lineEnd, lineTop;\\n\\nuniform vec2 scale, translate;\\nuniform float thickness, pixelRatio, id, depth;\\nuniform vec4 viewport;\\nuniform float miterLimit, miterMode;\\n\\nvarying vec4 fragColor;\\nvarying vec4 startCutoff, endCutoff;\\nvarying vec2 tangent;\\nvarying vec2 startCoord, endCoord;\\nvarying float enableStartMiter, enableEndMiter;\\n\\nconst float REVERSE_THRESHOLD = -.875;\\nconst float MIN_DIFF = 1e-6;\\n\\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\\n// TODO: precalculate dot products, normalize things beforehead etc.\\n// TODO: refactor to rectangular algorithm\\n\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\n\\tvec2 diff = b - a;\\n\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\n\\treturn dot(p - a, perp);\\n}\\n\\nbool isNaN( float val ){\\n  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\\n}\\n\\nvoid main() {\\n\\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\\n\\n  vec2 adjustedScale;\\n  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\\n  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\\n\\n  vec2 scaleRatio = adjustedScale * viewport.zw;\\n\\tvec2 normalWidth = thickness / scaleRatio;\\n\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineBot = 1. - lineTop;\\n\\n\\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\\n\\n\\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\\n\\n\\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\\n\\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\\n\\n\\tvec2 prevDiff = aCoord - prevCoord;\\n\\tvec2 currDiff = bCoord - aCoord;\\n\\tvec2 nextDiff = nextCoord - bCoord;\\n\\n\\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\\n\\tvec2 currTangent = normalize(currDiff * scaleRatio);\\n\\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\\n\\n\\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\\n\\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\\n\\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\\n\\n\\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\\n\\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\\n\\n\\t// collapsed/unidirectional segment cases\\n\\t// FIXME: there should be more elegant solution\\n\\tvec2 prevTanDiff = abs(prevTangent - currTangent);\\n\\tvec2 nextTanDiff = abs(nextTangent - currTangent);\\n\\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\\n\\t\\tstartJoinDirection = currNormal;\\n\\t}\\n\\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\\n\\t\\tendJoinDirection = currNormal;\\n\\t}\\n\\tif (aCoord == bCoord) {\\n\\t\\tendJoinDirection = startJoinDirection;\\n\\t\\tcurrNormal = prevNormal;\\n\\t\\tcurrTangent = prevTangent;\\n\\t}\\n\\n\\ttangent = currTangent;\\n\\n\\t//calculate join shifts relative to normals\\n\\tfloat startJoinShift = dot(currNormal, startJoinDirection);\\n\\tfloat endJoinShift = dot(currNormal, endJoinDirection);\\n\\n\\tfloat startMiterRatio = abs(1. / startJoinShift);\\n\\tfloat endMiterRatio = abs(1. / endJoinShift);\\n\\n\\tvec2 startJoin = startJoinDirection * startMiterRatio;\\n\\tvec2 endJoin = endJoinDirection * endMiterRatio;\\n\\n\\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\\n\\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\\n\\tstartBotJoin = -startTopJoin;\\n\\n\\tendTopJoin = sign(endJoinShift) * endJoin * .5;\\n\\tendBotJoin = -endTopJoin;\\n\\n\\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\\n\\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\\n\\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\\n\\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\\n\\n\\t//miter anti-clipping\\n\\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\\n\\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\\n\\n\\t//prevent close to reverse direction switch\\n\\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);\\n\\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);\\n\\n\\tif (prevReverse) {\\n\\t\\t//make join rectangular\\n\\t\\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\\n\\t\\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\\n\\t\\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\n\\t\\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\n\\t}\\n\\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\\n\\t\\t//handle miter clipping\\n\\t\\tbTopCoord -= normalWidth * endTopJoin;\\n\\t\\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\\n\\t}\\n\\n\\tif (nextReverse) {\\n\\t\\t//make join rectangular\\n\\t\\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\\n\\t\\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\\n\\t\\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\n\\t\\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\n\\t}\\n\\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\\n\\t\\t//handle miter clipping\\n\\t\\taBotCoord -= normalWidth * startBotJoin;\\n\\t\\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\\n\\t}\\n\\n\\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\\n\\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\\n\\n\\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\\n\\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\\n\\n\\t//position is normalized 0..1 coord on the screen\\n\\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\\n\\n\\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\\n\\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\\n\\n\\tgl_Position = vec4(position  * 2.0 - 1.0, depth, 1);\\n\\n\\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\\n\\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\\n\\n\\t//bevel miter cutoffs\\n\\tif (miterMode == 1.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\\n\\t\\t\\tstartCutoff = vec4(aCoord, aCoord);\\n\\t\\t\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\n\\t\\t\\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\n\\t\\t\\tstartCutoff += viewport.xyxy;\\n\\t\\t\\tstartCutoff += startMiterWidth.xyxy;\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\\n\\t\\t\\tendCutoff = vec4(bCoord, bCoord);\\n\\t\\t\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\\n\\t\\t\\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\n\\t\\t\\tendCutoff += viewport.xyxy;\\n\\t\\t\\tendCutoff += endMiterWidth.xyxy;\\n\\t\\t}\\n\\t}\\n\\n\\t//round miter cutoffs\\n\\telse if (miterMode == 2.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\\n\\t\\t\\tstartCutoff = vec4(aCoord, aCoord);\\n\\t\\t\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\n\\t\\t\\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\n\\t\\t\\tstartCutoff += viewport.xyxy;\\n\\t\\t\\tstartCutoff += startMiterWidth.xyxy;\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\\n\\t\\t\\tendCutoff = vec4(bCoord, bCoord);\\n\\t\\t\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\\n\\t\\t\\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\\n\\t\\t\\tendCutoff += viewport.xyxy;\\n\\t\\t\\tendCutoff += endMiterWidth.xyxy;\\n\\t\\t}\\n\\t}\\n}\\n\"]),frag:o([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\nuniform sampler2D dashTexture;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\nvarying vec4 startCutoff, endCutoff;\\nvarying vec2 startCoord, endCoord;\\nvarying float enableStartMiter, enableEndMiter;\\n\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\n\\tvec2 diff = b - a;\\n\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\n\\treturn dot(p - a, perp);\\n}\\n\\nvoid main() {\\n\\tfloat alpha = 1., distToStart, distToEnd;\\n\\tfloat cutoff = thickness * .5;\\n\\n\\t//bevel miter\\n\\tif (miterMode == 1.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\n\\t\\t\\tif (distToStart < -1.) {\\n\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\talpha *= min(max(distToStart + 1., 0.), 1.);\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\n\\t\\t\\tif (distToEnd < -1.) {\\n\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\talpha *= min(max(distToEnd + 1., 0.), 1.);\\n\\t\\t}\\n\\t}\\n\\n\\t// round miter\\n\\telse if (miterMode == 2.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\n\\t\\t\\tif (distToStart < 0.) {\\n\\t\\t\\t\\tfloat radius = length(gl_FragCoord.xy - startCoord);\\n\\n\\t\\t\\t\\tif(radius > cutoff + .5) {\\n\\t\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\n\\t\\t\\tif (distToEnd < 0.) {\\n\\t\\t\\t\\tfloat radius = length(gl_FragCoord.xy - endCoord);\\n\\n\\t\\t\\t\\tif(radius > cutoff + .5) {\\n\\t\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\\n\\n\\tgl_FragColor = fragColor;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop(\"colorBuffer\"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop(\"colorBuffer\"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop(\"positionBuffer\"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop(\"positionBuffer\"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop(\"positionBuffer\"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop(\"positionBuffer\"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:\"triangle\",elements:function(t,e){return e.triangles},offset:0,vert:o([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\n\\nuniform vec4 color;\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio, id;\\nuniform vec4 viewport;\\nuniform float opacity;\\n\\nvarying vec4 fragColor;\\n\\nconst float MAX_LINES = 256.;\\n\\nvoid main() {\\n\\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\\n\\n\\tvec2 position = position * scale + translate\\n       + positionFract * scale + translateFract\\n       + position * scaleFract\\n       + positionFract * scaleFract;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tfragColor = color / 255.;\\n\\tfragColor.a *= opacity;\\n}\\n\"]),frag:o([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n\\tgl_FragColor = fragColor;\\n}\\n\"]),uniforms:{scale:t.prop(\"scale\"),color:t.prop(\"fill\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),translate:t.prop(\"translate\"),opacity:t.prop(\"opacity\"),pixelRatio:t.context(\"pixelRatio\"),id:t.prop(\"id\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop(\"positionBuffer\"),stride:8,offset:8},positionFract:{buffer:t.prop(\"positionFractBuffer\"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},m.defaults={dashes:null,join:\"miter\",miterLimit:1,thickness:10,cap:\"square\",color:\"black\",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},m.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},m.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);\"number\"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>m.precisionThreshold||e.scale[1]*e.viewport.height>m.precisionThreshold||\"rect\"===e.join||!e.join&&(e.thickness<=2||e.count>=m.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},m.prototype.update=function(t){var e=this;if(t){null!=t.length?\"number\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach((function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if(\"number\"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:\"positions points data coords\",thickness:\"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth\",join:\"lineJoin linejoin join type mode\",miterLimit:\"miterlimit miterLimit\",dashes:\"dash dashes dasharray dash-array dashArray\",color:\"color colour stroke colors colours stroke-color strokeColor\",fill:\"fill fill-color fillColor\",opacity:\"alpha opacity\",overlay:\"overlay crease overlap intersect\",close:\"closed close closed-path closePath\",range:\"range dataBox\",viewport:\"viewport viewBox\",hole:\"holes hole hollow\",splitNull:\"splitNull\"}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:\"linear\",min:\"linear\"}),colorBuffer:r.buffer({usage:\"dynamic\",type:\"uint8\",data:new Uint8Array}),positionBuffer:r.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array})},t=a({},m.defaults,t)),null!=t.thickness&&(d.thickness=parseFloat(t.thickness)),null!=t.opacity&&(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(d.overlay=!!t.overlay,f<m.maxLines&&(d.depth=2*(m.maxLines-1-f%m.maxLines)/m.maxLines-1)),null!=t.join&&(d.join=t.join),null!=t.hole&&(d.hole=t.hole),null!=t.fill&&(d.fill=t.fill?n(t.fill,\"uint8\"):null),null!=t.viewport&&(d.viewport=g(t.viewport)),d.viewport||(d.viewport=g([o.drawingBufferWidth,o.drawingBufferHeight])),null!=t.close&&(d.close=t.close),null===t.positions&&(t.positions=[]),t.positions){var y,x;if(t.positions.x&&t.positions.y){var b=t.positions.x,_=t.positions.y;x=d.count=Math.max(b.length,_.length),y=new Float64Array(2*x);for(var w=0;w<x;w++)y[2*w]=b[w],y[2*w+1]=_[w]}else y=l(t.positions,\"float64\"),x=d.count=Math.floor(y.length/2);var k=d.bounds=i(y,2);if(d.fill){for(var T=[],M={},A=0,S=0,E=0,C=d.count;S<C;S++){var L=y[2*S],P=y[2*S+1];isNaN(L)||isNaN(P)||null==L||null==P?(L=y[2*A],P=y[2*A+1],M[S]=A):A=S,T[E++]=L,T[E++]=P}if(t.splitNull){d.count-1 in M||(M[d.count]=d.count-1);var O=Object.keys(M).map(Number).sort((function(t,e){return t-e})),I=[],D=0,z=null!=d.hole?d.hole[0]:null;if(null!=z){var R=v(O,(function(t){return t>=z}));(O=O.slice(0,R)).push(z)}for(var F=function(t){var e=T.slice(2*D,2*O[t]).concat(z?T.slice(2*z):[]),r=(d.hole||[]).map((function(e){return e-z+(O[t]-D)})),n=u(e,r);n=n.map((function(e){return e+D+(e+D<O[t]?0:z-O[t])})),I.push.apply(I,n),D=O[t]+1},N=0;N<O.length;N++)F(N);for(var B=0,j=I.length;B<j;B++)null!=M[I[B]]&&(I[B]=M[I[B]]);d.triangles=I}else{for(var U=u(T,d.hole||[]),V=0,H=U.length;V<H;V++)null!=M[U[V]]&&(U[V]=M[U[V]]);d.triangles=U}}var q=new Float64Array(y);c(q,2,k);var G=new Float64Array(2*x+6);d.close?y[0]===y[2*x-2]&&y[1]===y[2*x-1]?(G[0]=q[2*x-4],G[1]=q[2*x-3]):(G[0]=q[2*x-2],G[1]=q[2*x-1]):(G[0]=q[0],G[1]=q[1]),G.set(q,2),d.close?y[0]===y[2*x-2]&&y[1]===y[2*x-1]?(G[2*x+2]=q[2],G[2*x+3]=q[3],d.count-=1):(G[2*x+2]=q[0],G[2*x+3]=q[1],G[2*x+4]=q[2],G[2*x+5]=q[3]):(G[2*x+2]=q[2*x-2],G[2*x+3]=q[2*x-1],G[2*x+4]=q[2*x-2],G[2*x+5]=q[2*x-1]);var Y=h(G);d.positionBuffer(Y);var W=p(G,Y);d.positionFractBuffer(W)}if(t.range?d.range=t.range:d.range||(d.range=d.bounds),(t.range||t.positions)&&d.count){var X=d.bounds,Z=X[2]-X[0],K=X[3]-X[1],J=d.range[2]-d.range[0],$=d.range[3]-d.range[1];d.scale=[Z/J,K/$],d.translate=[-d.range[0]/J+X[0]/J||0,-d.range[1]/$+X[1]/$||0],d.scaleFract=p(d.scale),d.translateFract=p(d.translate)}if(t.dashes){var Q,tt=0;if(!t.dashes||t.dashes.length<2)tt=1,Q=new Uint8Array([255,255,255,255,255,255,255,255]);else{tt=0;for(var et=0;et<t.dashes.length;++et)tt+=t.dashes[et];Q=new Uint8Array(tt*m.dashMult);for(var rt=0,nt=255,it=0;it<2;it++)for(var at=0;at<t.dashes.length;++at){for(var ot=0,st=t.dashes[at]*m.dashMult*.5;ot<st;++ot)Q[rt++]=nt;nt^=255}}d.dashLength=tt,d.dashTexture({channels:1,data:Q,width:Q.length,height:1,mag:\"linear\",min:\"linear\"},0,0)}if(t.color){var lt=d.count,ut=t.color;ut||(ut=\"transparent\");var ct=new Uint8Array(4*lt+4);if(Array.isArray(ut)&&\"number\"!=typeof ut[0]){for(var ft=0;ft<lt;ft++){var ht=n(ut[ft],\"uint8\");ct.set(ht,4*ft)}ct.set(n(ut[0],\"uint8\"),4*lt)}else for(var pt=n(ut,\"uint8\"),dt=0;dt<lt+1;dt++)ct.set(pt,4*dt);d.colorBuffer({usage:\"dynamic\",type:\"uint8\",data:ct})}}else e.passes[f]=null})),t.length<this.passes.length){for(var f=t.length;f<this.passes.length;f++){var d=this.passes[f];d&&(d.colorBuffer.destroy(),d.positionBuffer.destroy(),d.dashTexture.destroy())}this.passes.length=t.length}for(var y=[],x=0;x<this.passes.length;x++)null!==this.passes[x]&&y.push(this.passes[x]);return this.passes=y,this}},m.prototype.destroy=function(){return this.passes.forEach((function(t){t.colorBuffer.destroy(),t.positionBuffer.destroy(),t.dashTexture.destroy()})),this.passes.length=0,this}},{\"array-bounds\":71,\"array-find-index\":72,\"array-normalize\":73,\"color-normalize\":89,earcut:129,\"es6-weak-map\":183,\"flatten-vertex-data\":191,glslify:227,\"object-assign\":247,\"parse-rect\":249,\"pick-by-alias\":253,\"to-float32\":314}],282:[function(t,e,r){\"use strict\";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var n,i,a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}}(t,e)||a(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||a(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function a(t,e){if(t){if(\"string\"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var s=t(\"color-normalize\"),l=t(\"array-bounds\"),u=t(\"color-id\"),c=t(\"@plotly/point-cluster\"),f=t(\"object-assign\"),h=t(\"glslify\"),p=t(\"pick-by-alias\"),d=t(\"update-diff\"),g=t(\"flatten-vertex-data\"),v=t(\"is-iexplorer\"),m=t(\"to-float32\"),y=t(\"parse-rect\"),x=b;function b(t,e){var r=this;if(!(this instanceof b))return new b(t,e);\"function\"==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&&e.length&&(e.positions=e);var n,i=(t=e.regl)._gl,a=[],o=255;this.tooManyColors=v,n=t.texture({data:new Uint8Array(1020),width:o,height:1,type:\"uint8\",format:\"rgba\",wrapS:\"clamp\",wrapT:\"clamp\",mag:\"nearest\",min:\"nearest\"}),f(this,{regl:t,gl:i,groups:[],markerCache:[null],markerTextures:[null],palette:a,paletteIds:{},paletteTexture:n,maxColors:o,maxSize:100,canvas:i.canvas}),this.update(e);var s={uniforms:{constPointSize:!!e.constPointSize,opacity:t.prop(\"opacity\"),paletteSize:function(t,e){return[r.tooManyColors?0:o,n.height]},pixelRatio:t.context(\"pixelRatio\"),scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translate:t.prop(\"translate\"),translateFract:t.prop(\"translateFract\"),markerTexture:t.prop(\"markerTexture\"),paletteTexture:n},attributes:{x:function(t,e){return e.xAttr||{buffer:e.positionBuffer,stride:8,offset:0}},y:function(t,e){return e.yAttr||{buffer:e.positionBuffer,stride:8,offset:4}},xFract:function(t,e){return e.xAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:0}},yFract:function(t,e){return e.yAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:4}},size:function(t,e){return e.size.length?{buffer:e.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*e.size/r.maxSize)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:e.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/r.maxSize)]}},colorId:function(t,e){return e.color.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(4*e.color,4*e.color+4):[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(4*e.borderColor,4*e.borderColor+4):[e.borderColor]}},isActive:function(t,e){return!0===e.activation?{constant:[1]}:e.activation?e.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},scissor:{enable:!0,box:t.prop(\"viewport\")},viewport:t.prop(\"viewport\"),stencil:{enable:!1},depth:{enable:!1},elements:t.prop(\"elements\"),count:t.prop(\"count\"),offset:t.prop(\"offset\"),primitive:\"points\"},l=f({},s);l.frag=h([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform float opacity;\\nuniform sampler2D markerTexture;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\\n\\nfloat smoothStep(float x, float y) {\\n  return 1.0 / (1.0 + exp(50.0*(x - y)));\\n}\\n\\nvoid main() {\\n  float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;\\n\\n  // max-distance alpha\\n  if (dist < 0.003) discard;\\n\\n  // null-border case\\n  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\\n    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\\n    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\\n  }\\n  else {\\n    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\\n    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\\n\\n    vec4 color = fragBorderColor;\\n    color.a *= borderColorAmt;\\n    color = mix(color, fragColor, colorAmt);\\n    color.a *= opacity;\\n\\n    gl_FragColor = color;\\n  }\\n\\n}\\n\"]),l.vert=h([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute float x, y, xFract, yFract;\\nattribute float size, borderSize;\\nattribute vec4 colorId, borderColorId;\\nattribute float isActive;\\n\\nuniform bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\nconst float borderLevel = .5;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n  return isDirect ? id / 255. : texture2D(paletteTexture,\\n    vec2(\\n      (id.x + .5) / paletteSize.x,\\n      (id.y + .5) / paletteSize.y\\n    )\\n  );\\n}\\n\\nvoid main() {\\n  // ignore inactive points\\n  if (isActive == 0.) return;\\n\\n  vec2 position = vec2(x, y);\\n  vec2 positionFract = vec2(xFract, yFract);\\n\\n  vec4 color = getColor(colorId);\\n  vec4 borderColor = getColor(borderColorId);\\n\\n  float size = size * maxSize / 255.;\\n  float borderSize = borderSize * maxSize / 255.;\\n\\n  gl_PointSize = 2. * size * pointSizeScale;\\n  fragPointSize = size * pixelRatio;\\n\\n  vec2 pos = (position + translate) * scale\\n      + (positionFract + translateFract) * scale\\n      + (position + translate) * scaleFract\\n      + (positionFract + translateFract) * scaleFract;\\n\\n  gl_Position = vec4(pos * 2. - 1., 0., 1.);\\n\\n  fragColor = color;\\n  fragBorderColor = borderColor;\\n  fragWidth = 1. / gl_PointSize;\\n\\n  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\\n  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\\n}\"]),this.drawMarker=t(l);var u=f({},s);u.frag=h([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nuniform float opacity;\\n\\nfloat smoothStep(float edge0, float edge1, float x) {\\n\\tfloat t;\\n\\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\\n\\treturn t * t * (3.0 - 2.0 * t);\\n}\\n\\nvoid main() {\\n\\tfloat radius, alpha = 1.0, delta = fragWidth;\\n\\n\\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\\n\\n\\tif (radius > 1.0 + delta) {\\n\\t\\tdiscard;\\n\\t}\\n\\n\\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\\n\\n\\tfloat borderRadius = fragBorderRadius;\\n\\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\\n\\tvec4 color = mix(fragColor, fragBorderColor, ratio);\\n\\tcolor.a *= alpha * opacity;\\n\\tgl_FragColor = color;\\n}\\n\"]),u.vert=h([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute float x, y, xFract, yFract;\\nattribute float size, borderSize;\\nattribute vec4 colorId, borderColorId;\\nattribute float isActive;\\n\\nuniform bool constPointSize;\\nuniform float pixelRatio;\\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\\nuniform sampler2D paletteTexture;\\n\\nconst float maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\\n\\nbool isDirect = (paletteSize.x < 1.);\\n\\nvec4 getColor(vec4 id) {\\n  return isDirect ? id / 255. : texture2D(paletteTexture,\\n    vec2(\\n      (id.x + .5) / paletteSize.x,\\n      (id.y + .5) / paletteSize.y\\n    )\\n  );\\n}\\n\\nvoid main() {\\n  // ignore inactive points\\n  if (isActive == 0.) return;\\n\\n  vec2 position = vec2(x, y);\\n  vec2 positionFract = vec2(xFract, yFract);\\n\\n  vec4 color = getColor(colorId);\\n  vec4 borderColor = getColor(borderColorId);\\n\\n  float size = size * maxSize / 255.;\\n  float borderSize = borderSize * maxSize / 255.;\\n\\n  gl_PointSize = (size + borderSize) * pointSizeScale;\\n\\n  vec2 pos = (position + translate) * scale\\n      + (positionFract + translateFract) * scale\\n      + (position + translate) * scaleFract\\n      + (positionFract + translateFract) * scaleFract;\\n\\n  gl_Position = vec4(pos * 2. - 1., 0., 1.);\\n\\n  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\\n  fragColor = color;\\n  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\\n  fragWidth = 1. / gl_PointSize;\\n}\\n\"]),v&&(u.frag=u.frag.replace(\"smoothstep\",\"smoothStep\"),l.frag=l.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=t(u)}b.defaults={color:\"black\",borderColor:\"transparent\",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=this.groups;if(1===r.length&&Array.isArray(r[0])&&(null===r[0][0]||Array.isArray(r[0][0]))&&(r=r[0]),this.regl._refresh(),r.length)for(var a=0;a<r.length;a++)this.drawItem(a,r[a]);else i.forEach((function(e,r){t.drawItem(r)}));return this},b.prototype.drawItem=function(t,e){var r=this.groups,n=r[t];if(\"number\"==typeof e&&(t=e,n=r[e],e=null),n&&n.count&&n.opacity){n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,e));for(var a=[],o=1;o<n.activation.length;o++)n.activation[o]&&(!0===n.activation[o]||n.activation[o].data.length)&&a.push.apply(a,i(this.getMarkerDrawOptions(o,n,e)));a.length&&this.drawMarker(a)}},b.prototype.getMarkerDrawOptions=function(t,e,r){var i=e.range,a=e.tree,o=e.viewport,s=e.activation,l=e.selectionBuffer,u=e.count;if(this.regl,!a)return r?[f({},e,{markerTexture:this.markerTextures[t],activation:s[t],count:r.length,elements:r,offset:0})]:[f({},e,{markerTexture:this.markerTextures[t],activation:s[t],offset:0})];var c=[],h=a.range(i,{lod:!0,px:[(i[2]-i[0])/o.width,(i[3]-i[1])/o.height]});if(r){for(var p=s[t].data,d=new Uint8Array(u),g=0;g<r.length;g++){var v=r[g];d[v]=p?p[v]:1}l.subdata(d)}for(var m=h.length;m--;){var y=n(h[m],2),x=y[0],b=y[1];c.push(f({},e,{markerTexture:this.markerTextures[t],activation:r?l:s[t],offset:x,count:b-x}))}return c},b.prototype.update=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length){1===r.length&&Array.isArray(r[0])&&(r=r[0]);var i=this.groups,a=this.gl,o=this.regl,s=this.maxSize,u=this.maxColors,h=this.palette;this.groups=i=r.map((function(e,r){var n=i[r];if(void 0===e)return n;null===e?e={positions:null}:\"function\"==typeof e?e={ondraw:e}:\"number\"==typeof e[0]&&(e={positions:e}),null===(e=p(e,{positions:\"positions data points\",snap:\"snap cluster lod tree\",size:\"sizes size radius\",borderSize:\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\",color:\"colors color fill fill-color fillColor\",borderColor:\"borderColors borderColor stroke stroke-color strokeColor\",marker:\"markers marker shape\",range:\"range dataBox databox\",viewport:\"viewport viewPort viewBox viewbox\",opacity:\"opacity alpha transparency\",bounds:\"bound bounds boundaries limits\",tooManyColors:\"tooManyColors palette paletteMode optimizePalette enablePalette\"})).positions&&(e.positions=[]),null!=e.tooManyColors&&(t.tooManyColors=e.tooManyColors),n||(i[r]=n={id:r,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:o.buffer({data:new Uint8Array(0),usage:\"stream\",type:\"uint8\"}),sizeBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"uint8\"}),colorBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"uint8\"}),positionBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"float\"}),positionFractBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"float\"})},e=f({},b.defaults,e)),e.positions&&!(\"marker\"in e)&&(e.marker=n.marker,delete n.marker),e.marker&&!(\"positions\"in e)&&(e.positions=n.positions,delete n.positions);var v=0,x=0;if(d(n,e,[{snap:!0,size:function(t,e){return null==t&&(t=b.defaults.size),v+=t&&t.length?1:0,t},borderSize:function(t,e){return null==t&&(t=b.defaults.borderSize),v+=t&&t.length?1:0,t},opacity:parseFloat,color:function(e,r){return null==e&&(e=b.defaults.color),e=t.updateColor(e),x++,e},borderColor:function(e,r){return null==e&&(e=b.defaults.borderColor),e=t.updateColor(e),x++,e},bounds:function(t,e,r){return\"range\"in r||(r.range=null),t},positions:function(t,e,r){var n=e.snap,i=e.positionBuffer,a=e.positionFractBuffer,s=e.selectionBuffer;if(t.x||t.y)return t.x.length?e.xAttr={buffer:o.buffer(t.x),offset:0,stride:4,count:t.x.length}:e.xAttr={buffer:t.x.buffer,offset:4*t.x.offset||0,stride:4*(t.x.stride||1),count:t.x.count},t.y.length?e.yAttr={buffer:o.buffer(t.y),offset:0,stride:4,count:t.y.length}:e.yAttr={buffer:t.y.buffer,offset:4*t.y.offset||0,stride:4*(t.y.stride||1),count:t.y.count},e.count=Math.max(e.xAttr.count,e.yAttr.count),t;t=g(t,\"float64\");var u=e.count=Math.floor(t.length/2),f=e.bounds=u?l(t,2):null;if(r.range||e.range||(delete e.range,r.range=f),r.marker||e.marker||(delete e.marker,r.marker=null),n&&(!0===n||u>n)?e.tree=c(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:\"points\",usage:\"static\",data:e.tree,type:\"uint32\"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=m.float32(t);return i({data:p,usage:\"dynamic\"}),a({data:m.fract32(t,p),usage:\"dynamic\"}),s({data:new Uint8Array(u),type:\"uint8\",usage:\"stream\"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&\"number\"!=typeof e[0]){for(var a=[],s=0,l=Math.min(e.length,r.count);s<l;s++){var u=t.addMarker(e[s]);a[u]||(a[u]=new Uint8Array(r.count)),a[u][s]=1}for(var c=0;c<a.length;c++)if(a[c]){var f={data:a[c],type:\"uint8\",usage:\"static\"};i[c]?i[c](f):i[c]=o.buffer(f),i[c].data=a[c]}}else i[t.addMarker(e)]=!0;return e},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=m.fract(e.scale),e.translateFract=m.fract(e.translate),t},viewport:function(t){return y(t||[a.drawingBufferWidth,a.drawingBufferHeight])}}]),v){var _=n,w=_.count,k=_.size,T=_.borderSize,M=_.sizeBuffer,A=new Uint8Array(2*w);if(k.length||T.length)for(var S=0;S<w;S++)A[2*S]=Math.round(255*(null==k[S]?k:k[S])/s),A[2*S+1]=Math.round(255*(null==T[S]?T:T[S])/s);M({data:A,usage:\"dynamic\"})}if(x){var E,C=n,L=C.count,P=C.color,O=C.borderColor,I=C.colorBuffer;if(t.tooManyColors){if(P.length||O.length){E=new Uint8Array(8*L);for(var D=0;D<L;D++){var z=P[D];E[8*D]=h[4*z],E[8*D+1]=h[4*z+1],E[8*D+2]=h[4*z+2],E[8*D+3]=h[4*z+3];var R=O[D];E[8*D+4]=h[4*R],E[8*D+5]=h[4*R+1],E[8*D+6]=h[4*R+2],E[8*D+7]=h[4*R+3]}}}else if(P.length||O.length){E=new Uint8Array(4*L+2);for(var F=0;F<L;F++)null!=P[F]&&(E[4*F]=P[F]%u,E[4*F+1]=Math.floor(P[F]/u)),null!=O[F]&&(E[4*F+2]=O[F]%u,E[4*F+3]=Math.floor(O[F]/u))}I({data:E||new Uint8Array(0),type:\"uint8\",usage:\"dynamic\"})}return n}))}},b.prototype.addMarker=function(t){var e,r=this.markerTextures,n=this.regl,i=this.markerCache,a=null==t?0:i.indexOf(t);if(a>=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o<s;o++)e[o]=255*t[o]}var l=Math.floor(Math.sqrt(e.length));return a=r.length,i.push(t),r.push(n.texture({channels:1,data:e,radius:l,mag:\"linear\",min:\"linear\"})),a},b.prototype.updateColor=function(t){var e=this.paletteIds,r=this.palette,n=this.maxColors;Array.isArray(t)||(t=[t]);var i=[];if(\"number\"==typeof t[0]){var a=[];if(Array.isArray(t))for(var o=0;o<t.length;o+=4)a.push(t.slice(o,o+4));else for(var l=0;l<t.length;l+=4)a.push(t.subarray(l,l+4));t=a}for(var c=0;c<t.length;c++){var f=t[c];f=s(f,\"uint8\");var h=u(f,!1);if(null==e[h]){var p=r.length;e[h]=Math.floor(p/4),r[p]=f[0],r[p+1]=f[1],r[p+2]=f[2],r[p+3]=f[3]}i[c]=e[h]}return!this.tooManyColors&&r.length>4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i<n*e;i++)t.push(0,0,0,0);r.height<n&&r.resize(e,n),r.subimage({width:Math.min(.25*t.length,e),height:n,data:t},0,0)}},b.prototype.destroy=function(){return this.groups.forEach((function(t){t.sizeBuffer.destroy(),t.positionBuffer.destroy(),t.positionFractBuffer.destroy(),t.colorBuffer.destroy(),t.activation.forEach((function(t){return t&&t.destroy&&t.destroy()})),t.selectionBuffer.destroy(),t.elements&&t.elements.destroy()})),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach((function(t){return t&&t.destroy&&t.destroy()})),this};var _=t(\"object-assign\");e.exports=function(t,e){var r=new x(t,e),n=r.render.bind(r);return _(n,{render:n,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),n}},{\"@plotly/point-cluster\":59,\"array-bounds\":71,\"color-id\":87,\"color-normalize\":89,\"flatten-vertex-data\":191,glslify:227,\"is-iexplorer\":233,\"object-assign\":247,\"parse-rect\":249,\"pick-by-alias\":253,\"to-float32\":314,\"update-diff\":330}],283:[function(t,e,r){\"use strict\";var n=t(\"regl-scatter2d\"),i=t(\"pick-by-alias\"),a=t(\"array-bounds\"),o=t(\"raf\"),s=t(\"array-range\"),l=t(\"parse-rect\"),u=t(\"flatten-vertex-data\");function c(t,e){if(!(this instanceof c))return new c(t,e);this.traces=[],this.passes={},this.regl=t,this.scatter=n(t),this.canvas=this.scatter.canvas}function f(t,e,r){return(null!=t.id?t.id:t)<<16|(255&e)<<8|255&r}function h(t,e,r){var n,i,a,o,s=t[e],l=t[r];return s.length>2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x,s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y,l.height),[a,n,o,i]}function p(t){if(\"number\"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}e.exports=c,c.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){e.draw(),e.dirty=!0,e.planned=null}))):(this.draw(),this.dirty=!0,o((function(){e.dirty=!1}))),this)},c.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;n<e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);for(var i=[],a=0,o=0;o<this.traces.length;o++){for(var s=this.traces[o],l=this.traces[o].passes,u=0;u<l.length;u++)i.push(this.passes[l[u]]);s.passOffset=a,a+=s.passes.length}return(t=this.scatter).update.apply(t,i),this}},c.prototype.updateItem=function(t,e){var r=this.regl;if(null===e)return this.traces[t]=null,this;if(!e)return this;var n,o=i(e,{data:\"data items columns rows values dimensions samples x\",snap:\"snap cluster\",size:\"sizes size radius\",color:\"colors color fill fill-color fillColor\",opacity:\"opacity alpha transparency opaque\",borderSize:\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\",borderColor:\"borderColors borderColor bordercolor stroke stroke-color strokeColor\",marker:\"markers marker shape\",range:\"range ranges databox dataBox\",viewport:\"viewport viewBox viewbox\",domain:\"domain domains area areas\",padding:\"pad padding paddings pads margin margins\",transpose:\"transpose transposed\",diagonal:\"diagonal diag showDiagonal\",upper:\"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf\",lower:\"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower\"}),s=this.traces[t]||(this.traces[t]={id:t,buffer:r.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array}),color:\"black\",marker:null,size:12,borderColor:\"transparent\",borderSize:1,viewport:l([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=o.color&&(s.color=o.color),null!=o.size&&(s.size=o.size),null!=o.marker&&(s.marker=o.marker),null!=o.borderColor&&(s.borderColor=o.borderColor),null!=o.borderSize&&(s.borderSize=o.borderSize),null!=o.opacity&&(s.opacity=o.opacity),o.viewport&&(s.viewport=l(o.viewport)),null!=o.diagonal&&(s.diagonal=o.diagonal),null!=o.upper&&(s.upper=o.upper),null!=o.lower&&(s.lower=o.lower),o.data){s.buffer(u(o.data)),s.columns=o.data.length,s.count=o.data[0].length,s.bounds=[];for(var c=0;c<s.columns;c++)s.bounds[c]=a(o.data[c],1)}o.range&&(s.range=o.range,n=s.range&&\"number\"!=typeof s.range[0]),o.domain&&(s.domain=o.domain);var d=!1;null!=o.padding&&(Array.isArray(o.padding)&&o.padding.length===s.columns&&\"number\"==typeof o.padding[o.padding.length-1]?(s.padding=o.padding.map(p),d=!0):s.padding=p(o.padding));var g=s.columns,v=s.count,m=s.viewport.width,y=s.viewport.height,x=s.viewport.x,b=s.viewport.y,_=m/g,w=y/g;s.passes=[];for(var k=0;k<g;k++)for(var T=0;T<g;T++)if((s.diagonal||T!==k)&&(s.upper||!(k>T))&&(s.lower||!(k<T))){var M=f(s.id,k,T),A=this.passes[M]||(this.passes[M]={});if(o.data&&(o.transpose?A.positions={x:{buffer:s.buffer,offset:T,count:v,stride:g},y:{buffer:s.buffer,offset:k,count:v,stride:g}}:A.positions={x:{buffer:s.buffer,offset:T*v,count:v},y:{buffer:s.buffer,offset:k*v,count:v}},A.bounds=h(s.bounds,k,T)),o.domain||o.viewport||o.data){var S=d?h(s.padding,k,T):s.padding;if(s.domain){var E=h(s.domain,k,T),C=E[0],L=E[1],P=E[2],O=E[3];A.viewport=[x+C*m+S[0],b+L*y+S[1],x+P*m-S[2],b+O*y-S[3]]}else A.viewport=[x+T*_+_*S[0],b+k*w+w*S[1],x+(T+1)*_-_*S[2],b+(k+1)*w-w*S[3]]}o.color&&(A.color=s.color),o.size&&(A.size=s.size),o.marker&&(A.marker=s.marker),o.borderSize&&(A.borderSize=s.borderSize),o.borderColor&&(A.borderColor=s.borderColor),o.opacity&&(A.opacity=s.opacity),o.range&&(A.range=n?h(s.range,k,T):s.range||A.bounds),s.passes.push(M)}return this},c.prototype.draw=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=[],i=0;i<e.length;i++)if(\"number\"==typeof e[i]){var a=this.traces[e[i]],o=a.passes,l=a.passOffset;n.push.apply(n,s(l,l+o.length))}else if(e[i].length){var u=e[i],c=this.traces[i],f=c.passes,h=c.passOffset;f=f.map((function(t,e){n[h+e]=u}))}(t=this.scatter).draw.apply(t,n)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach((function(t){t.buffer&&t.buffer.destroy&&t.buffer.destroy()})),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{\"array-bounds\":71,\"array-range\":74,\"flatten-vertex-data\":191,\"parse-rect\":249,\"pick-by-alias\":253,raf:279,\"regl-scatter2d\":282}],284:[function(t,e,r){var n;n=function(){function t(t,e){this.id=Y++,this.type=t,this.data=e}function e(t){if(0===t.length)return[];var r=t.charAt(0),n=t.charAt(t.length-1);if(1<t.length&&r===n&&('\"'===r||\"'\"===r))return['\"'+t.substr(1,t.length-2).replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];if(r=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(t))return e(t.substr(0,r.index)).concat(e(r[1])).concat(e(t.substr(r.index+r[0].length)));if(1===(r=t.split(\".\")).length)return['\"'+t.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];for(t=[],n=0;n<r.length;++n)t=t.concat(e(r[n]));return t}function r(t){return\"[\"+e(t).join(\"][\")+\"]\"}function n(t){return\"string\"==typeof t?t.split():t}function i(t){return\"string\"==typeof t?document.querySelector(t):t}function a(t){var e,r,a,o,s=t||{};t={};var l=[],u=[],c=\"undefined\"==typeof window?1:window.devicePixelRatio,f=!1,h={},p=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?a=(o=s).canvas:(\"gl\"in s?o=s.gl:\"canvas\"in s?a=i(s.canvas):\"container\"in s&&(r=i(s.container)),\"attributes\"in s&&(t=s.attributes),\"extensions\"in s&&(l=n(s.extensions)),\"optionalExtensions\"in s&&(u=n(s.optionalExtensions)),\"onDone\"in s&&(p=s.onDone),\"profile\"in s&&(f=!!s.profile),\"pixelRatio\"in s&&(c=+s.pixelRatio),\"cachedCode\"in s&&(h=s.cachedCode))),e&&(\"canvas\"===e.nodeName.toLowerCase()?a=e:r=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&&(e=(n=a.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),a.width=r*e,a.height=r*n}var i,a=document.createElement(\"canvas\");return G(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:\"100%\",height:\"100%\"}),t.appendChild(a),t===document.body&&(a.style.position=\"absolute\",G(t.style,{margin:0,padding:0})),t!==document.body&&\"function\"==typeof ResizeObserver?(i=new ResizeObserver((function(){setTimeout(n)}))).observe(t):window.addEventListener(\"resize\",n,!1),n(),{canvas:a,onDestroy:function(){i?i.disconnect():window.removeEventListener(\"resize\",n),t.removeChild(a)}}}(r||document.body,0,c)))return null;a=e.canvas,d=e.onDestroy}void 0===t.premultipliedAlpha&&(t.premultipliedAlpha=!0),o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r(\"webgl\")||r(\"experimental-webgl\")||r(\"webgl-experimental\")}(a,t)}return o?{gl:o,canvas:a,container:r,extensions:l,optionalExtensions:u,pixelRatio:c,profile:f,cachedCode:h,onDone:p,onDestroy:d}:(d(),p(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function o(t,e){for(var r=Array(t),n=0;n<t;++n)r[n]=e(n);return r}function s(t){var e,r;return e=(65535<t)<<4,e|=r=(255<(t>>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function l(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[s(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[s(t.byteLength)>>2].push(t)}var r=o(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},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)||$(t.data))}function c(t,e,r,n,i,a){for(var o=0;o<e;++o)for(var s=t[o],l=0;l<r;++l)for(var u=s[l],c=0;c<n;++c)i[a++]=u[c]}function f(t,e,r,n,i){for(var a=1,o=r+1;o<e.length;++o)a*=e[o];var s=e[r];if(4==e.length-r){var l=e[r+1],u=e[r+2];for(e=e[r+3],o=0;o<s;++o)c(t[o],l,u,e,n,i),i+=a}else for(o=0;o<s;++o)f(t[o],e,r+1,n,i),i+=a}function h(t){return 0|et[Object.prototype.toString.call(t)]}function p(t,e){for(var r=0;r<e.length;++r)t[r]=e[r]}function d(t,e,r,n,i,a,o){for(var s=0,l=0;l<r;++l)for(var u=0;u<n;++u)t[s++]=e[i*l+a*u+o]}function g(t,e,r,n){function i(e){this.id=l++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}function a(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function o(t,e,r,n,i,o){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0<e.length)if(Array.isArray(e[0])){i=at(e);for(var s=n=1;s<i.length;++s)n*=i[s];t.dimension=n,a(t,e=it(e,i,t.dtype),r),o?t.persistentData=e:K.freeType(e)}else\"number\"==typeof e[0]?(t.dimension=i,p(i=K.allocType(t.dtype,e.length),e),a(t,i,r),o?t.persistentData=i:K.freeType(i)):$(e[0])&&(t.dimension=e[0].length,t.dtype=n||h(e[0])||5126,a(t,e=it(e,[e.length,e[0].length],t.dtype),r),o?t.persistentData=e:K.freeType(e))}else if($(e))t.dtype=n||h(e),t.dimension=i,a(t,e,r),o&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(u(e)){i=e.shape;var l=e.stride,c=(s=e.offset,0),f=0,g=0,v=0;1===i.length?(c=i[0],f=1,g=l[0],v=0):2===i.length&&(c=i[0],f=i[1],g=l[0],v=l[1]),t.dtype=n||h(e.data)||5126,t.dimension=f,d(i=K.allocType(t.dtype,c*f),e.data,c,f,g,v,s),a(t,i,r),o?t.persistentData=i:K.freeType(i)}else e instanceof ArrayBuffer&&(t.dtype=5121,t.dimension=i,a(t,e,r),o&&(t.persistentData=new Uint8Array(new Uint8Array(e))))}function s(r){e.bufferCount--,n(r),t.deleteBuffer(r.buffer),r.buffer=null,delete c[r.id]}var l=0,c={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var f=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(c).forEach((function(e){t+=c[e].stats.size})),t}),{create:function(n,a,l,f){function g(e){var n=35044,i=null,a=0,s=0,l=1;return Array.isArray(e)||$(e)||u(e)||e instanceof ArrayBuffer?i=e:\"number\"==typeof e?a=0|e:e&&(\"data\"in e&&(i=e.data),\"usage\"in e&&(n=nt[e.usage]),\"type\"in e&&(s=rt[e.type]),\"dimension\"in e&&(l=0|e.dimension),\"length\"in e&&(a=0|e.length)),v.bind(),i?o(v,i,n,s,l,f):(a&&t.bufferData(v.type,a,n),v.dtype=s||5121,v.usage=n,v.dimension=l,v.byteLength=a),r.profile&&(v.stats.size=v.byteLength*ot[v.dtype]),g}e.bufferCount++;var v=new i(a);return c[v.id]=v,l||g(n),g._reglType=\"buffer\",g._buffer=v,g.subdata=function(e,r){var n,i=0|(r||0);if(v.bind(),$(e)||e instanceof ArrayBuffer)t.bufferSubData(v.type,i,e);else if(Array.isArray(e)){if(0<e.length)if(\"number\"==typeof e[0]){var a=K.allocType(v.dtype,e.length);p(a,e),t.bufferSubData(v.type,i,a),K.freeType(a)}else(Array.isArray(e[0])||$(e[0]))&&(n=at(e),a=it(e,n,v.dtype),t.bufferSubData(v.type,i,a),K.freeType(a))}else if(u(e)){n=e.shape;var o=e.stride,s=a=0,l=0,c=0;1===n.length?(a=n[0],s=1,l=o[0],c=0):2===n.length&&(a=n[0],s=n[1],l=o[0],c=o[1]),n=Array.isArray(e.data)?v.dtype:h(e.data),d(n=K.allocType(n,a*s),e.data,a,s,l,c,e.offset),t.bufferSubData(v.type,i,n),K.freeType(n)}return g},r.profile&&(g.stats=v.stats),g.destroy=function(){s(v)},g},createStream:function(t,e){var r=f.pop();return r||(r=new i(t)),r.bind(),o(r,e,35040,0,1,!1),r},destroyStream:function(t){f.push(t)},clear:function(){Q(c).forEach(s),f.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof i?t._buffer:null},restore:function(){Q(c).forEach((function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)}))},_initBuffer:o}}function v(t,e,r,n){function i(t){this.id=l++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,o,s,l,c){var f;if(n.buffer.bind(),i?((f=c)||$(i)&&(!u(i)||$(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)):(t.bufferData(34963,l,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l),f=c,!c){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0>(i=s)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,c={uint8:5121,uint16:5123};e.oes_element_index_uint&&(c.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if(\"number\"==typeof t)l(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||$(t)||u(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=nt[t.usage]),\"primitive\"in t&&(n=st[t.primitive]),\"count\"in t&&(i=0|t.count),\"type\"in t&&(h=c[t.type]),\"length\"in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&&5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else l(),f.primType=4,f.vertCount=0,f.type=5121;return s}var l=r.create(null,34963,!0),f=new i(l._buffer);return n.elementsCount++,s(t),s._reglType=\"elements\",s._elements=f,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return\"function\"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){Q(s).forEach(o)}}}function m(t){for(var e=K.allocType(5123,t.length),r=0;r<t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{lt[0]=t[r];var n=(a=ut[0])>>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15<i?n+31744:n+(i+15<<10)+a}return e}function y(t){return Array.isArray(t)||$(t)}function x(t){return\"[object \"+t+\"]\"}function b(t){return Array.isArray(t)&&(0===t.length||\"number\"==typeof t[0])}function _(t){return!(!Array.isArray(t)||0===t.length||!y(t[0]))}function w(t){return Object.prototype.toString.call(t)}function k(t){if(!t)return!1;var e=w(t);return 0<=xt.indexOf(e)||b(t)||_(t)||u(t)}function T(t,e){36193===t.type?(t.data=m(e),K.freeType(e)):t.data=e}function M(t,e,r,n,i,a){if(t=void 0!==_t[t]?_t[t]:ht[t]*bt[e],a&&(t*=6),i){for(n=0;1<=r;)n+=t*r*r,r/=2;return n}return t*r*n}function A(t,e,r,n,i,a,o){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 l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function c(t,e){if(\"object\"==typeof e&&e){\"premultiplyAlpha\"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),\"flipY\"in e&&(t.flipY=e.flipY),\"alignment\"in e&&(t.unpackAlignment=e.alignment),\"colorSpace\"in e&&(t.colorSpace=V[e.colorSpace]),\"type\"in e&&(t.type=H[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;\"shape\"in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&&(i=e.shape[2],a=!0)):(\"radius\"in e&&(r=n=e.radius),\"width\"in e&&(r=e.width),\"height\"in e&&(n=e.height),\"channels\"in e&&(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,\"format\"in e&&(r=e.format,n=t.internalformat=q[r],t.format=at[n],r in H&&!(\"type\"in e)&&(t.type=H[r]),r in Y&&(t.compressed=!0),r=!0),!a&&r?t.channels=ht[t.format]:a&&!r&&t.channels!==ft[t.format]&&(t.format=t.internalformat=ft[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function p(t,e){var r=null;if(k(e)?r=e:e&&(c(t,e),\"x\"in e&&(t.xOffset=0|e.x),\"y\"in e&&(t.yOffset=0|e.y),k(e.data)&&(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if($(r))t.channels=t.channels||4,t.data=r,\"type\"in e||5121!==t.type||(t.type=0|et[Object.prototype.toString.call(r)]);else if(b(r)){switch(t.channels=t.channels||4,a=(n=r).length,t.type){case 5121:case 5123:case 5125:case 5126:(a=K.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=m(n)}t.alignment=1,t.needsFree=!0}else if(u(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|et[Object.prototype.toString.call(n)]),a=r.shape;var o,s,l,f,h=r.stride;3===a.length?(l=a[2],f=h[2]):f=l=1,o=a[0],s=a[1],a=h[0],h=h[1],t.alignment=1,t.width=o,t.height=s,t.channels=l,t.format=t.internalformat=ft[l],t.needsFree=!0,o=f,r=r.offset,l=t.width,f=t.height,s=t.channels;for(var p=K.allocType(36193===t.type?5126:t.type,l*f*s),d=0,g=0;g<f;++g)for(var v=0;v<l;++v)for(var x=0;x<s;++x)p[d++]=n[a*v+h*g+o*x+r];T(t,p)}else if(w(r)===pt||w(r)===dt||w(r)===gt)w(r)===pt||w(r)===dt?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(w(r)===vt)t.element=r,t.width=r.width,t.height=r.height,t.channels=4;else if(w(r)===mt)t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(w(r)===yt)t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(_(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=y(r[0][0])?h||r[0][0].length:h||1,o=tt.shape(r),l=1,f=0;f<o.length;++f)l*=o[f];l=K.allocType(36193===t.type?5126:t.type,l),tt.flatten(r,o,\"\",l),T(t,l),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=ft[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function d(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,c=e.format,h=e.type,p=e.width,d=e.height;f(e),s?t.texSubImage2D(r,o,i,a,c,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,p,d,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,p,d)):t.texSubImage2D(r,o,i,a,p,d,c,h,l)}function g(){return ot.pop()||new h}function v(t){t.needsFree&&K.freeType(t.data),h.call(t),ot.push(t)}function x(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function A(t,e,r){var n=t.images[0]=g();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function S(t,e){var r=null;if(k(e))l(r=t.images[0]=g(),t),p(r,e),t.mipmask=1;else if(c(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i<n.length;++i)l(r=t.images[i]=g(),t),r.width>>=i,r.height>>=i,p(r,n[i]),t.mipmask|=1<<i;else l(r=t.images[0]=g(),t),p(r,e),t.mipmask=1;l(t,t.images[0])}function E(e,r){for(var i=e.images,a=0;a<i.length&&i[a];++a){var o=i[a],s=r,l=a,u=o.element,c=o.data,h=o.internalformat,p=o.format,d=o.type,g=o.width,v=o.height;f(o),u?t.texImage2D(s,l,p,p,d,u):o.compressed?t.compressedTexImage2D(s,l,h,g,v,0,c):o.needsCopy?(n(),t.copyTexImage2D(s,l,p,o.xOffset,o.yOffset,g,v,0)):t.texImage2D(s,l,p,g,v,0,p,d,c||null)}}function C(){var t=st.pop()||new x;s.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;r<e.length;++r)e[r]&&v(e[r]),e[r]=null;st.push(t)}function P(){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=U[e.min],0<=ct.indexOf(t.minFilter)&&!(\"faces\"in e)&&(t.genMipmaps=!0)),\"mag\"in e&&(t.magFilter=j[e.mag]);var r=t.wrapS,n=t.wrapT;if(\"wrap\"in e){var i=e.wrap;\"string\"==typeof i?r=n=B[i]:Array.isArray(i)&&(r=B[i[0]],n=B[i[1]])}else\"wrapS\"in e&&(r=B[e.wrapS]),\"wrapT\"in e&&(n=B[e.wrapT]);if(t.wrapS=r,t.wrapT=n,\"anisotropic\"in e&&(t.anisotropic=e.anisotropic),\"mipmap\"in e){switch(r=!1,typeof e.mipmap){case\"string\":t.mipmapHint=N[e.mipmap],r=t.genMipmaps=!0;break;case\"boolean\":r=t.genMipmaps=e.mipmap;break;case\"object\":t.genMipmaps=!1,r=!0}!r||\"min\"in e||(t.minFilter=9984)}}function I(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function D(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=lt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new P,o.profile&&(this.stats={size:0})}function z(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function R(){var e=bt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function F(e){var r=e.texture,n=e.unit,i=e.target;0<=n&&(t.activeTexture(33984+n),t.bindTexture(i,null),bt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete ut[e.id],a.textureCount--}var N={\"don't care\":4352,\"dont care\":4352,nice:4354,fast:4353},B={repeat:10497,clamp:33071,mirror:33648},j={nearest:9728,linear:9729},U=G({mipmap:9987,\"nearest mipmap nearest\":9984,\"linear mipmap nearest\":9985,\"nearest mipmap linear\":9986,\"linear mipmap linear\":9987},j),V={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,\"rgb5 a1\":32820},q={alpha:6406,luminance:6409,\"luminance alpha\":6410,rgb:6407,rgba:6408,rgba4:32854,\"rgb5 a1\":32855,rgb565:36194},Y={};e.ext_srgb&&(q.srgb=35904,q.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&&(G(q,{depth:6402,\"depth stencil\":34041}),G(H,{uint16:5123,uint32:5125,\"depth stencil\":34042})),e.webgl_compressed_texture_s3tc&&G(Y,{\"rgb s3tc dxt1\":33776,\"rgba s3tc dxt1\":33777,\"rgba s3tc dxt3\":33778,\"rgba s3tc dxt5\":33779}),e.webgl_compressed_texture_atc&&G(Y,{\"rgb atc\":35986,\"rgba atc explicit alpha\":35987,\"rgba atc interpolated alpha\":34798}),e.webgl_compressed_texture_pvrtc&&G(Y,{\"rgb pvrtc 4bppv1\":35840,\"rgb pvrtc 2bppv1\":35841,\"rgba pvrtc 4bppv1\":35842,\"rgba pvrtc 2bppv1\":35843}),e.webgl_compressed_texture_etc1&&(Y[\"rgb etc1\"]=36196);var W=Array.prototype.slice.call(t.getParameter(34467));Object.keys(Y).forEach((function(t){var e=Y[t];0<=W.indexOf(e)&&(q[t]=e)}));var X=Object.keys(q);r.textureFormats=X;var Z=[];Object.keys(q).forEach((function(t){Z[q[t]]=t}));var J=[];Object.keys(H).forEach((function(t){J[H[t]]=t}));var rt=[];Object.keys(j).forEach((function(t){rt[j[t]]=t}));var nt=[];Object.keys(U).forEach((function(t){nt[U[t]]=t}));var it=[];Object.keys(B).forEach((function(t){it[B[t]]=t}));var at=X.reduce((function(t,r){var n=q[r];return 6409===n||6406===n||6409===n||6410===n||6402===n||34041===n||e.ext_srgb&&(35904===n||35906===n)?t[n]=n:32855===n||0<=r.indexOf(\"rgba\")?t[n]=6408:t[n]=6407,t}),{}),ot=[],st=[],lt=0,ut={},xt=r.maxTextureUnits,bt=Array(xt).map((function(){return null}));return G(D.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var r=0;r<xt;++r){var n=bt[r];if(n){if(0<n.bindCount)continue;n.unit=-1}bt[r]=this,e=r;break}o.profile&&a.maxTextureUnits<e+1&&(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(ut).forEach((function(e){t+=ut[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=C();return\"number\"==typeof t?A(a,0|t,\"number\"==typeof e?0|e:0|t):t?(O(r,t),S(a,t)):A(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,l(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,z(i),E(a,3553),I(r,3553),R(),L(a),o.profile&&(i.stats.size=M(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=Z[i.internalformat],n.type=J[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new D(3553);return ut[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=g();return l(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,z(i),d(o,3553,e,r,a),R(),v(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,z(i);for(var l=0;i.mipmask>>l;++l){var u=a>>l,c=s>>l;if(!u||!c)break;t.texImage2D(3553,l,i.format,u,c,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=M(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType=\"texture2d\",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,u){function f(t,e,r,n,i,a){var s,u=h.texInfo;for(P.call(u),s=0;6>s;++s)m[s]=C();if(\"number\"!=typeof t&&t){if(\"object\"==typeof t)if(e)S(m[0],t),S(m[1],e),S(m[2],r),S(m[3],n),S(m[4],i),S(m[5],a);else if(O(u,t),c(h,t),\"faces\"in t)for(t=t.faces,s=0;6>s;++s)l(m[s],h),S(m[s],t[s]);else for(s=0;6>s;++s)S(m[s],t)}else for(t=0|t||1,s=0;6>s;++s)A(m[s],t,t);for(l(h,m[0]),h.mipmask=u.genMipmaps?(m[0].width<<1)-1:m[0].mipmask,h.internalformat=m[0].internalformat,f.width=m[0].width,f.height=m[0].height,z(h),s=0;6>s;++s)E(m[s],34069+s);for(I(u,34067),R(),o.profile&&(h.stats.size=M(h.internalformat,h.type,f.width,f.height,u.genMipmaps,!0)),f.format=Z[h.internalformat],f.type=J[h.type],f.mag=rt[u.magFilter],f.min=nt[u.minFilter],f.wrapS=it[u.wrapS],f.wrapT=it[u.wrapT],s=0;6>s;++s)L(m[s]);return f}var h=new D(34067);ut[h.id]=h,a.cubeCount++;var m=Array(6);return f(e,r,n,i,s,u),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=g();return l(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,z(h),d(a,34069+t,r,n,i),R(),v(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,z(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return R(),o.profile&&(h.stats.size=M(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType=\"textureCube\",f._texture=h,o.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e<xt;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),bt[e]=null;Q(ut).forEach(F),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){for(var e=0;e<xt;++e){var r=bt[e];r&&(r.bindCount=0,r.unit=-1,bt[e]=null)}Q(ut).forEach((function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32>r;++r)if(0!=(e.mipmask&1<<r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);I(e.texInfo,e.target)}))},refresh:function(){for(var e=0;e<xt;++e){var r=bt[e];r&&(r.bindCount=0,r.unit=-1,bt[e]=null),t.activeTexture(33984+e),t.bindTexture(3553,null),t.bindTexture(34067,null)}}}}function S(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function u(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function c(t){var e=3553,r=null,n=null,i=t;return\"object\"==typeof t&&(i=t.data,\"target\"in t&&(e=0|t.target)),\"texture2d\"===(t=i._reglType)||\"textureCube\"===t?r=i:\"renderbuffer\"===t&&(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r),t.width=e,t.height=r)}function d(){this.id=k++,T[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function v(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete T[e.id]}function m(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n<i.length;++n)u(36064+n,i[n]);for(n=i.length;n<r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),u(36096,e.depthAttachment),u(36128,e.stencilAttachment),u(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.isContextLost(),t.bindFramebuffer(36160,x.next?x.next.framebuffer:null),x.cur=x.next,t.getError()}function y(t,e){function r(t,e){var i,a=0,o=0,s=!0,u=!0;i=null;var p=!0,d=\"rgba\",v=\"uint8\",y=1,x=null,w=null,k=null,T=!1;\"number\"==typeof t?(a=0|t,o=0|e||a):t?(\"shape\"in t?(a=(o=t.shape)[0],o=o[1]):(\"radius\"in t&&(a=o=t.radius),\"width\"in t&&(a=t.width),\"height\"in t&&(o=t.height)),(\"color\"in t||\"colors\"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||(\"colorCount\"in t&&(y=0|t.colorCount),\"colorTexture\"in t&&(p=!!t.colorTexture,d=\"rgba4\"),\"colorType\"in t&&(v=t.colorType,!p)&&(\"half float\"===v||\"float16\"===v?d=\"rgba16f\":\"float\"!==v&&\"float32\"!==v||(d=\"rgba32f\")),\"colorFormat\"in t&&(d=t.colorFormat,0<=b.indexOf(d)?p=!0:0<=_.indexOf(d)&&(p=!1))),(\"depthTexture\"in t||\"depthStencilTexture\"in t)&&(T=!(!t.depthTexture&&!t.depthStencilTexture)),\"depth\"in t&&(\"boolean\"==typeof t.depth?s=t.depth:(x=t.depth,u=!1)),\"stencil\"in t&&(\"boolean\"==typeof t.stencil?u=t.stencil:(w=t.stencil,s=!1)),\"depthStencil\"in t&&(\"boolean\"==typeof t.depthStencil?s=u=t.depthStencil:(k=t.depthStencil,u=s=!1))):a=o=1;var M=null,A=null,S=null,E=null;if(Array.isArray(i))M=i.map(c);else if(i)M=[c(i)];else for(M=Array(y),i=0;i<y;++i)M[i]=f(a,o,p,d,v);for(a=a||M[0].width,o=o||M[0].height,x?A=c(x):s&&!u&&(A=f(a,o,T,\"depth\",\"uint32\")),w?S=c(w):u&&!s&&(S=f(a,o,!1,\"stencil\",\"uint8\")),k?E=c(k):!x&&!w&&u&&s&&(E=f(a,o,T,\"depth stencil\",\"depth stencil\")),s=null,i=0;i<M.length;++i)l(M[i]),M[i]&&M[i].texture&&(u=Tt[M[i].texture._texture.format]*Mt[M[i].texture._texture.type],null===s&&(s=u));return l(A),l(S),l(E),g(n),n.width=a,n.height=o,n.colorAttachments=M,n.depthAttachment=A,n.stencilAttachment=S,n.depthStencilAttachment=E,r.color=M.map(h),r.depth=h(A),r.stencil=h(S),r.depthStencil=h(E),r.width=n.width,r.height=n.height,m(n),r}var n=new d;return a.framebufferCount++,r(t,e),G(r,{resize:function(t,e){var i=Math.max(0|t,1),a=Math.max(0|e||i,1);if(i===n.width&&a===n.height)return r;for(var o=n.colorAttachments,s=0;s<o.length;++s)p(o[s],i,a);return p(n.depthAttachment,i,a),p(n.stencilAttachment,i,a),p(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,m(n),r},_reglType:\"framebuffer\",_framebuffer:n,destroy:function(){v(n),g(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=[\"rgba\"],_=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];e.ext_srgb&&_.push(\"srgba\"),e.ext_color_buffer_half_float&&_.push(\"rgba16f\",\"rgb16f\"),e.webgl_color_buffer_float&&_.push(\"rgba32f\");var w=[\"uint8\"];e.oes_texture_half_float&&w.push(\"half float\",\"float16\"),e.oes_texture_float&&w.push(\"float\",\"float32\");var k=0,T={};return G(x,{getFramebuffer:function(t){return\"function\"==typeof t&&\"framebuffer\"===t._reglType&&(t=t._framebuffer)instanceof d?t:null},create:y,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i=\"rgba\";var l=\"uint8\",u=1;if(\"number\"==typeof t?o=0|t:t?(\"shape\"in t?o=t.shape[0]:(\"radius\"in t&&(o=0|t.radius),\"width\"in t?o=0|t.width:\"height\"in t&&(o=0|t.height)),(\"color\"in t||\"colors\"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||(\"colorCount\"in t&&(u=0|t.colorCount),\"colorType\"in t&&(l=t.colorType),\"colorFormat\"in t&&(i=t.colorFormat)),\"depth\"in t&&(a.depth=t.depth),\"stencil\"in t&&(a.stencil=t.stencil),\"depthStencil\"in t&&(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(u),s={radius:o,format:i,type:l},i=0;i<u;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i<t.length;++i)u=t[i],o=o||u.width,a.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(u=0;u<t.length;++u)a.color[u].target=34069+i;0<i&&(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=y(a)}return G(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),G(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(n);for(t=0;6>t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:\"framebufferCube\",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){Q(T).forEach(v)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,Q(T).forEach((function(e){e.framebuffer=t.createFramebuffer(),m(e)}))}})}function E(){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 C(t,e,r,n,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var l=r.maxAttributes,c=Array(l);for(r=0;r<l;++r)c[r]=new E;var f=0,h={},p={Record:E,scope:{},state:c,currentVAO:null,targetVAO:null,restore:e.oes_vertex_array_object?function(){e.oes_vertex_array_object&&Q(h).forEach((function(t){t.refresh()}))}:function(){},createVAO:function(t){function e(t){var n;Array.isArray(t)?(n=t,r.elements&&r.ownsElements&&r.elements.destroy(),r.elements=null,r.ownsElements=!1,r.offset=0,r.count=0,r.instances=-1,r.primitive=4):(t.elements?(n=t.elements,r.ownsElements?(\"function\"==typeof n&&\"elements\"===n._reglType?r.elements.destroy():r.elements(n),r.ownsElements=!1):a.getElements(t.elements)?(r.elements=t.elements,r.ownsElements=!1):(r.elements=a.create(t.elements),r.ownsElements=!0)):(r.elements=null,r.ownsElements=!1),n=t.attributes,r.offset=0,r.count=-1,r.instances=-1,r.primitive=4,r.elements&&(r.count=r.elements._elements.vertCount,r.primitive=r.elements._elements.primType),\"offset\"in t&&(r.offset=0|t.offset),\"count\"in t&&(r.count=0|t.count),\"instances\"in t&&(r.instances=0|t.instances),\"primitive\"in t&&(r.primitive=st[t.primitive])),t={};var o=r.attributes;o.length=n.length;for(var s=0;s<n.length;++s){var l,c=n[s],f=o[s]=new E,h=c.data||c;Array.isArray(h)||$(h)||u(h)?(r.buffers[s]&&(l=r.buffers[s],$(h)&&l._buffer.byteLength>=h.byteLength?l.subdata(h):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(c,34962,!1,!0)),f.buffer=i.getBuffer(l),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1):i.getBuffer(c)?(f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(c.buffer)?(f.buffer=i.getBuffer(c.buffer),f.size=0|(+c.size||f.buffer.dimension),f.normalized=!!c.normalized||!1,f.type=\"type\"in c?rt[c.type]:f.buffer.dtype,f.offset=0|(c.offset||0),f.stride=0|(c.stride||0),f.divisor=0|(c.divisor||0),f.state=1):\"x\"in c&&(f.x=+c.x||0,f.y=+c.y||0,f.z=+c.z||0,f.w=+c.w||0,f.state=2)}for(l=0;l<r.buffers.length;++l)!t[l]&&r.buffers[l]&&(r.buffers[l].destroy(),r.buffers[l]=null);return r.refresh(),e}var r=new s;return n.vaoCount+=1,e.destroy=function(){for(var t=0;t<r.buffers.length;++t)r.buffers[t]&&r.buffers[t].destroy();r.buffers.length=0,r.ownsElements&&(r.elements.destroy(),r.elements=null,r.ownsElements=!1),r.destroy()},e._vao=r,e._reglType=\"vao\",e(t)},getVAO:function(t){return\"function\"==typeof t&&t._vao?t._vao:null},destroyBuffer:function(e){for(var r=0;r<c.length;++r){var n=c[r];n.buffer===e&&(t.disableVertexAttribArray(r),n.buffer=null)}},setVAO:e.oes_vertex_array_object?function(t){if(t!==p.currentVAO){var r=e.oes_vertex_array_object;t?r.bindVertexArrayOES(t.vao):r.bindVertexArrayOES(null),p.currentVAO=t}}:function(r){if(r!==p.currentVAO){if(r)r.bindAttrs();else{for(var n=e.angle_instanced_arrays,i=0;i<c.length;++i){var a=c[i];a.buffer?(t.enableVertexAttribArray(i),a.buffer.bind(),t.vertexAttribPointer(i,a.size,a.type,a.normalized,a.stride,a.offfset),n&&a.divisor&&n.vertexAttribDivisorANGLE(i,a.divisor)):(t.disableVertexAttribArray(i),t.vertexAttrib4f(i,a.x,a.y,a.z,a.w))}o.elements?t.bindBuffer(34963,o.elements.buffer.buffer):t.bindBuffer(34963,null)}p.currentVAO=r}},clear:e.oes_vertex_array_object?function(){Q(h).forEach((function(t){t.destroy()}))}:function(){}};return s.prototype.bindAttrs=function(){for(var r=e.angle_instanced_arrays,n=this.attributes,i=0;i<n.length;++i){var o=n[i];o.buffer?(t.enableVertexAttribArray(i),t.bindBuffer(34962,o.buffer.buffer),t.vertexAttribPointer(i,o.size,o.type,o.normalized,o.stride,o.offset),r&&o.divisor&&r.vertexAttribDivisorANGLE(i,o.divisor)):(t.disableVertexAttribArray(i),t.vertexAttrib4f(i,o.x,o.y,o.z,o.w))}for(r=n.length;r<l;++r)t.disableVertexAttribArray(r);(r=a.getElements(this.elements))?t.bindBuffer(34963,r.buffer.buffer):t.bindBuffer(34963,null)},s.prototype.refresh=function(){var t=e.oes_vertex_array_object;t&&(t.bindVertexArrayOES(this.vao),this.bindAttrs(),p.currentVAO=null,t.bindVertexArrayOES(null))},s.prototype.destroy=function(){if(this.vao){var t=e.oes_vertex_array_object;this===p.currentVAO&&(p.currentVAO=null,t.bindVertexArrayOES(null)),t.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),h[this.id]&&(delete h[this.id],--n.vaoCount)},p}function L(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r<t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?u:c)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(t,e){this.id=p++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function l(r,s,l){var u;u=o(35632,r.fragId);var c=o(35633,r.vertId);if(s=r.program=t.createProgram(),t.attachShader(s,u),t.attachShader(s,c),l)for(u=0;u<l.length;++u)c=l[u],t.bindAttribLocation(s,c[0],c[1]);t.linkProgram(s),c=t.getProgramParameter(s,35718),n.profile&&(r.stats.uniformsCount=c);var f=r.uniforms;for(u=0;u<c;++u)if(l=t.getActiveUniform(s,u))if(1<l.size)for(var h=0;h<l.size;++h){var p=l.name.replace(\"[0]\",\"[\"+h+\"]\");a(f,new i(p,e.id(p),t.getUniformLocation(s,p),l))}else a(f,new i(l.name,e.id(l.name),t.getUniformLocation(s,l.name),l));for(c=t.getProgramParameter(s,35721),n.profile&&(r.stats.attributesCount=c),r=r.attributes,u=0;u<c;++u)(l=t.getActiveAttrib(s,u))&&a(r,new i(l.name,e.id(l.name),t.getAttribLocation(s,l.name),l))}var u={},c={},f={},h=[],p=0;return n.profile&&(r.getMaxUniformsCount=function(){var t=0;return h.forEach((function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)})),t},r.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);Q(u).forEach(e),u={},Q(c).forEach(e),c={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,f={},r.shaderCount=0},program:function(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),G(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(c[d.vertId]),delete c[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(u[d.fragId]),delete u[d.fragId],delete f[d.fragId])}})},restore:function(){u={},c={};for(var t=0;t<h.length;++t)l(h[t],null,h[t].attributes.map((function(t){return[t.location,t.name]})))},shader:o,frag:-1,vert:-1}}function P(t,e,r,n,i,a,o){function s(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,u=n.framebufferHeight,c=null;return $(i)?c=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),u=0|(i.height||n.framebufferHeight-s),c=i.data||null),r(),i=l*u*4,c||(5121===a?c=new Uint8Array(i):5126===a&&(c=c||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,u,6408,a,c),c}return function(t){return t&&\"framebuffer\"in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},(function(){r=s(t)})),r}(t):s(t)}}function O(t,e){return t>>>e|t<<32-e}function I(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function D(t){return Array.prototype.slice.call(t)}function z(t){return D(t).join(\"\")}function R(t){function e(){var t=[],e=[];return G((function(){t.push.apply(t,D(arguments))}),{def:function(){var r=\"v\"+i++;return e.push(r),0<arguments.length&&(t.push(r,\"=\"),t.push.apply(t,D(arguments)),t.push(\";\")),r},toString:function(){return z([0<e.length?\"var \"+e.join(\",\")+\";\":\"\",z(t)])}})}function r(){function t(t,e){n(t,e,\"=\",r.def(t,e),\";\")}var r=e(),n=e(),i=r.toString,a=n.toString;return G((function(){r.apply(r,D(arguments))}),{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,\"=\",i,\";\")},toString:function(){return i()+a()}})}var n=t&&t.cache,i=0,a=[],o=[],s=[],l=e(),u={};return{global:l,link:function(t,e){var r=e&&e.stable;if(!r)for(var n=0;n<o.length;++n)if(o[n]===t&&!s[n])return a[n];return n=\"g\"+i++,a.push(n),o.push(t),s.push(r),n},block:e,proc:function(t,e){function n(){var t=\"a\"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a<e;++a)n();var o=(a=r()).toString;return u[t]=G(a,{arg:n,toString:function(){return z([\"function(\",i.join(),\"){\",o(),\"}\"])}})},scope:r,cond:function(){var t=z(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return G(e,{then:function(){return e.apply(e,D(arguments)),this},else:function(){return n.apply(n,D(arguments)),this},toString:function(){var e=a();return e&&(e=\"else{\"+e+\"}\"),z([\"if(\",t,\"){\",i(),\"}\",e])}})},compile:function(){var t=['\"use strict\";',l,\"return {\"];Object.keys(u).forEach((function(e){t.push('\"',e,'\":',u[e].toString(),\",\")})),t.push(\"}\");var e,r=z(t).replace(/;/g,\";\\n\").replace(/}/g,\"}\\n\").replace(/{/g,\"{\\n\");return n&&(e=function(t){for(var e,r=\"\",n=0;n<t.length;n++)e=t.charCodeAt(n),r+=\"0123456789abcdef\".charAt(e>>>4&15)+\"0123456789abcdef\".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r<e.length;r++)e[r]=0;for(r=0;r<8*t.length;r+=8)e[r>>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,a,o,s,l,u,c,f,h,p,d=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[d>>5]|=128<<24-d%32,e[15+(d+64>>9<<4)]=d,c=0;c<e.length;c+=16){for(d=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],f=0;64>f;f++){var g;16>f?r[f]=e[f+c]:(h=f,p=I(p=O(p=r[f-2],17)^O(p,19)^p>>>10,r[f-7]),g=O(g=r[f-15],7)^O(g,18)^g>>>3,r[h]=I(I(p,g),r[f-16])),h=I(I(I(I(u,h=O(h=o,6)^O(h,11)^O(h,25)),o&s^~o&l),At[f]),r[f]),p=I(u=O(u=d,2)^O(u,13)^O(u,22),d&n^d&i^n&i),u=l,l=s,s=o,o=I(a,h),a=i,i=n,n=d,d=I(h,p)}t[0]=I(d,t[0]),t[1]=I(n,t[1]),t[2]=I(i,t[2]),t[3]=I(a,t[3]),t[4]=I(o,t[4]),t[5]=I(s,t[5]),t[6]=I(l,t[6]),t[7]=I(u,t[7])}for(e=\"\",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n=\"\",i=-1;++i<t.length;)e=t.charCodeAt(i),r=i+1<t.length?t.charCodeAt(i+1):0,55296<=e&&56319>=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,o):(r=Function.apply(null,a.concat(r)),n&&(n[e]=r),r.apply(null,o))}}}function F(t){return Array.isArray(t)||$(t)||u(t)}function N(t){return t.sort((function(t,e){return\"viewport\"===t?-1:\"viewport\"===e?1:t<e?-1:1}))}function B(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function j(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function U(t){return new B(!1,!1,!1,t)}function V(t,e){var r=t.type;if(0===r)return new B(!0,1<=(r=t.data.length),2<=r,e);if(4===r)return new B((r=t.data).thisDep,r.contextDep,r.propDep,e);if(5===r)return new B(!1,!1,!1,e);if(6===r){for(var n=r=!1,i=!1,a=0;a<t.data.length;++a){var o=t.data[a];1===o.type?i=!0:2===o.type?n=!0:3===o.type?r=!0:0===o.type?(r=!0,1<=(o=o.data)&&(n=!0),2<=o&&(i=!0)):4===o.type&&(r=r||o.data.thisDep,n=n||o.data.contextDep,i=i||o.data.propDep)}return new B(r,n,i,e)}return new B(3===r,2===r,1===r,e)}function H(t,e,r,n,i,a,s,l,u,c,f,h,p,d,g,v){function m(t){return t.replace(\".\",\"_\")}function x(t,e,r){var n=m(t);at.push(t),it[n]=nt[n]=!!r,ot[n]=e}function b(t,e,r){var n=m(t);at.push(t),Array.isArray(r)?(nt[n]=r.slice(),it[n]=r.slice()):nt[n]=it[n]=r,lt[n]=e}function _(){var t=R({cache:g}),r=t.link,n=t.global;t.id=ft++,t.batchId=\"0\";var i=r(ut),a=t.shared={props:\"a0\"};Object.keys(ut).forEach((function(t){a[t]=n.def(i,\".\",t)}));var o=t.next={},s=t.current={};Object.keys(lt).forEach((function(t){Array.isArray(nt[t])&&(o[t]=n.def(a.next,\".\",t),s[t]=n.def(a.current,\".\",t))}));var l=t.constants={};Object.keys(ct).forEach((function(t){l[t]=n.def(JSON.stringify(ct[t]))})),t.invoke=function(e,n){switch(n.type){case 0:var i=[\"this\",a.context,a.props,t.batchId];return e.def(r(n.data),\".call(\",i.slice(0,Math.max(n.data.length+1,4)),\")\");case 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def(\"this\",n.data);case 4:return n.data.append(t,e),n.data.ref;case 5:return n.data.toString();case 6:return n.data.map((function(r){return t.invoke(e,r)}))}},t.attribCache={};var u={};return t.scopeAttrib=function(t){if((t=e.id(t))in u)return u[t];var n=c.scope[t];return n||(n=c.scope[t]=new J),u[t]=r(n)},t}function w(t,e){var r=t.static,n=t.dynamic;if(\"framebuffer\"in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),U((function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,\".next\",r),n=n.context,e.set(n,\".framebufferWidth\",r+\".width\"),e.set(n,\".framebufferHeight\",r+\".height\"),r}))):U((function(t,e){var r=t.shared;return e.set(r.framebuffer,\".next\",\"null\"),r=r.context,e.set(r,\".framebufferWidth\",r+\".drawingBufferWidth\"),e.set(r,\".framebufferHeight\",r+\".drawingBufferHeight\"),\"null\"}))}if(\"framebuffer\"in n){var a=n.framebuffer;return V(a,(function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;return r=e.def(i,\".getFramebuffer(\",r,\")\"),e.set(i,\".next\",r),n=n.context,e.set(n,\".framebufferWidth\",r+\"?\"+r+\".width:\"+n+\".drawingBufferWidth\"),e.set(n,\".framebufferHeight\",r+\"?\"+r+\".height:\"+n+\".drawingBufferHeight\"),r}))}return null}function k(t,r,n){function i(t){if(t in a){var r=e.id(a[t]);return(t=U((function(){return r}))).id=r,t}if(t in o){var n=o[t];return V(n,(function(t,e){var r=t.invoke(e,n);return e.def(t.shared.strings,\".id(\",r,\")\")}))}return null}var a=t.static,o=t.dynamic,s=i(\"frag\"),l=i(\"vert\"),u=null;return j(s)&&j(l)?(u=f.program(l.id,s.id,null,n),t=U((function(t,e){return t.link(u)}))):t=new B(s&&s.thisDep||l&&l.thisDep,s&&s.contextDep||l&&l.contextDep,s&&s.propDep||l&&l.propDep,(function(t,e){var r,n,i=t.shared.shader;return r=s?s.append(t,e):e.def(i,\".\",\"frag\"),n=l?l.append(t,e):e.def(i,\".\",\"vert\"),e.def(i+\".program(\"+n+\",\"+r+\")\")})),{frag:s,vert:l,progVar:t,program:u}}function T(t,e){function r(t,e){if(t in n){var r=0|n[t];return e?o.offset=r:o.instances=r,U((function(t,n){return e&&(t.OFFSET=r),r}))}if(t in i){var a=i[t];return V(a,(function(t,r){var n=t.invoke(r,a);return e&&(t.OFFSET=n),n}))}if(e){if(u)return U((function(t,e){return t.OFFSET=0}));if(s)return new B(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+\".currentVAO?\"+t.shared.vao+\".currentVAO.offset:0\")}))}else if(s)return new B(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+\".currentVAO?\"+t.shared.vao+\".currentVAO.instances:-1\")}));return null}var n=t.static,i=t.dynamic,o={},s=!1,l=function(){if(\"vao\"in n){var t=n.vao;return null!==t&&null===c.getVAO(t)&&(t=c.createVAO(t)),s=!0,o.vao=t,U((function(e){var r=c.getVAO(t);return r?e.link(r):\"null\"}))}if(\"vao\"in i){s=!0;var e=i.vao;return V(e,(function(t,r){var n=t.invoke(r,e);return r.def(t.shared.vao+\".getVAO(\"+n+\")\")}))}return null}(),u=!1,f=function(){if(\"elements\"in n){var t=n.elements;if(o.elements=t,F(t)){var e=o.elements=a.create(t,!0);t=a.getElements(e),u=!0}else t&&(t=a.getElements(t),u=!0);return e=U((function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null})),e.value=t,e}if(\"elements\"in i){u=!0;var r=i.elements;return V(r,(function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def(\"null\");return n=e.def(n,\"(\",a,\")\"),a=t.cond(n).then(o,\"=\",i,\".createStream(\",a,\");\").else(o,\"=\",i,\".getElements(\",a,\");\"),e.entry(a),e.exit(t.cond(n).then(i,\".destroyStream(\",o,\");\")),t.ELEMENTS=o}))}return s?new B(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+\".currentVAO?\"+t.shared.elements+\".getElements(\"+t.shared.vao+\".currentVAO.elements):null\")})):null}(),h=r(\"offset\",!0),p=function(){if(\"primitive\"in n){var t=n.primitive;return o.primitive=t,U((function(e,r){return st[t]}))}if(\"primitive\"in i){var e=i.primitive;return V(e,(function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,\"[\",i,\"]\")}))}return u?j(f)?f.value?U((function(t,e){return e.def(t.ELEMENTS,\".primType\")})):U((function(){return 4})):new B(f.thisDep,f.contextDep,f.propDep,(function(t,e){var r=t.ELEMENTS;return e.def(r,\"?\",r,\".primType:\",4)})):s?new B(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+\".currentVAO?\"+t.shared.vao+\".currentVAO.primitive:4\")})):null}(),d=function(){if(\"count\"in n){var t=0|n.count;return o.count=t,U((function(){return t}))}if(\"count\"in i){var e=i.count;return V(e,(function(t,r){return t.invoke(r,e)}))}return u?j(f)?f?h?new B(h.thisDep,h.contextDep,h.propDep,(function(t,e){return e.def(t.ELEMENTS,\".vertCount-\",t.OFFSET)})):U((function(t,e){return e.def(t.ELEMENTS,\".vertCount\")})):U((function(){return-1})):new B(f.thisDep||h.thisDep,f.contextDep||h.contextDep,f.propDep||h.propDep,(function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,\"?\",r,\".vertCount-\",t.OFFSET,\":-1\"):e.def(r,\"?\",r,\".vertCount:-1\")})):s?new B(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao,\".currentVAO?\",t.shared.vao,\".currentVAO.count:-1\")})):null}(),g=r(\"instances\",!1);return{elements:f,primitive:p,count:d,instances:g,offset:h,vao:l,vaoActive:s,elementsActive:u,static:o}}function M(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach((function(t){var r=n[t],a=e.id(t),s=new J;if(F(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(u=i.getBuffer(r))s.state=1,s.buffer=u,s.type=0;else if(\"constant\"in r){var l=r.constant;s.buffer=\"null\",s.state=2,\"number\"==typeof l?s.x=l:St.forEach((function(t,e){e<l.length&&(s[t]=l[e])}))}else{var u=F(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),c=0|r.offset,f=0|r.stride,h=0|r.size,p=!!r.normalized,d=0;\"type\"in r&&(d=rt[r.type]),r=0|r.divisor,s.buffer=u,s.state=1,s.size=h,s.normalized=p,s.type=d||u.dtype,s.offset=c,s.stride=f,s.divisor=r}o[t]=U((function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach((function(t){n[t]=s[t]})),s.buffer&&(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+\".dtype\"),r[a]=n}))})),Object.keys(a).forEach((function(t){var e=a[t];o[t]=V(e,(function(t,r){function n(t){r(l[t],\"=\",i,\".\",t,\"|0;\")}var i=t.invoke(r,e),a=t.shared,o=t.constants,s=a.isBufferArgs,l=(a=a.buffer,{isStream:r.def(!1)}),u=new J;u.state=1,Object.keys(u).forEach((function(t){l[t]=r.def(\"\"+u[t])}));var c=l.buffer,f=l.type;return r(\"if(\",s,\"(\",i,\")){\",l.isStream,\"=true;\",c,\"=\",a,\".createStream(\",34962,\",\",i,\");\",f,\"=\",c,\".dtype;\",\"}else{\",c,\"=\",a,\".getBuffer(\",i,\");\",\"if(\",c,\"){\",f,\"=\",c,\".dtype;\",'}else if(\"constant\" in ',i,\"){\",l.state,\"=\",2,\";\",\"if(typeof \"+i+'.constant === \"number\"){',l[St[0]],\"=\",i,\".constant;\",St.slice(1).map((function(t){return l[t]})).join(\"=\"),\"=0;\",\"}else{\",St.map((function(t,e){return l[t]+\"=\"+i+\".constant.length>\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"})).join(\"\"),\"}}else{\",\"if(\",s,\"(\",i,\".buffer)){\",c,\"=\",a,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",c,\"=\",a,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",o.glTypes,\"[\",i,\".type]:\",c,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",a,\".destroyStream(\",c,\");\",\"}\"),l}))})),o}function A(t,e,n,i,a){function s(t){var e=u[t];e&&(h[t]=e)}var l=function(t,e){if(\"string\"==typeof(r=t.static).frag&&\"string\"==typeof r.vert){if(0<Object.keys(e.dynamic).length)return null;var r=e.static,n=Object.keys(r);if(0<n.length&&\"number\"==typeof r[n[0]]){for(var i=[],a=0;a<n.length;++a)i.push([0|r[n[a]],n[a]]);return i}}return null}(t,e),u=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return\"width\"in r?n=0|r.width:t=!1,\"height\"in r?o=0|r.height:t=!1,new B(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,(function(t,e){var i=t.shared.context,a=n;\"width\"in r||(a=e.def(i,\".\",\"framebufferWidth\",\"-\",s));var u=o;return\"height\"in r||(u=e.def(i,\".\",\"framebufferHeight\",\"-\",l)),[s,l,a,u]}))}if(t in a){var u=a[t];return t=V(u,(function(t,e){var r=t.invoke(e,u),n=t.shared.context,i=e.def(r,\".x|0\"),a=e.def(r,\".y|0\");return[i,a,e.def('\"width\" in ',r,\"?\",r,\".width|0:\",\"(\",n,\".\",\"framebufferWidth\",\"-\",i,\")\"),r=e.def('\"height\" in ',r,\"?\",r,\".height|0:\",\"(\",n,\".\",\"framebufferHeight\",\"-\",a,\")\")]})),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new B(e.thisDep,e.contextDep,e.propDep,(function(t,e){var r=t.shared.context;return[0,0,e.def(r,\".\",\"framebufferWidth\"),e.def(r,\".\",\"framebufferHeight\")]})):null}var i=t.static,a=t.dynamic;if(t=n(\"viewport\")){var o=t;t=new B(t.thisDep,t.contextDep,t.propDep,(function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,\".viewportWidth\",r[2]),e.set(n,\".viewportHeight\",r[3]),r}))}return{viewport:t,scissor_box:n(\"scissor.box\")}}(t,d=w(t)),f=T(t),h=function(t,e){var r=t.static,n=t.dynamic,i={};return at.forEach((function(t){function e(e,o){if(t in r){var s=e(r[t]);i[a]=U((function(){return s}))}else if(t in n){var l=n[t];i[a]=V(l,(function(t,e){return o(t,e,t.invoke(e,l))}))}}var a=m(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\":case\"lineWidth\":return e((function(t){return t}),(function(t,e,r){return r}));case\"depth.func\":return e((function(t){return Lt[t]}),(function(t,e,r){return e.def(t.constants.compareFuncs,\"[\",r,\"]\")}));case\"depth.range\":return e((function(t){return t}),(function(t,e,r){return[e.def(\"+\",r,\"[0]\"),e=e.def(\"+\",r,\"[1]\")]}));case\"blend.func\":return e((function(t){return[Ct[\"srcRGB\"in t?t.srcRGB:t.src],Ct[\"dstRGB\"in t?t.dstRGB:t.dst],Ct[\"srcAlpha\"in t?t.srcAlpha:t.src],Ct[\"dstAlpha\"in t?t.dstAlpha:t.dst]]}),(function(t,e,r){function n(t,n){return e.def('\"',t,n,'\" in ',r,\"?\",r,\".\",t,n,\":\",r,\".\",t)}t=t.constants.blendFuncs;var i=n(\"src\",\"RGB\"),a=n(\"dst\",\"RGB\"),o=(i=e.def(t,\"[\",i,\"]\"),e.def(t,\"[\",n(\"src\",\"Alpha\"),\"]\"));return[i,a=e.def(t,\"[\",a,\"]\"),o,t=e.def(t,\"[\",n(\"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,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond(\"typeof \",r,'===\"string\"')).then(i,\"=\",a,\"=\",n,\"[\",r,\"];\"),t.else(i,\"=\",n,\"[\",r,\".rgb];\",a,\"=\",n,\"[\",r,\".alpha];\"),e(t),[i,a]}));case\"blend.color\":return e((function(t){return o(4,(function(e){return+t[e]}))}),(function(t,e,r){return o(4,(function(t){return e.def(\"+\",r,\"[\",t,\"]\")}))}));case\"stencil.mask\":return e((function(t){return 0|t}),(function(t,e,r){return e.def(r,\"|0\")}));case\"stencil.func\":return e((function(t){return[Lt[t.cmp||\"keep\"],t.ref||0,\"mask\"in t?t.mask:-1]}),(function(t,e,r){return[t=e.def('\"cmp\" in ',r,\"?\",t.constants.compareFuncs,\"[\",r,\".cmp]\",\":\",7680),e.def(r,\".ref|0\"),e=e.def('\"mask\" in ',r,\"?\",r,\".mask|0:-1\")]}));case\"stencil.opFront\":case\"stencil.opBack\":return e((function(e){return[\"stencil.opBack\"===t?1029:1028,Pt[e.fail||\"keep\"],Pt[e.zfail||\"keep\"],Pt[e.zpass||\"keep\"]]}),(function(e,r,n){function i(t){return r.def('\"',t,'\" in ',n,\"?\",a,\"[\",n,\".\",t,\"]:\",7680)}var a=e.constants.stencilOps;return[\"stencil.opBack\"===t?1029:1028,i(\"fail\"),i(\"zfail\"),i(\"zpass\")]}));case\"polygonOffset.offset\":return e((function(t){return[0|t.factor,0|t.units]}),(function(t,e,r){return[e.def(r,\".factor|0\"),e=e.def(r,\".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,r){return e.def(r,'===\"front\"?',1028,\":\",1029)}));case\"frontFace\":return e((function(t){return Ot[t]}),(function(t,e,r){return e.def(r+'===\"cw\"?2304:2305')}));case\"colorMask\":return e((function(t){return t.map((function(t){return!!t}))}),(function(t,e,r){return o(4,(function(t){return\"!!\"+r+\"[\"+t+\"]\"}))}));case\"sample.coverage\":return e((function(t){return[\"value\"in t?t.value:1,!!t.invert]}),(function(t,e,r){return[e.def('\"value\" in ',r,\"?+\",r,\".value:1\"),e=e.def(\"!!\",r,\".invert\")]}))}})),i}(t),p=k(t,0,l);s(\"viewport\"),s(m(\"scissor.box\"));var d,g=0<Object.keys(h).length;if((d={framebuffer:d,draw:f,shader:p,state:h,dirty:g,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}}).profile=function(t){var e,r=t.static;if(t=t.dynamic,\"profile\"in r){var n=!!r.profile;(e=U((function(t,e){return n}))).enable=n}else if(\"profile\"in t){var i=t.profile;e=V(i,(function(t,e){return t.invoke(e,i)}))}return e}(t),d.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach((function(t){var e,n=r[t];if(\"number\"==typeof n||\"boolean\"==typeof n)e=U((function(){return n}));else if(\"function\"==typeof n){var a=n._reglType;\"texture2d\"===a||\"textureCube\"===a?e=U((function(t){return t.link(n)})):\"framebuffer\"!==a&&\"framebufferCube\"!==a||(e=U((function(t){return t.link(n.color[0])})))}else y(n)&&(e=U((function(t){return t.global.def(\"[\",o(n.length,(function(t){return n[t]})),\"]\")})));e.value=n,i[t]=e})),Object.keys(n).forEach((function(t){var e=n[t];i[t]=V(e,(function(t,r){return t.invoke(r,e)}))})),i}(n),d.drawVAO=d.scopeVAO=f.vao,!d.drawVAO&&p.program&&!l&&r.angle_instanced_arrays&&f.static.elements){var v=!0;if(t=p.program.attributes.map((function(t){return t=e.static[t],v=v&&!!t,t})),v&&0<t.length){var x=c.getVAO(c.createVAO({attributes:t,elements:f.static.elements}));d.drawVAO=new B(null,null,null,(function(t,e){return t.link(x)})),d.useVAO=!0}}return l?d.useVAO=!0:d.attributes=M(e),d.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach((function(t){var r=e[t];n[t]=U((function(t,e){return\"number\"==typeof r||\"boolean\"==typeof r?\"\"+r:t.link(r)}))})),Object.keys(r).forEach((function(t){var e=r[t];n[t]=V(e,(function(t,r){return t.invoke(r,e)}))})),n}(i),d}function S(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach((function(a){e.save(n,\".\"+a);var o=r[a].append(t,e);Array.isArray(o)?i(n,\".\",a,\"=[\",o.join(),\"];\"):i(n,\".\",a,\"=\",o,\";\")})),e(i)}function E(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;tt&&(i=e.def(s.extensions,\".webgl_draw_buffers\"));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,\".next\"),n||e(\"if(\",t,\"!==\",o,\".cur){\"),e(\"if(\",t,\"){\",a,\".bindFramebuffer(\",36160,\",\",t,\".framebuffer);\"),tt&&e(i,\".drawBuffersWEBGL(\",s,\"[\",t,\".colorAttachments.length]);\"),e(\"}else{\",a,\".bindFramebuffer(\",36160,\",null);\"),tt&&e(i,\".drawBuffersWEBGL(\",l,\");\"),e(\"}\",o,\".cur=\",t,\";\"),n||e(\"}\")}function C(t,e,r){var n=t.shared,i=n.gl,a=t.current,s=t.next,l=n.current,u=n.next,c=t.cond(l,\".dirty\");at.forEach((function(e){var n,f;if(!((e=m(e))in r.state))if(e in s){n=s[e],f=a[e];var h=o(nt[e].length,(function(t){return c.def(n,\"[\",t,\"]\")}));c(t.cond(h.map((function(t,e){return t+\"!==\"+f+\"[\"+e+\"]\"})).join(\"||\")).then(i,\".\",lt[e],\"(\",h,\");\",h.map((function(t,e){return f+\"[\"+e+\"]=\"+t})).join(\";\"),\";\"))}else n=c.def(u,\".\",e),h=t.cond(n,\"!==\",l,\".\",e),c(h),e in ot?h(t.cond(n).then(i,\".enable(\",ot[e],\");\").else(i,\".disable(\",ot[e],\");\"),l,\".\",e,\"=\",n,\";\"):h(i,\".\",lt[e],\"(\",n,\");\",l,\".\",e,\"=\",n,\";\")})),0===Object.keys(r.state).length&&c(l,\".dirty=false;\"),e(c)}function L(t,e,r,n){var i,a=t.shared,o=t.current,s=a.current,l=a.gl;N(Object.keys(r)).forEach((function(a){var u=r[a];if(!n||n(u)){var c=u.append(t,e);if(ot[a]){var f=ot[a];j(u)?(i=t.link(c,{stable:!0}),e(t.cond(i).then(l,\".enable(\",f,\");\").else(l,\".disable(\",f,\");\")),e(s,\".\",a,\"=\",i,\";\")):(e(t.cond(c).then(l,\".enable(\",f,\");\").else(l,\".disable(\",f,\");\")),e(s,\".\",a,\"=\",c,\";\"))}else if(y(c)){var h=o[a];e(l,\".\",lt[a],\"(\",c,\");\",c.map((function(t,e){return h+\"[\"+e+\"]=\"+t})).join(\";\"),\";\")}else j(u)?(i=t.link(c,{stable:!0}),e(l,\".\",lt[a],\"(\",i,\");\",s,\".\",a,\"=\",i,\";\")):e(l,\".\",lt[a],\"(\",c,\");\",s,\".\",a,\"=\",c,\";\")}}))}function P(t,e){Q&&(t.instancing=e.def(t.shared.extensions,\".angle_instanced_arrays\"))}function O(t,e,r,n,i){function a(){return\"undefined\"==typeof performance?\"Date.now()\":\"performance.now()\"}function o(t){t(u=e.def(),\"=\",a(),\";\"),\"string\"==typeof i?t(h,\".count+=\",i,\";\"):t(h,\".count++;\"),d&&(n?t(c=e.def(),\"=\",g,\".getNumPendingQueries();\"):t(g,\".beginQuery(\",h,\");\"))}function s(t){t(h,\".cpuTime+=\",a(),\"-\",u,\";\"),d&&(n?t(g,\".pushScopeStats(\",c,\",\",g,\".getNumPendingQueries(),\",h,\");\"):t(g,\".endQuery();\"))}function l(t){var r=e.def(p,\".profile\");e(p,\".profile=\",t,\";\"),e.exit(p,\".profile=\",r,\";\")}var u,c,f=t.shared,h=t.stats,p=f.current,g=f.timer;if(r=r.profile){if(j(r))return void(r.enable?(o(e),s(e.exit),l(\"true\")):l(\"false\"));l(r=r.append(t,e))}else r=e.def(p,\".profile\");o(f=t.block()),e(\"if(\",r,\"){\",f,\"}\"),s(t=t.block()),e.exit(\"if(\",r,\"){\",t,\"}\")}function I(t,e,r,n,i){function a(r,n,i){function a(){e(\"if(!\",c,\".buffer){\",l,\".enableVertexAttribArray(\",u,\");}\");var r,a=i.type;r=i.size?e.def(i.size,\"||\",n):n,e(\"if(\",c,\".type!==\",a,\"||\",c,\".size!==\",r,\"||\",p.map((function(t){return c+\".\"+t+\"!==\"+i[t]})).join(\"||\"),\"){\",l,\".bindBuffer(\",34962,\",\",f,\".buffer);\",l,\".vertexAttribPointer(\",[u,r,a,i.normalized,i.stride,i.offset],\");\",c,\".type=\",a,\";\",c,\".size=\",r,\";\",p.map((function(t){return c+\".\"+t+\"=\"+i[t]+\";\"})).join(\"\"),\"}\"),Q&&(a=i.divisor,e(\"if(\",c,\".divisor!==\",a,\"){\",t.instancing,\".vertexAttribDivisorANGLE(\",[u,a],\");\",c,\".divisor=\",a,\";}\"))}function s(){e(\"if(\",c,\".buffer){\",l,\".disableVertexAttribArray(\",u,\");\",c,\".buffer=null;\",\"}if(\",St.map((function(t,e){return c+\".\"+t+\"!==\"+h[e]})).join(\"||\"),\"){\",l,\".vertexAttrib4f(\",u,\",\",h,\");\",St.map((function(t,e){return c+\".\"+t+\"=\"+h[e]+\";\"})).join(\"\"),\"}\")}var l=o.gl,u=e.def(r,\".location\"),c=e.def(o.attributes,\"[\",u,\"]\");r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],p=[\"buffer\",\"normalized\",\"offset\",\"stride\"];1===r?a():2===r?s():(e(\"if(\",r,\"===\",1,\"){\"),a(),e(\"}else{\"),s(),e(\"}\"))}var o=t.shared;n.forEach((function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(It))return;var u=t.scopeAttrib(s);o={},Object.keys(new J).forEach((function(t){o[t]=e.def(u,\".\",t)}))}a(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)}))}function D(t,r,n,i,a,s){for(var l,u=t.shared,c=u.gl,f=0;f<i.length;++f){var h,p=(v=i[f]).name,d=v.info.type,g=n.uniforms[p],v=t.link(v)+\".location\";if(g){if(!a(g))continue;if(j(g)){if(p=g.value,35678===d||35680===d)r(c,\".uniform1i(\",v,\",\",(d=t.link(p._texture||p.color[0]._texture))+\".bind());\"),r.exit(d,\".unbind();\");else if(35674===d||35675===d||35676===d)g=2,35675===d?g=3:35676===d&&(g=4),r(c,\".uniformMatrix\",g,\"fv(\",v,\",false,\",p=t.global.def(\"new Float32Array([\"+Array.prototype.slice.call(p)+\"])\"),\");\");else{switch(d){case 5126:l=\"1f\";break;case 35664:l=\"2f\";break;case 35665:l=\"3f\";break;case 35666:l=\"4f\";break;case 35670:case 5124:l=\"1i\";break;case 35671:case 35667:l=\"2i\";break;case 35672:case 35668:l=\"3i\";break;case 35673:case 35669:l=\"4i\"}r(c,\".uniform\",l,\"(\",v,\",\",y(p)?Array.prototype.slice.call(p):p,\");\")}continue}h=g.append(t,r)}else{if(!a(It))continue;h=r.def(u.uniforms,\"[\",e.id(p),\"]\")}switch(35678===d?r(\"if(\",h,\"&&\",h,'._reglType===\"framebuffer\"){',h,\"=\",h,\".color[0];\",\"}\"):35680===d&&r(\"if(\",h,\"&&\",h,'._reglType===\"framebufferCube\"){',h,\"=\",h,\".color[0];\",\"}\"),p=1,d){case 35678:case 35680:d=r.def(h,\"._texture\"),r(c,\".uniform1i(\",v,\",\",d,\".bind());\"),r.exit(d,\".unbind();\");continue;case 5124:case 35670:l=\"1i\";break;case 35667:case 35671:l=\"2i\",p=2;break;case 35668:case 35672:l=\"3i\",p=3;break;case 35669:case 35673:l=\"4i\",p=4;break;case 5126:l=\"1f\";break;case 35664:l=\"2f\",p=2;break;case 35665:l=\"3f\",p=3;break;case 35666:l=\"4f\",p=4;break;case 35674:l=\"Matrix2fv\";break;case 35675:l=\"Matrix3fv\";break;case 35676:l=\"Matrix4fv\"}if(\"M\"===l.charAt(0)){r(c,\".uniform\",l,\"(\",v,\",\"),v=Math.pow(d-35674+2,2);var m=t.global.def(\"new Float32Array(\",v,\")\");Array.isArray(h)?r(\"false,(\",o(v,(function(t){return m+\"[\"+t+\"]=\"+h[t]})),\",\",m,\")\"):r(\"false,(Array.isArray(\",h,\")||\",h,\" instanceof Float32Array)?\",h,\":(\",o(v,(function(t){return m+\"[\"+t+\"]=\"+h+\"[\"+t+\"]\"})),\",\",m,\")\"),r(\");\")}else{if(1<p){d=[];var x=[];for(g=0;g<p;++g)Array.isArray(h)?x.push(h[g]):x.push(r.def(h+\"[\"+g+\"]\")),s&&d.push(r.def());s&&r(\"if(!\",t.batchId,\"||\",d.map((function(t,e){return t+\"!==\"+x[e]})).join(\"||\"),\"){\",d.map((function(t,e){return t+\"=\"+x[e]+\";\"})).join(\"\")),r(c,\".uniform\",l,\"(\",v,\",\",x.join(\",\"),\");\")}else s&&(d=r.def(),r(\"if(!\",t.batchId,\"||\",d,\"!==\",h,\"){\",d,\"=\",h,\";\")),r(c,\".uniform\",l,\"(\",v,\",\",h,\");\");s&&r(\"}\")}}}function z(t,e,r,n){function i(i){var a=h[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(f,\".\",i)}function a(){function t(){r(l,\".drawElementsInstancedANGLE(\",[d,v,m,g+\"<<((\"+m+\"-5121)>>1)\",s],\");\")}function e(){r(l,\".drawArraysInstancedANGLE(\",[d,g,v,s],\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(c+\".drawElements(\"+[d,v,m,g+\"<<((\"+m+\"-5121)>>1)\"]+\");\")}function e(){r(c+\".drawArrays(\"+[d,g,v]+\");\")}p&&\"null\"!==p?y?t():(r(\"if(\",p,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}var s,l,u=t.shared,c=u.gl,f=u.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a),h.elementsActive&&a(\"if(\"+i+\")\"+c+\".bindBuffer(34963,\"+i+\".buffer.buffer);\")):(i=a.def(),a(i,\"=\",f,\".\",\"elements\",\";\",\"if(\",i,\"){\",c,\".bindBuffer(\",34963,\",\",i,\".buffer.buffer);}\",\"else if(\",u.vao,\".currentVAO){\",i,\"=\",t.shared.elements+\".getElements(\"+u.vao,\".currentVAO.elements);\",et?\"\":\"if(\"+i+\")\"+c+\".bindBuffer(34963,\"+i+\".buffer.buffer);\",\"}\")),i}(),d=i(\"primitive\"),g=i(\"offset\"),v=function(){var i=h.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,\".\",\"count\"),i}();if(\"number\"==typeof v){if(0===v)return}else r(\"if(\",v,\"){\"),r.exit(\"}\");Q&&(s=i(\"instances\"),l=t.instancing);var m=p+\".type\",y=h.elements&&j(h.elements)&&!h.vaoActive;Q&&(\"number\"!=typeof s||0<=s)?\"string\"==typeof s?(r(\"if(\",s,\">0){\"),a(),r(\"}else if(\",s,\"<0){\"),o(),r(\"}\")):a():o()}function H(t,e,r,n,i){return i=(e=_()).proc(\"body\",i),Q&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function q(t,e,r,n){P(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,e),\");\"):e(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(e(t.shared.vao,\".setVAO(null);\"),I(t,e,r,n.attributes,(function(){return!0}))),D(t,e,r,n.uniforms,(function(){return!0}),!1),z(t,e,e,r)}function Y(t,e,r,n){function i(){return!0}t.batchId=\"a1\",P(t,e),I(t,e,r,n.attributes,i),D(t,e,r,n.uniforms,i,!1),z(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}P(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();e(u.entry,\"for(\",s,\"=0;\",s,\"<\",\"a1\",\";++\",s,\"){\",l,\"=\",\"a0\",\"[\",s,\"];\",c,\"}\",u.exit),r.needsContext&&S(t,c,r.context),r.needsFramebuffer&&E(t,c,r.framebuffer),L(t,c,r.state,i),r.profile&&i(r.profile)&&O(t,c,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?c(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,c),\");\"):u(t.shared.vao,\".setVAO(\",r.drawVAO.append(t,u),\");\"):u(t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"):(u(t.shared.vao,\".setVAO(null);\"),I(t,u,r,n.attributes,a),I(t,c,r,n.attributes,i)),D(t,u,r,n.uniforms,a,!1),D(t,c,r,n.uniforms,i,!0),z(t,u,c,r)):(e=t.global.def(\"{}\"),n=r.shader.progVar.append(t,c),l=c.def(n,\".id\"),u=c.def(e,\"[\",l,\"]\"),c(t.shared.gl,\".useProgram(\",n,\".program);\",\"if(!\",u,\"){\",u,\"=\",e,\"[\",l,\"]=\",t.link((function(e){return H(Y,t,r,e,2)})),\"(\",n,\");}\",u,\".call(this,a0[\",s,\"],\",s,\");\"))}function Z(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.shader,\".\"+e,n):i.set(a.shader,\".\"+e,t.link(n,{stable:!0})))}var i=t.proc(\"scope\",3);t.batchId=\"a2\";var a=t.shared,o=a.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),N(Object.keys(r.state)).forEach((function(e){var n=r.state[e],o=n.append(t,i);y(o)?o.forEach((function(r,n){isNaN(r)?i.set(t.next[e],\"[\"+n+\"]\",r):i.set(t.next[e],\"[\"+n+\"]\",t.link(r,{stable:!0}))})):j(n)?i.set(a.next,\".\"+e,t.link(o,{stable:!0})):i.set(a.next,\".\"+e,o)})),O(t,i,r,!0,!0),[\"elements\",\"offset\",\"count\",\"instances\",\"primitive\"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.draw,\".\"+e,n):i.set(a.draw,\".\"+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o=\"[\"+o.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+\"]\"),i.set(a.uniforms,\"[\"+t.link(e.id(n),{stable:!0})+\"]\",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new J).forEach((function(t){i.set(a,\".\"+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(a.vao,\".targetVAO\",s):i.set(a.vao,\".targetVAO\",t.link(s,{stable:!0}))}n(\"vert\"),n(\"frag\"),0<Object.keys(r.state).length&&(i(o,\".dirty=true;\"),i.exit(o,\".dirty=true;\")),i(\"a1(\",t.shared.context,\",a0,\",t.batchId,\");\")}function K(t,e,r){var n=e.static[r];if(n&&function(t){if(\"object\"==typeof t&&!y(t)){for(var e=Object.keys(t),r=0;r<e.length;++r)if(W.isDynamic(t[e[r]]))return!0;return!1}}(n)){var i=t.global,a=Object.keys(n),o=!1,s=!1,l=!1,u=t.global.def(\"{}\");a.forEach((function(e){var r=n[e];if(W.isDynamic(r))\"function\"==typeof r&&(r=n[e]=W.unbox(r)),e=V(r,null),o=o||e.thisDep,l=l||e.propDep,s=s||e.contextDep;else{switch(i(u,\".\",e,\"=\"),typeof r){case\"number\":i(r);break;case\"string\":i('\"',r,'\"');break;case\"object\":Array.isArray(r)&&i(\"[\",r.join(),\"]\");break;default:i(t.link(r))}i(\";\")}})),e.dynamic[r]=new W.DynamicVariable(4,{thisDep:o,contextDep:s,propDep:l,ref:u,append:function(t,e){a.forEach((function(r){var i=n[r];W.isDynamic(i)&&(i=t.invoke(e,i),e(u,\".\",r,\"=\",i,\";\"))}))}}),delete e.static[r]}}var J=c.Record,$={add:32774,subtract:32778,\"reverse subtract\":32779};r.ext_blend_minmax&&($.min=32775,$.max=32776);var Q=r.angle_instanced_arrays,tt=r.webgl_draw_buffers,et=r.oes_vertex_array_object,nt={dirty:!0,profile:v.profile},it={},at=[],ot={},lt={};x(\"dither\",3024),x(\"blend.enable\",3042),b(\"blend.color\",\"blendColor\",[0,0,0,0]),b(\"blend.equation\",\"blendEquationSeparate\",[32774,32774]),b(\"blend.func\",\"blendFuncSeparate\",[1,0,1,0]),x(\"depth.enable\",2929,!0),b(\"depth.func\",\"depthFunc\",513),b(\"depth.range\",\"depthRange\",[0,1]),b(\"depth.mask\",\"depthMask\",!0),b(\"colorMask\",\"colorMask\",[!0,!0,!0,!0]),x(\"cull.enable\",2884),b(\"cull.face\",\"cullFace\",1029),b(\"frontFace\",\"frontFace\",2305),b(\"lineWidth\",\"lineWidth\",1),x(\"polygonOffset.enable\",32823),b(\"polygonOffset.offset\",\"polygonOffset\",[0,0]),x(\"sample.alpha\",32926),x(\"sample.enable\",32928),b(\"sample.coverage\",\"sampleCoverage\",[1,!1]),x(\"stencil.enable\",2960),b(\"stencil.mask\",\"stencilMask\",-1),b(\"stencil.func\",\"stencilFunc\",[519,0,-1]),b(\"stencil.opFront\",\"stencilOpSeparate\",[1028,7680,7680,7680]),b(\"stencil.opBack\",\"stencilOpSeparate\",[1029,7680,7680,7680]),x(\"scissor.enable\",3089),b(\"scissor.box\",\"scissor\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),b(\"viewport\",\"viewport\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var ut={gl:t,context:p,strings:e,next:it,current:nt,draw:h,elements:a,buffer:i,shader:f,attributes:c.state,vao:c,uniforms:u,framebuffer:l,extensions:r,timer:d,isBufferArgs:F},ct={primTypes:st,compareFuncs:Lt,blendFuncs:Ct,blendEquations:$,stencilOps:Pt,glTypes:rt,orientationType:Ot};tt&&(ct.backBuffer=[1029],ct.drawBuffer=o(n.maxDrawbuffers,(function(t){return 0===t?[0]:o(t,(function(t){return 36064+t}))})));var ft=0;return{next:it,current:nt,procs:function(){var t=_(),e=t.proc(\"poll\"),i=t.proc(\"refresh\"),a=t.block();e(a),i(a);var s,l=(f=t.shared).gl,u=f.next,c=f.current;a(c,\".dirty=false;\"),E(t,e),E(t,i,null,!0),Q&&(s=t.link(Q)),r.oes_vertex_array_object&&i(t.link(r.oes_vertex_array_object),\".bindVertexArrayOES(null);\");var f=i.def(f.attributes),h=i.def(0),p=t.cond(h,\".buffer\");p.then(l,\".enableVertexAttribArray(i);\",l,\".bindBuffer(\",34962,\",\",h,\".buffer.buffer);\",l,\".vertexAttribPointer(i,\",h,\".size,\",h,\".type,\",h,\".normalized,\",h,\".stride,\",h,\".offset);\").else(l,\".disableVertexAttribArray(i);\",l,\".vertexAttrib4f(i,\",h,\".x,\",h,\".y,\",h,\".z,\",h,\".w);\",h,\".buffer=null;\");var d=t.link(n.maxAttributes,{stable:!0});return i(\"for(var i=0;i<\",d,\";++i){\",h,\"=\",f,\"[i];\",p,\"}\"),Q&&i(\"for(var i=0;i<\",d,\";++i){\",s,\".vertexAttribDivisorANGLE(i,\",f,\"[i].divisor);\",\"}\"),i(t.shared.vao,\".currentVAO=null;\",t.shared.vao,\".setVAO(\",t.shared.vao,\".targetVAO);\"),Object.keys(ot).forEach((function(r){var n=ot[r],o=a.def(u,\".\",r),s=t.block();s(\"if(\",o,\"){\",l,\".enable(\",n,\")}else{\",l,\".disable(\",n,\")}\",c,\".\",r,\"=\",o,\";\"),i(s),e(\"if(\",o,\"!==\",c,\".\",r,\"){\",s,\"}\")})),Object.keys(lt).forEach((function(r){var n,s,f=lt[r],h=nt[r],p=t.block();p(l,\".\",f,\"(\"),y(h)?(f=h.length,n=t.global.def(u,\".\",r),s=t.global.def(c,\".\",r),p(o(f,(function(t){return n+\"[\"+t+\"]\"})),\");\",o(f,(function(t){return s+\"[\"+t+\"]=\"+n+\"[\"+t+\"];\"})).join(\"\")),e(\"if(\",o(f,(function(t){return n+\"[\"+t+\"]!==\"+s+\"[\"+t+\"]\"})).join(\"||\"),\"){\",p,\"}\")):(n=a.def(u,\".\",r),s=a.def(c,\".\",r),p(n,\");\",c,\".\",r,\"=\",n,\";\"),e(\"if(\",n,\"!==\",s,\"){\",p,\"}\")),i(p)})),t.compile()}(),compile:function(t,e,r,n,i){var a=_();a.stats=a.link(i),Object.keys(e.static).forEach((function(t){K(a,e,t)})),Et.forEach((function(e){K(a,t,e)}));var o=A(t,e,r,n);return o.shader.program&&(o.shader.program.attributes.sort((function(t,e){return t.name<e.name?-1:1})),o.shader.program.uniforms.sort((function(t,e){return t.name<e.name?-1:1}))),function(t,e){var r=t.proc(\"draw\",1);P(t,r),S(t,r,e.context),E(t,r,e.framebuffer),C(t,r,e),L(t,r,e.state),O(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,\".useProgram(\",n,\".program);\"),e.shader.program)q(t,r,e,e.shader.program);else{r(t.shared.vao,\".setVAO(null);\");var i=t.global.def(\"{}\"),a=r.def(n,\".id\"),o=r.def(i,\"[\",a,\"]\");r(t.cond(o).then(o,\".call(this,a0);\").else(o,\"=\",i,\"[\",a,\"]=\",t.link((function(r){return H(q,t,e,r,1)})),\"(\",n,\");\",o,\".call(this,a0);\"))}0<Object.keys(e.state).length&&r(t.shared.current,\".dirty=true;\"),t.shared.vao&&r(t.shared.vao,\".setVAO(null);\")}(a,o),Z(a,o),function(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc(\"batch\",2);t.batchId=\"0\",P(t,n);var i=!1,a=!0;Object.keys(e.context).forEach((function(t){i=i||e.context[t].propDep})),i||(S(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&&i&&(o=!0),o||E(t,n,s)):E(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),C(t,n,e),L(t,n,e.state,(function(t){return!r(t)})),e.profile&&r(e.profile)||O(t,n,e,!1,\"a1\"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&&i||a.propDep)X(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,\".useProgram(\",a,\".program);\"),e.shader.program)X(t,n,e,e.shader.program);else{n(t.shared.vao,\".setVAO(null);\");var s=t.global.def(\"{}\"),l=(o=n.def(a,\".id\"),n.def(s,\"[\",o,\"]\"));n(t.cond(l).then(l,\".call(this,a0,a1);\").else(l,\"=\",s,\"[\",o,\"]=\",t.link((function(r){return H(X,t,e,r,2)})),\"(\",a,\");\",l,\".call(this,a0,a1);\"))}0<Object.keys(e.state).length&&n(t.shared.current,\".dirty=true;\"),t.shared.vao&&n(t.shared.vao,\".setVAO(null);\")}(a,o),G(a.compile(),{destroy:function(){o.shader.program.destroy()}})}}}function q(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}var G=function(t,e){for(var r=Object.keys(e),n=0;n<r.length;++n)t[r[n]]=e[r[n]];return t},Y=0,W={DynamicVariable:t,define:function(e,n){return new t(e,r(n+\"\"))},isDynamic:function(e){return\"function\"==typeof e&&!e._reglType||e instanceof t},unbox:function e(r,n){return\"function\"==typeof r?new t(0,r):\"number\"==typeof r||\"boolean\"==typeof r?new t(5,r):Array.isArray(r)?new t(6,r.map((function(t,r){return e(t,n+\"[\"+r+\"]\")}))):r instanceof t?r:void 0},accessor:r},X={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},Z=\"undefined\"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},K=l();K.zero=l();var J=function(t,e){var r=1;e.ext_texture_filter_anisotropic&&(r=t.getParameter(34047));var n=1,i=1;e.webgl_draw_buffers&&(n=t.getParameter(34852),i=t.getParameter(36063));var a=!!e.oes_texture_float;if(a){a=t.createTexture(),t.bindTexture(3553,a),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var o=t.createFramebuffer();if(t.bindFramebuffer(36160,o),t.framebufferTexture2D(36160,36064,3553,a,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))a=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=K.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?a=!1:(t.deleteFramebuffer(o),t.deleteTexture(a),a=1===s[0]),K.freeType(s)}}return s=!0,\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(s=t.createTexture(),o=K.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,o),K.freeType(o),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:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:a,npotTextureCube:s}},$=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},Q=function(t){return Object.keys(t).map((function(e){return t[e]}))},tt={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a<e.length;++a)i*=e[a];else i=0;switch(r=n||K.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e<n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a<n;++a)for(var o=t[a],s=0;s<e;++s)r[i++]=o[s];break;case 3:c(t,e[0],e[1],e[2],r,0);break;default:f(t,e,0,r,0)}return r}},et={\"[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},rt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},nt={dynamic:35048,stream:35040,static:35044},it=tt.flatten,at=tt.shape,ot=[];ot[5120]=1,ot[5122]=2,ot[5124]=4,ot[5121]=1,ot[5123]=2,ot[5125]=4,ot[5126]=4;var st={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},lt=new Float32Array(1),ut=new Uint32Array(lt.buffer),ct=[9984,9986,9985,9987],ft=[0,6409,6410,6407,6408],ht={};ht[6409]=ht[6406]=ht[6402]=1,ht[34041]=ht[6410]=2,ht[6407]=ht[35904]=3,ht[6408]=ht[35906]=4;var pt=x(\"HTMLCanvasElement\"),dt=x(\"OffscreenCanvas\"),gt=x(\"CanvasRenderingContext2D\"),vt=x(\"ImageBitmap\"),mt=x(\"HTMLImageElement\"),yt=x(\"HTMLVideoElement\"),xt=Object.keys(et).concat([pt,dt,gt,vt,mt,yt]),bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2,bt[5123]=2,bt[5125]=4;var _t=[];_t[32854]=2,_t[32855]=2,_t[36194]=2,_t[34041]=4,_t[33776]=.5,_t[33777]=.5,_t[33778]=1,_t[33779]=1,_t[35986]=.5,_t[35987]=1,_t[34798]=1,_t[35840]=.5,_t[35841]=.25,_t[35842]=.5,_t[35843]=.25,_t[36196]=.5;var wt=[];wt[32854]=2,wt[32855]=2,wt[36194]=2,wt[33189]=2,wt[36168]=1,wt[34041]=4,wt[35907]=4,wt[34836]=16,wt[34842]=8,wt[34843]=6;var kt=function(t,e,r,n,i){function a(t){this.id=u++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete c[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,\"rgb5 a1\":32855,depth:33189,stencil:36168,\"depth stencil\":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach((function(t){l[s[t]]=t}));var u=0,c={};return a.prototype.decRef=function(){0>=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(c).forEach((function(e){t+=c[e].stats.size})),t}),{create:function(e,r){function o(e,r){var n=0,a=0,c=32854;if(\"object\"==typeof e&&e?(\"shape\"in e?(n=0|(a=e.shape)[0],a=0|a[1]):(\"radius\"in e&&(n=a=0|e.radius),\"width\"in e&&(n=0|e.width),\"height\"in e&&(a=0|e.height)),\"format\"in e&&(c=s[e.format])):\"number\"==typeof e?(n=0|e,a=\"number\"==typeof r?0|r:n):e||(n=a=1),n!==u.width||a!==u.height||c!==u.format)return o.width=u.width=n,o.height=u.height=a,u.format=c,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,c,n,a),i.profile&&(u.stats.size=wt[u.format]*u.width*u.height),o.format=l[u.format],o}var u=new a(t.createRenderbuffer());return c[u.id]=u,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===u.width&&a===u.height||(o.width=u.width=n,o.height=u.height=a,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,u.format,n,a),i.profile&&(u.stats.size=wt[u.format]*u.width*u.height)),o},o._reglType=\"renderbuffer\",o._renderbuffer=u,i.profile&&(o.stats=u.stats),o.destroy=function(){u.decRef()},o},clear:function(){Q(c).forEach(o)},restore:function(){Q(c).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)}}},Tt=[];Tt[6408]=4,Tt[6407]=3;var Mt=[];Mt[5121]=1,Mt[5126]=4,Mt[36193]=2;var At=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],St=[\"x\",\"y\",\"z\",\"w\"],Et=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),Ct={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},Lt={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},Pt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},Ot={cw:2304,ccw:2305},It=new B(!1,!1,!1,(function(){}));return function(t){function e(){if(0===K.length)k&&k.update(),et=null;else{et=X.next(e),f();for(var t=K.length-1;0<=t;--t){var r=K[t];r&&r(O,null,0)}d.flush(),k&&k.update()}}function r(){!et&&0<K.length&&(et=X.next(e))}function n(){et&&(X.cancel(e),et=null)}function i(t){t.preventDefault(),n(),$.forEach((function(t){t()}))}function o(t){d.getError(),y.restore(),F.restore(),D.restore(),N.restore(),B.restore(),j.restore(),R.restore(),k&&k.restore(),U.procs.refresh(),r(),Q.forEach((function(t){t()}))}function s(t){function e(t,e){var r={},n={};return Object.keys(t).forEach((function(i){var a=t[i];if(W.isDynamic(a))n[i]=W.unbox(a,i);else{if(e&&Array.isArray(a))for(var o=0;o<a.length;++o)if(W.isDynamic(a[o]))return void(n[i]=W.unbox(a,i));r[i]=a}})),{dynamic:n,static:r}}var r=e(t.context||{},!0),n=e(t.uniforms||{},!0),i=e(t.attributes||{},!1);t=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach((function(n){r[t+\".\"+n]=e[n]}))}}var r=G({},t);return delete r.uniforms,delete r.attributes,delete r.context,delete r.vao,\"stencil\"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e(\"blend\"),e(\"depth\"),e(\"cull\"),e(\"stencil\"),e(\"polygonOffset\"),e(\"scissor\"),e(\"sample\"),\"vao\"in t&&(r.vao=t.vao),r}(t),!1);var a={gpuTime:0,cpuTime:0,count:0},o=U.compile(t,i,n,r,a),s=o.draw,l=o.batch,u=o.scope,c=[];return G((function(t,e){var r;if(\"function\"==typeof t)return u.call(this,null,t,0);if(\"function\"==typeof e)if(\"number\"==typeof t)for(r=0;r<t;++r)u.call(this,null,e,r);else{if(!Array.isArray(t))return u.call(this,t,e,0);for(r=0;r<t.length;++r)u.call(this,t[r],e,r)}else if(\"number\"==typeof t){if(0<t)return l.call(this,function(t){for(;c.length<t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return s.call(this,t);if(t.length)return l.call(this,t,t.length)}}),{stats:a,destroy:function(){o.destroy()}})}function l(t,e){var r=0;U.procs.poll();var n=e.color;n&&(d.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),\"depth\"in e&&(d.clearDepth(+e.depth),r|=256),\"stencil\"in e&&(d.clearStencil(0|e.stencil),r|=1024),d.clear(r)}function u(t){return K.push(t),r(),{cancel:function(){var e=q(K,t);K[e]=function t(){var e=q(K,t);K[e]=K[K.length-1],--K.length,0>=K.length&&n()}}}}function c(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,O.viewportWidth=O.framebufferWidth=O.drawingBufferWidth=t[2]=e[2]=d.drawingBufferWidth,O.viewportHeight=O.framebufferHeight=O.drawingBufferHeight=t[3]=e[3]=d.drawingBufferHeight}function f(){O.tick+=1,O.time=p(),c(),U.procs.poll()}function h(){N.refresh(),c(),U.procs.refresh(),k&&k.update()}function p(){return(Z()-T)/1e3}if(!(t=a(t)))return null;var d=t.gl,m=d.getContextAttributes();d.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i<e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('\"'+a+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach((function(t){if(n[t]&&!r(t))throw Error(\"(regl): error restoring extension \"+t)}))}}}(d,t);if(!y)return null;var x=function(){var t={\"\":0},e=[\"\"];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),b={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},_=t.cachedCode||{},w=y.extensions,k=function(t,e){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(t,e,n){var i=o.pop()||new r;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=n,s.push(i)}if(!e.ext_disjoint_timer_query)return null;var i=[],a=[],o=[],s=[],l=[],u=[];return{beginQuery:function(t){var r=i.pop()||e.ext_disjoint_timer_query.createQueryEXT();e.ext_disjoint_timer_query.beginQueryEXT(35007,r),a.push(r),n(a.length-1,a.length,t)},endQuery:function(){e.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,r;if(0!==(t=a.length)){u.length=Math.max(u.length,t+1),l.length=Math.max(l.length,t+1),l[0]=0;var n=u[0]=0;for(r=t=0;r<a.length;++r){var c=a[r];e.ext_disjoint_timer_query.getQueryObjectEXT(c,34919)?(n+=e.ext_disjoint_timer_query.getQueryObjectEXT(c,34918),i.push(c)):a[t++]=c,l[r+1]=n,u[r+1]=t}for(a.length=t,r=t=0;r<s.length;++r){var f=(n=s[r]).startQueryIndex;c=n.endQueryIndex,n.sum+=l[c]-l[f],f=u[f],(c=u[c])===f?(n.stats.gpuTime+=n.sum/1e6,o.push(n)):(n.startQueryIndex=f,n.endQueryIndex=c,s[t++]=n)}s.length=t}},getNumPendingQueries:function(){return a.length},clear:function(){i.push.apply(i,a);for(var t=0;t<i.length;t++)e.ext_disjoint_timer_query.deleteQueryEXT(i[t]);a.length=0,i.length=0},restore:function(){a.length=0,i.length=0}}}(0,w),T=Z(),M=d.drawingBufferWidth,E=d.drawingBufferHeight,O={tick:0,time:0,viewportWidth:M,viewportHeight:E,framebufferWidth:M,framebufferHeight:E,drawingBufferWidth:M,drawingBufferHeight:E,pixelRatio:t.pixelRatio},I=(M={elements:null,primitive:4,count:-1,offset:0,instances:-1},J(d,w)),D=g(d,b,t,(function(t){return R.destroyBuffer(t)})),z=v(d,w,D,b),R=C(d,w,I,b,D,z,M),F=L(d,x,b,t),N=A(d,w,I,(function(){U.procs.poll()}),O,b,t),B=kt(d,w,0,b,t),j=S(d,w,I,N,B,b),U=H(d,x,w,I,D,z,0,j,{},R,F,M,O,k,_,t),V=(x=P(d,j,U.procs.poll,O),U.next),Y=d.canvas,K=[],$=[],Q=[],tt=[t.onDestroy],et=null;Y&&(Y.addEventListener(\"webglcontextlost\",i,!1),Y.addEventListener(\"webglcontextrestored\",o,!1));var rt=j.setFBO=s({framebuffer:W.define.call(null,1,\"framebuffer\")});return h(),m=G(s,{clear:function(t){if(\"framebuffer\"in t)if(t.framebuffer&&\"framebufferCube\"===t.framebuffer_reglType)for(var e=0;6>e;++e)rt(G({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:W.define.bind(null,1),context:W.define.bind(null,2),this:W.define.bind(null,3),draw:s({}),buffer:function(t){return D.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:N.create2D,cube:N.createCube,renderbuffer:B.create,framebuffer:j.create,framebufferCube:j.createCube,vao:R.createVAO,attributes:m,frame:u,on:function(t,e){var r;switch(t){case\"frame\":return u(e);case\"lost\":r=$;break;case\"restore\":r=Q;break;case\"destroy\":r=tt}return r.push(e),{cancel:function(){for(var t=0;t<r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:I,hasExtension:function(t){return 0<=I.extensions.indexOf(t.toLowerCase())},read:x,destroy:function(){K.length=0,n(),Y&&(Y.removeEventListener(\"webglcontextlost\",i),Y.removeEventListener(\"webglcontextrestored\",o)),F.clear(),j.clear(),B.clear(),R.clear(),N.clear(),z.clear(),D.clear(),k&&k.clear(),tt.forEach((function(t){t()}))},_gl:d,_refresh:h,poll:function(){f(),k&&k.update()},now:p,stats:b,getCachedCode:function(){return _},preloadCachedCode:function(t){Object.entries(t).forEach((function(t){_[t[0]]=t[1]}))}}),t.onDone(null,m),m}},\"object\"==typeof r&&void 0!==e?e.exports=n():this.createREGL=n()},{}],285:[function(t,e,r){var n=t(\"buffer\"),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return i(t,e,r)},o.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");var n=i(t);return void 0!==e?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i(t)},o.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(t)}},{buffer:85}],286:[function(t,e,r){e.exports=i;var n=t(\"events\").EventEmitter;function i(){n.call(this)}t(\"inherits\")(i,n),i.Readable=t(\"readable-stream/lib/_stream_readable.js\"),i.Writable=t(\"readable-stream/lib/_stream_writable.js\"),i.Duplex=t(\"readable-stream/lib/_stream_duplex.js\"),i.Transform=t(\"readable-stream/lib/_stream_transform.js\"),i.PassThrough=t(\"readable-stream/lib/_stream_passthrough.js\"),i.finished=t(\"readable-stream/lib/internal/streams/end-of-stream.js\"),i.pipeline=t(\"readable-stream/lib/internal/streams/pipeline.js\"),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on(\"data\",i),t.on(\"drain\",a),t._isStdio||e&&!1===e.end||(r.on(\"end\",s),r.on(\"close\",l));var o=!1;function s(){o||(o=!0,t.end())}function l(){o||(o=!0,\"function\"==typeof t.destroy&&t.destroy())}function u(t){if(c(),0===n.listenerCount(this,\"error\"))throw t}function c(){r.removeListener(\"data\",i),t.removeListener(\"drain\",a),r.removeListener(\"end\",s),r.removeListener(\"close\",l),r.removeListener(\"error\",u),t.removeListener(\"error\",u),r.removeListener(\"end\",c),r.removeListener(\"close\",c),t.removeListener(\"close\",c)}return r.on(\"error\",u),t.on(\"error\",u),r.on(\"end\",c),r.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",r),t}},{events:84,inherits:231,\"readable-stream/lib/_stream_duplex.js\":288,\"readable-stream/lib/_stream_passthrough.js\":289,\"readable-stream/lib/_stream_readable.js\":290,\"readable-stream/lib/_stream_transform.js\":291,\"readable-stream/lib/_stream_writable.js\":292,\"readable-stream/lib/internal/streams/end-of-stream.js\":296,\"readable-stream/lib/internal/streams/pipeline.js\":298}],287:[function(t,e,r){\"use strict\";var n={};function i(t,e,r){r||(r=Error);var i=function(t){function r(r,n,i){return t.call(this,function(t,r,n){return\"string\"==typeof e?e:e(t,r,n)}(r,n,i))||this}return i=t,(n=r).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,r;var n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function a(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}i(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var n,i,o,s;if(\"string\"==typeof e&&(o=\"not \",e.substr(!s||s<0?0:+s,o.length)===o)?(n=\"must not be\",e=e.replace(/^not /,\"\")):n=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))i=\"The \".concat(t,\" \").concat(n,\" \").concat(a(e,\"type\"));else{var l=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";i='The \"'.concat(t,'\" ').concat(l,\" \").concat(n,\" \").concat(a(e,\"type\"))}return i+\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.codes=n},{}],288:[function(t,e,r){(function(r){(function(){\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=u;var i=t(\"./_stream_readable\"),a=t(\"./_stream_writable\");t(\"inherits\")(u,i);for(var o=n(a.prototype),s=0;s<o.length;s++){var l=o[s];u.prototype[l]||(u.prototype[l]=a.prototype[l])}function u(t){if(!(this instanceof u))return new u(t);i.call(this,t),a.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",c)))}function c(){this._writableState.ended||r.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(u.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this)}).call(this,t(\"_process\"))},{\"./_stream_readable\":290,\"./_stream_writable\":292,_process:278,inherits:231}],289:[function(t,e,r){\"use strict\";e.exports=i;var n=t(\"./_stream_transform\");function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}t(\"inherits\")(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},{\"./_stream_transform\":291,inherits:231}],290:[function(t,e,n){(function(r,n){(function(){\"use strict\";var i;e.exports=M,M.ReadableState=T,t(\"events\").EventEmitter;var a,o=function(t,e){return t.listeners(e).length},s=t(\"./internal/streams/stream\"),l=t(\"buffer\").Buffer,u=n.Uint8Array||function(){},c=t(\"util\");a=c&&c.debuglog?c.debuglog(\"stream\"):function(){};var f,h,p,d=t(\"./internal/streams/buffer_list\"),g=t(\"./internal/streams/destroy\"),v=t(\"./internal/streams/state\").getHighWaterMark,m=t(\"../errors\").codes,y=m.ERR_INVALID_ARG_TYPE,x=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t(\"inherits\")(M,s);var w=g.errorOrDestroy,k=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function T(e,r,n){i=i||t(\"./_stream_duplex\"),e=e||{},\"boolean\"!=typeof n&&(n=r instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,\"readableHighWaterMark\",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=t(\"string_decoder/\").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function M(e){if(i=i||t(\"./_stream_duplex\"),!(this instanceof M))return new M(e);var r=this instanceof i;this._readableState=new T(e,this,r),this.readable=!0,e&&(\"function\"==typeof e.read&&(this._read=e.read),\"function\"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function A(t,e,r,n,i){a(\"readableAddChunk\",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(a(\"onEofChunk\"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?L(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,P(t)))}}(t,s);else if(i||(o=function(t,e){var r,n;return n=e,l.isBuffer(n)||n instanceof u||\"string\"==typeof e||void 0===e||t.objectMode||(r=new y(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e)),r}(s,e)),o)w(t,o);else if(s.objectMode||e&&e.length>0)if(\"string\"==typeof e||s.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),n)s.endEmitted?w(t,new _):S(t,s,e,!0);else if(s.ended)w(t,new x);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?S(t,s,e,!1):O(t,s)):S(t,s,e,!1)}else n||(s.reading=!1,O(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function S(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&L(t)),O(t,e)}Object.defineProperty(M.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),M.prototype.destroy=g.destroy,M.prototype._undestroy=g.undestroy,M.prototype._destroy=function(t,e){e(t)},M.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:\"string\"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=l.from(t,e),e=\"\"),r=!0),A(this,t,e,!1,r)},M.prototype.unshift=function(t){return A(this,t,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(e){f||(f=t(\"string_decoder/\").StringDecoder);var r=new f(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i=\"\";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),\"\"!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var E=1073741824;function C(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;a(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(a(\"emitReadable\",e.flowing),e.emittedReadable=!0,r.nextTick(P,t))}function P(t){var e=t._readableState;a(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,F(t)}function O(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(a(\"maybeReadMore read 0\"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function z(t){a(\"readable nexttick read 0\"),t.read(0)}function R(t,e){a(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),F(t),e.flowing&&!e.reading&&t.read(0)}function F(t){var e=t._readableState;for(a(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;a(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(j,e,t))}function j(t,e){if(a(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function U(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}M.prototype.read=function(t){a(\"read\",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return a(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return a(\"need readable\",i),(0===e.length||e.length-t<e.highWaterMark)&&a(\"length less than watermark\",i=!0),e.ended||e.reading?a(\"reading or ended\",i=!1):i&&(a(\"do read\"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=C(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit(\"data\",n),n},M.prototype._read=function(t){w(this,new b(\"_read()\"))},M.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,a(\"pipe count=%d opts=%j\",i.pipesCount,e);var s=e&&!1===e.end||t===r.stdout||t===r.stderr?v:u;function l(e,r){a(\"onunpipe\"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,a(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",g),t.removeListener(\"drain\",c),t.removeListener(\"error\",p),t.removeListener(\"unpipe\",l),n.removeListener(\"end\",u),n.removeListener(\"end\",v),n.removeListener(\"data\",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function u(){a(\"onend\"),t.end()}i.endEmitted?r.nextTick(s):n.once(\"end\",s),t.on(\"unpipe\",l);var c=function(t){return function(){var e=t._readableState;a(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,\"data\")&&(e.flowing=!0,F(t))}}(n);t.on(\"drain\",c);var f=!1;function h(e){a(\"ondata\");var r=t.write(e);a(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==U(i.pipes,t))&&!f&&(a(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){a(\"onerror\",e),v(),t.removeListener(\"error\",p),0===o(t,\"error\")&&w(t,e)}function d(){t.removeListener(\"finish\",g),v()}function g(){a(\"onfinish\"),t.removeListener(\"close\",d),v()}function v(){a(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",h),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",p),t.once(\"close\",d),t.once(\"finish\",g),t.emit(\"pipe\",n),i.flowing||(a(\"pipe resume\"),n.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var o=U(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit(\"unpipe\",this,r)),this},M.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return\"data\"===t?(i.readableListening=this.listenerCount(\"readable\")>0,!1!==i.flowing&&this.resume()):\"readable\"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a(\"on readable\",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return\"readable\"===t&&r.nextTick(D,this),n},M.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||r.nextTick(D,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(a(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(R,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return a(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(a(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(a(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){a(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<k.length;o++)t.on(k[o],this.emit.bind(this,k[o]));return this._read=function(e){a(\"wrapped _read\",e),n&&(n=!1,t.resume())},this},\"function\"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=t(\"./internal/streams/async_iterator\")),h(this)}),Object.defineProperty(M.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),M._fromList=N,Object.defineProperty(M.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}}),\"function\"==typeof Symbol&&(M.from=function(e,r){return void 0===p&&(p=t(\"./internal/streams/from\")),p(M,e,r)})}).call(this)}).call(this,t(\"_process\"),void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":287,\"./_stream_duplex\":288,\"./internal/streams/async_iterator\":293,\"./internal/streams/buffer_list\":294,\"./internal/streams/destroy\":295,\"./internal/streams/from\":297,\"./internal/streams/state\":299,\"./internal/streams/stream\":300,_process:278,buffer:85,events:84,inherits:231,\"string_decoder/\":301,util:83}],291:[function(t,e,r){\"use strict\";e.exports=c;var n=t(\"../errors\").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,l=t(\"./_stream_duplex\");function u(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit(\"error\",new a);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);l.call(this,t),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(\"function\"==typeof t.transform&&(this._transform=t.transform),\"function\"==typeof t.flush&&(this._flush=t.flush)),this.on(\"prefinish\",f)}function f(){var t=this;\"function\"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(e,r){h(t,e,r)}))}function h(t,e,r){if(e)return t.emit(\"error\",e);if(null!=r&&t.push(r),t._writableState.length)throw new s;if(t._transformState.transforming)throw new o;return t.push(null)}t(\"inherits\")(c,l),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,l.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,r){r(new i(\"_transform()\"))},c.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){l.prototype._destroy.call(this,t,(function(t){e(t)}))}},{\"../errors\":287,\"./_stream_duplex\":288,inherits:231}],292:[function(t,e,n){(function(r,n){(function(){\"use strict\";function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var a;e.exports=M,M.WritableState=T;var o,s={deprecate:t(\"util-deprecate\")},l=t(\"./internal/streams/stream\"),u=t(\"buffer\").Buffer,c=n.Uint8Array||function(){},f=t(\"./internal/streams/destroy\"),h=t(\"./internal/streams/state\").getHighWaterMark,p=t(\"../errors\").codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,x=p.ERR_STREAM_NULL_VALUES,b=p.ERR_STREAM_WRITE_AFTER_END,_=p.ERR_UNKNOWN_ENCODING,w=f.errorOrDestroy;function k(){}function T(e,n,o){a=a||t(\"./_stream_duplex\"),e=e||{},\"boolean\"!=typeof o&&(o=n instanceof a),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,\"writableHighWaterMark\",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,a=n.writecb;if(\"function\"!=typeof a)throw new v;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,a){--e.pendingcb,n?(r.nextTick(a,i),r.nextTick(O,t,e),t._writableState.errorEmitted=!0,w(t,i)):(a(i),t._writableState.errorEmitted=!0,w(t,i),O(t,e))}(t,n,i,e,a);else{var o=L(n)||t.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||C(t,n),i?r.nextTick(E,t,n,o,a):E(t,n,o,a)}}(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function M(e){var r=this instanceof(a=a||t(\"./_stream_duplex\"));if(!r&&!o.call(M,this))return new M(e);this._writableState=new T(e,this,r),this.writable=!0,e&&(\"function\"==typeof e.write&&(this._write=e.write),\"function\"==typeof e.writev&&(this._writev=e.writev),\"function\"==typeof e.destroy&&(this._destroy=e.destroy),\"function\"==typeof e.final&&(this._final=e.final)),l.call(this)}function A(t,e,r,n,i,a){if(!r){var o=function(t,e,r){return t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=u.from(e,r)),e}(e,n,i);n!==o&&(r=!0,i=\"buffer\",n=o)}var s=e.objectMode?1:n.length;e.length+=s;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else S(t,e,!1,s,n,i,a);return l}function S(t,e,r,n,i,a,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y(\"write\")):r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function E(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}(t,e),e.pendingcb--,n(),O(t,e)}function C(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,a=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,l=!0;r;)a[s]=r,r.isBuf||(l=!1),r=r.next,s+=1;a.allBuffers=l,S(t,e,!0,e.length,a,\"\",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,f=r.callback;if(S(t,e,!1,e.objectMode?1:u.length,u,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function L(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function P(t,e){t._final((function(r){e.pendingcb--,r&&w(t,r),e.prefinished=!0,t.emit(\"prefinish\"),O(t,e)}))}function O(t,e){var n=L(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||(\"function\"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit(\"prefinish\")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(P,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit(\"finish\"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return n}t(\"inherits\")(M,l),T.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(T.prototype,\"buffer\",{get:s.deprecate((function(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(t){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(t){return!!o.call(this,t)||this===M&&t&&t._writableState instanceof T}})):o=function(t){return t instanceof this},M.prototype.pipe=function(){w(this,new m)},M.prototype.write=function(t,e,n){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return s&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),\"function\"==typeof e&&(n=e,e=null),s?e=\"buffer\":e||(e=a.defaultEncoding),\"function\"!=typeof n&&(n=k),a.ending?function(t,e){var n=new b;w(t,n),r.nextTick(e,n)}(this,n):(s||function(t,e,n,i){var a;return null===n?a=new x:\"string\"==typeof n||e.objectMode||(a=new d(\"chunk\",[\"string\",\"Buffer\"],n)),!a||(w(t,a),r.nextTick(i,a),!1)}(this,a,t,n))&&(a.pendingcb++,o=A(this,a,s,t,e,n)),o},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||C(this,t))},M.prototype.setDefaultEncoding=function(t){if(\"string\"==typeof t&&(t=t.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((t+\"\").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,r){r(new g(\"_write()\"))},M.prototype._writev=null,M.prototype.end=function(t,e,n){var i=this._writableState;return\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,O(t,e),n&&(e.finished?r.nextTick(n):t.once(\"finish\",n)),e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(M.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=f.destroy,M.prototype._undestroy=f.undestroy,M.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t(\"_process\"),void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":287,\"./_stream_duplex\":288,\"./internal/streams/destroy\":295,\"./internal/streams/state\":299,\"./internal/streams/stream\":300,_process:278,buffer:85,inherits:231,\"util-deprecate\":331}],293:[function(t,e,r){(function(r){(function(){\"use strict\";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t(\"./end-of-stream\"),o=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),u=Symbol(\"ended\"),c=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[c]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function g(t){r.nextTick(d,t)}var v=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[u])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[c];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[u]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),v);e.exports=function(t){var e,r=Object.create(m,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,u,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[c]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[c]=null,a(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[s];return null!==e&&(r[c]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[c]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[u]=!0})),t.on(\"readable\",g.bind(null,r)),r}}).call(this)}).call(this,t(\"_process\"))},{\"./end-of-stream\":296,_process:278}],294:[function(t,e,r){\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=t(\"buffer\").Buffer,s=t(\"util\").inspect,l=s&&s.custom||\"inspect\";e.exports=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")})(this,t),this.head=null,this.tail=null,this.length=0}return e=t,r=[{key:\"push\",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return o.alloc(0);for(var e=o.allocUnsafe(t>>>0),r=this.head,n=0;r;)i=r.data,a=e,s=n,o.prototype.copy.call(i,a,s),n+=r.data.length,r=r.next;var i,a,s;return e}},{key:\"consume\",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,a=t>i.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&a(e.prototype,r),u&&a(e,u),t;var e,r,u}()},{buffer:85,util:83}],295:[function(t,e,r){(function(t){(function(){\"use strict\";function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit(\"close\")}function i(t,e){t.emit(\"error\",e)}e.exports={destroy:function(e,a){var o=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?o._writableState?o._writableState.errorEmitted?t.nextTick(n,o):(o._writableState.errorEmitted=!0,t.nextTick(r,o,e)):t.nextTick(r,o,e):a?(t.nextTick(n,o),a(e)):t.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit(\"error\",e)}}}).call(this)}).call(this,t(\"_process\"))},{_process:278}],296:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function t(e,r,a){if(\"function\"==typeof r)return t(e,null,r);r||(r={}),a=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(a||i);var o=r.readable||!1!==r.readable&&e.readable,s=r.writable||!1!==r.writable&&e.writable,l=function(){e.writable||c()},u=e._writableState&&e._writableState.finished,c=function(){s=!1,u=!0,o||a.call(e)},f=e._readableState&&e._readableState.endEmitted,h=function(){o=!1,f=!0,s||a.call(e)},p=function(t){a.call(e,t)},d=function(){var t;return o&&!f?(e._readableState&&e._readableState.ended||(t=new n),a.call(e,t)):s&&!u?(e._writableState&&e._writableState.ended||(t=new n),a.call(e,t)):void 0},g=function(){e.req.on(\"finish\",c)};return function(t){return t.setHeader&&\"function\"==typeof t.abort}(e)?(e.on(\"complete\",c),e.on(\"abort\",d),e.req?g():e.on(\"request\",g)):s&&!e._writableState&&(e.on(\"end\",l),e.on(\"close\",l)),e.on(\"end\",h),e.on(\"finish\",c),!1!==r.error&&e.on(\"error\",p),e.on(\"close\",d),function(){e.removeListener(\"complete\",c),e.removeListener(\"abort\",d),e.removeListener(\"request\",g),e.req&&e.req.removeListener(\"finish\",c),e.removeListener(\"end\",l),e.removeListener(\"close\",l),e.removeListener(\"finish\",c),e.removeListener(\"end\",h),e.removeListener(\"error\",p),e.removeListener(\"close\",d)}}},{\"../../../errors\":287}],297:[function(t,e,r){e.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},{}],298:[function(t,e,r){\"use strict\";var n,i=t(\"../../../errors\").codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function l(e,r,i,a){a=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(a);var s=!1;e.on(\"close\",(function(){s=!0})),void 0===n&&(n=t(\"./end-of-stream\")),n(e,{readable:r,writable:i},(function(t){if(t)return a(t);s=!0,a()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(t){return t.setHeader&&\"function\"==typeof t.abort}(e)?e.abort():\"function\"==typeof e.destroy?e.destroy():void a(t||new o(\"pipe\"))}}function u(t){t()}function c(t,e){return t.pipe(e)}function f(t){return t.length?\"function\"!=typeof t[t.length-1]?s:t.pop():s}e.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a(\"streams\");var o=e.map((function(t,r){var a=r<e.length-1;return l(t,a,r>0,(function(t){n||(n=t),t&&o.forEach(u),a||(o.forEach(u),i(n))}))}));return e.reduce(c)}},{\"../../../errors\":287,\"./end-of-stream\":296}],299:[function(t,e,r){\"use strict\";var n=t(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:\"highWaterMark\",a);return Math.floor(a)}return t.objectMode?16:16384}}},{\"../../../errors\":287}],300:[function(t,e,r){e.exports=t(\"events\").EventEmitter},{events:84}],301:[function(t,e,r){\"use strict\";var n=t(\"safe-buffer\").Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=l,this.end=u,e=4;break;case\"utf8\":this.fillLast=s,e=4;break;case\"base64\":this.text=c,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"�\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"�\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"�\"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):\"\"}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||\"\"},a.prototype.end=function(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"�\":e},a.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=o(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=o(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=o(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{\"safe-buffer\":285}],302:[function(t,e,r){(function(r,n){(function(){var r=t(\"assert\"),i=t(\"debug\")(\"stream-parser\");function a(t){i(\"initializing parser stream\"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,\"function\"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got \"'+t+'\"'),this._parserInit||a(this),i(\"buffering %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a \"callback\" set!'),r(t>0,'can only skip > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"skipping %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a \"callback\" set!'),r(t>0,'can only pass through > 0 bytes, got \"'+t+'\"'),this._parserInit||a(this),i(\"passing through %o bytes\",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function u(t,e,r){this._parserInit||a(this),i(\"write(%o bytes)\",t.length),\"function\"==typeof e&&(r=e),h(this,t,null,r)}function c(t,e,r){this._parserInit||a(this),i(\"transform(%o bytes)\",t.length),\"function\"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i(\"%o bytes left for stream piece\",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var u=o.apply(t,s);if(!l||a===u)return a}}e.exports=function(t){var e=t&&\"function\"==typeof t._transform,r=t&&\"function\"==typeof t._write;if(!e&&!r)throw new Error(\"must pass a Writable or Transform stream in\");i(\"extending Parser into stream\"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l),e?t._transform=c:t._write=u};var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error(\"got data but not currently parsing anything\")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);\"function\"==typeof e;)e=e();return e}}}).call(this)}).call(this,t(\"_process\"),t(\"buffer\").Buffer)},{_process:278,assert:75,buffer:85,debug:303}],303:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&\"env\"in n&&(t=n.env.DEBUG),t}(r=e.exports=t(\"./debug\")).log=function(){return\"object\"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?\"%c\":\"\")+this.namespace+(e?\" %c\":\" \")+t[0]+(e?\"%c \":\" \")+\"+\"+r.humanize(this.diff),e){var n=\"color: \"+this.color;t.splice(1,0,n,\"color: inherit\");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){\"%%\"!==t&&(i++,\"%c\"===t&&(a=i))})),t.splice(a,0,n)}},r.save=function(t){try{null==t?r.storage.removeItem(\"debug\"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){return!(\"undefined\"==typeof window||!window.process||\"renderer\"!==window.process.type)||\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},r.storage=\"undefined\"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}},r.enable(i())}).call(this)}).call(this,t(\"_process\"))},{\"./debug\":304,_process:278}],304:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];o[0]=r.coerce(o[0]),\"string\"!=typeof o[0]&&o.unshift(\"%O\");var l=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,(function(e,n){if(\"%%\"===e)return e;l++;var i=r.formatters[n];if(\"function\"==typeof i){var a=o[l];e=i.call(t,a),o.splice(l,1),l--}return e})),r.formatArgs.call(t,o),(e.log||r.log||console.log.bind(console)).apply(t,o)}}return e.namespace=t,e.enabled=r.enabled(t),e.useColors=r.useColors(),e.color=function(t){var e,n=0;for(e in t)n=(n<<5)-n+t.charCodeAt(e),n|=0;return r.colors[Math.abs(n)%r.colors.length]}(t),\"function\"==typeof r.init&&r.init(e),e}(r=e.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},r.disable=function(){r.enable(\"\")},r.enable=function(t){r.save(t),r.names=[],r.skips=[];for(var e=(\"string\"==typeof t?t:\"\").split(/[\\s,]+/),n=e.length,i=0;i<n;i++)e[i]&&(\"-\"===(t=e[i].replace(/\\*/g,\".*?\"))[0]?r.skips.push(new RegExp(\"^\"+t.substr(1)+\"$\")):r.names.push(new RegExp(\"^\"+t+\"$\")))},r.enabled=function(t){var e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=t(\"ms\"),r.names=[],r.skips=[],r.formatters={}},{ms:305}],305:[function(t,e,r){var n=1e3,i=60*n,a=60*i,o=24*a;function s(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+\" \"+r:Math.ceil(t/e)+\" \"+r+\"s\"}e.exports=function(t,e){e=e||{};var r,l=typeof t;if(\"string\"===l&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]);switch((e[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return 315576e5*r;case\"days\":case\"day\":case\"d\":return r*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*a;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*i;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}(t);if(\"number\"===l&&!1===isNaN(t))return e.long?s(r=t,o,\"day\")||s(r,a,\"hour\")||s(r,i,\"minute\")||s(r,n,\"second\")||r+\" ms\":function(t){return t>=o?Math.round(t/o)+\"d\":t>=a?Math.round(t/a)+\"h\":t>=i?Math.round(t/i)+\"m\":t>=n?Math.round(t/n)+\"s\":t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},{}],306:[function(t,e,r){\"use strict\";var n=t(\"parenthesis\");e.exports=function(t,e,r){if(null==t)throw Error(\"First argument should be a string\");if(null==e)throw Error(\"Separator should be a string or a RegExp\");r?(\"string\"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=[\"[]\",\"()\",\"{}\",\"<>\",'\"\"',\"''\",\"``\",\"“”\",\"«»\"]:(\"string\"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s<a.length;s++){var l=a[s],u=a[s+1];\"\\\\\"===l[l.length-1]&&\"\\\\\"!==l[l.length-2]?(o.push(l+e+u),s++):o.push(l)}a=o}for(s=0;s<a.length;s++)i[0]=a[s],a[s]=n.stringify(i,{flat:!0});return a}},{parenthesis:248}],307:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.length,r=new Array(e),n=new Array(e),i=new Array(e),a=new Array(e),o=new Array(e),s=new Array(e),l=0;l<e;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var u,c=0,f=[],h=[];function p(e){var l=[e],u=[e];for(r[e]=n[e]=c,i[e]=!0,c+=1;u.length>0;){e=u[u.length-1];var p=t[e];if(a[e]<p.length){for(var d=a[e];d<p.length;++d){var g=p[d];if(r[g]<0){r[g]=n[g]=c,i[g]=!0,c+=1,l.push(g),u.push(g);break}i[g]&&(n[e]=0|Math.min(n[e],n[g])),o[g]>=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var v=[],m=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,v.push(x),m.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(v);var b=new Array(y);for(d=0;d<m.length;d++)for(var _=0;_<m[d].length;_++)b[--y]=m[d][_];h.push(b)}u.pop()}}}for(l=0;l<e;++l)r[l]<0&&p(l);for(l=0;l<h.length;l++){var d=h[l];if(0!==d.length){d.sort((function(t,e){return t-e})),u=[d[0]];for(var g=1;g<d.length;g++)d[g]!==d[g-1]&&u.push(d[g]);h[l]=u}}return{components:f,adjacencyList:h}}},{}],308:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")},i=2*Math.PI,a=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},o=function(t,e){var r=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},s=function(t,e,r,n){var i=t*r+e*n;return i>1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,u=t.cy,c=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,g=void 0===d?0:d,v=t.sweepFlag,m=void 0===v?0:v,y=[];if(0===c||0===f)return[];var x=Math.sin(p*i/360),b=Math.cos(p*i/360),_=b*(e-l)/2+x*(r-u)/2,w=-x*(e-l)/2+b*(r-u)/2;if(0===_&&0===w)return[];c=Math.abs(c),f=Math.abs(f);var k=Math.pow(_,2)/Math.pow(c,2)+Math.pow(w,2)/Math.pow(f,2);k>1&&(c*=Math.sqrt(k),f*=Math.sqrt(k));var T=function(t,e,r,n,a,o,l,u,c,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),v=Math.pow(h,2),m=Math.pow(p,2),y=d*g-d*m-g*v;y<0&&(y=0),y/=d*m+g*v;var x=(y=Math.sqrt(y)*(l===u?-1:1))*a/o*p,b=y*-o/a*h,_=f*x-c*b+(t+r)/2,w=c*x+f*b+(e+n)/2,k=(h-x)/a,T=(p-b)/o,M=(-h-x)/a,A=(-p-b)/o,S=s(1,0,k,T),E=s(k,T,M,A);return 0===u&&E>0&&(E-=i),1===u&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,u,c,f,g,m,x,b,_,w),M=n(T,4),A=M[0],S=M[1],E=M[2],C=M[3],L=Math.abs(C)/(i/4);Math.abs(1-L)<1e-7&&(L=1);var P=Math.max(Math.ceil(L),1);C/=P;for(var O=0;O<P;O++)y.push(o(E,C)),E+=C;return y.map((function(t){var e=a(t[0],c,f,b,x,A,S),r=e.x,n=e.y,i=a(t[1],c,f,b,x,A,S),o=i.x,s=i.y,l=a(t[2],c,f,b,x,A,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}}))},e.exports=r.default},{}],309:[function(t,e,r){\"use strict\";var n=t(\"parse-svg-path\"),i=t(\"abs-svg-path\"),a=t(\"normalize-svg-path\"),o=t(\"is-svg-path\"),s=t(\"assert\");e.exports=function(t){if(Array.isArray(t)&&1===t.length&&\"string\"==typeof t[0]&&(t=t[0]),\"string\"==typeof t&&(s(o(t),\"String is not an SVG path.\"),t=n(t)),s(Array.isArray(t),\"Argument should be a string or an array of path segments.\"),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r<l;r++)for(var u=t[r].slice(1),c=0;c<u.length;c+=2)u[c+0]<e[0]&&(e[0]=u[c+0]),u[c+1]<e[1]&&(e[1]=u[c+1]),u[c+0]>e[2]&&(e[2]=u[c+0]),u[c+1]>e[3]&&(e[3]=u[c+1]);return e}},{\"abs-svg-path\":70,assert:75,\"is-svg-path\":238,\"normalize-svg-path\":310,\"parse-svg-path\":250}],310:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,u=0,c=null,f=null,h=0,p=0,d=0,g=t.length;d<g;d++){var v=t[d],m=v[0];switch(m){case\"M\":l=v[1],u=v[2];break;case\"A\":var y=n({px:h,py:p,cx:v[6],cy:v[7],rx:v[1],ry:v[2],xAxisRotation:v[3],largeArcFlag:v[4],sweepFlag:v[5]});if(!y.length)continue;for(var x,b=0;b<y.length;b++)v=[\"C\",(x=y[b]).x1,x.y1,x.x2,x.y2,x.x,x.y],b<y.length-1&&r.push(v);break;case\"S\":var _=h,w=p;\"C\"!=e&&\"S\"!=e||(_+=_-o,w+=w-s),v=[\"C\",_,w,v[1],v[2],v[3],v[4]];break;case\"T\":\"Q\"==e||\"T\"==e?(c=2*h-c,f=2*p-f):(c=h,f=p),v=a(h,p,c,f,v[1],v[2]);break;case\"Q\":c=v[1],f=v[2],v=a(h,p,v[1],v[2],v[3],v[4]);break;case\"L\":v=i(h,p,v[1],v[2]);break;case\"H\":v=i(h,p,v[1],p);break;case\"V\":v=i(h,p,h,v[1]);break;case\"Z\":v=i(h,p,l,u)}e=m,h=v[v.length-2],p=v[v.length-1],v.length>4?(o=v[v.length-4],s=v[v.length-3]):(o=h,s=p),r.push(v)}return r};var n=t(\"svg-arc-to-cubic-bezier\");function i(t,e,r,n){return[\"C\",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return[\"C\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{\"svg-arc-to-cubic-bezier\":308}],311:[function(t,e,r){\"use strict\";var n,i=t(\"svg-path-bounds\"),a=t(\"parse-svg-path\"),o=t(\"draw-svg-path\"),s=t(\"is-svg-path\"),l=t(\"bitmap-sdf\"),u=document.createElement(\"canvas\"),c=u.getContext(\"2d\");e.exports=function(t,e){if(!s(t))throw Error(\"Argument should be valid svg path string\");var r,f;e||(e={}),e.shape?(r=e.shape[0],f=e.shape[1]):(r=u.width=e.w||e.width||200,f=u.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],v=Math.min(g[0]||0,g[1]||0)/2;if(c.fillStyle=\"black\",c.fillRect(0,0,r,f),c.fillStyle=\"white\",p&&(\"number\"!=typeof p&&(p=1),c.strokeStyle=p>0?\"white\":\"black\",c.lineWidth=Math.abs(p)),c.translate(.5*r,.5*f),c.scale(v,v),function(){if(null!=n)return n;var t=document.createElement(\"canvas\").getContext(\"2d\");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D(\"M0,0h1v1h-1v-1Z\");t.fillStyle=\"black\",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var m=new Path2D(t);c.fill(m),p&&c.stroke(m)}else{var y=a(t);o(c,y),c.fill(),p&&c.stroke()}return c.setTransform(1,0,0,1,0,0),l(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{\"bitmap-sdf\":82,\"draw-svg-path\":126,\"is-svg-path\":238,\"parse-svg-path\":250,\"svg-path-bounds\":309}],312:[function(t,e,r){(function(e,n){(function(){var i=t(\"process/browser.js\").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function u(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new u(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new u(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate=\"function\"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate=\"function\"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t(\"timers\").setImmediate,t(\"timers\").clearImmediate)},{\"process/browser.js\":278,timers:312}],313:[function(t,e,r){!function(t){var r=/^\\s+/,n=/\\s+$/,i=0,a=t.round,o=t.min,s=t.max,l=t.random;function u(e,l){if(l=l||{},(e=e||\"\")instanceof u)return e;if(!(this instanceof u))return new u(e,l);var c=function(e){var i,a,l,u={r:0,g:0,b:0},c=1,f=null,h=null,p=null,d=!1,g=!1;return\"string\"==typeof e&&(e=function(t){t=t.replace(r,\"\").replace(n,\"\").toLowerCase();var e,i=!1;if(S[t])t=S[t],i=!0;else if(\"transparent\"==t)return{r:0,g:0,b:0,a:0,format:\"name\"};return(e=j.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=j.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=j.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=j.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=j.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=j.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=j.hex8.exec(t))?{r:O(e[1]),g:O(e[2]),b:O(e[3]),a:R(e[4]),format:i?\"name\":\"hex8\"}:(e=j.hex6.exec(t))?{r:O(e[1]),g:O(e[2]),b:O(e[3]),format:i?\"name\":\"hex\"}:(e=j.hex4.exec(t))?{r:O(e[1]+\"\"+e[1]),g:O(e[2]+\"\"+e[2]),b:O(e[3]+\"\"+e[3]),a:R(e[4]+\"\"+e[4]),format:i?\"name\":\"hex8\"}:!!(e=j.hex3.exec(t))&&{r:O(e[1]+\"\"+e[1]),g:O(e[2]+\"\"+e[2]),b:O(e[3]+\"\"+e[3]),format:i?\"name\":\"hex\"}}(e)),\"object\"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(i=e.r,a=e.g,l=e.b,u={r:255*L(i,255),g:255*L(a,255),b:255*L(l,255)},d=!0,g=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):U(e.h)&&U(e.s)&&U(e.v)?(f=D(e.s),h=D(e.v),u=function(e,r,n){e=6*L(e,360),r=L(r,100),n=L(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),u=i%6;return{r:255*[n,s,o,o,l,n][u],g:255*[l,n,n,s,o,o][u],b:255*[o,o,l,n,n,s][u]}}(e.h,f,h),d=!0,g=\"hsv\"):U(e.h)&&U(e.s)&&U(e.l)&&(f=D(e.s),p=D(e.l),u=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,f,p),d=!0,g=\"hsl\"),e.hasOwnProperty(\"a\")&&(c=e.a)),c=C(c),{ok:d,format:e.format||g,r:o(255,s(u.r,0)),g:o(255,s(u.g,0)),b:o(255,s(u.b,0)),a:c}}(e);this._originalInput=e,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=a(100*this._a)/100,this._format=l.format||c.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=c.ok,this._tc_id=i++}function c(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),u=(a+l)/2;if(a==l)n=i=0;else{var c=a-l;switch(i=u>.5?c/(2-a-l):c/(a+l),a){case t:n=(e-r)/c+(e<r?6:0);break;case e:n=(r-t)/c+2;break;case r:n=(t-e)/c+4}n/=6}return{h:n,s:i,l:u}}function f(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),u=a,c=a-l;if(i=0===a?0:c/a,a==l)n=0;else{switch(a){case t:n=(e-r)/c+(e<r?6:0);break;case e:n=(r-t)/c+2;break;case r:n=(t-e)/c+4}n/=6}return{h:n,s:i,v:u}}function h(t,e,r,n){var i=[I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\"\")}function p(t,e,r,n){return[I(z(n)),I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16))].join(\"\")}function d(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.s-=e/100,r.s=P(r.s),u(r)}function g(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.s+=e/100,r.s=P(r.s),u(r)}function v(t){return u(t).desaturate(100)}function m(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.l+=e/100,r.l=P(r.l),u(r)}function y(t,e){e=0===e?0:e||10;var r=u(t).toRgb();return r.r=s(0,o(255,r.r-a(-e/100*255))),r.g=s(0,o(255,r.g-a(-e/100*255))),r.b=s(0,o(255,r.b-a(-e/100*255))),u(r)}function x(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.l-=e/100,r.l=P(r.l),u(r)}function b(t,e){var r=u(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,u(r)}function _(t){var e=u(t).toHsl();return e.h=(e.h+180)%360,u(e)}function w(t){var e=u(t).toHsl(),r=e.h;return[u(t),u({h:(r+120)%360,s:e.s,l:e.l}),u({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=u(t).toHsl(),r=e.h;return[u(t),u({h:(r+90)%360,s:e.s,l:e.l}),u({h:(r+180)%360,s:e.s,l:e.l}),u({h:(r+270)%360,s:e.s,l:e.l})]}function T(t){var e=u(t).toHsl(),r=e.h;return[u(t),u({h:(r+72)%360,s:e.s,l:e.l}),u({h:(r+216)%360,s:e.s,l:e.l})]}function M(t,e,r){e=e||6,r=r||30;var n=u(t).toHsl(),i=360/r,a=[u(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(u(n));return a}function A(t,e){e=e||6;for(var r=u(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(u({h:n,s:i,v:a})),a=(a+s)%1;return o}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,i=this.toRgb();return e=i.r/255,r=i.g/255,n=i.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.v);return 1==this._a?\"hsv(\"+e+\", \"+r+\"%, \"+n+\"%)\":\"hsva(\"+e+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHsl:function(){var t=c(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=c(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.l);return 1==this._a?\"hsl(\"+e+\", \"+r+\"%, \"+n+\"%)\":\"hsla(\"+e+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return\"#\"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[I(a(t).toString(16)),I(a(e).toString(16)),I(a(r).toString(16)),I(z(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(\"\")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return\"#\"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?\"rgb(\"+a(this._r)+\", \"+a(this._g)+\", \"+a(this._b)+\")\":\"rgba(\"+a(this._r)+\", \"+a(this._g)+\", \"+a(this._b)+\", \"+this._roundA+\")\"},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+\"%\",g:a(100*L(this._g,255))+\"%\",b:a(100*L(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+a(100*L(this._r,255))+\"%, \"+a(100*L(this._g,255))+\"%, \"+a(100*L(this._b,255))+\"%)\":\"rgba(\"+a(100*L(this._r,255))+\"%, \"+a(100*L(this._g,255))+\"%, \"+a(100*L(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(E[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e=\"#\"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?\"GradientType = 1, \":\"\";if(t){var i=u(t);r=\"#\"+p(i._r,i._g,i._b,i._a)}return\"progid:DXImageTransform.Microsoft.gradient(\"+n+\"startColorstr=\"+e+\",endColorstr=\"+r+\")\"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||\"hex\"!==t&&\"hex6\"!==t&&\"hex3\"!==t&&\"hex4\"!==t&&\"hex8\"!==t&&\"name\"!==t?(\"rgb\"===t&&(r=this.toRgbString()),\"prgb\"===t&&(r=this.toPercentageRgbString()),\"hex\"!==t&&\"hex6\"!==t||(r=this.toHexString()),\"hex3\"===t&&(r=this.toHexString(!0)),\"hex4\"===t&&(r=this.toHex8String(!0)),\"hex8\"===t&&(r=this.toHex8String()),\"name\"===t&&(r=this.toName()),\"hsl\"===t&&(r=this.toHslString()),\"hsv\"===t&&(r=this.toHsvString()),r||this.toHexString()):\"name\"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},u.fromRatio=function(t,e){if(\"object\"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=\"a\"===n?t[n]:D(t[n]));t=r}return u(t,e)},u.equals=function(t,e){return!(!t||!e)&&u(t).toRgbString()==u(e).toRgbString()},u.random=function(){return u.fromRatio({r:l(),g:l(),b:l()})},u.mix=function(t,e,r){r=0===r?0:r||50;var n=u(t).toRgb(),i=u(e).toRgb(),a=r/100;return u({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},u.readability=function(e,r){var n=u(e),i=u(r);return(t.max(n.getLuminance(),i.getLuminance())+.05)/(t.min(n.getLuminance(),i.getLuminance())+.05)},u.isReadable=function(t,e,r){var n,i,a,o,s,l=u.readability(t,e);switch(i=!1,(a=r,\"AA\"!==(o=((a=a||{level:\"AA\",size:\"small\"}).level||\"AA\").toUpperCase())&&\"AAA\"!==o&&(o=\"AA\"),\"small\"!==(s=(a.size||\"small\").toLowerCase())&&\"large\"!==s&&(s=\"small\"),n={level:o,size:s}).level+n.size){case\"AAsmall\":case\"AAAlarge\":i=l>=4.5;break;case\"AAlarge\":i=l>=3;break;case\"AAAsmall\":i=l>=7}return i},u.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var c=0;c<e.length;c++)(n=u.readability(t,e[c]))>l&&(l=n,s=u(e[c]));return u.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,u.mostReadable(t,[\"#fff\",\"#000\"],r))};var S=u.names={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"0ff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"00f\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",burntsienna:\"ea7e5d\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"0ff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkgrey:\"a9a9a9\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"f0f\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",grey:\"808080\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgreen:\"90ee90\",lightgrey:\"d3d3d3\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"663399\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"},E=u.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return\"string\"==typeof t&&-1!=t.indexOf(\".\")&&1===parseFloat(t)})(e)&&(e=\"100%\");var n=function(t){return\"string\"==typeof t&&-1!=t.indexOf(\"%\")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(t){return o(1,s(0,t))}function O(t){return parseInt(t,16)}function I(t){return 1==t.length?\"0\"+t:\"\"+t}function D(t){return t<=1&&(t=100*t+\"%\"),t}function z(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return O(t)/255}var F,N,B,j=(N=\"[\\\\s|\\\\(]+(\"+(F=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",B=\"[\\\\s|\\\\(]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")[,|\\\\s]+(\"+F+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(F),rgb:new RegExp(\"rgb\"+N),rgba:new RegExp(\"rgba\"+B),hsl:new RegExp(\"hsl\"+N),hsla:new RegExp(\"hsla\"+B),hsv:new RegExp(\"hsv\"+N),hsva:new RegExp(\"hsva\"+B),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=u:window.tinycolor=u}(Math)},{}],314:[function(t,e,r){\"use strict\";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;r<n;r++)e[r]=t[r]-e[r];return e}return i(t-i(t))};var n=new Float32Array(1);function i(t){return t.length?t instanceof Float32Array?t:new Float32Array(t):(n[0]=t,n[0])}},{}],315:[function(t,e,r){\"use strict\";var n=t(\"parse-unit\");function i(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function a(t,e){switch(e=e||document.body,t=(t||\"px\").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case\"%\":return e.clientHeight/100;case\"ch\":case\"ex\":return function(t,e){var r=document.createElement(\"div\");r.style[\"font-size\"]=\"128\"+t,e.appendChild(r);var n=i(r,\"font-size\")/128;return e.removeChild(r),n}(t,e);case\"em\":return i(e,\"font-size\");case\"rem\":return i(document.body,\"font-size\");case\"vw\":return window.innerWidth/100;case\"vh\":return window.innerHeight/100;case\"vmin\":return Math.min(window.innerWidth,window.innerHeight)/100;case\"vmax\":return Math.max(window.innerWidth,window.innerHeight)/100;case\"in\":return 96;case\"cm\":return 96/2.54;case\"mm\":return 96/25.4;case\"pt\":return 96/72;case\"pc\":return 16}return 1}e.exports=a},{\"parse-unit\":251}],316:[function(t,e,r){var n,i;n=this,i=function(t){\"use strict\";function e(t){return t}function r(t){if(null==t)return e;var r,n,i=t.scale[0],a=t.scale[1],o=t.translate[0],s=t.translate[1];return function(t,e){e||(r=n=0);var l=2,u=t.length,c=new Array(u);for(c[0]=(r+=t[0])*i+o,c[1]=(n+=t[1])*a+s;l<u;)c[l]=t[l],++l;return c}}function n(t){var e,n=r(t.transform),i=1/0,a=i,o=-i,s=-i;function l(t){(t=n(t))[0]<i&&(i=t[0]),t[0]>o&&(o=t[0]),t[1]<a&&(a=t[1]),t[1]>s&&(s=t[1])}function u(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(u);break;case\"Point\":l(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++r<l;)(e=n(t[r],r))[0]<i&&(i=e[0]),e[0]>o&&(o=e[0]),e[1]<a&&(a=e[1]),e[1]>s&&(s=e[1])})),t.objects)u(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:\"Feature\",properties:i,geometry:o}:null==n?{type:\"Feature\",id:r,properties:i,geometry:o}:{type:\"Feature\",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a<o;++a)e.push(n(r[a],a));t<0&&function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r}(e,o)}function o(t){return n(t)}function s(t){for(var e=[],r=0,n=t.length;r<n;++r)a(t[r],e);return e.length<2&&e.push(e[0]),e}function l(t){for(var e=s(t);e.length<4;)e.push(e[0]);return e}function u(t){return t.map(l)}return function t(e){var r,n=e.type;switch(n){case\"GeometryCollection\":return{type:n,geometries:e.geometries.map(t)};case\"Point\":r=o(e.coordinates);break;case\"MultiPoint\":r=e.coordinates.map(o);break;case\"LineString\":r=s(e.arcs);break;case\"MultiLineString\":r=e.arcs.map(s);break;case\"Polygon\":r=u(e.arcs);break;case\"MultiPolygon\":r=e.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(e)}function o(t,e){var r={},n={},i={},a=[],o=-1;function s(t,e){for(var n in t){var i=t[n];delete e[i.start],delete i.start,delete i.end,i.forEach((function(t){r[t<0?~t:t]=1})),a.push(i)}}return e.forEach((function(r,n){var i,a=t.arcs[r<0?~r:r];a.length<3&&!a[1][0]&&!a[1][1]&&(i=e[++o],e[o]=r,e[n]=i)})),e.forEach((function(e){var r,a,o=function(e){var r,n=t.arcs[e<0?~e:e],i=n[0];return t.transform?(r=[0,0],n.forEach((function(t){r[0]+=t[0],r[1]+=t[1]}))):r=n[n.length-1],e<0?[r,i]:[i,r]}(e),s=o[0],l=o[1];if(r=i[s])if(delete i[r.end],r.push(e),r.end=l,a=n[l]){delete n[a.start];var u=a===r?r:r.concat(a);n[u.start=r.start]=i[u.end=a.end]=u}else n[r.start]=i[r.end]=r;else if(r=n[l])if(delete n[r.start],r.unshift(e),r.start=s,a=i[s]){delete i[a.end];var c=a===r?r:a.concat(r);n[c.start=a.start]=i[c.end=r.end]=c}else n[r.start]=i[r.end]=r;else n[(r=[e]).start=s]=i[r.end=l]=r})),s(i,n),s(n,i),e.forEach((function(t){r[t<0?~t:t]||a.push([t])})),a}function s(t,e,r){var n,i,a;if(arguments.length>1)n=l(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i<a;++i)n[i]=i;return{type:\"MultiLineString\",arcs:o(t,n)}}function l(t,e,r){var n,i=[],a=[];function o(t){var e=t<0?~t:t;(a[e]||(a[e]=[])).push({i:t,g:n})}function s(t){t.forEach(o)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case\"GeometryCollection\":e.geometries.forEach(t);break;case\"LineString\":s(e.arcs);break;case\"MultiLineString\":case\"Polygon\":l(e.arcs);break;case\"MultiPolygon\":!function(t){t.forEach(l)}(e.arcs)}}(e),a.forEach(null==r?function(t){i.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&i.push(t[0].i)}),i}function u(t,e){var r={},n=[],i=[];function s(t){t.forEach((function(e){e.forEach((function(e){(r[e=e<0?~e:e]||(r[e]=[])).push(t)}))})),n.push(t)}function l(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],a=0;++r<n;)e=i,i=t[r],a+=e[0]*i[1]-e[1]*i[0];return Math.abs(a)}(a(t,{type:\"Polygon\",arcs:[e]}).coordinates[0])}return e.forEach((function t(e){switch(e.type){case\"GeometryCollection\":e.geometries.forEach(t);break;case\"Polygon\":s(e.arcs);break;case\"MultiPolygon\":e.arcs.forEach(s)}})),n.forEach((function(t){if(!t._){var e=[],n=[t];for(t._=1,i.push(e);t=n.pop();)e.push(t),t.forEach((function(t){t.forEach((function(t){r[t<0?~t:t].forEach((function(t){t._||(t._=1,n.push(t))}))}))}))}})),n.forEach((function(t){delete t._})),{type:\"MultiPolygon\",arcs:i.map((function(e){var n,i=[];if(e.forEach((function(t){t.forEach((function(t){t.forEach((function(t){r[t<0?~t:t].length<2&&i.push(t)}))}))})),(n=(i=o(t,i)).length)>1)for(var a,s,u=1,c=l(i[0]);u<n;++u)(a=l(i[u]))>c&&(s=i[0],i[0]=i[u],i[u]=s,c=a);return i})).filter((function(t){return t.length>0}))}}function c(t,e){for(var r=0,n=t.length;r<n;){var i=r+n>>>1;t[i]<e?r=i+1:n=i}return r}function f(t){if(null==t)return e;var r,n,i=t.scale[0],a=t.scale[1],o=t.translate[0],s=t.translate[1];return function(t,e){e||(r=n=0);var l=2,u=t.length,c=new Array(u),f=Math.round((t[0]-o)/i),h=Math.round((t[1]-s)/a);for(c[0]=f-r,r=f,c[1]=h-n,n=h;l<u;)c[l]=t[l],++l;return c}}t.bbox=n,t.feature=function(t,e){return\"string\"==typeof e&&(e=t.objects[e]),\"GeometryCollection\"===e.type?{type:\"FeatureCollection\",features:e.geometries.map((function(e){return i(t,e)}))}:i(t,e)},t.merge=function(t){return a(t,u.apply(this,arguments))},t.mergeArcs=u,t.mesh=function(t){return a(t,s.apply(this,arguments))},t.meshArcs=s,t.neighbors=function(t){var e={},r=t.map((function(){return[]}));function n(t,r){t.forEach((function(t){t<0&&(t=~t);var n=e[t];n?n.push(r):e[t]=[r]}))}function i(t,e){t.forEach((function(t){n(t,e)}))}var a={LineString:n,MultiLineString:i,Polygon:i,MultiPolygon:function(t,e){t.forEach((function(t){i(t,e)}))}};for(var o in t.forEach((function t(e,r){\"GeometryCollection\"===e.type?e.geometries.forEach((function(e){t(e,r)})):e.type in a&&a[e.type](e.arcs,r)})),e)for(var s=e[o],l=s.length,u=0;u<l;++u)for(var f=u+1;f<l;++f){var h,p=s[u],d=s[f];(h=r[p])[o=c(h,d)]!==d&&h.splice(o,0,d),(h=r[d])[o=c(h,p)]!==p&&h.splice(o,0,p)}return r},t.quantize=function(t,e){if(t.transform)throw new Error(\"already quantized\");if(e&&e.scale)l=t.bbox;else{if(!((r=Math.floor(e))>=2))throw new Error(\"n must be ≥2\");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,u,c=f(e),h=t.objects,p={};function d(t){return c(t)}function g(t){var e;switch(t.type){case\"GeometryCollection\":e={type:\"GeometryCollection\",geometries:t.geometries.map(g)};break;case\"Point\":e={type:\"Point\",coordinates:d(t.coordinates)};break;case\"MultiPoint\":e={type:\"MultiPoint\",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(u in h)p[u]=g(h[u]);return{type:\"Topology\",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=c(t[0],0);++r<i;)((e=c(t[r],r))[0]||e[1])&&(a[n++]=e);return 1===n&&(a[n++]=[0,0]),a.length=n,a}))}},t.transform=r,t.untransform=f,Object.defineProperty(t,\"__esModule\",{value:!0})},i(\"object\"==typeof r&&void 0!==e?r:(n=n||self).topojson=n.topojson||{})},{}],317:[function(t,e,r){\"use strict\";var n=t(\"../prototype/is\");e.exports=function(t){if(\"function\"!=typeof t)return!1;if(!hasOwnProperty.call(t,\"length\"))return!1;try{if(\"number\"!=typeof t.length)return!1;if(\"function\"!=typeof t.call)return!1;if(\"function\"!=typeof t.apply)return!1}catch(t){return!1}return!n(t)}},{\"../prototype/is\":324}],318:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=t(\"../string/coerce\"),o=t(\"./to-short-string\"),s=function(t,e){return t.replace(\"%v\",o(e))};e.exports=function(t,e,r){if(!i(r))throw new TypeError(s(e,t));if(!n(t)){if(\"default\"in r)return r.default;if(r.isOptional)return null}var o=a(r.errorMessage);throw n(o)||(o=e),new TypeError(s(o,t))}},{\"../object/is\":321,\"../string/coerce\":325,\"../value/is\":327,\"./to-short-string\":320}],319:[function(t,e,r){\"use strict\";e.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}}},{}],320:[function(t,e,r){\"use strict\";var n=t(\"./safe-to-string\"),i=/[\\n\\r\\u2028\\u2029]/g;e.exports=function(t){var e=n(t);return null===e?\"<Non-coercible to string value>\":(e.length>100&&(e=e.slice(0,99)+\"…\"),e=e.replace(i,(function(t){switch(t){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}})))}},{\"./safe-to-string\":319}],321:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{\"../value/is\":327}],322:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"%v is not a plain function\",arguments[1])}},{\"../lib/resolve-exception\":318,\"./is\":323}],323:[function(t,e,r){\"use strict\";var n=t(\"../function/is\"),i=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{\"../function/is\":317}],324:[function(t,e,r){\"use strict\";var n=t(\"../object/is\");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{\"../object/is\":321}],325:[function(t,e,r){\"use strict\";var n=t(\"../value/is\"),i=t(\"../object/is\"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if(\"function\"!=typeof e)return null;if(e===a)return null}try{return\"\"+t}catch(t){return null}}},{\"../object/is\":321,\"../value/is\":327}],326:[function(t,e,r){\"use strict\";var n=t(\"../lib/resolve-exception\"),i=t(\"./is\");e.exports=function(t){return i(t)?t:n(t,\"Cannot use %v\",arguments[1])}},{\"../lib/resolve-exception\":318,\"./is\":327}],327:[function(t,e,r){\"use strict\";e.exports=function(t){return null!=t}},{}],328:[function(t,e,n){(function(e){(function(){\"use strict\";var r=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,u=e.__TYPEDARRAY_POOL;u.UINT8C||(u.UINT8C=i([32,0])),u.BIGUINT64||(u.BIGUINT64=i([32,0])),u.BIGINT64||(u.BIGINT64=i([32,0])),u.BUFFER||(u.BUFFER=i([32,0]));var c=u.DATA,f=u.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,n=r.log2(e);c[n].push(t)}}function p(t){t=r.nextPow2(t);var e=r.log2(t),n=c[e];return n.length>0?n.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function v(t){return new Uint32Array(p(4*t),0,t)}function m(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function k(t){return s?new BigUint64Array(p(8*t),0,t):null}function T(t){return l?new BigInt64Array(p(8*t),0,t):null}function M(t){return new DataView(p(t),0,t)}function A(t){t=r.nextPow2(t);var e=r.log2(t),n=f[e];return n.length>0?n.pop():new a(t)}n.free=function(t){if(a.isBuffer(t))f[r.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|r.log2(e);c[n].push(t)}},n.freeUint8=n.freeUint16=n.freeUint32=n.freeBigUint64=n.freeInt8=n.freeInt16=n.freeInt32=n.freeBigInt64=n.freeFloat32=n.freeFloat=n.freeFloat64=n.freeDouble=n.freeUint8Clamped=n.freeDataView=function(t){h(t.buffer)},n.freeArrayBuffer=h,n.freeBuffer=function(t){f[r.log2(t.length)].push(t)},n.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return v(t);case\"int8\":return m(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return T(t);case\"biguint64\":return k(t);case\"buffer\":return A(t);case\"data\":case\"dataview\":return M(t);default:return null}return null},n.mallocArrayBuffer=p,n.mallocUint8=d,n.mallocUint16=g,n.mallocUint32=v,n.mallocInt8=m,n.mallocInt16=y,n.mallocInt32=x,n.mallocFloat32=n.mallocFloat=b,n.mallocFloat64=n.mallocDouble=_,n.mallocUint8Clamped=w,n.mallocBigUint64=k,n.mallocBigInt64=T,n.mallocDataView=M,n.mallocBuffer=A,n.clearCache=function(){for(var t=0;t<32;++t)u.UINT8[t].length=0,u.UINT16[t].length=0,u.UINT32[t].length=0,u.INT8[t].length=0,u.INT16[t].length=0,u.INT32[t].length=0,u.FLOAT[t].length=0,u.DOUBLE[t].length=0,u.BIGUINT64[t].length=0,u.BIGINT64[t].length=0,u.UINT8C[t].length=0,c[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":81,buffer:85,dup:128}],329:[function(t,e,r){var n=/[\\'\\\"]/;e.exports=function(t){return t?(n.test(t.charAt(0))&&(t=t.substr(1)),n.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):\"\"}},{}],330:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n<i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&&o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if(\"function\"==typeof a[o]&&void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},{}],331:[function(t,e,n){(function(t){(function(){function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&\"true\"===String(r).toLowerCase()}e.exports=function(t,e){if(r(\"noDeprecation\"))return t;var n=!1;return function(){if(!n){if(r(\"throwDeprecation\"))throw new Error(e);r(\"traceDeprecation\")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],332:[function(t,e,r){var n=t(\"get-canvas-context\");e.exports=function(t){return n(\"webgl\",t)}},{\"get-canvas-context\":194}],333:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\"Chinese\",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{\"\":{name:\"Chinese\",epochs:[\"BEC\",\"EC\"],monthNumbers:function(t,e){if(\"string\"==typeof t){var r=t.match(l);return r?r[0]:\"\"}var n=this._validateYear(t),i=t.month(),a=\"\"+this.toChineseMonth(n,i);return e&&a.length<2&&(a=\"0\"+a),this.isIntercalaryMonth(n,i)&&(a+=\"i\"),a},monthNames:function(t){if(\"string\"==typeof t){var e=t.match(u);return e?e[0]:\"\"}var r=this._validateYear(t),n=t.month(),i=[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\"闰\"+i),i},monthNamesShort:function(t){if(\"string\"==typeof t){var e=t.match(c);return e?e[0]:\"\"}var r=this._validateYear(t),n=t.month(),i=[\"一\",\"二\",\"三\",\"四\",\"五\",\"六\",\"七\",\"八\",\"九\",\"十\",\"十一\",\"十二\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\"闰\"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))\"闰\"===e[0]&&(r=!0,e=e.substring(1)),\"月\"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+[\"一\",\"二\",\"三\",\"四\",\"五\",\"六\",\"七\",\"八\",\"九\",\"十\",\"十一\",\"十二\"].indexOf(e);else{var i=e[e.length-1];r=\"i\"===i||\"I\"===i}return this.toMonthIndex(t,n,r)},dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),\"number\"!=typeof t||t<1888||t>2111)throw e.replace(/\\{0\\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\\{0\\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\\{0\\}/,this.local.name);return r?e<r?e+1:e:e+1},intercalaryMonth:function(t){return t=this._validateYear(t),f[t-f[0]]>>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,u=s>>5&15,c=31&s;(i=a.newDate(l,u,c)).add(4-(i.dayOfWeek()||7),\"d\");var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\\{0\\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if(\"object\"==typeof t)o=t,a=e||{};else{var l;if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Lunar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Lunar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=30))throw new Error(\"Lunar day outside range 1 - 30\");\"object\"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var u,c=f[o.year-f[0]],p=c>>13;u=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d<u;d++)s+=c&1<<12-d?30:29;var g=h[o.year-h[0]],v=new Date(g>>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=v.getFullYear(),a.month=1+v.getMonth(),a.day=v.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if(\"object\"==typeof t)i=t,a=e||{};else{if(!(\"number\"==typeof t&&t>=1888&&t<=2111))throw new Error(\"Solar year outside range 1888-2111\");if(!(\"number\"==typeof e&&e>=1&&e<=12))throw new Error(\"Solar month outside range 1 - 12\");if(!(\"number\"==typeof r&&r>=1&&r<=31))throw new Error(\"Solar day outside range 1 - 31\");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(i.year,i.month-1,i.day);l=Math.round((c-u)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l<g)break;l-=g}var v=d>>13;return!v||p<v?(a.isIntercalary=!1,a.month=1+p):p===v?(a.isIntercalary=!0,a.month=p):(a.isIntercalary=!1,a.month=p),a.day=1+l,a}(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(s),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var n=t.year(),i=t.month(),a=this.isIntercalaryMonth(n,i),s=this.toChineseMonth(n,i),l=Object.getPrototypeOf(o.prototype).add.call(this,t,e,r);if(\"y\"===r){var u=l.year(),c=l.month(),f=this.isIntercalaryMonth(u,s),h=a&&f?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);h!==c&&l.month(h)}return l}});var s=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)[-/](\\d?\\d)([iI]?)[-/](\\d?\\d)/m,l=/^\\d?\\d[iI]?/m,u=/^闰?十?[一二三四五六七八九]?月/m,c=/^闰?十?[一二三四五六七八九]?/m;n.calendars.chinese=o;var f=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],h=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{\"../main\":347,\"object-assign\":247}],334:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Coptic\",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Coptic\",epochs:[\"BAM\",\"AM\"],monthNames:[\"Thout\",\"Paopi\",\"Hathor\",\"Koiak\",\"Tobi\",\"Meshir\",\"Paremhat\",\"Paremoude\",\"Pashons\",\"Paoni\",\"Epip\",\"Mesori\",\"Pi Kogi Enavot\"],monthNamesShort:[\"Tho\",\"Pao\",\"Hath\",\"Koi\",\"Tob\",\"Mesh\",\"Pat\",\"Pad\",\"Pash\",\"Pao\",\"Epi\",\"Meso\",\"PiK\"],dayNames:[\"Tkyriaka\",\"Pesnau\",\"Pshoment\",\"Peftoou\",\"Ptiou\",\"Psoou\",\"Psabbaton\"],dayNamesShort:[\"Tky\",\"Pes\",\"Psh\",\"Pef\",\"Pti\",\"Pso\",\"Psa\"],dayNamesMin:[\"Tk\",\"Pes\",\"Psh\",\"Pef\",\"Pt\",\"Pso\",\"Psa\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\"\"].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},{\"../main\":347,\"object-assign\":247}],335:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Discworld\",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Discworld\",epochs:[\"BUC\",\"UC\"],monthNames:[\"Ick\",\"Offle\",\"February\",\"March\",\"April\",\"May\",\"June\",\"Grune\",\"August\",\"Spune\",\"Sektober\",\"Ember\",\"December\"],monthNamesShort:[\"Ick\",\"Off\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Gru\",\"Aug\",\"Spu\",\"Sek\",\"Emb\",\"Dec\"],dayNames:[\"Sunday\",\"Octeday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Oct\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Oc\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,n.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||\"\"}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:\"Fruitbat\",21:\"Anchovy\"};n.calendars.discworld=a},{\"../main\":347,\"object-assign\":247}],336:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Ethiopian\",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Ethiopian\",epochs:[\"BEE\",\"EE\"],monthNames:[\"Meskerem\",\"Tikemet\",\"Hidar\",\"Tahesas\",\"Tir\",\"Yekatit\",\"Megabit\",\"Miazia\",\"Genbot\",\"Sene\",\"Hamle\",\"Nehase\",\"Pagume\"],monthNamesShort:[\"Mes\",\"Tik\",\"Hid\",\"Tah\",\"Tir\",\"Yek\",\"Meg\",\"Mia\",\"Gen\",\"Sen\",\"Ham\",\"Neh\",\"Pag\"],dayNames:[\"Ehud\",\"Segno\",\"Maksegno\",\"Irob\",\"Hamus\",\"Arb\",\"Kidame\"],dayNamesShort:[\"Ehu\",\"Seg\",\"Mak\",\"Iro\",\"Ham\",\"Arb\",\"Kid\"],dayNamesMin:[\"Eh\",\"Se\",\"Ma\",\"Ir\",\"Ha\",\"Ar\",\"Ki\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\"\"].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},{\"../main\":347,\"object-assign\":247}],337:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Hebrew\",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{\"\":{name:\"Hebrew\",epochs:[\"BAM\",\"AM\"],monthNames:[\"Nisan\",\"Iyar\",\"Sivan\",\"Tammuz\",\"Av\",\"Elul\",\"Tishrei\",\"Cheshvan\",\"Kislev\",\"Tevet\",\"Shevat\",\"Adar\",\"Adar II\"],monthNamesShort:[\"Nis\",\"Iya\",\"Siv\",\"Tam\",\"Av\",\"Elu\",\"Tis\",\"Che\",\"Kis\",\"Tev\",\"She\",\"Ada\",\"Ad2\"],dayNames:[\"Yom Rishon\",\"Yom Sheni\",\"Yom Shlishi\",\"Yom Revi'i\",\"Yom Chamishi\",\"Yom Shishi\",\"Yom Shabbat\"],dayNamesShort:[\"Ris\",\"She\",\"Shl\",\"Rev\",\"Cha\",\"Shi\",\"Sha\"],dayNamesMin:[\"Ri\",\"She\",\"Shl\",\"Re\",\"Ch\",\"Shi\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)||8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?\"embolismic\":\"common\")+\" \"+[\"deficient\",\"regular\",\"complete\"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s<e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s<e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t<this.toJD(e,1,1)?7:1;t>this.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},{\"../main\":347,\"object-assign\":247}],338:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Islamic\",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Islamic\",epochs:[\"BH\",\"AH\"],monthNames:[\"Muharram\",\"Safar\",\"Rabi' al-awwal\",\"Rabi' al-thani\",\"Jumada al-awwal\",\"Jumada al-thani\",\"Rajab\",\"Sha'aban\",\"Ramadan\",\"Shawwal\",\"Dhu al-Qi'dah\",\"Dhu al-Hijjah\"],monthNamesShort:[\"Muh\",\"Saf\",\"Rab1\",\"Rab2\",\"Jum1\",\"Jum2\",\"Raj\",\"Sha'\",\"Ram\",\"Shaw\",\"DhuQ\",\"DhuH\"],dayNames:[\"Yawm al-ahad\",\"Yawm al-ithnayn\",\"Yawm ath-thulaathaa'\",\"Yawm al-arbi'aa'\",\"Yawm al-khamīs\",\"Yawm al-jum'a\",\"Yawm as-sabt\"],dayNamesShort:[\"Aha\",\"Ith\",\"Thu\",\"Arb\",\"Kha\",\"Jum\",\"Sab\"],dayNamesMin:[\"Ah\",\"It\",\"Th\",\"Ar\",\"Kh\",\"Ju\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},{\"../main\":347,\"object-assign\":247}],339:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Julian\",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Julian\",epochs:[\"BC\",\"AD\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"mm/dd/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},{\"../main\":347,\"object-assign\":247}],340:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Mayan\",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{\"\":{name:\"Mayan\",epochs:[\"\",\"\"],monthNames:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],monthNamesShort:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],dayNames:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],dayNamesShort:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],dayNamesMin:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],digits:null,dateFormat:\"YYYY.m.d\",firstDay:0,isRTL:!1,haabMonths:[\"Pop\",\"Uo\",\"Zip\",\"Zotz\",\"Tzec\",\"Xul\",\"Yaxkin\",\"Mol\",\"Chen\",\"Yax\",\"Zac\",\"Ceh\",\"Mac\",\"Kankin\",\"Muan\",\"Pax\",\"Kayab\",\"Cumku\",\"Uayeb\"],tzolkinMonths:[\"Imix\",\"Ik\",\"Akbal\",\"Kan\",\"Chicchan\",\"Cimi\",\"Manik\",\"Lamat\",\"Muluc\",\"Oc\",\"Chuen\",\"Eb\",\"Ben\",\"Ix\",\"Men\",\"Cib\",\"Caban\",\"Etznab\",\"Cauac\",\"Ahau\"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+\".\"+Math.floor(t/20)+\".\"+t%20},forYear:function(t){if((t=t.split(\".\")).length<3)throw\"Invalid Mayan year\";for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)>19||r>0&&n<0)throw\"Invalid Mayan year\";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o(8+(t-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s(20+(t-=this.jdEpoch),20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},{\"../main\":347,\"object-assign\":247}],341:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar;var o=n.instance(\"gregorian\");i(a.prototype,{name:\"Nanakshahi\",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Nanakshahi\",epochs:[\"BN\",\"AN\"],monthNames:[\"Chet\",\"Vaisakh\",\"Jeth\",\"Harh\",\"Sawan\",\"Bhadon\",\"Assu\",\"Katak\",\"Maghar\",\"Poh\",\"Magh\",\"Phagun\"],monthNamesShort:[\"Che\",\"Vai\",\"Jet\",\"Har\",\"Saw\",\"Bha\",\"Ass\",\"Kat\",\"Mgr\",\"Poh\",\"Mgh\",\"Pha\"],dayNames:[\"Somvaar\",\"Mangalvar\",\"Budhvaar\",\"Veervaar\",\"Shukarvaar\",\"Sanicharvaar\",\"Etvaar\"],dayNamesShort:[\"Som\",\"Mangal\",\"Budh\",\"Veer\",\"Shukar\",\"Sanichar\",\"Et\"],dayNamesMin:[\"So\",\"Ma\",\"Bu\",\"Ve\",\"Sh\",\"Sa\",\"Et\"],digits:null,dateFormat:\"dd-mm-yyyy\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[\"\"].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s<i.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t>=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},{\"../main\":347,\"object-assign\":247}],342:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Nepali\",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{\"\":{name:\"Nepali\",epochs:[\"BBS\",\"ABS\"],monthNames:[\"Baisakh\",\"Jestha\",\"Ashadh\",\"Shrawan\",\"Bhadra\",\"Ashwin\",\"Kartik\",\"Mangsir\",\"Paush\",\"Mangh\",\"Falgun\",\"Chaitra\"],monthNamesShort:[\"Bai\",\"Je\",\"As\",\"Shra\",\"Bha\",\"Ash\",\"Kar\",\"Mang\",\"Pau\",\"Ma\",\"Fal\",\"Chai\"],dayNames:[\"Aaitabaar\",\"Sombaar\",\"Manglbaar\",\"Budhabaar\",\"Bihibaar\",\"Shukrabaar\",\"Shanibaar\"],dayNamesShort:[\"Aaita\",\"Som\",\"Mangl\",\"Budha\",\"Bihi\",\"Shukra\",\"Shani\"],dayNamesMin:[\"Aai\",\"So\",\"Man\",\"Bu\",\"Bi\",\"Shu\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,\"d\").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r<t+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=a},{\"../main\":347,\"object-assign\":247}],343:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"Persian\",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Persian\",epochs:[\"BP\",\"AP\"],monthNames:[\"Farvardin\",\"Ordibehesht\",\"Khordad\",\"Tir\",\"Mordad\",\"Shahrivar\",\"Mehr\",\"Aban\",\"Azar\",\"Day\",\"Bahman\",\"Esfand\"],monthNamesShort:[\"Far\",\"Ord\",\"Kho\",\"Tir\",\"Mor\",\"Sha\",\"Meh\",\"Aba\",\"Aza\",\"Day\",\"Bah\",\"Esf\"],dayNames:[\"Yekshambe\",\"Doshambe\",\"Seshambe\",\"Chæharshambe\",\"Panjshambe\",\"Jom'e\",\"Shambe\"],dayNamesShort:[\"Yek\",\"Do\",\"Se\",\"Chæ\",\"Panj\",\"Jom\",\"Sha\"],dayNamesMin:[\"Ye\",\"Do\",\"Se\",\"Ch\",\"Pa\",\"Jo\",\"Sh\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 682*((e.year()-(e.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=t-this.toJD(l,c,1)+1;return this.newDate(l,c,f)}}),n.calendars.persian=a,n.calendars.jalali=a},{\"../main\":347,\"object-assign\":247}],344:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\"Taiwan\",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Taiwan\",epochs:[\"BROC\",\"ROC\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{\"../main\":347,\"object-assign\":247}],345:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\"),a=n.instance();function o(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}o.prototype=new n.baseCalendar,i(o.prototype,{name:\"Thai\",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Thai\",epochs:[\"BBE\",\"BE\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},{\"../main\":347,\"object-assign\":247}],346:[function(t,e,r){var n=t(\"../main\"),i=t(\"object-assign\");function a(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}a.prototype=new n.baseCalendar,i(a.prototype,{name:\"UmmAlQura\",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Umm al-Qura\",epochs:[\"BH\",\"AH\"],monthNames:[\"Al-Muharram\",\"Safar\",\"Rabi' al-awwal\",\"Rabi' Al-Thani\",\"Jumada Al-Awwal\",\"Jumada Al-Thani\",\"Rajab\",\"Sha'aban\",\"Ramadan\",\"Shawwal\",\"Dhu al-Qi'dah\",\"Dhu al-Hijjah\"],monthNamesShort:[\"Muh\",\"Saf\",\"Rab1\",\"Rab2\",\"Jum1\",\"Jum2\",\"Raj\",\"Sha'\",\"Ram\",\"Shaw\",\"DhuQ\",\"DhuH\"],dayNames:[\"Yawm al-Ahad\",\"Yawm al-Ithnain\",\"Yawm al-Thalāthā’\",\"Yawm al-Arba‘ā’\",\"Yawm al-Khamīs\",\"Yawm al-Jum‘a\",\"Yawm al-Sabt\"],dayNamesMin:[\"Ah\",\"Ith\",\"Th\",\"Ar\",\"Kh\",\"Ju\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;a<o.length;a++){if(o[a]>r)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n<o.length&&!(o[n]>e);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\\{0\\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{\"../main\":347,\"object-assign\":247}],347:[function(t,e,r){var n=t(\"object-assign\");function i(){this.regionalOptions=[],this.regionalOptions[\"\"]={invalidCalendar:\"Calendar {0} not found\",invalidDate:\"Invalid {0} date\",invalidMonth:\"Invalid {0} month\",invalidYear:\"Invalid {0} year\",differentCalendars:\"Cannot mix {0} and {1} dates\"},this.local=this.regionalOptions[\"\"],this.calendars={},this._localCals={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[\"\"].invalidDate).replace(/\\{0\\}/,this._calendar.local.name)}function o(t,e){return\"000000\".substring(0,e-(t=\"\"+t).length)+t}function s(){this.shortYearCutoff=\"+10\"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[\"\"]}n(i.prototype,{instance:function(t,e){t=(t||\"gregorian\").toLowerCase(),e=e||\"\";var r=this._localCals[t+\"-\"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+\"-\"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[\"\"].invalidCalendar).replace(/\\{0\\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():\"string\"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+\"\").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n=\"\",i=0;r>0;){var a=r%10;n=(0===a?\"\":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,\"y\")},month:function(t){return 0===arguments.length?this._month:this.set(t,\"m\")},day:function(t){return 0===arguments.length?this._day:this.set(t,\"d\")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[\"\"].invalidDate).replace(/\\{0\\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this._calendar.local.name).replace(/\\{1\\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?\"-\":\"\")+o(Math.abs(this.year()),4)+\"-\"+o(this.month(),2)+\"-\"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[\"\"].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[\"\"].invalidYear);return(e.year()<0?\"-\":\"\")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[\"\"].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[\"\"].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[\"\"].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[\"\"].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,\"d\"===r||\"w\"===r){var n=t.toJD()+e*(\"w\"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+(\"y\"===r?e:0),o=t.monthOfYear()+(\"m\"===r?e:0),s=(i=t.day(),function(t){for(;o<t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o>e-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)});\"y\"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):\"m\"===r&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||\"y\"!==n&&\"m\"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,\"y\"],m:[1,this.monthsInYear(-1),\"m\"],w:[this.daysInWeek(),this.daysInYear(-1),\"d\"],d:[1,this.daysInYear(-1),\"d\"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate);var n=\"y\"===r?e:t.year(),i=\"m\"===r?e:t.month(),a=\"d\"===r?e:t.day();return\"y\"!==r&&\"m\"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate);return u.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(u.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(u.local.differentCalendars||u.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this.local.name).replace(/\\{1\\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(t,e,r))throw n.replace(/\\{0\\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l.prototype=new s,n(l.prototype,{name:\"Gregorian\",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Gregorian\",epochs:[\"BCE\",\"CE\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"mm/dd/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[\"\"].invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==0&&(t%100!=0||t%400==0)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[\"\"].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate);t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<3&&(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=1524+(r=e+1+r-Math.floor(r/4)),i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[\"\"].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=e.exports=new i;u.cdate=a,u.baseCalendar=s,u.calendars.gregorian=l},{\"object-assign\":247}],348:[function(t,e,r){var n=t(\"object-assign\"),i=t(\"./main\");n(i.regionalOptions[\"\"],{invalidArguments:\"Invalid arguments\",invalidFormat:\"Cannot format a date from another calendar\",missingNumberAt:\"Missing number at position {0}\",unknownNameAt:\"Unknown name at position {0}\",unexpectedLiteralAt:\"Unexpected literal at position {0}\",unexpectedText:\"Additional text found at end\"}),i.local=i.regionalOptions[\"\"],n(i.cdate.prototype,{formatDate:function(t,e){return\"string\"!=typeof t&&(e=t,t=\"\"),this._calendar.formatDate(t||\"\",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:\"yyyy-mm-dd\",COOKIE:\"D, dd M yyyy\",FULL:\"DD, MM d, yyyy\",ISO_8601:\"yyyy-mm-dd\",JULIAN:\"J\",RFC_822:\"D, d M yy\",RFC_850:\"DD, dd-M-yy\",RFC_1036:\"D, d M yy\",RFC_1123:\"D, d M yyyy\",RFC_2822:\"D, d M yyyy\",RSS:\"D, d M yy\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yyyy-mm-dd\",formatDate:function(t,e,r){if(\"string\"!=typeof t&&(r=e,e=t,t=\"\"),!e)return\"\";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[\"\"].invalidFormat;t=t||this.local.dateFormat;for(var n=(r=r||{}).dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.monthNumbers||this.local.monthNumbers,s=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,u=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;y+n<t.length&&t.charAt(y+n)===e;)n++;return y+=n-1,Math.floor(n/(r||1))>1}),c=function(t,e,r,n){var i=\"\"+e;if(u(t,n))for(;i.length<r;)i=\"0\"+i;return i},f=this,h=function(t){return\"function\"==typeof o?o.call(f,t,u(\"m\")):g(c(\"m\",t.month(),2))},p=function(t,e){return e?\"function\"==typeof l?l.call(f,t):l[t.month()-f.minMonth]:\"function\"==typeof s?s.call(f,t):s[t.month()-f.minMonth]},d=this.local.digits,g=function(t){return r.localNumbers&&d?d(t):t},v=\"\",m=!1,y=0;y<t.length;y++)if(m)\"'\"!==t.charAt(y)||u(\"'\")?v+=t.charAt(y):m=!1;else switch(t.charAt(y)){case\"d\":v+=g(c(\"d\",e.day(),2));break;case\"D\":v+=(x=\"D\",b=e.dayOfWeek(),_=n,w=a,u(x)?w[b]:_[b]);break;case\"o\":v+=c(\"o\",e.dayOfYear(),3);break;case\"w\":v+=c(\"w\",e.weekOfYear(),2);break;case\"m\":v+=h(e);break;case\"M\":v+=p(e,u(\"M\"));break;case\"y\":v+=u(\"y\",2)?e.year():(e.year()%100<10?\"0\":\"\")+e.year()%100;break;case\"Y\":u(\"Y\",2),v+=e.formatYear();break;case\"J\":v+=e.toJD();break;case\"@\":v+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case\"!\":v+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case\"'\":u(\"'\")?v+=\"'\":m=!0;break;default:v+=t.charAt(y)}var x,b,_,w;return v},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[\"\"].invalidArguments;if(\"\"===(e=\"object\"==typeof e?e.toString():e+\"\"))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n=\"string\"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,u=r.monthNamesShort||this.local.monthNamesShort,c=r.monthNames||this.local.monthNames,f=-1,h=-1,p=-1,d=-1,g=-1,v=!1,m=!1,y=function(e,r){for(var n=1;A+n<t.length&&t.charAt(A+n)===e;)n++;return A+=n-1,Math.floor(n/(r||1))>1},x=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20][\"oyYJ@!\".indexOf(t)+1],o=new RegExp(\"^-?\\\\d{1,\"+a+\"}\"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[\"\"].missingNumberAt).replace(/\\{0\\}/,M);return M+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if(\"function\"==typeof l){y(\"m\");var t=l.call(b,e.substring(M));return M+=t.length,t}return x(\"m\")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(M,o[s].length).toLowerCase()===o[s].toLowerCase())return M+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[\"\"].unknownNameAt).replace(/\\{0\\}/,M)},k=function(){if(\"function\"==typeof c){var t=y(\"M\")?c.call(b,e.substring(M)):u.call(b,e.substring(M));return M+=t.length,t}return w(\"M\",u,c)},T=function(){if(e.charAt(M)!==t.charAt(A))throw(i.local.unexpectedLiteralAt||i.regionalOptions[\"\"].unexpectedLiteralAt).replace(/\\{0\\}/,M);M++},M=0,A=0;A<t.length;A++)if(m)\"'\"!==t.charAt(A)||y(\"'\")?T():m=!1;else switch(t.charAt(A)){case\"d\":d=x(\"d\");break;case\"D\":w(\"D\",a,o);break;case\"o\":g=x(\"o\");break;case\"w\":x(\"w\");break;case\"m\":p=_();break;case\"M\":p=k();break;case\"y\":var S=A;v=!y(\"y\",2),A=S,h=x(\"y\",2);break;case\"Y\":h=x(\"Y\",2);break;case\"J\":f=x(\"J\")+.5,\".\"===e.charAt(M)&&(M++,x(\"J\"));break;case\"@\":f=x(\"@\")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case\"!\":f=x(\"!\")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case\"*\":M=e.length;break;case\"'\":y(\"'\")?T():m=!0;break;default:T()}if(M<e.length)throw i.local.unexpectedText||i.regionalOptions[\"\"].unexpectedText;if(-1===h?h=this.today().year():h<100&&v&&(h+=-1===n?1900:this.today().year()-this.today().year()%100-(h<=n?0:100)),\"string\"==typeof p&&(p=s.call(this,h,p)),g>-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}return f>-1?this.fromJD(f):this.newDate(h,p,d)},determineDate:function(t,e,r,n,i){r&&\"object\"!=typeof r&&(i=n,n=r,r=null),\"string\"!=typeof n&&(i=n,n=\"\");var a=this;return e=e?e.newDate():null,null==t?e:\"string\"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||\"d\"),s=o.exec(t);return e}(t):\"number\"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,\"d\"):a.newDate(t)}})},{\"./main\":347,\"object-assign\":247}],349:[function(t,e,r){\"use strict\";e.exports=[{path:\"\",backoff:0},{path:\"M-2.4,-3V3L0.6,0Z\",backoff:.6},{path:\"M-3.7,-2.5V2.5L1.3,0Z\",backoff:1.3},{path:\"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z\",backoff:1.55},{path:\"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z\",backoff:1.6},{path:\"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z\",backoff:2},{path:\"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z\",backoff:0,noRotate:!0},{path:\"M2,2V-2H-2V2Z\",backoff:0,noRotate:!0}]},{}],350:[function(t,e,r){\"use strict\";var n=t(\"./arrow_paths\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../plots/cartesian/constants\"),o=t(\"../../plot_api/plot_template\").templatedArray;t(\"../../constants/axis_placeable_objects\"),e.exports=o(\"annotation\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc+arraydraw\"},text:{valType:\"string\",editType:\"calc+arraydraw\"},textangle:{valType:\"angle\",dflt:0,editType:\"calc+arraydraw\"},font:i({editType:\"calc+arraydraw\",colorEditType:\"arraydraw\"}),width:{valType:\"number\",min:1,dflt:null,editType:\"calc+arraydraw\"},height:{valType:\"number\",min:1,dflt:null,editType:\"calc+arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"center\",editType:\"arraydraw\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"arraydraw\"},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},borderpad:{valType:\"number\",min:0,dflt:1,editType:\"calc+arraydraw\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc+arraydraw\"},showarrow:{valType:\"boolean\",dflt:!0,editType:\"calc+arraydraw\"},arrowcolor:{valType:\"color\",editType:\"arraydraw\"},arrowhead:{valType:\"integer\",min:0,max:n.length,dflt:1,editType:\"arraydraw\"},startarrowhead:{valType:\"integer\",min:0,max:n.length,dflt:1,editType:\"arraydraw\"},arrowside:{valType:\"flaglist\",flags:[\"end\",\"start\"],extras:[\"none\"],dflt:\"end\",editType:\"arraydraw\"},arrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calc+arraydraw\"},startarrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calc+arraydraw\"},arrowwidth:{valType:\"number\",min:.1,editType:\"calc+arraydraw\"},standoff:{valType:\"number\",min:0,dflt:0,editType:\"calc+arraydraw\"},startstandoff:{valType:\"number\",min:0,dflt:0,editType:\"calc+arraydraw\"},ax:{valType:\"any\",editType:\"calc+arraydraw\"},ay:{valType:\"any\",editType:\"calc+arraydraw\"},axref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",a.idRegex.x.toString()],editType:\"calc\"},ayref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",a.idRegex.y.toString()],editType:\"calc\"},xref:{valType:\"enumerated\",values:[\"paper\",a.idRegex.x.toString()],editType:\"calc\"},x:{valType:\"any\",editType:\"calc+arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\",editType:\"calc+arraydraw\"},xshift:{valType:\"number\",dflt:0,editType:\"calc+arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",a.idRegex.y.toString()],editType:\"calc\"},y:{valType:\"any\",editType:\"calc+arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"auto\",editType:\"calc+arraydraw\"},yshift:{valType:\"number\",dflt:0,editType:\"calc+arraydraw\"},clicktoshow:{valType:\"enumerated\",values:[!1,\"onoff\",\"onout\"],dflt:!1,editType:\"arraydraw\"},xclick:{valType:\"any\",editType:\"arraydraw\"},yclick:{valType:\"any\",editType:\"arraydraw\"},hovertext:{valType:\"string\",editType:\"arraydraw\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",editType:\"arraydraw\"},font:i({editType:\"arraydraw\"}),editType:\"arraydraw\"},captureevents:{valType:\"boolean\",editType:\"arraydraw\"},editType:\"calc\",_deprecated:{ref:{valType:\"string\",editType:\"calc\"}}})},{\"../../constants/axis_placeable_objects\":484,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/constants\":573,\"../../plots/font_attributes\":594,\"./arrow_paths\":349}],351:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"./draw\").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},\"range\"===a&&s(e,r),\"range\"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t[\"a\"+a],l=t[a+\"ref\"],u=t[\"a\"+a+\"ref\"],c=t[\"_\"+a+\"padplus\"],f=t[\"_\"+a+\"padminus\"],h={x:1,y:-1}[a]*t[a+\"shift\"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,g=p-h,v=3*t.startarrowsize*t.arrowwidth||0,m=v+h,y=v-h;if(u===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(c,m),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(c,d,m),ppadminus:Math.max(f,g,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"./draw\":356}],352:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"../../plot_api/plot_template\").arrayEditor;function o(t,e){var r,n,i,a,o,l,u,c=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r<c.length;r++)if(a=(i=c[r]).clicktoshow){for(n=0;n<d;n++)if(l=(o=e[n]).xaxis,u=o.yaxis,l._id===i.xref&&u._id===i.yref&&l.d2r(o.x)===s(i._xclick,l)&&u.d2r(o.y)===s(i._yclick,u)){(i.visible?\"onout\"===a?h:p:f).push(r);break}n===d&&i.visible&&\"onout\"===a&&h.push(r)}return{on:f,off:h,explicitOff:p}}function s(t,e){return\"log\"===e.type?e.l2r(t):e.d2r(t)}e.exports={hasClickToShow:function(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),u=l.on,c=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(u.length||c.length){for(r=0;r<u.length;r++)(s=a(t.layout,\"annotations\",h[u[r]])).modifyItem(\"visible\",!0),n.extendFlat(f,s.getUpdateObj());for(r=0;r<c.length;r++)(s=a(t.layout,\"annotations\",h[c[r]])).modifyItem(\"visible\",!1),n.extendFlat(f,s.getUpdateObj());return i.call(\"update\",t,{},f)}}}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../registry\":647}],353:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\");e.exports=function(t,e,r,a){a(\"opacity\");var o=a(\"bgcolor\"),s=a(\"bordercolor\"),l=i.opacity(s);a(\"borderpad\");var u=a(\"borderwidth\"),c=a(\"showarrow\");if(a(\"text\",c?\" \":r._dfltTitle.annotation),a(\"textangle\"),n.coerceFont(a,\"font\",r.font),a(\"width\"),a(\"align\"),a(\"height\")&&a(\"valign\"),c){var f,h,p=a(\"arrowside\");-1!==p.indexOf(\"end\")&&(f=a(\"arrowhead\"),h=a(\"arrowsize\")),-1!==p.indexOf(\"start\")&&(a(\"startarrowhead\",f),a(\"startarrowsize\",h)),a(\"arrowcolor\",l?e.bordercolor:i.defaultLine),a(\"arrowwidth\",2*(l&&u||1)),a(\"standoff\"),a(\"startstandoff\")}var d=a(\"hovertext\"),g=r.hoverlabel||{};if(d){var v=a(\"hoverlabel.bgcolor\",g.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),m=a(\"hoverlabel.bordercolor\",g.bordercolor||i.contrast(v));n.coerceFont(a,\"hoverlabel.font\",{family:g.font.family,size:g.font.size,color:g.font.color||m})}a(\"captureevents\",!!d)}},{\"../../lib\":515,\"../color\":367}],354:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib/to_log_range\");e.exports=function(t,e,r,a){e=e||{};var o=\"log\"===r&&\"linear\"===e.type,s=\"linear\"===r&&\"log\"===e.type;if(o||s)for(var l,u,c=t._fullLayout.annotations,f=e._id.charAt(0),h=0;h<c.length;h++)l=c[h],u=\"annotations[\"+h+\"].\",l[f+\"ref\"]===e._id&&p(f),l[\"a\"+f+\"ref\"]===e._id&&p(\"a\"+f);function p(t){var r=l[t],s=null;s=o?i(r,e.range):Math.pow(10,r),n(s)||(s=null),a(u+t,s)}}},{\"../../lib/to_log_range\":543,\"fast-isnumeric\":190}],355:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./common_defaults\"),s=t(\"./attributes\");function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a(\"visible\"),u=a(\"clicktoshow\");if(l||u){o(t,e,r,a);for(var c=e.showarrow,f=[\"x\",\"y\"],h=[-10,-30],p={_fullLayout:r},d=0;d<2;d++){var g=f[d],v=i.coerceRef(t,e,p,g,\"\",\"paper\");if(\"paper\"!==v&&i.getFromId(p,v)._annIndices.push(e._index),i.coercePosition(e,p,a,v,g,.5),c){var m=\"a\"+g,y=i.coerceRef(t,e,p,m,\"pixel\",[\"pixel\",\"paper\"]);\"pixel\"!==y&&y!==v&&(y=e[m]=\"pixel\");var x=\"pixel\"===y?h[d]:.4;i.coercePosition(e,p,a,y,m,x)}a(g+\"anchor\"),a(g+\"shift\")}if(n.noneOrAll(t,e,[\"x\",\"y\"]),c&&n.noneOrAll(t,e,[\"ax\",\"ay\"]),u){var b=a(\"xclick\"),_=a(\"yclick\");e._xclick=void 0===b?e.x:i.cleanPosition(b,p,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,p,e.yref)}}}e.exports=function(t,e){a(t,e,{name:\"annotations\",handleItemDefaults:l})}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../../plots/cartesian/axes\":566,\"./attributes\":350,\"./common_defaults\":353}],356:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../plots/plots\"),o=t(\"../../lib\"),s=o.strTranslate,l=t(\"../../plots/cartesian/axes\"),u=t(\"../color\"),c=t(\"../drawing\"),f=t(\"../fx\"),h=t(\"../../lib/svg_text_utils\"),p=t(\"../../lib/setcursor\"),d=t(\"../dragelement\"),g=t(\"../../plot_api/plot_template\").arrayEditor,v=t(\"./draw_arrow_head\");function m(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),x(t,r,e,!1,n,i)}function y(t,e,r,n,i){var a=i[r],o=i[r+\"ref\"],s=-1!==r.indexOf(\"y\"),u=\"domain\"===l.getRefType(o),c=s?n.h:n.w;return t?u?a+(s?-e:e)/t._length:t.p2r(t.r2p(a)+e):a+(s?-e:e)/c}function x(t,e,r,a,m,x){var b,_,w=t._fullLayout,k=t._fullLayout._size,T=t._context.edits;a?(b=\"annotation-\"+a,_=a+\".annotations\"):(b=\"annotation\",_=\"annotations\");var M=g(t.layout,_,e),A=M.modifyBase,S=M.modifyItem,E=M.getUpdateObj;w._infolayer.selectAll(\".\"+b+'[data-index=\"'+r+'\"]').remove();var C=\"clip\"+w._uid+\"_ann\"+r;if(e._input&&!1!==e.visible){var L={x:{},y:{}},P=+e.textangle||0,O=w._infolayer.append(\"g\").classed(b,!0).attr(\"data-index\",String(r)).style(\"opacity\",e.opacity),I=O.append(\"g\").classed(\"annotation-text-g\",!0),D=T[e.showarrow?\"annotationTail\":\"annotationPosition\"],z=e.captureevents||T.annotationText||D,R=I.append(\"g\").style(\"pointer-events\",z?\"all\":null).call(p,\"pointer\").on(\"click\",(function(){t._dragging=!1,t.emit(\"plotly_clickannotation\",Y(n.event))}));e.hovertext&&R.on(\"mouseover\",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();f.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:t})})).on(\"mouseout\",(function(){f.loneUnhover(w._hoverlayer.node())}));var F=e.borderwidth,N=e.borderpad,B=F+N,j=R.append(\"rect\").attr(\"class\",\"bg\").style(\"stroke-width\",F+\"px\").call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor),U=e.width||e.height,V=w._topclips.selectAll(\"#\"+C).data(U?[0]:[]);V.enter().append(\"clipPath\").classed(\"annclip\",!0).attr(\"id\",C).append(\"rect\"),V.exit().remove();var H=e.font,q=w._meta?o.templateString(e.text,w._meta):e.text,G=R.append(\"text\").classed(\"annotation-text\",!0).text(q);T.annotationText?G.call(h.makeEditable,{delegate:R,gd:t}).call(W).on(\"edit\",(function(r){e.text=r,this.call(W),S(\"text\",r),m&&m.autorange&&A(m._name+\".autorange\",!0),x&&x.autorange&&A(x._name+\".autorange\",!0),i.call(\"_guiRelayout\",t,E())})):G.call(W)}else n.selectAll(\"#\"+C).remove();function Y(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return a&&(n.subplotId=a),n}function W(r){return r.call(c.font,H).attr({\"text-anchor\":{left:\"start\",right:\"end\"}[e.align]||\"middle\"}),h.convertToTspans(r,t,X),r}function X(){var r=G.selectAll(\"a\");1===r.size()&&r.text()===G.text()&&R.insert(\"a\",\":first-child\").attr({\"xlink:xlink:href\":r.attr(\"xlink:href\"),\"xlink:xlink:show\":r.attr(\"xlink:show\")}).style({cursor:\"pointer\"}).node().appendChild(j.node());var n=R.select(\".annotation-text-math-group\"),f=!n.empty(),g=c.bBox((f?n:G).node()),b=g.width,_=g.height,M=e.width||b,z=e.height||_,N=Math.round(M+2*B),H=Math.round(z+2*B);function q(t,e){return\"auto\"===e&&(e=t<1/3?\"left\":t>2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=[\"x\",\"y\"],Z=0;Z<X.length;Z++){var K,J,$,Q,tt,et=X[Z],rt=e[et+\"ref\"]||et,nt=e[\"a\"+et+\"ref\"],it={x:m,y:x}[et],at=(P+(\"x\"===et?0:-90))*Math.PI/180,ot=N*Math.cos(at),st=H*Math.sin(at),lt=Math.abs(ot)+Math.abs(st),ut=e[et+\"anchor\"],ct=e[et+\"shift\"]*(\"x\"===et?1:-1),ft=L[et],ht=l.getRefType(rt);if(it&&\"domain\"!==ht){var pt=it.r2fraction(e[et]);(pt<0||pt>1)&&(nt===rt?((pt=it.r2fraction(e[\"a\"+et]))<0||pt>1)&&(W=!0):W=!0),K=it._offset+it.r2p(e[et]),Q=.5}else{var dt=\"domain\"===ht;\"x\"===et?($=e[et],K=dt?it._offset+it._length*$:K=k.l+k.w*$):($=1-e[et],K=dt?it._offset+it._length*$:K=k.t+k.h*$),Q=e.showarrow?.5:$}if(e.showarrow){ft.head=K;var gt=e[\"a\"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var vt=l.getRefType(nt);\"domain\"===vt?(\"y\"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):\"paper\"===vt?\"y\"===et?(gt=1-gt,ft.tail=k.t+k.h*gt):ft.tail=k.l+k.w*gt:ft.tail=it._offset+it.r2p(gt),J=tt}else ft.tail=K+gt,J=tt+gt;ft.text=ft.tail+tt;var mt=w[\"x\"===et?\"width\":\"height\"];if(\"paper\"===rt&&(ft.head=o.constrain(ft.head,1,mt-1)),\"pixel\"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-mt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ct,ft.head+=ct}else J=tt=lt*q(Q,ut),ft.text=K+tt;ft.text+=ct,tt+=ct,J+=ct,e[\"_\"+et+\"padplus\"]=lt/2+J,e[\"_\"+et+\"padminus\"]=lt/2-J,e[\"_\"+et+\"size\"]=lt,e[\"_\"+et+\"shift\"]=tt}if(W)R.remove();else{var bt=0,_t=0;if(\"left\"!==e.align&&(bt=(M-b)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(_t=(z-_)*(\"middle\"===e.valign?.5:1)),f)n.select(\"svg\").attr({x:B+bt-1,y:B+_t}).call(c.setClipUrl,U?C:null,t);else{var wt=B+_t-g.top,kt=B+bt-g.left;G.call(h.positionText,kt,wt).call(c.setClipUrl,U?C:null,t)}V.select(\"rect\").call(c.setRect,B,B,M,z),j.call(c.setRect,F/2,F/2,N-F,H-F),R.call(c.setTranslate,Math.round(L.x.text-N/2),Math.round(L.y.text-H/2)),I.attr({transform:\"rotate(\"+P+\",\"+L.x.text+\",\"+L.y.text+\")\"});var Tt,Mt=function(r,n){O.selectAll(\".annotation-arrow-g\").remove();var l=L.x.head,f=L.y.head,h=L.x.tail+r,p=L.y.tail+n,g=L.x.text+r,b=L.y.text+n,_=o.rotationXYMatrix(P,g,b),w=o.apply2DTransform(_),M=o.apply2DTransform2(_),C=+j.attr(\"width\"),D=+j.attr(\"height\"),z=g-.5*C,F=z+C,N=b-.5*D,B=N+D,U=[[z,N,z,B],[z,B,F,B],[F,B,F,N],[F,N,z,N]].map(M);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=O.append(\"g\").style({opacity:u.opacity(H)}).classed(\"annotation-arrow-g\",!0),Y=G.append(\"path\").attr(\"d\",\"M\"+h+\",\"+p+\"L\"+l+\",\"+f).style(\"stroke-width\",V+\"px\").call(u.stroke,u.rgb(H));if(v(Y,q,e),T.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var K,J,$=G.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(h-W)+\",\"+(p-X),transform:s(W,X)}).style(\"stroke-width\",V+6+\"px\").call(u.stroke,\"rgba(0,0,0,0)\").call(u.fill,\"rgba(0,0,0,0)\");d.init({element:$.node(),gd:t,prepFn:function(){var t=c.getTranslate(R);K=t.x,J=t.y,m&&m.autorange&&A(m._name+\".autorange\",!0),x&&x.autorange&&A(x._name+\".autorange\",!0)},moveFn:function(t,r){var n=w(K,J),i=n[0]+t,a=n[1]+r;R.call(c.setTranslate,i,a),S(\"x\",y(m,t,\"x\",k,e)),S(\"y\",y(x,r,\"y\",k,e)),e.axref===e.xref&&S(\"ax\",y(m,t,\"ax\",k,e)),e.ayref===e.yref&&S(\"ay\",y(x,r,\"ay\",k,e)),G.attr(\"transform\",s(t,r)),I.attr({transform:\"rotate(\"+P+\",\"+i+\",\"+a+\")\"})},doneFn:function(){i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Mt(0,0),D&&d.init({element:R.node(),gd:t,prepFn:function(){Tt=I.attr(\"transform\")},moveFn:function(t,r){var n=\"pointer\";if(e.showarrow)e.axref===e.xref?S(\"ax\",y(m,t,\"ax\",k,e)):S(\"ax\",e.ax+t),e.ayref===e.yref?S(\"ay\",y(x,r,\"ay\",k.w,e)):S(\"ay\",e.ay+r),Mt(t,r);else{if(a)return;var i,o;if(m)i=y(m,t,\"x\",k,e);else{var l=e._xsize/k.w,u=e.x+(e._xshift-e.xshift)/k.w-l/2;i=d.align(u+t/k.w,l,0,1,e.xanchor)}if(x)o=y(x,r,\"y\",k,e);else{var c=e._ysize/k.h,f=e.y-(e._yshift+e.yshift)/k.h-c/2;o=d.align(f-r/k.h,c,0,1,e.yanchor)}S(\"x\",i),S(\"y\",o),m&&x||(n=d.getCursor(m?.5:i,x?.5:o,e.xanchor,e.yanchor))}I.attr({transform:s(t,r)+Tt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit(\"plotly_clickannotation\",Y(n))},doneFn:function(){p(R),i.call(\"_guiRelayout\",t,E());var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&m(t,r);return a.previousPromises(t)},drawOne:m,drawRaw:x}},{\"../../lib\":515,\"../../lib/setcursor\":536,\"../../lib/svg_text_utils\":541,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/axes\":566,\"../../plots/plots\":628,\"../../registry\":647,\"../color\":367,\"../dragelement\":386,\"../drawing\":389,\"../fx\":407,\"./draw_arrow_head\":357,\"@plotly/d3\":58}],357:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../color\"),a=t(\"./arrow_paths\"),o=t(\"../../lib\"),s=o.strScale,l=o.strRotate,u=o.strTranslate;e.exports=function(t,e,r){var o,c,f,h,p=t.node(),d=a[r.arrowhead||0],g=a[r.startarrowhead||0],v=(r.arrowwidth||1)*(r.arrowsize||1),m=(r.arrowwidth||1)*(r.startarrowsize||1),y=e.indexOf(\"start\")>=0,x=e.indexOf(\"end\")>=0,b=d.backoff*v+r.standoff,_=g.backoff*m+r.startstandoff;if(\"line\"===p.nodeName){o={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},c={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var w=o.x-c.x,k=o.y-c.y;if(h=(f=Math.atan2(k,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+k*k))return void D();if(b){if(b*b>w*w+k*k)return void D();var T=b*Math.cos(f),M=b*Math.sin(f);c.x+=T,c.y+=M,t.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+k*k)return void D();var A=_*Math.cos(f),S=_*Math.sin(f);o.x-=A,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if(\"path\"===p.nodeName){var E=p.getTotalLength(),C=\"\";if(E<b+_)return void D();var L=p.getPointAtLength(0),P=p.getPointAtLength(.1);f=Math.atan2(L.y-P.y,L.x-P.x),o=p.getPointAtLength(Math.min(_,E)),C=\"0px,\"+_+\"px,\";var O=p.getPointAtLength(E),I=p.getPointAtLength(E-.1);h=Math.atan2(O.y-I.y,O.x-I.x),c=p.getPointAtLength(Math.max(0,E-b)),C+=E-(C?_+b:b)+\"px,\"+E+\"px\",t.style(\"stroke-dasharray\",C)}function D(){t.style(\"stroke-dasharray\",\"0px,100px\")}function z(e,a,o,c){e.path&&(e.noRotate&&(o=0),n.select(p.parentNode).append(\"path\").attr({class:t.attr(\"class\"),d:e.path,transform:u(a.x,a.y)+l(180*o/Math.PI)+s(c)}).style({fill:i.rgb(r.arrowcolor),\"stroke-width\":0}))}y&&z(g,o,f,m),x&&z(d,c,h,v)}},{\"../../lib\":515,\"../color\":367,\"./arrow_paths\":349,\"@plotly/d3\":58}],358:[function(t,e,r){\"use strict\";var n=t(\"./draw\"),i=t(\"./click\");e.exports={moduleType:\"component\",name:\"annotations\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"annotations\"),calcAutorange:t(\"./calc_autorange\"),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:t(\"./convert_coords\")}},{\"../../plots/cartesian/include_components\":577,\"./attributes\":350,\"./calc_autorange\":351,\"./click\":352,\"./convert_coords\":354,\"./defaults\":355,\"./draw\":356}],359:[function(t,e,r){\"use strict\";var n=t(\"../annotations/attributes\"),i=t(\"../../plot_api/edit_types\").overrideAll,a=t(\"../../plot_api/plot_template\").templatedArray;e.exports=i(a(\"annotation\",{visible:n.visible,x:{valType:\"any\"},y:{valType:\"any\"},z:{valType:\"any\"},ax:{valType:\"number\"},ay:{valType:\"number\"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),\"calc\",\"from-root\")},{\"../../plot_api/edit_types\":548,\"../../plot_api/plot_template\":555,\"../annotations/attributes\":350}],360:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\");function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:\"linear\",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}e.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(\".annotation-\"+t.id).remove()}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566}],361:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"../annotations/common_defaults\"),s=t(\"./attributes\");function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function u(t){var n=t+\"axis\",a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l(\"visible\")&&(o(t,e,a.fullLayout,l),u(\"x\"),u(\"y\"),u(\"z\"),n.noneOrAll(t,e,[\"x\",\"y\",\"z\"]),e.xref=\"x\",e.yref=\"y\",e.zref=\"z\",l(\"xanchor\"),l(\"yanchor\"),l(\"xshift\"),l(\"yshift\"),e.showarrow&&(e.axref=\"pixel\",e.ayref=\"pixel\",l(\"ax\",-10),l(\"ay\",-30),n.noneOrAll(t,e,[\"ax\",\"ay\"])))}e.exports=function(t,e,r){a(t,e,{name:\"annotations\",handleItemDefaults:l,fullLayout:r.fullLayout})}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../../plots/cartesian/axes\":566,\"../annotations/common_defaults\":353,\"./attributes\":359}],362:[function(t,e,r){\"use strict\";var n=t(\"../annotations/draw\").drawRaw,i=t(\"../../plots/gl3d/project\"),a=[\"x\",\"y\",\"z\"];e.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],u=!1,c=0;c<3;c++){var f=a[c],h=l[f],p=e[f+\"axis\"].r2fraction(h);if(p<0||p>1){u=!0;break}}u?t.fullLayout._infolayer.select(\".annotation-\"+t.id+'[data-index=\"'+s+'\"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{\"../../plots/gl3d/project\":616,\"../annotations/draw\":356}],363:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports={moduleType:\"component\",name:\"annotations3d\",schema:{subplots:{scene:{annotations:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:t(\"./convert\"),draw:t(\"./draw\")}},{\"../../lib\":515,\"../../registry\":647,\"./attributes\":359,\"./convert\":360,\"./defaults\":361,\"./draw\":362}],364:[function(t,e,r){\"use strict\";e.exports=t(\"world-calendars/dist/main\"),t(\"world-calendars/dist/plus\"),t(\"world-calendars/dist/calendars/chinese\"),t(\"world-calendars/dist/calendars/coptic\"),t(\"world-calendars/dist/calendars/discworld\"),t(\"world-calendars/dist/calendars/ethiopian\"),t(\"world-calendars/dist/calendars/hebrew\"),t(\"world-calendars/dist/calendars/islamic\"),t(\"world-calendars/dist/calendars/julian\"),t(\"world-calendars/dist/calendars/mayan\"),t(\"world-calendars/dist/calendars/nanakshahi\"),t(\"world-calendars/dist/calendars/nepali\"),t(\"world-calendars/dist/calendars/persian\"),t(\"world-calendars/dist/calendars/taiwan\"),t(\"world-calendars/dist/calendars/thai\"),t(\"world-calendars/dist/calendars/ummalqura\")},{\"world-calendars/dist/calendars/chinese\":333,\"world-calendars/dist/calendars/coptic\":334,\"world-calendars/dist/calendars/discworld\":335,\"world-calendars/dist/calendars/ethiopian\":336,\"world-calendars/dist/calendars/hebrew\":337,\"world-calendars/dist/calendars/islamic\":338,\"world-calendars/dist/calendars/julian\":339,\"world-calendars/dist/calendars/mayan\":340,\"world-calendars/dist/calendars/nanakshahi\":341,\"world-calendars/dist/calendars/nepali\":342,\"world-calendars/dist/calendars/persian\":343,\"world-calendars/dist/calendars/taiwan\":344,\"world-calendars/dist/calendars/thai\":345,\"world-calendars/dist/calendars/ummalqura\":346,\"world-calendars/dist/main\":347,\"world-calendars/dist/plus\":348}],365:[function(t,e,r){\"use strict\";var n=t(\"./calendars\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\"),o=a.EPOCHJD,s=a.ONEDAY,l={valType:\"enumerated\",values:i.sortObjectKeys(n.calendars),editType:\"calc\",dflt:\"gregorian\"},u=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},c=\"##\",f={d:{0:\"dd\",\"-\":\"d\"},e:{0:\"d\",\"-\":\"d\"},a:{0:\"D\",\"-\":\"D\"},A:{0:\"DD\",\"-\":\"DD\"},j:{0:\"oo\",\"-\":\"o\"},W:{0:\"ww\",\"-\":\"w\"},m:{0:\"mm\",\"-\":\"m\"},b:{0:\"M\",\"-\":\"M\"},B:{0:\"MM\",\"-\":\"MM\"},y:{0:\"yy\",\"-\":\"yy\"},Y:{0:\"yyyy\",\"-\":\"yyyy\"},U:c,w:c,c:{0:\"D M d %X yyyy\",\"-\":\"D M d %X yyyy\"},x:{0:\"mm/dd/yyyy\",\"-\":\"mm/dd/yyyy\"}},h={};function p(t){var e=h[t];return e||(h[t]=n.instance(t))}function d(t){return i.extendFlat({},l,{description:t})}function g(t){return\"Sets the calendar system to use with `\"+t+\"` date data.\"}var v={xcalendar:d(g(\"x\"))},m=i.extendFlat({},v,{ycalendar:d(g(\"y\"))}),y=i.extendFlat({},m,{zcalendar:d(g(\"z\"))}),x=d([\"Sets the calendar system to use for `range` and `tick0`\",\"if this is a date axis. This does not set the calendar for\",\"interpreting data on this axis, that's specified in the trace\",\"or via the global `layout.calendar`\"].join(\" \"));e.exports={moduleType:\"component\",name:\"calendars\",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:y,surface:y,mesh3d:y,scattergl:m,ohlc:v,candlestick:v},layout:{calendar:d([\"Sets the default calendar system to use for interpreting and\",\"displaying dates throughout the plot.\"].join(\" \"))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:d([\"WARNING: All transforms are deprecated and may be removed from the API in next major version.\",\"Sets the calendar system to use for `value`, if it is a date.\"].join(\" \")),targetcalendar:d([\"WARNING: All transforms are deprecated and may be removed from the API in next major version.\",\"Sets the calendar system to use for `target`, if it is an\",\"array of dates. If `target` is a string (eg *x*) we use the\",\"corresponding trace attribute (eg `xcalendar`) if it exists,\",\"even if `targetcalendar` is provided.\"].join(\" \"))}}},layoutAttributes:l,handleDefaults:u,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)u(t,e,r[i]+\"calendar\",n.calendar)},CANONICAL_SUNDAY:{chinese:\"2000-01-02\",coptic:\"2000-01-03\",discworld:\"2000-01-03\",ethiopian:\"2000-01-05\",hebrew:\"5000-01-01\",islamic:\"1000-01-02\",julian:\"2000-01-03\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-05\",nepali:\"2000-01-05\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-04\",thai:\"2000-01-04\",ummalqura:\"1400-01-06\"},CANONICAL_TICK:{chinese:\"2000-01-01\",coptic:\"2000-01-01\",discworld:\"2000-01-01\",ethiopian:\"2000-01-01\",hebrew:\"5000-01-01\",islamic:\"1000-01-01\",julian:\"2000-01-01\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-01\",nepali:\"2000-01-01\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-01\",thai:\"2000-01-01\",ummalqura:\"1400-01-01\"},DFLTRANGE:{chinese:[\"2000-01-01\",\"2001-01-01\"],coptic:[\"1700-01-01\",\"1701-01-01\"],discworld:[\"1800-01-01\",\"1801-01-01\"],ethiopian:[\"2000-01-01\",\"2001-01-01\"],hebrew:[\"5700-01-01\",\"5701-01-01\"],islamic:[\"1400-01-01\",\"1401-01-01\"],julian:[\"2000-01-01\",\"2001-01-01\"],mayan:[\"5200-01-01\",\"5201-01-01\"],nanakshahi:[\"0500-01-01\",\"0501-01-01\"],nepali:[\"2000-01-01\",\"2001-01-01\"],persian:[\"1400-01-01\",\"1401-01-01\"],jalali:[\"1400-01-01\",\"1401-01-01\"],taiwan:[\"0100-01-01\",\"0101-01-01\"],thai:[\"2500-01-01\",\"2501-01-01\"],ummalqura:[\"1400-01-01\",\"1401-01-01\"]},getCal:p,worldCalFmt:function(t,e,r){for(var n,i,a,l,u,h=Math.floor((e+.05)/s)+o,d=p(r).fromJD(h),g=0;-1!==(g=t.indexOf(\"%\",g));)\"0\"===(n=t.charAt(g+1))||\"-\"===n||\"_\"===n?(a=3,i=t.charAt(g+2),\"_\"===n&&(n=\"-\")):(i=n,n=\"0\",a=2),(l=f[i])?(u=l===c?c:d.formatDate(l[n]),t=t.substr(0,g)+u+t.substr(g+a),g+=u.length):g+=a;return t}}},{\"../../constants/numerical\":491,\"../../lib\":515,\"./calendars\":364}],366:[function(t,e,r){\"use strict\";r.defaults=[\"#1f77b4\",\"#ff7f0e\",\"#2ca02c\",\"#d62728\",\"#9467bd\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\",\"#17becf\"],r.defaultLine=\"#444\",r.lightLine=\"#eee\",r.background=\"#fff\",r.borderLine=\"#BEC8D9\",r.lightFraction=1e3/11},{}],367:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib/array\").isTypedArray,o=e.exports={},s=t(\"./attributes\");o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;function c(t){if(i(t)||\"string\"!=typeof t)return t;var e=t.trim();if(\"rgb\"!==e.substr(0,3))return t;var r=e.match(/^rgba?\\s*\\(([^()]*)\\)$/);if(!r)return t;var n=r[1].trim().split(/\\s*[\\s,]\\s*/),a=\"a\"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+\", \"+Math.round(255*n[1])+\", \"+Math.round(255*n[2]);return a?\"rgba(\"+s+\", \"+n[3]+\")\":\"rgb(\"+s+\")\"}o.tinyRGB=function(t){var e=t.toRgb();return\"rgb(\"+Math.round(e.r)+\", \"+Math.round(e.g)+\", \"+Math.round(e.b)+\")\"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+e+\")\"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,u))),(i.isDark()?e?i.lighten(e):u:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),\"fill-opacity\":r.getAlpha()})},o.clean=function(t){if(t&&\"object\"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e<s.length;e++)if(i=t[n=s[e]],\"color\"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if(\"colorscale\"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&\"object\"==typeof l)for(r=0;r<i.length;r++)o.clean(i[r])}else i&&\"object\"==typeof i&&!a(i)&&o.clean(i)}}},{\"../../lib/array\":497,\"./attributes\":366,\"fast-isnumeric\":190,tinycolor2:313}],368:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/layout_attributes\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"../../plot_api/edit_types\").overrideAll;e.exports=o({orientation:{valType:\"enumerated\",values:[\"h\",\"v\"],dflt:\"v\"},thicknessmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\"},thickness:{valType:\"number\",min:0,dflt:30},lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\",min:-2,max:3},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"]},xpad:{valType:\"number\",min:0,dflt:10},y:{valType:\"number\",min:-2,max:3},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"]},ypad:{valType:\"number\",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:\"number\",min:0,dflt:0},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\"},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:\"\"}),ticklabeloverflow:a({},n.ticklabeloverflow,{}),ticklabelposition:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside left\",\"inside left\",\"outside right\",\"inside right\",\"outside bottom\",\"inside bottom\"],dflt:\"outside\"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:\"string\"},font:i({}),side:{valType:\"enumerated\",values:[\"right\",\"top\",\"bottom\"]}},_deprecated:{title:{valType:\"string\"},titlefont:i({}),titleside:{valType:\"enumerated\",values:[\"right\",\"top\",\"bottom\"],dflt:\"top\"}}},\"colorbars\",\"from-root\")},{\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/cartesian/layout_attributes\":579,\"../../plots/font_attributes\":594}],369:[function(t,e,r){\"use strict\";e.exports={cn:{colorbar:\"colorbar\",cbbg:\"cbbg\",cbfill:\"cbfill\",cbfills:\"cbfills\",cbline:\"cbline\",cblines:\"cblines\",cbaxis:\"cbaxis\",cbtitleunshift:\"cbtitleunshift\",cbtitle:\"cbtitle\",cboutline:\"cboutline\",crisp:\"crisp\",jsPlaceholder:\"js-placeholder\"}}},{}],370:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plot_api/plot_template\"),a=t(\"../../plots/cartesian/tick_value_defaults\"),o=t(\"../../plots/cartesian/tick_mark_defaults\"),s=t(\"../../plots/cartesian/tick_label_defaults\"),l=t(\"../../plots/cartesian/prefix_suffix_defaults\"),u=t(\"./attributes\");e.exports=function(t,e,r){var c=i.newContainer(e,\"colorbar\"),f=t.colorbar||{};function h(t,e){return n.coerce(f,c,u,t,e)}var p=r.margin||{t:0,b:0,l:0,r:0},d=r.width-p.l-p.r,g=r.height-p.t-p.b,v=\"v\"===h(\"orientation\"),m=h(\"thicknessmode\");h(\"thickness\",\"fraction\"===m?30/(v?d:g):30);var y=h(\"lenmode\");h(\"len\",\"fraction\"===y?1:v?g:d),h(\"x\",v?1.02:.5),h(\"xanchor\",v?\"left\":\"center\"),h(\"xpad\"),h(\"y\",v?.5:1.02),h(\"yanchor\",v?\"middle\":\"bottom\"),h(\"ypad\"),n.noneOrAll(f,c,[\"x\",\"y\"]),h(\"outlinecolor\"),h(\"outlinewidth\"),h(\"bordercolor\"),h(\"borderwidth\"),h(\"bgcolor\");var x=n.coerce(f,c,{ticklabelposition:{valType:\"enumerated\",dflt:\"outside\",values:v?[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside bottom\",\"inside bottom\"]:[\"outside\",\"inside\",\"outside left\",\"inside left\",\"outside right\",\"inside right\"]}},\"ticklabelposition\");h(\"ticklabeloverflow\",-1!==x.indexOf(\"inside\")?\"hide past domain\":\"hide past div\"),a(f,c,h,\"linear\");var b=r.font,_={outerTicks:!1,font:b};-1!==x.indexOf(\"inside\")&&(_.bgColor=\"black\"),l(f,c,h,\"linear\",_),s(f,c,h,\"linear\",_),o(f,c,h,\"linear\",_),h(\"title.text\",r._dfltTitle.colorbar);var w=c.tickfont,k=n.extendFlat({},w,{color:b.color,size:n.bigFont(w.size)});n.coerceFont(h,\"title.font\",k),h(\"title.side\",v?\"top\":\"right\")}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/prefix_suffix_defaults\":583,\"../../plots/cartesian/tick_label_defaults\":587,\"../../plots/cartesian/tick_mark_defaults\":588,\"../../plots/cartesian/tick_value_defaults\":589,\"./attributes\":368}],371:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../plots/cartesian/axes\"),l=t(\"../dragelement\"),u=t(\"../../lib\"),c=u.strTranslate,f=t(\"../../lib/extend\").extendFlat,h=t(\"../../lib/setcursor\"),p=t(\"../drawing\"),d=t(\"../color\"),g=t(\"../titles\"),v=t(\"../../lib/svg_text_utils\"),m=t(\"../colorscale/helpers\").flipScale,y=t(\"../../plots/cartesian/axis_defaults\"),x=t(\"../../plots/cartesian/position_defaults\"),b=t(\"../../plots/cartesian/layout_attributes\"),_=t(\"../../constants/alignment\"),w=_.LINE_SPACING,k=_.FROM_TL,T=_.FROM_BR,M=t(\"./constants\").cn;e.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll(\"g.\"+M.colorbar).data(function(t){var e,r,n,i,a=t._fullLayout,o=t.calcdata,s=[];function l(t){return f(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){\"function\"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?m(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var c=0;c<o.length;c++){var h=o[c],p=(n=h[0].trace)._module.colorbar;if(!0===n.visible&&p)for(var d=Array.isArray(p),g=d?p:[p],v=0;v<g.length;v++){var y=(i=g[v]).container;(r=y?n[y]:n)&&r.showscale&&((e=l(r.colorbar))._id=\"cb\"+n.uid+(d&&y?\"-\"+y:\"\"),e._traceIndex=n.index,e._propPrefix=(y?y+\".\":\"\")+\"colorbar.\",e._meta=n._meta,u(),s.push(e))}}for(var x in a._colorAxes)if((r=a[x]).showscale){var b=a._colorAxes[x];(e=l(r.colorbar))._id=\"cb\"+x,e._propPrefix=x+\".colorbar.\",e._meta=a._meta,i={min:\"cmin\",max:\"cmax\"},\"heatmap\"!==b[0]&&(n=b[1],i.calc=n._module.colorbar.calc),u(),s.push(e)}return s}(t),(function(t){return t._id}));e.enter().append(\"g\").attr(\"class\",(function(t){return t._id})).classed(M.colorbar,!0),e.each((function(e){var r=n.select(this);u.ensureSingle(r,\"rect\",M.cbbg),u.ensureSingle(r,\"g\",M.cbfills),u.ensureSingle(r,\"g\",M.cblines),u.ensureSingle(r,\"g\",M.cbaxis,(function(t){t.classed(M.crisp,!0)})),u.ensureSingle(r,\"g\",M.cbtitleunshift,(function(t){t.append(\"g\").classed(M.cbtitle,!0)})),u.ensureSingle(r,\"rect\",M.cboutline);var m=function(t,e,r){var o=\"v\"===e.orientation,l=e.len,h=e.lenmode,m=e.thickness,_=e.thicknessmode,A=e.outlinewidth,S=e.borderwidth,E=e.bgcolor,C=e.xanchor,L=e.yanchor,P=e.xpad,O=e.ypad,I=e.x,D=o?e.y:1-e.y,z=r._fullLayout,R=z._size,F=e._fillcolor,N=e._line,B=e.title,j=B.side,U=e._zrange||n.extent((\"function\"==typeof F?F:N.color).domain()),V=\"function\"==typeof N.color?N.color:function(){return N.color},H=\"function\"==typeof F?F:function(){return F},q=e._levels,G=function(t,e,r){var n,i,a=e._levels,o=[],s=[],l=a.end+a.size/100,u=a.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(i=0;i<1e5&&(n=a.start+i*u,!(u>0?n>=l:n<=l));i++)n>c&&n<f&&o.push(n);if(e._fillgradient)s=[0];else if(\"function\"==typeof e._fillcolor){var h=e._filllevels;if(h)for(l=h.end+h.size/100,u=h.size,i=0;i<1e5&&(n=h.start+i*u,!(u>0?n>=l:n<=l));i++)n>r[0]&&n<r[1]&&s.push(n);else(s=o.map((function(t){return t-a.size/2}))).push(s[s.length-1]+a.size)}else e._fillcolor&&\"string\"==typeof e._fillcolor&&(s=[0]);return a.size<0&&(o.reverse(),s.reverse()),{line:o,fill:s}}(0,e,U),Y=G.fill,W=G.line,X=Math.round(m*(\"fraction\"===_?o?R.w:R.h:1)),Z=X/(o?R.w:R.h),K=Math.round(l*(\"fraction\"===h?o?R.h:R.w:1)),J=K/(o?R.h:R.w),$=Math.round(o?I*R.w+P:D*R.h+O),Q={center:.5,right:1}[C]||0,tt={top:1,middle:.5}[L]||0,et=o?I-Q*Z:D-tt*Z,rt=o?D-tt*J:I-Q*J,nt=Math.round(o?R.h*(1-rt):R.w*rt);e._lenFrac=J,e._thickFrac=Z,e._uFrac=et,e._vFrac=rt;var it=e._axis=function(t,e,r){var n=t._fullLayout,i=\"v\"===e.orientation,a={type:\"linear\",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:\"free\",side:i?\"right\":\"bottom\",position:1},o=i?\"y\":\"x\",s={type:\"linear\",_id:o+e._id},l={letter:o,font:n.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:n.calendar};function c(t,e){return u.coerce(a,s,b,t,e)}return y(a,s,c,l,n),x(a,s,c,l),s}(r,e,U);it.position=Z+(o?I+P/R.w:D+O/R.h);var at=-1!==[\"top\",\"bottom\"].indexOf(j);if(o&&at&&(it.title.side=j,it.titlex=I+P/R.w,it.titley=rt+(\"top\"===B.side?J-O/R.h:O/R.h)),o||at||(it.title.side=j,it.titley=D+O/R.h,it.titlex=rt+P/R.w),N.color&&\"auto\"===e.tickmode){it.tickmode=\"linear\",it.tick0=q.start;var ot=q.size,st=u.constrain(K/50,4,15)+1,lt=(U[1]-U[0])/((e.nticks||st)*ot);if(lt>1){var ut=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ut*u.roundUp(lt/ut,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+O/R.h,rt+J-O/R.h]:[rt+P/R.w,rt+J-P/R.w],it.setScale(),t.attr(\"transform\",c(Math.round(R.l),Math.round(R.t)));var ct,ft=t.select(\".\"+M.cbtitleunshift).attr(\"transform\",c(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select(\".\"+M.cbaxis),gt=0,vt=0;function mt(n,i){var a={propContainer:it,propName:e._propPrefix+\"title\",traceIndex:e._traceIndex,_meta:e._meta,placeholder:z._dfltTitle.colorbar,containerGroup:t.select(\".\"+M.cbtitle)},o=\"h\"===n.charAt(0)?n.substr(1):\"h\"+n;t.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),g.draw(r,n,f(a,i||{}))}function yt(){var t,e;(o&&at||!o&&!at)&&(\"top\"===j&&(t=P+R.l+R.w*I,e=O+R.t+R.h*(1-rt-J)+3+.75*pt),\"bottom\"===j&&(t=P+R.l+R.w*I,e=O+R.t+R.h*(1-rt)-3-.25*pt),\"right\"===j&&(e=O+R.t+R.h*D+3+.75*pt,t=P+R.l+R.w*rt),mt(it._id+\"title\",{attributes:{x:t,y:e,\"text-anchor\":o?\"start\":\"middle\"}}))}function xt(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if(\"right\"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,\"bottom\"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf(\"inside\")?it.tickfont.size:0)+(\"intside\"!==it.ticks&&e.ticklen||0)),\"top\"===j){var l=B.text.split(\"<br>\").length;i=R.t+R.h*a+10-X-w*pt*l}mt((o?\"h\":\"v\")+it._id+\"title\",{avoid:{selection:n.select(r).selectAll(\"g.\"+it._id+\"tick\"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?z.width:z.height},attributes:{x:t,y:i,\"text-anchor\":\"middle\"},transform:{rotate:o?-90:0,offset:0}})}}function bt(){if(!o&&!at||o&&at){var a,l=t.select(\".\"+M.cbtitle),f=l.select(\"text\"),h=[-A/2,A/2],d=l.select(\".h\"+it._id+\"title-math-group\").node(),g=15.6;if(f.node()&&(g=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),vt=a.width,(gt=a.height)>g&&(h[1]-=(gt-g)/2)):f.node()&&!f.classed(M.jsPlaceholder)&&(a=p.bBox(f.node()),vt=a.width,gt=a.height),o){if(gt){if(gt+=5,\"top\"===j)it.domain[1]-=gt/R.h,h[1]*=-1;else{it.domain[0]+=gt/R.h;var m=v.lineCount(f);h[1]+=(1-m)*g}l.attr(\"transform\",c(h[0],h[1])),it.setScale()}}else vt&&(\"right\"===j&&(it.domain[0]+=(vt+pt/2)/R.w),l.attr(\"transform\",c(h[0],h[1])),it.setScale())}t.selectAll(\".\"+M.cbfills+\",.\"+M.cblines).attr(\"transform\",o?c(0,Math.round(R.h*(1-it.domain[1]))):c(Math.round(R.w*it.domain[0]),0)),dt.attr(\"transform\",o?c(0,Math.round(-R.t)):c(Math.round(-R.l),0));var y=t.select(\".\"+M.cbfills).selectAll(\"rect.\"+M.cbfill).attr(\"style\",\"\").data(Y);y.enter().append(\"rect\").classed(M.cbfill,!0).style(\"stroke\",\"none\"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=u.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?\"x\":\"y\",$).attr(o?\"y\":\"x\",n.min(s)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?\"vertical\":\"horizontalreversed\",e._fillgradient,\"fill\");else{var c=H(t).replace(\"e-\",\"\");l.attr(\"fill\",i(c).toHexString())}}));var b=t.select(\".\"+M.cblines).selectAll(\"path.\"+M.cbline).data(N.color&&N.width?W:[]);b.enter().append(\"path\").classed(M.cbline,!0),b.exit().remove(),b.each((function(t){var e=$,r=Math.round(it.c2p(t))+N.width/2%1;n.select(this).attr(\"d\",\"M\"+(o?e+\",\"+r:r+\",\"+e)+(o?\"h\":\"v\")+X).call(p.lineGroupStyle,N.width,V(t),N.dash)})),dt.selectAll(\"g.\"+it._id+\"tick,path\").remove();var _=$+X+(A||0)/2-(\"outside\"===e.ticks?1:0),k=s.calcTicks(it),T=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:\"inside\"===it.ticks?s.clipEnds(it,k):k,layer:dt,path:s.makeTickPath(it,_,T),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:k,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})}function _t(){var n,s=X+A/2;-1===ht.indexOf(\"inside\")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ct=ft.select(\"text\");var u=0,f=o&&\"top\"===j,g=!o&&\"right\"===j,v=0;if(ct.node()&&!ct.classed(M.jsPlaceholder)){var y,x=ft.select(\".h\"+it._id+\"title-math-group\").node();x&&(o&&at||!o&&!at)?(u=(n=p.bBox(x)).width,y=n.height):(u=(n=p.bBox(ft.node())).right-R.l-(o?$:nt),y=n.bottom-R.t-(o?nt:$),o||\"top\"!==j||(s+=n.height,v=n.height)),g&&(ct.attr(\"transform\",c(u/2+pt/2,0)),u*=2),s=Math.max(s,o?u:y)}var b=2*(o?P:O)+s+S+A/2,w=0;!o&&B.text&&\"bottom\"===L&&D<=0&&(b+=w=b/2,v+=w),z._hColorbarMoveTitle=w,z._hColorbarMoveCBTitle=v;var F=S+A;t.select(\".\"+M.cbbg).attr(\"x\",(o?$:nt)-F/2-(o?P:0)).attr(\"y\",(o?nt:$)-(o?K:O+v-w)).attr(o?\"width\":\"height\",Math.max(b-w,2)).attr(o?\"height\":\"width\",Math.max(K+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style(\"stroke-width\",S);var N=g?Math.max(u-10,0):0;if(t.selectAll(\".\"+M.cboutline).attr(\"x\",(o?$:nt+P)+N).attr(\"y\",(o?nt+O-K:$)+(f?gt:0)).attr(o?\"width\":\"height\",Math.max(X,2)).attr(o?\"height\":\"width\",Math.max(K-(o?2*O+gt:2*P+N),2)).call(d.stroke,e.outlinecolor).style({fill:\"none\",\"stroke-width\":A}),t.attr(\"transform\",c(R.l-(o?Q*b:0),R.t-(o?0:(1-tt)*b-v))),!o&&(S||i(E).getAlpha()&&!i.equals(z.paper_bgcolor,E))){var U=dt.selectAll(\"text\"),V=U[0].length,H=t.select(\".\"+M.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t),Y=2;U.each((function(t,e){var r=0,n=V-1;if(e===r||e===n){var i,a=p.bBox(this),o=p.getTranslate(this);if(e===n){var s=a.right+o.x;(i=q.right+G.x+nt-S-Y+I-s)>0&&(i=0)}else if(e===r){var l=a.left+o.x;(i=q.left+G.x+nt+S+Y-l)<0&&(i=0)}i&&(V<3?this.setAttribute(\"transform\",\"translate(\"+i+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}}))}var W={},Z=k[C],J=T[C],et=k[L],rt=T[L],ot=b-X;o?(\"pixels\"===h?(W.y=D,W.t=K*et,W.b=K*rt):(W.t=W.b=0,W.yt=D+l*et,W.yb=D-l*rt),\"pixels\"===_?(W.x=I,W.l=b*Z,W.r=b*J):(W.l=ot*Z,W.r=ot*J,W.xl=I-m*Z,W.xr=I+m*J)):(\"pixels\"===h?(W.x=I,W.l=K*Z,W.r=K*J):(W.l=W.r=0,W.xl=I+l*Z,W.xr=I-l*J),\"pixels\"===_?(W.y=1-D,W.t=b*et,W.b=b*rt):(W.t=ot*et,W.b=ot*rt,W.yt=D-m*et,W.yb=D+m*rt)),a.autoMargin(r,e._id,W)}return u.syncOrAsync([a.previousPromises,yt,bt,xt,a.previousPromises,_t],r)}(r,e,t);m&&m.then&&(t._promises||[]).push(m),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=\"v\"===e.orientation,u=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr(\"transform\"),h(t)},moveFn:function(r,o){t.attr(\"transform\",n+c(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/u.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/u.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+\"x\"]=i,n[e._propPrefix+\"y\"]=a,void 0!==e._traceIndex?o.call(\"_guiRestyle\",r,n,e._traceIndex):o.call(\"_guiRelayout\",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/extend\":505,\"../../lib/setcursor\":536,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axes\":566,\"../../plots/cartesian/axis_defaults\":568,\"../../plots/cartesian/layout_attributes\":579,\"../../plots/cartesian/position_defaults\":582,\"../../plots/plots\":628,\"../../registry\":647,\"../color\":367,\"../colorscale/helpers\":378,\"../dragelement\":386,\"../drawing\":389,\"../titles\":476,\"./constants\":369,\"@plotly/d3\":58,tinycolor2:313}],372:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":515}],373:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"colorbar\",attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),draw:t(\"./draw\").draw,hasColorbar:t(\"./has_colorbar\")}},{\"./attributes\":368,\"./defaults\":370,\"./draw\":371,\"./has_colorbar\":372}],374:[function(t,e,r){\"use strict\";var n=t(\"../colorbar/attributes\"),i=t(\"../../lib/regex\").counter,a=t(\"../../lib/sort_object_keys\"),o=t(\"./scales.js\").scales;function s(t){return\"`\"+t+\"`\"}a(o),e.exports=function(t,e){t=t||\"\";var r,a=(e=e||{}).cLetter||\"c\",l=(\"onlyIfNumerical\"in e?e.onlyIfNumerical:Boolean(t),\"noScale\"in e?e.noScale:\"marker.line\"===t),u=\"showScaleDflt\"in e?e.showScaleDflt:\"z\"===a,c=\"string\"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||\"\",h=t?t+\".\":\"\";\"colorAttr\"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:\"z\",c:\"color\"}[a]));var p=a+\"auto\",d=a+\"min\",g=a+\"max\",v=a+\"mid\",m=(s(h+p),s(h+d),s(h+g),{});m[d]=m[g]=void 0;var y={};y[p]=!1;var x={};return\"color\"===r&&(x.color={valType:\"color\",arrayOk:!0,editType:f||\"style\"},e.anim&&(x.color.anim=!0)),x[p]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:m},x[d]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[g]={valType:\"number\",dflt:null,editType:f||\"plot\",impliedEdits:y},x[v]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:m},x.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:c,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:\"boolean\",dflt:!1!==e.autoColorDflt,editType:\"calc\",impliedEdits:{colorscale:void 0}},x.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},l||(x.showscale={valType:\"boolean\",dflt:u,editType:\"calc\"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:\"subplotid\",regex:i(\"coloraxis\"),dflt:null,editType:\"calc\"}),x}},{\"../../lib/regex\":532,\"../../lib/sort_object_keys\":538,\"../colorbar/attributes\":368,\"./scales.js\":382}],375:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./helpers\").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,u=r.containerStr,c=u?i.nestedProperty(e,u).get():e,f=a(c),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,v=function(){return i.aggNums(Math.min,null,l)},m=function(){return i.aggNums(Math.max,null,l)};void 0===p?p=v():h&&(p=c._colorAx&&n(p)?Math.min(p,v()):v()),void 0===d?d=m():h&&(d=c._colorAx&&n(d)?Math.max(d,m()):m()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g<g-p&&(d=g+(g-p))),p===d&&(p-=.5,d+=.5),f._sync(\"min\",p),f._sync(\"max\",d),f.autocolorscale&&(o=p*d<0?s.colorscale.diverging:p>=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync(\"colorscale\",o))}},{\"../../lib\":515,\"./helpers\":378,\"fast-isnumeric\":190}],376:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./helpers\").hasColorscale,a=t(\"./helpers\").extractOpts;e.exports=function(t,e){function r(t,e){var r=t[\"_\"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,\"colorscale\")}}for(var s=0;s<t.length;s++){var l=t[s],u=l._module.colorbar;if(u)if(Array.isArray(u))for(var c=0;c<u.length;c++)o(l,u[c]);else o(l,u);i(l,\"marker.line\")&&o(l,{container:\"marker.line\",min:\"cmin\",max:\"cmax\"})}for(var f in e._colorAxes)o(e[f],{min:\"cmin\",max:\"cmax\"})}},{\"../../lib\":515,\"./helpers\":378}],377:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../colorbar/has_colorbar\"),o=t(\"../colorbar/defaults\"),s=t(\"./scales\").isValid,l=t(\"../../registry\").traceIs;function u(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}e.exports=function t(e,r,c,f,h){var p=h.prefix,d=h.cLetter,g=\"_module\"in r,v=u(e,p),m=u(r,p),y=u(r._template||{},p)||{},x=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,c,f,h)};if(g){var b=c._colorAxes||{},_=f(p+\"coloraxis\");if(_){var w=l(r,\"contour\")&&i.nestedProperty(r,\"contours.coloring\").get()||\"heatmap\",k=b[_];return void(k?(k[2].push(x),k[0]!==w&&(k[0]=!1,i.warn([\"Ignoring coloraxis:\",_,\"setting\",\"as it is linked to incompatible colorscales.\"].join(\" \")))):b[_]=[w,r,[x]])}}var T=v[d+\"min\"],M=v[d+\"max\"],A=n(T)&&n(M)&&T<M;f(p+d+\"auto\",!A)?f(p+d+\"mid\"):(f(p+d+\"min\"),f(p+d+\"max\"));var S,E,C=v.colorscale,L=y.colorscale;void 0!==C&&(S=!s(C)),void 0!==L&&(S=!s(L)),f(p+\"autocolorscale\",S),f(p+\"colorscale\"),f(p+\"reversescale\"),\"marker.line.\"!==p&&(p&&g&&(E=a(v)),f(p+\"showscale\",E)&&(p&&y&&(m._template=y),o(v,m,c)))}},{\"../../lib\":515,\"../../registry\":647,\"../colorbar/defaults\":370,\"../colorbar/has_colorbar\":372,\"./scales\":382,\"fast-isnumeric\":190}],378:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"fast-isnumeric\"),o=t(\"../../lib\"),s=t(\"../color\"),l=t(\"./scales\").isValid,u=[\"showscale\",\"autocolorscale\",\"colorscale\",\"reversescale\",\"colorbar\"],c=[\"min\",\"max\",\"mid\",\"auto\"];function f(t){var e,r,n,i=t._colorAx,a=i||t,o={};for(r=0;r<u.length;r++)o[n=u[r]]=a[n];if(i)for(e=\"c\",r=0;r<c.length;r++)o[n=c[r]]=a[\"c\"+n];else{var s;for(r=0;r<c.length;r++)((s=\"c\"+(n=c[r]))in a||(s=\"z\"+n)in a)&&(o[n]=a[s]);e=s.charAt(0)}return o._sync=function(t,r){var n=-1!==c.indexOf(t)?e+t:t;a[n]=a[\"_\"+n]=r},o}function h(t){for(var e=f(t),r=e.min,n=e.max,i=e.reversescale?p(e.colorscale):e.colorscale,a=i.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var u=i[l];o[l]=r+u[0]*(n-r),s[l]=u[1]}return{domain:o,range:s}}function p(t){for(var e=t.length,r=new Array(e),n=e-1,i=0;n>=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,u=new Array(l),c=0;c<l;c++){var f=i(o[c]).toRgb();u[c]=[f.r,f.g,f.b,f.a]}var h,p=n.scale.linear().domain(r).range(u).clamp(!0),d=e.noNumericCheck,v=e.returnArray;return(h=d&&v?p:d?function(t){return g(p(t))}:v?function(t){return a(t)?p(t):i(t).isValid()?t:s.defaultLine}:function(t){return a(t)?g(p(t)):i(t).isValid()?t:s.defaultLine}).domain=p.domain,h.range=function(){return o},h}function g(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}e.exports={hasColorscale:function(t,e,r){var n=e?o.nestedProperty(t,e).get()||{}:t,i=n[r||\"color\"],s=!1;if(o.isArrayOrTypedArray(i))for(var u=0;u<i.length;u++)if(a(i[u])){s=!0;break}return o.isPlainObject(n)&&(s||!0===n.showscale||a(n.cmin)&&a(n.cmax)||l(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:f,extractScale:h,flipScale:p,makeColorScaleFunc:d,makeColorScaleFuncFromTrace:function(t,e){return d(h(t),e)}}},{\"../../lib\":515,\"../color\":367,\"./scales\":382,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:313}],379:[function(t,e,r){\"use strict\";var n=t(\"./scales\"),i=t(\"./helpers\");e.exports={moduleType:\"component\",name:\"colorscale\",attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),handleDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\"),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},{\"./attributes\":374,\"./calc\":375,\"./cross_trace_defaults\":376,\"./defaults\":377,\"./helpers\":378,\"./layout_attributes\":380,\"./layout_defaults\":381,\"./scales\":382}],380:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat,i=t(\"./attributes\"),a=t(\"./scales\").scales;e.exports={editType:\"calc\",colorscale:{editType:\"calc\",sequential:{valType:\"colorscale\",dflt:a.Reds,editType:\"calc\"},sequentialminus:{valType:\"colorscale\",dflt:a.Blues,editType:\"calc\"},diverging:{valType:\"colorscale\",dflt:a.RdBu,editType:\"calc\"}},coloraxis:n({_isSubplotObj:!0,editType:\"calc\"},i(\"\",{colorAttr:\"corresponding trace color array(s)\",noColorAxis:!0,showScaleDflt:!0}))}},{\"../../lib/extend\":505,\"./attributes\":374,\"./scales\":382}],381:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plot_api/plot_template\"),a=t(\"./layout_attributes\"),o=t(\"./defaults\");e.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r(\"colorscale.sequential\"),r(\"colorscale.sequentialminus\"),r(\"colorscale.diverging\");var s,l,u=e._colorAxes;function c(t,e){return n.coerce(s,l,a.coloraxis,t,e)}for(var f in u){var h=u[f];if(h[0])s=t[f]||{},(l=i.newContainer(e,f,\"coloraxis\"))._name=f,o(s,l,e,c,{prefix:\"\",cLetter:\"c\"});else{for(var p=0;p<h[2].length;p++)h[2][p]();delete e._colorAxes[f]}}}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"./defaults\":377,\"./layout_attributes\":380}],382:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\"),i={Greys:[[0,\"rgb(0,0,0)\"],[1,\"rgb(255,255,255)\"]],YlGnBu:[[0,\"rgb(8,29,88)\"],[.125,\"rgb(37,52,148)\"],[.25,\"rgb(34,94,168)\"],[.375,\"rgb(29,145,192)\"],[.5,\"rgb(65,182,196)\"],[.625,\"rgb(127,205,187)\"],[.75,\"rgb(199,233,180)\"],[.875,\"rgb(237,248,217)\"],[1,\"rgb(255,255,217)\"]],Greens:[[0,\"rgb(0,68,27)\"],[.125,\"rgb(0,109,44)\"],[.25,\"rgb(35,139,69)\"],[.375,\"rgb(65,171,93)\"],[.5,\"rgb(116,196,118)\"],[.625,\"rgb(161,217,155)\"],[.75,\"rgb(199,233,192)\"],[.875,\"rgb(229,245,224)\"],[1,\"rgb(247,252,245)\"]],YlOrRd:[[0,\"rgb(128,0,38)\"],[.125,\"rgb(189,0,38)\"],[.25,\"rgb(227,26,28)\"],[.375,\"rgb(252,78,42)\"],[.5,\"rgb(253,141,60)\"],[.625,\"rgb(254,178,76)\"],[.75,\"rgb(254,217,118)\"],[.875,\"rgb(255,237,160)\"],[1,\"rgb(255,255,204)\"]],Bluered:[[0,\"rgb(0,0,255)\"],[1,\"rgb(255,0,0)\"]],RdBu:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(106,137,247)\"],[.5,\"rgb(190,190,190)\"],[.6,\"rgb(220,170,132)\"],[.7,\"rgb(230,145,90)\"],[1,\"rgb(178,10,28)\"]],Reds:[[0,\"rgb(220,220,220)\"],[.2,\"rgb(245,195,157)\"],[.4,\"rgb(245,160,105)\"],[1,\"rgb(178,10,28)\"]],Blues:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(40,60,190)\"],[.5,\"rgb(70,100,245)\"],[.6,\"rgb(90,120,245)\"],[.7,\"rgb(106,137,247)\"],[1,\"rgb(220,220,220)\"]],Picnic:[[0,\"rgb(0,0,255)\"],[.1,\"rgb(51,153,255)\"],[.2,\"rgb(102,204,255)\"],[.3,\"rgb(153,204,255)\"],[.4,\"rgb(204,204,255)\"],[.5,\"rgb(255,255,255)\"],[.6,\"rgb(255,204,255)\"],[.7,\"rgb(255,153,255)\"],[.8,\"rgb(255,102,204)\"],[.9,\"rgb(255,102,102)\"],[1,\"rgb(255,0,0)\"]],Rainbow:[[0,\"rgb(150,0,90)\"],[.125,\"rgb(0,0,200)\"],[.25,\"rgb(0,25,255)\"],[.375,\"rgb(0,152,255)\"],[.5,\"rgb(44,255,150)\"],[.625,\"rgb(151,255,0)\"],[.75,\"rgb(255,234,0)\"],[.875,\"rgb(255,111,0)\"],[1,\"rgb(255,0,0)\"]],Portland:[[0,\"rgb(12,51,131)\"],[.25,\"rgb(10,136,186)\"],[.5,\"rgb(242,211,56)\"],[.75,\"rgb(242,143,56)\"],[1,\"rgb(217,30,30)\"]],Jet:[[0,\"rgb(0,0,131)\"],[.125,\"rgb(0,60,170)\"],[.375,\"rgb(5,255,255)\"],[.625,\"rgb(255,255,0)\"],[.875,\"rgb(250,0,0)\"],[1,\"rgb(128,0,0)\"]],Hot:[[0,\"rgb(0,0,0)\"],[.3,\"rgb(230,0,0)\"],[.6,\"rgb(255,210,0)\"],[1,\"rgb(255,255,255)\"]],Blackbody:[[0,\"rgb(0,0,0)\"],[.2,\"rgb(230,0,0)\"],[.4,\"rgb(230,210,0)\"],[.7,\"rgb(255,255,255)\"],[1,\"rgb(160,200,255)\"]],Earth:[[0,\"rgb(0,0,130)\"],[.1,\"rgb(0,180,180)\"],[.2,\"rgb(40,210,40)\"],[.4,\"rgb(230,230,50)\"],[.6,\"rgb(120,70,20)\"],[1,\"rgb(255,255,255)\"]],Electric:[[0,\"rgb(0,0,0)\"],[.15,\"rgb(30,0,100)\"],[.4,\"rgb(120,0,100)\"],[.6,\"rgb(160,90,0)\"],[.8,\"rgb(230,200,0)\"],[1,\"rgb(255,250,220)\"]],Viridis:[[0,\"#440154\"],[.06274509803921569,\"#48186a\"],[.12549019607843137,\"#472d7b\"],[.18823529411764706,\"#424086\"],[.25098039215686274,\"#3b528b\"],[.3137254901960784,\"#33638d\"],[.3764705882352941,\"#2c728e\"],[.4392156862745098,\"#26828e\"],[.5019607843137255,\"#21918c\"],[.5647058823529412,\"#1fa088\"],[.6274509803921569,\"#28ae80\"],[.6901960784313725,\"#3fbc73\"],[.7529411764705882,\"#5ec962\"],[.8156862745098039,\"#84d44b\"],[.8784313725490196,\"#addc30\"],[.9411764705882353,\"#d8e219\"],[1,\"#fde725\"]],Cividis:[[0,\"rgb(0,32,76)\"],[.058824,\"rgb(0,42,102)\"],[.117647,\"rgb(0,52,110)\"],[.176471,\"rgb(39,63,108)\"],[.235294,\"rgb(60,74,107)\"],[.294118,\"rgb(76,85,107)\"],[.352941,\"rgb(91,95,109)\"],[.411765,\"rgb(104,106,112)\"],[.470588,\"rgb(117,117,117)\"],[.529412,\"rgb(131,129,120)\"],[.588235,\"rgb(146,140,120)\"],[.647059,\"rgb(161,152,118)\"],[.705882,\"rgb(176,165,114)\"],[.764706,\"rgb(192,177,109)\"],[.823529,\"rgb(209,191,102)\"],[.882353,\"rgb(225,204,92)\"],[.941176,\"rgb(243,219,79)\"],[1,\"rgb(255,233,69)\"]]},a=i.RdBu;function o(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}e.exports={scales:i,defaultScale:a,get:function(t,e){if(e||(e=a),!t)return e;function r(){try{t=i[t]||JSON.parse(t)}catch(r){t=e}}return\"string\"==typeof t&&(r(),\"string\"==typeof t&&r()),o(t)?t:e},isValid:function(t){return void 0!==i[t]||o(t)}}},{tinycolor2:313}],383:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return\"left\"===i||\"bottom\"===i?a:\"center\"===i||\"middle\"===i?s:\"right\"===i||\"top\"===i?o:a<2/3-s?a:o>4/3-s?o:s}},{}],384:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=[[\"sw-resize\",\"s-resize\",\"se-resize\"],[\"w-resize\",\"move\",\"e-resize\"],[\"nw-resize\",\"n-resize\",\"ne-resize\"]];e.exports=function(t,e,r,a){return t=\"left\"===r?0:\"center\"===r?1:\"right\"===r?2:n.constrain(Math.floor(3*t),0,2),e=\"bottom\"===a?0:\"middle\"===a?1:\"top\"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{\"../../lib\":515}],385:[function(t,e,r){\"use strict\";r.selectMode=function(t){return\"lasso\"===t||\"select\"===t},r.drawMode=function(t){return\"drawclosedpath\"===t||\"drawopenpath\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.openMode=function(t){return\"drawline\"===t||\"drawopenpath\"===t},r.rectMode=function(t){return\"select\"===t||\"drawline\"===t||\"drawrect\"===t||\"drawcircle\"===t},r.freeMode=function(t){return\"lasso\"===t||\"drawclosedpath\"===t||\"drawopenpath\"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],386:[function(t,e,r){\"use strict\";var n=t(\"mouse-event-offset\"),i=t(\"has-hover\"),a=t(\"has-passive-events\"),o=t(\"../../lib\").removeElement,s=t(\"../../plots/cartesian/constants\"),l=e.exports={};l.align=t(\"./align\"),l.getCursor=t(\"./cursor\");var u=t(\"./unhover\");function c(){var t=document.createElement(\"div\");t.className=\"dragcover\";var e=t.style;return e.position=\"fixed\",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background=\"none\",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(t){var e,r,n,u,h,p,d,g,v=t.gd,m=1,y=v._context.doubleClickDelay,x=t.element;v._mouseDownTime||(v._mouseDownTime=0),x.style.pointerEvents=\"all\",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener(\"touchstart\",x._ontouchstart),x._ontouchstart=_,x.addEventListener(\"touchstart\",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]};function _(a){v._dragged=!1,v._dragging=!0;var o=f(a);e=o[0],r=o[1],d=a.target,p=a,g=2===a.buttons||a.ctrlKey,void 0===a.clientX&&void 0===a.clientY&&(a.clientX=e,a.clientY=r),(n=(new Date).getTime())-v._mouseDownTime<y?m+=1:(m=1,v._mouseDownTime=n),t.prepFn&&t.prepFn(a,e,r),i&&!g?(h=c()).style.cursor=window.getComputedStyle(x).cursor:i||(h=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(x).cursor),document.addEventListener(\"mouseup\",k),document.addEventListener(\"touchend\",k),!1!==t.dragmode&&(a.preventDefault(),document.addEventListener(\"mousemove\",w),document.addEventListener(\"touchmove\",w,{passive:!1}))}function w(n){n.preventDefault();var i=f(n),a=t.minDrag||s.MINDRAG,o=b(i[0]-e,i[1]-r,a),u=o[0],c=o[1];(u||c)&&(v._dragged=!0,l.unhover(v,n)),v._dragged&&t.moveFn&&!g&&(v._dragdata={element:x,dx:u,dy:c},t.moveFn(u,c))}function k(e){if(delete v._dragdata,!1!==t.dragmode&&(e.preventDefault(),document.removeEventListener(\"mousemove\",w),document.removeEventListener(\"touchmove\",w)),document.removeEventListener(\"mouseup\",k),document.removeEventListener(\"touchend\",k),i?o(h):u&&(h.documentElement.style.cursor=u,u=null),v._dragging){if(v._dragging=!1,(new Date).getTime()-v._mouseDownTime>y&&(m=Math.max(m-1,1)),v._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,p),!g){var r;try{r=new MouseEvent(\"click\",e)}catch(t){var n=f(e);(r=document.createEvent(\"MouseEvents\")).initMouseEvent(\"click\",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},l.coverSlip=c},{\"../../lib\":515,\"../../plots/cartesian/constants\":573,\"./align\":383,\"./cursor\":384,\"./unhover\":387,\"has-hover\":228,\"has-passive-events\":229,\"mouse-event-offset\":242}],387:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/dom\").getGraphDiv,o=t(\"../fx/constants\"),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,\"plotly_beforehover\",e)||(r._hoverlayer.selectAll(\"g\").remove(),r._hoverlayer.selectAll(\"line\").remove(),r._hoverlayer.selectAll(\"circle\").remove(),t._hoverdata=void 0,e.target&&i&&t.emit(\"plotly_unhover\",{event:e,points:i}))}},{\"../../lib/dom\":503,\"../../lib/events\":504,\"../../lib/throttle\":542,\"../fx/constants\":401}],388:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"},r.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}},{}],389:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"fast-isnumeric\"),s=t(\"tinycolor2\"),l=t(\"../../registry\"),u=t(\"../color\"),c=t(\"../colorscale\"),f=i.strTranslate,h=t(\"../../lib/svg_text_utils\"),p=t(\"../../constants/xmlns_namespaces\"),d=t(\"../../constants/alignment\").LINE_SPACING,g=t(\"../../constants/interactions\").DESELECTDIM,v=t(\"../../traces/scatter/subtypes\"),m=t(\"../../traces/scatter/make_bubble_size_func\"),y=t(\"../../components/fx/helpers\").appendArrayPointValue,x=e.exports={};function b(t,e,r){var n=e.fillpattern,i=n&&x.getPatternAttr(n.shape,0,\"\");if(i){var a=x.getPatternAttr(n.bgcolor,0,null),o=x.getPatternAttr(n.fgcolor,0,null),s=n.fgopacity,l=x.getPatternAttr(n.size,0,8),c=x.getPatternAttr(n.solidity,0,.3),f=e.uid;x.pattern(t,\"point\",r,f,i,l,c,void 0,n.fillmode,a,o,s)}else e.fillcolor&&t.call(u.fill,e.fillcolor)}x.font=function(t,e,r,n){i.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style(\"font-family\",e),r+1&&t.style(\"font-size\",r+\"px\"),n&&t.call(u.fill,n)},x.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},x.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},x.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,u=l.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";t.selectAll(u).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style(\"fill\",\"none\");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";u.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style(\"fill\",\"none\").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||\"\";n.select(this).call(u.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return\"solid\"===t?t=\"\":\"dot\"===t?t=r+\"px,\"+r+\"px\":\"dash\"===t?t=3*r+\"px,\"+3*r+\"px\":\"longdash\"===t?t=5*r+\"px,\"+5*r+\"px\":\"dashdot\"===t?t=3*r+\"px,\"+r+\"px,\"+r+\"px,\"+r+\"px\":\"longdashdot\"===t&&(t=5*r+\"px,\"+2*r+\"px,\"+r+\"px,\"+2*r+\"px\"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());b(t,((r.data()[0]||[])[0]||{}).trace||{},e)},x.fillGroupStyle=function(t,e){t.style(\"stroke-width\",0).each((function(t){var r=n.select(this);t[0].trace&&b(r,t[0].trace,e)}))};var _=t(\"./symbol_defs\");x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(_).forEach((function(t){var e=_[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+\"-open\"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,x.symbolBackOffs[r]=e.backoff||0,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+\"-dot\",r+300,String(r+300),t+\"-open-dot\"),e.noFill&&(x.symbolNoFill[r]=!0)}));var w=x.symbolNames.length;function k(t,e,r,n){var i=t%100;return x.symbolFuncs[i](e,r,n)+(t>=200?\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\":\"\")}x.symbolNumber=function(t){if(o(t))t=+t;else if(\"string\"==typeof t){var e=0;t.indexOf(\"-open\")>0&&(e=100,t=t.replace(\"-open\",\"\")),t.indexOf(\"-dot\")>0&&(e+=200,t=t.replace(\"-dot\",\"\")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var T={x1:1,x2:0,y1:0,y2:0},M={x1:0,x2:0,y1:1,y2:0},A=a(\"~f\"),S={radial:{node:\"radialGradient\"},radialreversed:{node:\"radialGradient\",reversed:!0},horizontal:{node:\"linearGradient\",attrs:T},horizontalreversed:{node:\"linearGradient\",attrs:T,reversed:!0},vertical:{node:\"linearGradient\",attrs:M},verticalreversed:{node:\"linearGradient\",attrs:M,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var c=o.length,f=S[a],h=new Array(c),p=0;p<c;p++)f.reversed?h[c-1-p]=[A(100*(1-o[p][0])),o[p][1]]:h[p]=[A(100*o[p][0]),o[p][1]];var d=e._fullLayout,g=\"g\"+d._uid+\"-\"+r,v=d._defs.select(\".gradients\").selectAll(\"#\"+g).data([a+h.join(\";\")],i.identity);v.exit().remove(),v.enter().append(f.node).each((function(){var t=n.select(this);f.attrs&&t.attr(f.attrs),t.attr(\"id\",g);var e=t.selectAll(\"stop\").data(h);e.exit().remove(),e.enter().append(\"stop\"),e.each((function(t){var e=s(t[1]);n.select(this).attr({offset:t[0]+\"%\",\"stop-color\":u.tinyRGB(e),\"stop-opacity\":e.getAlpha()})}))})),t.style(l,V(g,e)).style(l+\"-opacity\",null),t.classed(\"gradient_filled\",!0)},x.pattern=function(t,e,r,a,o,l,c,f,h,p,d,g){var v=\"legend\"===e;f&&(\"overlay\"===h?(p=f,d=u.contrast(p)):(p=void 0,d=f));var m,y,x,b,_,w,k,T,M,A,S,E=r._fullLayout,C=\"p\"+E._uid+\"-\"+a,L={},P=s(d),O=u.tinyRGB(P),I=g*P.getAlpha();switch(o){case\"/\":m=l*Math.sqrt(2),y=l*Math.sqrt(2),w=\"path\",L={d:x=\"M-\"+m/4+\",\"+y/4+\"l\"+m/2+\",-\"+y/2+\"M0,\"+y+\"L\"+m+\",0M\"+m/4*3+\",\"+y/4*5+\"l\"+m/2+\",-\"+y/2,opacity:I,stroke:O,\"stroke-width\":(b=c*l)+\"px\"};break;case\"\\\\\":m=l*Math.sqrt(2),y=l*Math.sqrt(2),w=\"path\",L={d:x=\"M\"+m/4*3+\",-\"+y/4+\"l\"+m/2+\",\"+y/2+\"M0,0L\"+m+\",\"+y+\"M-\"+m/4+\",\"+y/4*3+\"l\"+m/2+\",\"+y/2,opacity:I,stroke:O,\"stroke-width\":(b=c*l)+\"px\"};break;case\"x\":m=l*Math.sqrt(2),y=l*Math.sqrt(2),x=\"M-\"+m/4+\",\"+y/4+\"l\"+m/2+\",-\"+y/2+\"M0,\"+y+\"L\"+m+\",0M\"+m/4*3+\",\"+y/4*5+\"l\"+m/2+\",-\"+y/2+\"M\"+m/4*3+\",-\"+y/4+\"l\"+m/2+\",\"+y/2+\"M0,0L\"+m+\",\"+y+\"M-\"+m/4+\",\"+y/4*3+\"l\"+m/2+\",\"+y/2,b=l-l*Math.sqrt(1-c),w=\"path\",L={d:x,opacity:I,stroke:O,\"stroke-width\":b+\"px\"};break;case\"|\":w=\"path\",w=\"path\",L={d:x=\"M\"+(m=l)/2+\",0L\"+m/2+\",\"+(y=l),opacity:I,stroke:O,\"stroke-width\":(b=c*l)+\"px\"};break;case\"-\":w=\"path\",w=\"path\",L={d:x=\"M0,\"+(y=l)/2+\"L\"+(m=l)+\",\"+y/2,opacity:I,stroke:O,\"stroke-width\":(b=c*l)+\"px\"};break;case\"+\":w=\"path\",x=\"M\"+(m=l)/2+\",0L\"+m/2+\",\"+(y=l)+\"M0,\"+y/2+\"L\"+m+\",\"+y/2,b=l-l*Math.sqrt(1-c),w=\"path\",L={d:x,opacity:I,stroke:O,\"stroke-width\":b+\"px\"};break;case\".\":m=l,y=l,_=c<Math.PI/4?Math.sqrt(c*l*l/Math.PI):(k=c,T=Math.PI/4,M=1,A=l/2,S=l/Math.sqrt(2),A+(S-A)*(k-T)/(M-T)),w=\"circle\",L={cx:m/2,cy:y/2,r:_,opacity:I,fill:O}}var D=[o||\"noSh\",p||\"noBg\",d||\"noFg\",l,c].join(\";\"),z=E._defs.select(\".patterns\").selectAll(\"#\"+C).data([D],i.identity);z.exit().remove(),z.enter().append(\"pattern\").each((function(){var t=n.select(this);if(t.attr({id:C,width:m+\"px\",height:y+\"px\",patternUnits:\"userSpaceOnUse\",patternTransform:v?\"scale(0.8)\":\"\"}),p){var e=s(p),r=u.tinyRGB(e),i=e.getAlpha(),a=t.selectAll(\"rect\").data([0]);a.exit().remove(),a.enter().append(\"rect\").attr({width:m+\"px\",height:y+\"px\",fill:r,\"fill-opacity\":i})}var o=t.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(L)})),t.style(\"fill\",V(C,r)).style(\"fill-opacity\",null),t.classed(\"pattern_filled\",!0)},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"gradients\").selectAll(\"linearGradient,radialGradient\").remove(),n.select(t).selectAll(\".gradient_filled\").classed(\"gradient_filled\",!1)},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,\"g\",\"patterns\").selectAll(\"pattern\").remove(),n.select(t).selectAll(\".pattern_filled\").classed(\"pattern_filled\",!1)},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t},x.pointStyle=function(t,e,r){if(t.size()){var i=x.makePointStyleFns(e);t.each((function(t){x.singlePointStyle(t,n.select(this),e,i,r)}))}},x.singlePointStyle=function(t,e,r,n,a){var o=r.marker,s=o.line;if(e.style(\"opacity\",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?o.opacity:t.mo),n.ms2mrc){var l;l=\"various\"===t.ms||\"various\"===o.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&&(l=t.mrc=n.selectedSizeFn(t));var c=x.symbolNumber(t.mx||o.symbol)||0;t.om=c%200>=100;var f=rt(t,r),h=G(t,r);e.attr(\"d\",k(c,l,f,h))}var p,d,g,v=!1;if(t.so)g=s.outlierwidth,d=s.outliercolor,p=o.outliercolor;else{var m=(s||{}).width;g=(t.mlw+1||m+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,d=\"mlc\"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(s.color)?u.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(p=u.defaultLine,v=!0),p=\"mc\"in t?t.mcc=n.markerScale(t.mc):o.color||\"rgba(0,0,0,0)\",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(u.stroke,p).style({\"stroke-width\":(g||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",(t.isBlank?0:g)+\"px\");var y=o.gradient,b=t.mgt;b?v=!0:b=y&&y.type,i.isArrayOrTypedArray(b)&&(b=b[0],S[b]||(b=0));var _=o.pattern,w=_&&x.getPatternAttr(_.shape,t.i,\"\");if(b&&\"none\"!==b){var T=t.mgc;T?v=!0:T=y.color;var M=r.uid;v&&(M+=\"-\"+t.i),x.gradient(e,a,M,b,[[0,T],[1,p]],\"fill\")}else if(w){var A=x.getPatternAttr(_.bgcolor,t.i,null),E=x.getPatternAttr(_.fgcolor,t.i,null),C=_.fgopacity,L=x.getPatternAttr(_.size,t.i,8),P=x.getPatternAttr(_.solidity,t.i,.3),O=t.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity),I=r.uid;O&&(I+=\"-\"+t.i),x.pattern(e,\"point\",a,I,w,L,P,t.mcc,_.fillmode,A,E,C)}else u.fill(e,p);g&&u.stroke(e,d)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,\"\"),e.lineScale=x.tryColorscale(r,\"line\"),l.traceIs(t,\"symbols\")&&(e.ms2mrc=v.isBubble(t)?m(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,f=s.opacity,h=void 0!==c,p=void 0!==f;(i.isArrayOrTypedArray(u)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?c:e:p?f:g*e});var d=a.color,v=o.color,m=s.color;(v||m)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?v||e:m||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(t,\"symbols\")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:c||(l?e:u.addOpacity(e,g))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style(\"opacity\",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){u.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr(\"d\",k(x.symbolNumber(a),o,rt(n,e),G(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r<a.length;r++)a[r](e,t)}))}},x.tryColorscale=function(t,e){var r=e?i.nestedProperty(t,e).get():t;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&i.isArrayOrTypedArray(n))return c.makeColorScaleFuncFromTrace(r)}return i.identity};var E,C,L={start:1,end:-1,middle:0,bottom:1,top:-1};function P(t,e,r,i,a){var o=n.select(t.node().parentNode),s=-1!==e.indexOf(\"top\")?\"top\":-1!==e.indexOf(\"bottom\")?\"bottom\":\"middle\",l=-1!==e.indexOf(\"left\")?\"end\":-1!==e.indexOf(\"right\")?\"start\":\"middle\",u=i?i/.8+1:0,c=(h.lineCount(t)-1)*d+1,p=L[l]*u,g=.75*r+L[s]*u+(L[s]-1)*c*r/2;t.attr(\"text-anchor\",l),a||o.attr(\"transform\",f(p,g))}function O(t,e){var r=t.ts||e.textfont.size;return o(r)&&r>0?r:0}function I(t,e,r){return r&&(t=B(t)),e?z(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return E=e,e}function z(t){var e=n.round(t,2);return C=e,e}function R(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),p=3*l*(l+u);return[[D(e[0]+(h&&c/h)),z(e[1]+(h&&f/h))],[D(e[0]-(p&&c/p)),z(e[1]-(p&&f/p))]]}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),u=s?i.extractOption(t,e,\"txt\",\"texttemplate\"):i.extractOption(t,e,\"tx\",\"text\");if(u||0===u){if(s){var c=e._module.formatLabels,f=c?c(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};u=i.texttemplateString(u,f,l._d3locale,p,t,d)}var g=t.tp||e.textposition,v=O(t,e),m=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,v,m).text(u).call(h.convertToTspans,r).call(P,g,v,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=O(t,e);u.fill(i,a);var c=l.traceIs(e,\"bar-like\");P(i,o,s,t.mrc2||t.mrc,c)}))}},x.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(R(t[r-1],t[r],t[r+1],e));for(n+=\"Q\"+i[0][0]+\" \"+t[1],r=2;r<t.length-1;r++)n+=\"C\"+i[r-2][1]+\" \"+i[r-1][0]+\" \"+t[r];return n+\"Q\"+i[t.length-3][1]+\" \"+t[t.length-1]},x.smoothclosed=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\")+\"Z\";var r,n=\"M\"+t[0],i=t.length-1,a=[R(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(R(t[r-1],t[r],t[r+1],e));for(a.push(R(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+=\"C\"+a[r-1][1]+\" \"+a[r][0]+\" \"+t[r];return n+\"C\"+a[i][1]+\" \"+a[0][0]+\" \"+t[0]+\"Z\"};var F={hv:function(t,e,r){return\"H\"+D(e[0])+\"V\"+I(e,1,r)},vh:function(t,e,r){return\"V\"+z(e[1])+\"H\"+I(e,0,r)},hvh:function(t,e,r){return\"H\"+D((t[0]+e[0])/2)+\"V\"+z(e[1])+\"H\"+I(e,0,r)},vhv:function(t,e,r){return\"V\"+z((t[1]+e[1])/2)+\"H\"+D(e[0])+\"V\"+I(e,1,r)}},N=function(t,e,r){return\"L\"+I(e,0,r)+\",\"+I(e,1,r)};function B(t,e){var r=t.backoff,n=t.trace,a=t.d,o=t.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&\"spline\"!==n.line.shape){var s=i.isArrayOrTypedArray(r),l=t,u=e?e[0]:E||0,c=e?e[1]:C||0,f=l[0],h=l[1],p=f-u,d=h-c,g=Math.atan2(d,p),v=s?r[o]:r;if(\"auto\"===v){var m=l.i;\"scatter\"===n.type&&m--;var y=l.marker;v=y?x.symbolBackOffs[x.symbolNumber(y.symbol)]*y.size:0,v+=x.getMarkerStandoff(a[m],n)||0}var b=f-v*Math.cos(g),_=h-v*Math.sin(g);(b<=f&&b>=u||b>=f&&b<=u)&&(_<=h&&_>=c||_>=h&&_<=c)&&(t=[b,_])}return t}x.steps=function(t){var e=F[t]||N;return function(t){for(var r=\"M\"+D(t[0][0])+\",\"+z(t[0][1]),n=t.length,i=1;i<n;i++)r+=e(t[i-1],t[i],i===n-1);return r}},x.applyBackoff=B,x.makeTester=function(){var t=i.ensureSingleById(n.select(\"body\"),\"svg\",\"js-plotly-tester\",(function(t){t.attr(p.svgAttrs).style({position:\"absolute\",left:\"-10000px\",top:\"-10000px\",width:\"9000px\",height:\"9000px\",\"z-index\":\"1\"})})),e=i.ensureSingle(t,\"path\",\"js-reference-point\",(function(t){t.attr(\"d\",\"M0,0H1V1H0Z\").style({\"stroke-width\":0,fill:\"black\"})}));x.tester=t,x.testref=e},x.savedBBoxes={};var j=0;function U(t){var e=t.getAttribute(\"data-unformatted\");if(null!==e)return e+t.getAttribute(\"data-math\")+t.getAttribute(\"text-anchor\")+t.getAttribute(\"style\")}function V(t,e){if(!t)return null;var r=e._context,n=r._exportedPlot?\"\":r._baseUrl||\"\";return n?\"url('\"+n+\"#\"+t+\"')\":\"url(#\"+t+\")\"}x.bBox=function(t,e,r){var a,o,s;if(r||(r=U(t)),r){if(a=x.savedBBoxes[r])return i.extendFlat({},a)}else if(1===t.childNodes.length){var l=t.childNodes[0];if(r=U(l)){var u=+l.getAttribute(\"x\")||0,c=+l.getAttribute(\"y\")||0,f=l.getAttribute(\"transform\");if(!f){var p=x.bBox(l,!1,r);return u&&(p.left+=u,p.right+=u),c&&(p.top+=c,p.bottom+=c),p}if(r+=\"~\"+u+\"~\"+c+\"~\"+f,a=x.savedBBoxes[r])return i.extendFlat({},a)}}e?o=t:(s=x.tester.node(),o=t.cloneNode(!0),s.appendChild(o)),n.select(o).attr(\"transform\",null).call(h.positionText,0,0);var d=o.getBoundingClientRect(),g=x.testref.node().getBoundingClientRect();e||s.removeChild(o);var v={height:d.height,width:d.width,left:d.left-g.left,top:d.top-g.top,right:d.right-g.left,bottom:d.bottom-g.top};return j>=1e4&&(x.savedBBoxes={},j=0),r&&(x.savedBBoxes[r]=v),j++,i.extendFlat({},v)},x.setClipUrl=function(t,e,r){t.attr(\"clip-path\",V(e,r))},x.getTranslate=function(t){var e=(t[t.attr?\"attr\":\"getAttribute\"](\"transform\")||\"\").replace(/.*\\btranslate\\((-?\\d*\\.?\\d*)[^-\\d]*(-?\\d*\\.?\\d*)[^\\d].*/,(function(t,e,r){return[e,r].join(\" \")})).split(\" \");return{x:+e[0]||0,y:+e[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?\"attr\":\"getAttribute\",i=t.attr?\"attr\":\"setAttribute\",a=t[n](\"transform\")||\"\";return e=e||0,r=r||0,a=a.replace(/(\\btranslate\\(.*?\\);?)/,\"\").trim(),a=(a+=f(e,r)).trim(),t[i](\"transform\",a),a},x.getScale=function(t){var e=(t[t.attr?\"attr\":\"getAttribute\"](\"transform\")||\"\").replace(/.*\\bscale\\((\\d*\\.?\\d*)[^\\d]*(\\d*\\.?\\d*)[^\\d].*/,(function(t,e,r){return[e,r].join(\" \")})).split(\" \");return{x:+e[0]||1,y:+e[1]||1}},x.setScale=function(t,e,r){var n=t.attr?\"attr\":\"getAttribute\",i=t.attr?\"attr\":\"setAttribute\",a=t[n](\"transform\")||\"\";return e=e||1,r=r||1,a=a.replace(/(\\bscale\\(.*?\\);?)/,\"\").trim(),a=(a+=\"scale(\"+e+\",\"+r+\")\").trim(),t[i](\"transform\",a),a};var H=/\\s*sc.*/;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?\"\":\"scale(\"+e+\",\"+r+\")\";t.each((function(){var t=(this.getAttribute(\"transform\")||\"\").replace(H,\"\");t=(t+=n).trim(),this.setAttribute(\"transform\",t)}))}};var q=/translate\\([^)]*\\)\\s*$/;function G(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}x.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),a=i.select(\"text\");if(a.node()){var o=parseFloat(a.attr(\"x\")||0),s=parseFloat(a.attr(\"y\")||0),l=(i.attr(\"transform\")||\"\").match(q);t=1===e&&1===r?[]:[f(o,s),\"scale(\"+e+\",\"+r+\")\",f(-o,-s)],l&&t.push(l),i.attr(\"transform\",t.join(\"\"))}}))},x.getMarkerStandoff=G;var Y,W,X,Z,K,J,$=Math.atan2,Q=Math.cos,tt=Math.sin;function et(t,e){var r=e[0],n=e[1];return[r*Q(t)-n*tt(t),r*tt(t)+n*Q(t)]}function rt(t,e){var r,n,i=t.ma;void 0===i&&(i=e.marker.angle||0);var a=e.marker.angleref;if(\"previous\"===a||\"north\"===a){if(e._geo){var s=e._geo.project(t.lonlat);r=s[0],n=s[1]}else{var l=e._xA,u=e._yA;if(!l||!u)return 90;r=l.c2p(t.x),n=u.c2p(t.y)}if(e._geo){var c,f=t.lonlat[0],h=t.lonlat[1],p=e._geo.project([f,h+1e-5]),d=e._geo.project([f+1e-5,h]),g=$(d[1]-n,d[0]-r),v=$(p[1]-n,p[0]-r);if(\"north\"===a)c=i/180*Math.PI;else if(\"previous\"===a){var m=f/180*Math.PI,y=h/180*Math.PI,x=Y/180*Math.PI,b=W/180*Math.PI,_=x-m,w=Q(b)*tt(_),k=tt(b)*Q(y)-Q(b)*tt(y)*Q(_);c=-$(w,k)-Math.PI,Y=f,W=h}var T=et(g,[Q(c),0]),M=et(v,[tt(c),0]);i=$(T[1]+M[1],T[0]+M[0])/Math.PI*180,\"previous\"!==a||J===e.uid&&t.i===K+1||(i=null)}if(\"previous\"===a&&!e._geo)if(J===e.uid&&t.i===K+1&&o(r)&&o(n)){var A=r-X,S=n-Z,E=e.line&&e.line.shape||\"\",C=E.slice(E.length-1);\"h\"===C&&(S=0),\"v\"===C&&(A=0),i+=$(S,A)/Math.PI*180+90}else i=null}return X=r,Z=n,K=t.i,J=e.uid,i}x.getMarkerAngle=rt},{\"../../components/fx/helpers\":403,\"../../constants/alignment\":483,\"../../constants/interactions\":490,\"../../constants/xmlns_namespaces\":492,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../registry\":647,\"../../traces/scatter/make_bubble_size_func\":953,\"../../traces/scatter/subtypes\":961,\"../color\":367,\"../colorscale\":379,\"./symbol_defs\":390,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:313}],390:[function(t,e,r){\"use strict\";var n,i,a,o,s=t(\"parse-svg-path\"),l=t(\"@plotly/d3\").round,u=\"M0,0Z\",c=Math.sqrt(2),f=Math.sqrt(3),h=Math.PI,p=Math.cos,d=Math.sin;function g(t){return null===t}function v(t,e,r){if(!(t&&t%360!=0||e))return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=p(t),i=d(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var u=t/180*h,c=0,f=0,g=s(r),v=\"\",m=0;m<g.length;m++){var y=g[m],x=y[0],b=c,_=f;if(\"M\"===x||\"L\"===x)c=+y[1],f=+y[2];else if(\"m\"===x||\"l\"===x)c+=+y[1],f+=+y[2];else if(\"H\"===x)c=+y[1];else if(\"h\"===x)c+=+y[1];else if(\"V\"===x)f=+y[1];else if(\"v\"===x)f+=+y[1];else if(\"A\"===x){c=+y[1],f=+y[2];var w=l(u,[+y[6],+y[7]]);y[6]=w[0],y[7]=w[1],y[3]=+y[3]+t}\"H\"!==x&&\"V\"!==x||(x=\"L\"),\"h\"!==x&&\"v\"!==x||(x=\"l\"),\"m\"!==x&&\"l\"!==x||(c-=b,f-=_);var k=l(u,[c,f]);\"H\"!==x&&\"V\"!==x||(x=\"L\"),\"M\"!==x&&\"L\"!==x&&\"m\"!==x&&\"l\"!==x||(y[1]=k[0],y[2]=k[1]),y[0]=x,v+=y[0]+y.slice(1).join(\",\")}return i=v,v}e.exports={circle:{n:0,f:function(t,e,r){if(g(e))return u;var n=l(t,2),i=\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\";return r?v(e,r,i):i}},square:{n:1,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")}},diamond:{n:2,f:function(t,e,r){if(g(e))return u;var n=l(1.3*t,2);return v(e,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"Z\")}},cross:{n:3,f:function(t,e,r){if(g(e))return u;var n=l(.4*t,2),i=l(1.2*t,2);return v(e,r,\"M\"+i+\",\"+n+\"H\"+n+\"V\"+i+\"H-\"+n+\"V\"+n+\"H-\"+i+\"V-\"+n+\"H-\"+n+\"V-\"+i+\"H\"+n+\"V-\"+n+\"H\"+i+\"Z\")}},x:{n:4,f:function(t,e,r){if(g(e))return u;var n=l(.8*t/c,2),i=\"l\"+n+\",\"+n,a=\"l\"+n+\",-\"+n,o=\"l-\"+n+\",-\"+n,s=\"l-\"+n+\",\"+n;return v(e,r,\"M0,\"+n+i+a+o+a+o+s+o+s+i+s+i+\"Z\")}},\"triangle-up\":{n:5,f:function(t,e,r){if(g(e))return u;var n=l(2*t/f,2);return v(e,r,\"M-\"+n+\",\"+l(t/2,2)+\"H\"+n+\"L0,-\"+l(t,2)+\"Z\")}},\"triangle-down\":{n:6,f:function(t,e,r){if(g(e))return u;var n=l(2*t/f,2);return v(e,r,\"M-\"+n+\",-\"+l(t/2,2)+\"H\"+n+\"L0,\"+l(t,2)+\"Z\")}},\"triangle-left\":{n:7,f:function(t,e,r){if(g(e))return u;var n=l(2*t/f,2);return v(e,r,\"M\"+l(t/2,2)+\",-\"+n+\"V\"+n+\"L-\"+l(t,2)+\",0Z\")}},\"triangle-right\":{n:8,f:function(t,e,r){if(g(e))return u;var n=l(2*t/f,2);return v(e,r,\"M-\"+l(t/2,2)+\",-\"+n+\"V\"+n+\"L\"+l(t,2)+\",0Z\")}},\"triangle-ne\":{n:9,f:function(t,e,r){if(g(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return v(e,r,\"M-\"+i+\",-\"+n+\"H\"+n+\"V\"+i+\"Z\")}},\"triangle-se\":{n:10,f:function(t,e,r){if(g(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return v(e,r,\"M\"+n+\",-\"+i+\"V\"+n+\"H-\"+i+\"Z\")}},\"triangle-sw\":{n:11,f:function(t,e,r){if(g(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return v(e,r,\"M\"+i+\",\"+n+\"H-\"+n+\"V-\"+i+\"Z\")}},\"triangle-nw\":{n:12,f:function(t,e,r){if(g(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return v(e,r,\"M-\"+n+\",\"+i+\"V-\"+n+\"H\"+i+\"Z\")}},pentagon:{n:13,f:function(t,e,r){if(g(e))return u;var n=l(.951*t,2),i=l(.588*t,2),a=l(-t,2),o=l(-.309*t,2);return v(e,r,\"M\"+n+\",\"+o+\"L\"+i+\",\"+l(.809*t,2)+\"H-\"+i+\"L-\"+n+\",\"+o+\"L0,\"+a+\"Z\")}},hexagon:{n:14,f:function(t,e,r){if(g(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return v(e,r,\"M\"+a+\",-\"+i+\"V\"+i+\"L0,\"+n+\"L-\"+a+\",\"+i+\"V-\"+i+\"L0,-\"+n+\"Z\")}},hexagon2:{n:15,f:function(t,e,r){if(g(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return v(e,r,\"M-\"+i+\",\"+a+\"H\"+i+\"L\"+n+\",0L\"+i+\",-\"+a+\"H-\"+i+\"L-\"+n+\",0Z\")}},octagon:{n:16,f:function(t,e,r){if(g(e))return u;var n=l(.924*t,2),i=l(.383*t,2);return v(e,r,\"M-\"+i+\",-\"+n+\"H\"+i+\"L\"+n+\",-\"+i+\"V\"+i+\"L\"+i+\",\"+n+\"H-\"+i+\"L-\"+n+\",\"+i+\"V-\"+i+\"Z\")}},star:{n:17,f:function(t,e,r){if(g(e))return u;var n=1.4*t,i=l(.225*n,2),a=l(.951*n,2),o=l(.363*n,2),s=l(.588*n,2),c=l(-n,2),f=l(-.309*n,2),h=l(.118*n,2),p=l(.809*n,2);return v(e,r,\"M\"+i+\",\"+f+\"H\"+a+\"L\"+o+\",\"+h+\"L\"+s+\",\"+p+\"L0,\"+l(.382*n,2)+\"L-\"+s+\",\"+p+\"L-\"+o+\",\"+h+\"L-\"+a+\",\"+f+\"H-\"+i+\"L0,\"+c+\"Z\")}},hexagram:{n:18,f:function(t,e,r){if(g(e))return u;var n=l(.66*t,2),i=l(.38*t,2),a=l(.76*t,2);return v(e,r,\"M-\"+a+\",0l-\"+i+\",-\"+n+\"h\"+a+\"l\"+i+\",-\"+n+\"l\"+i+\",\"+n+\"h\"+a+\"l-\"+i+\",\"+n+\"l\"+i+\",\"+n+\"h-\"+a+\"l-\"+i+\",\"+n+\"l-\"+i+\",-\"+n+\"h-\"+a+\"Z\")}},\"star-triangle-up\":{n:19,f:function(t,e,r){if(g(e))return u;var n=l(t*f*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s=\"A \"+o+\",\"+o+\" 0 0 1 \";return v(e,r,\"M-\"+n+\",\"+i+s+n+\",\"+i+s+\"0,-\"+a+s+\"-\"+n+\",\"+i+\"Z\")}},\"star-triangle-down\":{n:20,f:function(t,e,r){if(g(e))return u;var n=l(t*f*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s=\"A \"+o+\",\"+o+\" 0 0 1 \";return v(e,r,\"M\"+n+\",-\"+i+s+\"-\"+n+\",-\"+i+s+\"0,\"+a+s+n+\",-\"+i+\"Z\")}},\"star-square\":{n:21,f:function(t,e,r){if(g(e))return u;var n=l(1.1*t,2),i=l(2*t,2),a=\"A \"+i+\",\"+i+\" 0 0 1 \";return v(e,r,\"M-\"+n+\",-\"+n+a+\"-\"+n+\",\"+n+a+n+\",\"+n+a+n+\",-\"+n+a+\"-\"+n+\",-\"+n+\"Z\")}},\"star-diamond\":{n:22,f:function(t,e,r){if(g(e))return u;var n=l(1.4*t,2),i=l(1.9*t,2),a=\"A \"+i+\",\"+i+\" 0 0 1 \";return v(e,r,\"M-\"+n+\",0\"+a+\"0,\"+n+a+n+\",0\"+a+\"0,-\"+n+a+\"-\"+n+\",0Z\")}},\"diamond-tall\":{n:23,f:function(t,e,r){if(g(e))return u;var n=l(.7*t,2),i=l(1.4*t,2);return v(e,r,\"M0,\"+i+\"L\"+n+\",0L0,-\"+i+\"L-\"+n+\",0Z\")}},\"diamond-wide\":{n:24,f:function(t,e,r){if(g(e))return u;var n=l(1.4*t,2),i=l(.7*t,2);return v(e,r,\"M0,\"+i+\"L\"+n+\",0L0,-\"+i+\"L-\"+n+\",0Z\")}},hourglass:{n:25,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M\"+n+\",\"+n+\"H-\"+n+\"L\"+n+\",-\"+n+\"H-\"+n+\"Z\")},noDot:!0},bowtie:{n:26,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M\"+n+\",\"+n+\"V-\"+n+\"L-\"+n+\",\"+n+\"V-\"+n+\"Z\")},noDot:!0},\"circle-cross\":{n:27,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\")},needLine:!0,noDot:!0},\"circle-x\":{n:28,f:function(t,e,r){if(g(e))return u;var n=l(t,2),i=l(t/c,2);return v(e,r,\"M\"+i+\",\"+i+\"L-\"+i+\",-\"+i+\"M\"+i+\",-\"+i+\"L-\"+i+\",\"+i+\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\")},needLine:!0,noDot:!0},\"square-cross\":{n:29,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"square-x\":{n:30,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n+\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n+\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"diamond-cross\":{n:31,f:function(t,e,r){if(g(e))return u;var n=l(1.3*t,2);return v(e,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"ZM0,-\"+n+\"V\"+n+\"M-\"+n+\",0H\"+n)},needLine:!0,noDot:!0},\"diamond-x\":{n:32,f:function(t,e,r){if(g(e))return u;var n=l(1.3*t,2),i=l(.65*t,2);return v(e,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"ZM-\"+i+\",-\"+i+\"L\"+i+\",\"+i+\"M-\"+i+\",\"+i+\"L\"+i+\",-\"+i)},needLine:!0,noDot:!0},\"cross-thin\":{n:33,f:function(t,e,r){if(g(e))return u;var n=l(1.4*t,2);return v(e,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"x-thin\":{n:34,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n+\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t,e,r){if(g(e))return u;var n=l(1.2*t,2),i=l(.85*t,2);return v(e,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+i+\",\"+i+\"L-\"+i+\",-\"+i+\"M\"+i+\",-\"+i+\"L-\"+i+\",\"+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t,e,r){if(g(e))return u;var n=l(t/2,2),i=l(t,2);return v(e,r,\"M\"+n+\",\"+i+\"V-\"+i+\"M\"+(n-i)+\",-\"+i+\"V\"+i+\"M\"+i+\",\"+n+\"H-\"+i+\"M-\"+i+\",\"+(n-i)+\"H\"+i)},needLine:!0,noFill:!0},\"y-up\":{n:37,f:function(t,e,r){if(g(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return v(e,r,\"M-\"+n+\",\"+a+\"L0,0M\"+n+\",\"+a+\"L0,0M0,-\"+i+\"L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-down\":{n:38,f:function(t,e,r){if(g(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return v(e,r,\"M-\"+n+\",-\"+a+\"L0,0M\"+n+\",-\"+a+\"L0,0M0,\"+i+\"L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-left\":{n:39,f:function(t,e,r){if(g(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return v(e,r,\"M\"+a+\",\"+n+\"L0,0M\"+a+\",-\"+n+\"L0,0M-\"+i+\",0L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-right\":{n:40,f:function(t,e,r){if(g(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return v(e,r,\"M-\"+a+\",\"+n+\"L0,0M-\"+a+\",-\"+n+\"L0,0M\"+i+\",0L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"line-ew\":{n:41,f:function(t,e,r){if(g(e))return u;var n=l(1.4*t,2);return v(e,r,\"M\"+n+\",0H-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-ns\":{n:42,f:function(t,e,r){if(g(e))return u;var n=l(1.4*t,2);return v(e,r,\"M0,\"+n+\"V-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-ne\":{n:43,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-nw\":{n:44,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"arrow-up\":{n:45,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M0,0L-\"+n+\",\"+l(2*t,2)+\"H\"+n+\"Z\")},backoff:1,noDot:!0},\"arrow-down\":{n:46,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M0,0L-\"+n+\",-\"+l(2*t,2)+\"H\"+n+\"Z\")},noDot:!0},\"arrow-left\":{n:47,f:function(t,e,r){if(g(e))return u;var n=l(2*t,2),i=l(t,2);return v(e,r,\"M0,0L\"+n+\",-\"+i+\"V\"+i+\"Z\")},noDot:!0},\"arrow-right\":{n:48,f:function(t,e,r){if(g(e))return u;var n=l(2*t,2),i=l(t,2);return v(e,r,\"M0,0L-\"+n+\",-\"+i+\"V\"+i+\"Z\")},noDot:!0},\"arrow-bar-up\":{n:49,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M-\"+n+\",0H\"+n+\"M0,0L-\"+n+\",\"+l(2*t,2)+\"H\"+n+\"Z\")},backoff:1,needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(t,e,r){if(g(e))return u;var n=l(t,2);return v(e,r,\"M-\"+n+\",0H\"+n+\"M0,0L-\"+n+\",-\"+l(2*t,2)+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(t,e,r){if(g(e))return u;var n=l(2*t,2),i=l(t,2);return v(e,r,\"M0,-\"+i+\"V\"+i+\"M0,0L\"+n+\",-\"+i+\"V\"+i+\"Z\")},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(t,e,r){if(g(e))return u;var n=l(2*t,2),i=l(t,2);return v(e,r,\"M0,-\"+i+\"V\"+i+\"M0,0L-\"+n+\",-\"+i+\"V\"+i+\"Z\")},needLine:!0,noDot:!0},arrow:{n:53,f:function(t,e,r){if(g(e))return u;var n=h/2.5,i=2*t*p(n),a=2*t*d(n);return v(e,r,\"M0,0L\"+-i+\",\"+a+\"L\"+i+\",\"+a+\"Z\")},backoff:.9,noDot:!0},\"arrow-wide\":{n:54,f:function(t,e,r){if(g(e))return u;var n=h/4,i=2*t*p(n),a=2*t*d(n);return v(e,r,\"M0,0L\"+-i+\",\"+a+\"A \"+2*t+\",\"+2*t+\" 0 0 1 \"+i+\",\"+a+\"Z\")},backoff:.4,noDot:!0}}},{\"@plotly/d3\":58,\"parse-svg-path\":250}],391:[function(t,e,r){\"use strict\";e.exports={visible:{valType:\"boolean\",editType:\"calc\"},type:{valType:\"enumerated\",values:[\"percent\",\"constant\",\"sqrt\",\"data\"],editType:\"calc\"},symmetric:{valType:\"boolean\",editType:\"calc\"},array:{valType:\"data_array\",editType:\"calc\"},arrayminus:{valType:\"data_array\",editType:\"calc\"},value:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},valueminus:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},traceref:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},tracerefminus:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},copy_ystyle:{valType:\"boolean\",editType:\"plot\"},copy_zstyle:{valType:\"boolean\",editType:\"style\"},color:{valType:\"color\",editType:\"style\"},thickness:{valType:\"number\",min:0,dflt:2,editType:\"style\"},width:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\",_deprecated:{opacity:{valType:\"number\",editType:\"style\"}}}},{}],392:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"./compute_error\");function l(t,e,r,i){var l=e[\"error_\"+i]||{},u=[];if(l.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var c=s(l),f=0;f<t.length;f++){var h=t[f],p=h.i;if(void 0===p)p=f;else if(null===p)continue;var d=h[i];if(n(r.c2l(d))){var g=c(d,p);if(n(g[0])&&n(g[1])){var v=h[i+\"s\"]=d-g[0],m=h[i+\"h\"]=d+g[1];u.push(v,m)}}}var y=r._id,x=e._extremes[y],b=a.findExtremes(r,u,o.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(b.min),x.max=x.max.concat(b.max)}}e.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&&i.traceIs(o,\"errorBarsOK\")){var s=a.getFromId(t,o.xaxis),u=a.getFromId(t,o.yaxis);l(n,o,s,\"x\"),l(n,o,u,\"y\")}}}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"./compute_error\":393,\"fast-isnumeric\":190}],393:[function(t,e,r){\"use strict\";function n(t,e){return\"percent\"===t?function(t){return Math.abs(t*e/100)}:\"constant\"===t?function(){return Math.abs(e)}:\"sqrt\"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}e.exports=function(t){var e=t.type,r=t.symmetric;if(\"data\"===e){var i=t.array||[];if(r)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=n(e,t.value),s=n(e,t.valueminus);return r||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},{}],394:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../../plot_api/plot_template\"),s=t(\"./attributes\");e.exports=function(t,e,r,l){var u=\"error_\"+l.axis,c=o.newContainer(e,u),f=t[u]||{};function h(t,e){return a.coerce(f,c,s,t,e)}if(!1!==h(\"visible\",void 0!==f.array||void 0!==f.value||\"sqrt\"===f.type)){var p=h(\"type\",\"array\"in f?\"data\":\"percent\"),d=!0;\"sqrt\"!==p&&(d=h(\"symmetric\",!((\"data\"===p?\"arrayminus\":\"valueminus\")in f))),\"data\"===p?(h(\"array\"),h(\"traceref\"),d||(h(\"arrayminus\"),h(\"tracerefminus\"))):\"percent\"!==p&&\"constant\"!==p||(h(\"value\"),d||h(\"valueminus\"));var g=\"copy_\"+l.inherit+\"style\";l.inherit&&(e[\"error_\"+l.inherit]||{}).visible&&h(g,!(f.color||n(f.thickness)||n(f.width))),l.inherit&&c[g]||(h(\"color\",r),h(\"thickness\"),h(\"width\",i.traceIs(e,\"gl3d\")?0:4))}}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../registry\":647,\"./attributes\":391,\"fast-isnumeric\":190}],395:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plot_api/edit_types\").overrideAll,a=t(\"./attributes\"),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,e.exports={moduleType:\"component\",name:\"errorbars\",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,\"calc\",\"nested\"),scattergl:i(o,\"calc\",\"nested\")}},supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),makeComputeError:t(\"./compute_error\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},{\"../../lib\":515,\"../../plot_api/edit_types\":548,\"./attributes\":391,\"./calc\":392,\"./compute_error\":393,\"./defaults\":394,\"./plot\":396,\"./style\":397}],396:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../drawing\"),o=t(\"../../traces/scatter/subtypes\");e.exports=function(t,e,r,s){var l=r.xaxis,u=r.yaxis,c=s&&s.duration>0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var v=n.select(this).selectAll(\"g.errorbar\").data(e,f);if(v.exit().remove(),e.length){p.visible||v.selectAll(\"path.xerror\").remove(),d.visible||v.selectAll(\"path.yerror\").remove(),v.style(\"opacity\",1);var m=v.enter().append(\"g\").classed(\"errorbar\",!0);c&&m.style(\"opacity\",0).transition().duration(s.duration).style(\"opacity\",1),a.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,u);if(!g||t.vis){var a,o=e.select(\"path.yerror\");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a=\"M\"+(r.x-f)+\",\"+r.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+r.ys,r.noYS||(a+=\"m-\"+f+\",0h\"+2*f),o.size()?c&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0),o.attr(\"d\",a)}else o.remove();var h=e.select(\"path.xerror\");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?d:p).width;a=\"M\"+r.xh+\",\"+(r.y-v)+\"v\"+2*v+\"m0,-\"+v+\"H\"+r.xs,r.noXS||(a+=\"m0,-\"+v+\"v\"+2*v),h.size()?c&&(h=h.transition().duration(s.duration).ease(s.easing)):h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0),h.attr(\"d\",a)}else h.remove()}}))}}))}},{\"../../traces/scatter/subtypes\":961,\"../drawing\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190}],397:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../color\");e.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll(\"path.yerror\").style(\"stroke-width\",r.thickness+\"px\").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll(\"path.xerror\").style(\"stroke-width\",a.thickness+\"px\").call(i.stroke,a.color)}))}},{\"../color\":367,\"@plotly/d3\":58}],398:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./layout_attributes\").hoverlabel,a=t(\"../../lib/extend\").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:\"none\"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:\"none\"}}},{\"../../lib/extend\":505,\"../../plots/font_attributes\":594,\"./layout_attributes\":408}],399:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\");function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s<e.length;s++){var l=e[s],u=l[0].trace;if(!i.traceIs(u,\"pie-like\")){var c=i.traceIs(u,\"2dMap\")?a:n.fillArray;c(u.hoverinfo,l,\"hi\",o(u)),u.hovertemplate&&c(u.hovertemplate,l,\"ht\"),u.hoverlabel&&(c(u.hoverlabel.bgcolor,l,\"hbg\"),c(u.hoverlabel.bordercolor,l,\"hbc\"),c(u.hoverlabel.font.size,l,\"hts\"),c(u.hoverlabel.font.color,l,\"htc\"),c(u.hoverlabel.font.family,l,\"htf\"),c(u.hoverlabel.namelength,l,\"hnl\"),c(u.hoverlabel.align,l,\"hta\"))}}}},{\"../../lib\":515,\"../../registry\":647}],400:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./hover\").hover;e.exports=function(t,e,r){var a=n.getComponentMethod(\"annotations\",\"onClick\")(t,t._hoverdata);function o(){t.emit(\"plotly_click\",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(a&&a.then?a.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},{\"../../registry\":647,\"./hover\":404}],401:[function(t,e,r){\"use strict\";e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:\"Arial, sans-serif\",HOVERMINTIME:50,HOVERID:\"-hover\"}},{}],402:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"./hoverlabel_defaults\");e.exports=function(t,e,r,o){var s=n.extendFlat({},o.hoverlabel);e.hovertemplate&&(s.namelength=-1),a(t,e,(function(r,a){return n.coerce(t,e,i,r,a)}),s)}},{\"../../lib\":515,\"./attributes\":398,\"./hoverlabel_defaults\":405}],403:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");r.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},r.isTraceInSubplots=function(t,e){if(\"splom\"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==e.indexOf(n[a]+i[o]))return!0;return!1}return-1!==e.indexOf(r.getSubplot(t))},r.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},r.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},r.getDistanceFunction=function(t,e,n,i){return\"closest\"===t?i||r.quadrature(e,n):\"x\"===t.charAt(0)?e:n},r.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},r.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},r.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},r.makeEventData=function(t,e,n){var i=\"index\"in t?t.index:t.pointNumber,a={data:e._input,fullData:e,curveNumber:e.index,pointNumber:i};if(e._indexToPoints){var o=e._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return e._module.eventData?a=e._module.eventData(a,t,e,n,i):(\"xVal\"in t?a.x=t.xVal:\"x\"in t&&(a.x=t.x),\"yVal\"in t?a.y=t.yVal:\"y\"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),r.appendArrayPointValue(a,e,i),a},r.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){var c=o(n.nestedProperty(e,l).get(),r);void 0!==c&&(t[u]=c)}}},r.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){for(var c=n.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=o(c,r[h]);t[u]=f}}};var i={ids:\"id\",locations:\"location\",labels:\"label\",values:\"value\",\"marker.colors\":\"color\",parents:\"parent\"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var s={x:!0,y:!0},l={\"x unified\":!0,\"y unified\":!0};r.isUnifiedHover=function(t){return\"string\"==typeof t&&!!l[t]},r.isXYhover=function(t){return\"string\"==typeof t&&!!s[t]}},{\"../../lib\":515}],404:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"tinycolor2\"),o=t(\"../../lib\"),s=o.strTranslate,l=o.strRotate,u=t(\"../../lib/events\"),c=t(\"../../lib/svg_text_utils\"),f=t(\"../../lib/override_cursor\"),h=t(\"../drawing\"),p=t(\"../color\"),d=t(\"../dragelement\"),g=t(\"../../plots/cartesian/axes\"),v=t(\"../../registry\"),m=t(\"./helpers\"),y=t(\"./constants\"),x=t(\"../legend/defaults\"),b=t(\"../legend/draw\"),_=y.YANGLE,w=Math.PI*_/180,k=1/Math.sin(w),T=Math.cos(w),M=Math.sin(w),A=y.HOVERARROWSIZE,S=y.HOVERTEXTPAD,E={box:!0,ohlc:!0,violin:!0,candlestick:!0},C={scatter:!0,scattergl:!0,splom:!0};function L(t,e,r,a,s){r||(r=\"xy\");var l=Array.isArray(r)?r:[r],c=t._fullLayout,h=c._plots||[],g=h[r],y=c._has(\"cartesian\");if(g){var x=g.overlays.map((function(t){return t.id}));l=l.concat(x)}for(var b=l.length,_=new Array(b),w=new Array(b),T=!1,M=0;M<b;M++){var A=l[M];if(h[A])T=!0,_[M]=h[A].xaxis,w[M]=h[A].yaxis;else{if(!c[A]||!c[A]._subplot)return void o.warn(\"Unrecognized subplot: \"+A);var S=c[A]._subplot;_[M]=S.xaxis,w[M]=S.yaxis}}var L=e.hovermode||c.hovermode;if(L&&!T&&(L=\"closest\"),-1===[\"x\",\"y\",\"closest\",\"x unified\",\"y unified\"].indexOf(L)||!t.calcdata||t.querySelector(\".zoombox\")||t._dragging)return d.unhoverRaw(t,e);var O=c.hoverdistance;-1===O&&(O=1/0);var D=c.spikedistance;-1===D&&(D=1/0);var B,H,q,G,Y,W,X,Z,K,J,$,Q,tt,et=[],rt=[],nt={hLinePoint:null,vLinePoint:null},it=!1;if(Array.isArray(e))for(L=\"array\",q=0;q<e.length;q++)(Y=t.calcdata[e[q].curveNumber||0])&&(W=Y[0].trace,\"skip\"!==Y[0].trace.hoverinfo&&(rt.push(Y),\"h\"===W.orientation&&(it=!0)));else{for(G=0;G<t.calcdata.length;G++)Y=t.calcdata[G],\"skip\"!==(W=Y[0].trace).hoverinfo&&m.isTraceInSubplots(W,l)&&(rt.push(Y),\"h\"===W.orientation&&(it=!0));var at,ot;if(s){if(!1===u.triggerHandler(t,\"plotly_beforehover\",e))return;var st=s.getBoundingClientRect();at=e.clientX-st.left,ot=e.clientY-st.top,c._calcInverseTransform(t);var lt=o.apply3DTransform(c._invTransform)(at,ot);if(at=lt[0],ot=lt[1],at<0||at>_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}else at=\"xpx\"in e?e.xpx:_[0]._length/2,ot=\"ypx\"in e?e.ypx:w[0]._length/2;if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,B=\"xval\"in e?m.flat(l,e.xval):m.p2c(_,at),H=\"yval\"in e?m.flat(l,e.yval):m.p2c(w,ot),!i(B[0])||!i(H[0]))return o.warn(\"Fx.hover failed\",e,t),d.unhoverRaw(t,e)}var ut=1/0;function ct(t,r){for(G=0;G<rt.length;G++)if((Y=rt[G])&&Y[0]&&Y[0].trace&&!0===(W=Y[0].trace).visible&&0!==W._length&&-1===[\"carpet\",\"contourcarpet\"].indexOf(W._module.name)){if(\"splom\"===W.type?X=l[Z=0]:(X=m.getSubplot(W),Z=l.indexOf(X)),K=L,m.isUnifiedHover(K)&&(K=K.charAt(0)),Q={cd:Y,trace:W,xa:_[Z],ya:w[Z],maxHoverDistance:O,maxSpikeDistance:D,index:!1,distance:Math.min(ut,O),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:p.defaultLine,name:W.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},c[X]&&(Q.subplot=c[X]._subplot),c._splomScenes&&c._splomScenes[W.uid]&&(Q.scene=c._splomScenes[W.uid]),tt=et.length,\"array\"===K){var n=e[G];\"pointNumber\"in n?(Q.index=n.pointNumber,K=\"closest\"):(K=\"\",\"xval\"in n&&(J=n.xval,K=\"x\"),\"yval\"in n&&($=n.yval,K=K?\"closest\":\"y\"))}else void 0!==t&&void 0!==r?(J=t,$=r):(J=B[Z],$=H[Z]);if(0!==O)if(W._module&&W._module.hoverPoints){var a=W._module.hoverPoints(Q,J,$,K,{finiteRange:!0,hoverLayer:c._hoverlayer});if(a)for(var s,u=0;u<a.length;u++)s=a[u],i(s.x0)&&i(s.y0)&&et.push(R(s,L))}else o.log(\"Unrecognized trace type in hover:\",W);if(\"closest\"===L&&et.length>tt&&(et.splice(0,tt),ut=et[0].distance),y&&0!==D&&0===et.length){Q.distance=D,Q.index=!1;var f=W._module.hoverPoints(Q,J,$,\"closest\",{hoverLayer:c._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=D}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&\"hovered data\"!==t.xa.spikesnap}));if(d.length){var g=d[0];i(g.x0)&&i(g.y0)&&(h=ht(g),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var v=f.filter((function(t){return t.ya.showspikes&&\"hovered data\"!==t.ya.spikesnap}));if(v.length){var x=v[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o<t.length;o++)n=t[o].spikeDistance,r&&0===o&&(n=-1/0),n<=a&&n<=e&&(i=t[o],a=n);return i}function ht(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}ct();var pt={fullLayout:c,container:c._hoverlayer,event:e},dt=t._spikepoints,gt={vLinePoint:nt.vLinePoint,hLinePoint:nt.hLinePoint};t._spikepoints=gt;var vt=function(){et.sort((function(t,e){return t.distance-e.distance})),et=function(t,e){for(var r=e.charAt(0),n=[],i=[],a=[],o=0;o<t.length;o++){var s=t[o];v.traceIs(s.trace,\"bar-like\")||v.traceIs(s.trace,\"box-violin\")?a.push(s):s.trace[r+\"period\"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}(et,L)};vt();var mt=L.charAt(0),yt=(\"x\"===mt||\"y\"===mt)&&et[0]&&C[et[0].trace.type];if(y&&0!==D&&0!==et.length){var xt=ft(et.filter((function(t){return t.ya.showspikes})),D,yt);nt.hLinePoint=ht(xt);var bt=ft(et.filter((function(t){return t.xa.showspikes})),D,yt);nt.vLinePoint=ht(bt)}if(0===et.length){var _t=d.unhoverRaw(t,e);return!y||null===nt.hLinePoint&&null===nt.vLinePoint||N(dt)&&F(t,nt,pt),_t}if(y&&N(dt)&&F(t,nt,pt),m.isXYhover(K)&&0!==et[0].length&&\"splom\"!==et[0].trace.type){var wt=et[0],kt=(et=E[wt.trace.type]?et.filter((function(t){return t.trace.index===wt.trace.index})):[wt]).length;ct(j(\"x\",wt,c),j(\"y\",wt,c));var Tt,Mt=[],At={},St=0,Et=function(t){var e=E[t.trace.type]?P(t):t.trace.index;if(At[e]){var r=At[e]-1,n=Mt[r];r>0&&Math.abs(t.distance)<Math.abs(n.distance)&&(Mt[r]=t)}else St++,At[e]=St,Mt.push(t)};for(Tt=0;Tt<kt;Tt++)Et(et[Tt]);for(Tt=et.length-1;Tt>kt-1;Tt--)Et(et[Tt]);et=Mt,vt()}var Ct=t._hoverdata,Lt=[],Pt=U(t),Ot=V(t);for(q=0;q<et.length;q++){var It=et[q],Dt=m.makeEventData(It,It.trace,It.cd);if(!1!==It.hovertemplate){var zt=!1;It.cd[It.index]&&It.cd[It.index].ht&&(zt=It.cd[It.index].ht),It.hovertemplate=zt||It.trace.hovertemplate||!1}if(It.xa&&It.ya){var Rt=It.x0+It.xa._offset,Ft=It.x1+It.xa._offset,Nt=It.y0+It.ya._offset,Bt=It.y1+It.ya._offset,jt=Math.min(Rt,Ft),Ut=Math.max(Rt,Ft),Vt=Math.min(Nt,Bt),Ht=Math.max(Nt,Bt);Dt.bbox={x0:jt+Ot,x1:Ut+Ot,y0:Vt+Pt,y1:Ht+Pt}}It.eventData=[Dt],Lt.push(Dt)}t._hoverdata=Lt;var qt=\"y\"===L&&(rt.length>1||et.length>1)||\"closest\"===L&&it&&et.length>1,Gt=p.combine(c.plot_bgcolor||p.background,c.paper_bgcolor),Yt=I(et,{gd:t,hovermode:L,rotateLabels:qt,bgColor:Gt,container:c._hoverlayer,outerContainer:c._paper.node(),commonLabelOpts:c.hoverlabel,hoverdistance:c.hoverdistance});if(m.isUnifiedHover(L)||(function(t,e,r){var n,i,a,o,s,l,u,c=0,f=1,h=t.size(),p=new Array(h),d=0;function g(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;o<t.length;o++)(l=t[o]).pos+l.dp+l.size>e.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o<t.length&&!(u<=0);o++)if((l=t[o]).pos<e.pmin+1)for(l.del=!0,u--,a=2*l.size,s=t.length-1;s>=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(t.each((function(t){var n=t[e],i=\"x\"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?k:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));!n&&c<=h;){for(c++,n=!0,o=0;o<p.length-1;){var v=p[o],m=p[o+1],y=v[v.length-1],x=m[0];if((i=y.pos+y.dp+y.size-x.pos-x.dp+x.size)>.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=m.length-1;s>=0;s--)m[s].dp+=i;for(v.push.apply(v,m),p.splice(o+1,1),u=0,s=v.length-1;s>=0;s--)u+=v[s].dp;for(a=u/v.length,s=v.length-1;s>=0;s--)v[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Yt,qt?\"xa\":\"ya\",c),z(Yt,qt,c._invScaleX,c._invScaleY)),s&&s.tagName){var Wt=v.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,Lt);f(n.select(s),Wt?\"pointer\":\"\")}s&&!a&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Ct)&&(Ct&&t.emit(\"plotly_unhover\",{event:e,points:Ct}),t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:B,yvals:H}))}function P(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:\"\",t.ya?t.ya._id:\"\"].join(\",\")}r.hover=function(t,e,r,n){t=o.getGraphDiv(t);var i=e.target;o.throttle(t._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,(function(){L(t,e,r,n,i)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=U(i),o=V(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,u=t.eventData;if(u){var c=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),g=t.trace;if(v.traceIs(g,\"gl3d\")){var m=i._fullLayout[g.scene]._scene.container,y=m.offsetLeft,x=m.offsetTop;c+=y,f+=y,h+=x,d+=x}u.bbox={x0:c+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(u.bbox)}else u=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:u}})),{gd:i,hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,u=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5<l?l-n+5:0,l=n+t.by+t.offset,r===e.anchorIndex&&(u=t.offset)})).each((function(t){t.offset-=u})),z(s,!1,i._fullLayout._invScaleX,i._fullLayout._invScaleY),r?s:s.node()};var O=/<extra>([\\s\\S]*)<\\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,u=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var k=e.fontFamily||y.HOVERFONT,T=e.fontSize||y.HOVERFONTSIZE,M=t[0],E=M.xa,C=M.ya,L=a.charAt(0),O=L+\"Label\",I=M[O];if(void 0===I&&\"multicategory\"===E.type)for(var z=0;z<t.length&&void 0===(I=t[z][O]);z++);var R=H(r,g),F=R.top,N=R.width,B=R.height,j=void 0!==I&&M.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);if(j){var U,V,q=!0;for(U=0;U<t.length;U++)if(q&&void 0===t[U].zLabel&&(q=!1),V=t[U].hoverinfo||t[U].trace.hoverinfo){var G=Array.isArray(V)?V:V.split(\"+\");if(-1===G.indexOf(\"all\")&&-1===G.indexOf(a)){j=!1;break}}q&&(j=!1)}var Y=d.selectAll(\"g.axistext\").data(j?[0]:[]);if(Y.enter().append(\"g\").classed(\"axistext\",!0),Y.exit().remove(),Y.each((function(){var t=n.select(this),e=o.ensureSingle(t,\"path\",\"\",(function(t){t.style({\"stroke-width\":\"1px\"})})),l=o.ensureSingle(t,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),u=w.bgcolor||p.defaultLine,f=w.bordercolor||p.contrast(u),d=p.contrast(u),g={family:w.font.family||k,size:w.font.size||T,color:w.font.color||d};e.style({fill:u,stroke:f}),l.text(I).call(h.font,g).call(c.positionText,0,0).call(c.convertToTspans,r),t.attr(\"transform\",\"\");var v,m,y=H(r,l.node());if(\"x\"===a){var x=\"top\"===E.side?\"-\":\"\";l.attr(\"text-anchor\",\"middle\").call(c.positionText,0,\"top\"===E.side?F-y.bottom-A-S:F-y.top+A+S),v=E._offset+(M.x0+M.x1)/2,m=C._offset+(\"top\"===E.side?0:C._length);var b=y.width/2+S;v<b?(v=b,e.attr(\"d\",\"M-\"+(b-A)+\",0L-\"+(b-2*A)+\",\"+x+A+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+A+\"Z\")):v>i.width-b?(v=i.width-b,e.attr(\"d\",\"M\"+(b-A)+\",0L\"+b+\",\"+x+A+\"v\"+x+(2*S+y.height)+\"H-\"+b+\"V\"+x+A+\"H\"+(b-2*A)+\"Z\")):e.attr(\"d\",\"M0,0L\"+A+\",\"+x+A+\"H\"+(S+y.width/2)+\"v\"+x+(2*S+y.height)+\"H-\"+(S+y.width/2)+\"V\"+x+A+\"H-\"+A+\"Z\")}else{var _,L,P;\"right\"===C.side?(_=\"start\",L=1,P=\"\",v=E._offset+E._length):(_=\"end\",L=-1,P=\"-\",v=E._offset),m=C._offset+(M.y0+M.y1)/2,l.attr(\"text-anchor\",_),e.attr(\"d\",\"M0,0L\"+P+A+\",\"+A+\"V\"+(S+y.height/2)+\"h\"+P+(2*S+y.width)+\"V-\"+(S+y.height/2)+\"H\"+P+A+\"V-\"+A+\"Z\");var O,D=y.height/2,z=F-y.top-D,R=\"clip\"+i._uid+\"commonlabel\"+C._id;if(v<y.width+2*S+A){O=\"M-\"+(A+S)+\"-\"+D+\"h-\"+(y.width-S)+\"V\"+D+\"h\"+(y.width-S)+\"Z\";var N=y.width-v+S;c.positionText(l,N,z),\"end\"===_&&l.selectAll(\"tspan\").each((function(){var t=n.select(this),e=h.tester.append(\"text\").text(t.text()).call(h.font,g),i=H(r,e.node());Math.round(i.width)<Math.round(y.width)&&t.attr(\"x\",N-i.width),e.remove()}))}else c.positionText(l,L*(S+A),z),O=null;var B=i._topclips.selectAll(\"#\"+R).data(O?[0]:[]);B.enter().append(\"clipPath\").attr(\"id\",R).append(\"path\"),B.exit().remove(),B.select(\"path\").attr(\"d\",O),h.setClipUrl(l,O?R:null,r)}t.attr(\"transform\",s(v,m))})),m.isUnifiedHover(a)){d.selectAll(\"g.hovertext\").remove();var W=t.filter((function(t){return\"none\"!==t.hoverinfo}));if(0===W.length)return;var X=i.hoverlabel,Z=X.font,K={showlegend:!0,legend:{title:{text:I,font:Z},font:Z,bgcolor:X.bgcolor,bordercolor:X.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:\"v\"}},J={font:Z};x(K,J,r._fullData);var $=J.legend;$.entries=[];for(var Q=0;Q<W.length;Q++){var tt=W[Q];if(\"none\"!==tt.hoverinfo){var et=D(tt,!0,a,i,I),rt=et[0],nt=et[1];tt.name=nt,tt.text=\"\"!==nt?nt+\" : \"+rt:rt;var it=tt.cd[tt.index];it&&(it.mc&&(tt.mc=it.mc),it.mcc&&(tt.mc=it.mcc),it.mlc&&(tt.mlc=it.mlc),it.mlcc&&(tt.mlc=it.mlcc),it.mlw&&(tt.mlw=it.mlw),it.mrc&&(tt.mrc=it.mrc),it.dir&&(tt.dir=it.dir)),tt._distinct=!0,$.entries.push([tt])}}$.entries.sort((function(t,e){return t[0].trace.index-e[0].trace.index})),$.layer=d,$._inHover=!0,$._groupTitleFont=X.grouptitlefont,b(r,$);var at,ot,st,lt,ut=d.select(\"g.legend\"),ct=H(r,ut.node()),ft=ct.width+2*S,ht=ct.height+2*S,pt=W[0],dt=(pt.x0+pt.x1)/2,gt=(pt.y0+pt.y1)/2,vt=!(v.traceIs(pt.trace,\"bar-like\")||v.traceIs(pt.trace,\"box-violin\"));\"y\"===L?vt?(ot=gt-S,at=gt+S):(ot=Math.min.apply(null,W.map((function(t){return Math.min(t.y0,t.y1)}))),at=Math.max.apply(null,W.map((function(t){return Math.max(t.y0,t.y1)})))):ot=at=o.mean(W.map((function(t){return(t.y0+t.y1)/2})))-ht/2,\"x\"===L?vt?(st=dt+S,lt=dt-S):(st=Math.max.apply(null,W.map((function(t){return Math.max(t.x0,t.x1)}))),lt=Math.min.apply(null,W.map((function(t){return Math.min(t.x0,t.x1)})))):st=lt=o.mean(W.map((function(t){return(t.x0+t.x1)/2})))-ft/2;var mt,yt,xt=E._offset,bt=C._offset;return lt+=xt-ft,ot+=bt-ht,mt=(st+=xt)+ft<N&&st>=0?st:lt+ft<N&&lt>=0?lt:xt+ft<N?xt:st-dt<dt-lt+ft?N-ft:0,mt+=S,yt=(at+=bt)+ht<B&&at>=0?at:ot+ht<B&&ot>=0?ot:bt+ht<B?bt:at-gt<gt-ot+ht?B-ht:0,yt+=S,ut.attr(\"transform\",s(mt-1,yt-1)),ut}var _t=d.selectAll(\"g.hovertext\").data(t,(function(t){return P(t)}));return _t.enter().append(\"g\").classed(\"hovertext\",!0).each((function(){var t=n.select(this);t.append(\"rect\").call(p.fill,p.addOpacity(f,.8)),t.append(\"text\").classed(\"name\",!0),t.append(\"path\").style(\"stroke-width\",\"1px\"),t.append(\"text\").classed(\"nums\",!0).call(h.font,k,T)})),_t.exit().remove(),_t.each((function(t){var e=n.select(this).attr(\"transform\",\"\"),o=t.color;Array.isArray(o)&&(o=o[t.eventData[0].pointNumber]);var d=t.bgcolor||o,g=p.combine(p.opacity(d)?d:p.defaultLine,f),v=p.combine(p.opacity(o)?o:p.defaultLine,f),m=t.borderColor||p.contrast(g),y=D(t,j,a,i,I,e),x=y[0],b=y[1],w=e.select(\"text.nums\").call(h.font,t.fontFamily||k,t.fontSize||T,t.fontColor||m).text(x).attr(\"data-notex\",1).call(c.positionText,0,0).call(c.convertToTspans,r),M=e.select(\"text.name\"),E=0,C=0;if(b&&b!==x){M.call(h.font,t.fontFamily||k,t.fontSize||T,v).text(b).attr(\"data-notex\",1).call(c.positionText,0,0).call(c.convertToTspans,r);var L=H(r,M.node());E=L.width+2*S,C=L.height+2*S}else M.remove(),e.select(\"rect\").remove();e.select(\"path\").style({fill:g,stroke:m});var P=t.xa._offset+(t.x0+t.x1)/2,O=t.ya._offset+(t.y0+t.y1)/2,z=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),U=H(r,w.node()),V=U.width/i._invScaleX,q=U.height/i._invScaleY;t.ty0=(F-U.top)/i._invScaleY,t.bx=V+2*S,t.by=Math.max(q+2*S,C),t.anchor=\"start\",t.txwidth=V,t.tx2width=E,t.offset=0;var G,Y,W=(V+A+S+E)*i._invScaleX;if(u)t.pos=P,G=O+R/2+W<=B,Y=O-R/2-W>=0,\"top\"!==t.idealAlign&&G||!Y?G?(O+=R/2,t.anchor=\"start\"):t.anchor=\"middle\":(O-=R/2,t.anchor=\"end\");else if(t.pos=O,G=P+z/2+W<=N,Y=P-z/2-W>=0,\"left\"!==t.idealAlign&&G||!Y)if(G)P+=z/2,t.anchor=\"start\";else{t.anchor=\"middle\";var X=W/2,Z=P+X-N,K=P-X;Z>0&&(P-=Z),K<0&&(P+=-K)}else P-=z/2,t.anchor=\"end\";w.attr(\"text-anchor\",t.anchor),E&&M.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",s(P,O)+(u?l(_):\"\"))})),_t}function D(t,e,r,n,i,a){var s=\"\",l=\"\";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var u=r.charAt(0),c=\"x\"===u?\"y\":\"x\";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+=\"x: \"+t.xLabel+\"<br>\"),void 0!==t.yLabel&&(l+=\"y: \"+t.yLabel+\"<br>\"),\"choropleth\"!==t.trace.type&&\"choroplethmapbox\"!==t.trace.type&&(l+=(l?\"z: \":\"\")+t.zLabel)):e&&t[u+\"Label\"]===i?l=t[c+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&\"scattercarpet\"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?\"<br>\":\"\")+t.text),void 0!==t.extraText&&(l+=(l?\"<br>\":\"\")+t.extraText),a&&\"\"===l&&!t.hovertemplate&&(\"\"===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[u+\"Label\"]!==i&&(h[u+\"other\"]=h[u+\"Val\"],h[u+\"otherLabel\"]=h[u+\"Label\"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(O,(function(e,r){return s=B(r,t.nameLength),\"\"}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select(\"text.nums\"),s=t.anchor,l=\"end\"===s?-1:1,u={start:1,end:-1,middle:0}[s],f=u*(A+S),p=f+u*(t.txwidth+S),d=0,g=t.offset,v=\"middle\"===s;v&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-M,d=t.offset*T),r.select(\"path\").attr(\"d\",v?\"M-\"+a(t.bx/2+t.tx2width/2)+\",\"+o(g-t.by/2)+\"h\"+a(t.bx)+\"v\"+o(t.by)+\"h-\"+a(t.bx)+\"Z\":\"M0,0L\"+a(l*A+d)+\",\"+o(A+g)+\"v\"+o(t.by/2-A)+\"h\"+a(l*t.bx)+\"v-\"+o(t.by)+\"H\"+a(l*A+d)+\"V\"+o(g-A)+\"Z\");var m=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||\"auto\";\"auto\"!==x&&(\"left\"===x&&\"start\"!==s?(i.attr(\"text-anchor\",\"start\"),m=v?-t.bx/2-t.tx2width/2+S:-t.bx-S):\"right\"===x&&\"end\"!==s&&(i.attr(\"text-anchor\",\"end\"),m=v?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(c.positionText,a(m),o(y)),t.tx2width&&(r.select(\"text.name\").call(c.positionText,a(p+u*S+d),o(g+t.ty0-t.by/2+S)),r.select(\"rect\").call(h.setRect,a(p+(u-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function R(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var u=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,\"\",e)}:function(t,e){return o.extractOption(s,n,t,e)};function c(e,r,n){var i=u(r,n);l(i)&&(t[e]=i)}if(c(\"hoverinfo\",\"hi\",\"hoverinfo\"),c(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),c(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),c(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),c(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),c(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),c(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),c(\"textAlign\",\"hta\",\"hoverlabel.align\"),t.posref=\"y\"===e||\"closest\"===e&&\"h\"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel=\"xLabel\"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||\"log\"===t.xa.type&&t.xerr<=0)){var f=g.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+f+\" / -\"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" ± \"+f,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+h+\" / -\"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" ± \"+h,\"y\"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&\"all\"!==p&&(-1===(p=Array.isArray(p)?p:p.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===p.indexOf(\"y\")&&(t.yLabel=void 0),-1===p.indexOf(\"z\")&&(t.zLabel=void 0),-1===p.indexOf(\"text\")&&(t.text=void 0),-1===p.indexOf(\"name\")&&(t.name=void 0)),t}function F(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(\".spikeline\").remove(),f||c){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var v,m,y=e.hLinePoint;n=y&&y.xa,\"cursor\"===(i=y&&y.ya).spikesnap?(v=u.pointerX,m=u.pointerY):(v=n._offset+y.x,m=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,k=i.spikethickness,T=i.spikecolor||_,M=g.getPxPosition(t,i);if(-1!==w.indexOf(\"toaxis\")||-1!==w.indexOf(\"across\")){if(-1!==w.indexOf(\"toaxis\")&&(x=M,b=v),-1!==w.indexOf(\"across\")){var A=i._counterDomainMin,S=i._counterDomainMax;\"free\"===i.anchor&&(A=Math.min(A,i.position),S=Math.max(S,i.position)),x=l.l+A*l.w,b=l.l+S*l.w}o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:m,y2:m,\"stroke-width\":k,stroke:T,\"stroke-dasharray\":h.dashStyle(i.spikedash,k)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:x,x2:b,y1:m,y2:m,\"stroke-width\":k+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==w.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:M+(\"right\"!==i.side?k:-k),cy:m,r:k,fill:T}).classed(\"spikeline\",!0)}if(f){var E,C,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,\"cursor\"===n.spikesnap?(E=u.pointerX,C=u.pointerY):(E=n._offset+L.x,C=i._offset+L.y);var P,O,I=a.readability(L.color,d)<1.5?p.contrast(d):L.color,D=n.spikemode,z=n.spikethickness,R=n.spikecolor||I,F=g.getPxPosition(t,n);if(-1!==D.indexOf(\"toaxis\")||-1!==D.indexOf(\"across\")){if(-1!==D.indexOf(\"toaxis\")&&(P=F,O=C),-1!==D.indexOf(\"across\")){var N=n._counterDomainMin,B=n._counterDomainMax;\"free\"===n.anchor&&(N=Math.min(N,n.position),B=Math.max(B,n.position)),P=l.t+(1-B)*l.h,O=l.t+(1-N)*l.h}o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:O,\"stroke-width\":z,stroke:R,\"stroke-dasharray\":h.dashStyle(n.spikedash,z)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),o.insert(\"line\",\":first-child\").attr({x1:E,x2:E,y1:P,y2:O,\"stroke-width\":z+2,stroke:d}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}-1!==D.indexOf(\"marker\")&&o.insert(\"circle\",\":first-child\").attr({cx:E,cy:F-(\"top\"!==n.side?z:-z),r:z,fill:R}).classed(\"spikeline\",!0)}}}function N(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function B(t,e){return c.plainText(t||\"\",{len:e,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\"]})}function j(t,e,r){var n=e[t+\"a\"],i=e[t+\"Val\"],a=e.cd[0];if(\"category\"===n.type||\"multicategory\"===n.type)i=n._categoriesMap[i];else if(\"date\"===n.type){var o=e.trace[t+\"periodalignment\"];if(o){var s=e.cd[e.index],l=s[t+\"Start\"];void 0===l&&(l=s[t]);var u=s[t+\"End\"];void 0===u&&(u=s[t]);var c=u-l;\"end\"===o?i+=c:\"middle\"===o&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(\"group\"!==r.boxmode&&\"group\"!==r.violinmode||(i+=a.t.dPos)),i}function U(t){return t.offsetTop+t.clientTop}function V(t){return t.offsetLeft+t.clientLeft}function H(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,u=o.apply3DTransform(r._invTransform)(i,a),c=o.apply3DTransform(r._invTransform)(s,l),f=u[0],h=u[1],p=c[0],d=c[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{\"../../lib\":515,\"../../lib/events\":504,\"../../lib/override_cursor\":526,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"../color\":367,\"../dragelement\":386,\"../drawing\":389,\"../legend/defaults\":419,\"../legend/draw\":420,\"./constants\":401,\"./helpers\":403,\"@plotly/d3\":58,\"fast-isnumeric\":190,tinycolor2:313}],405:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./helpers\").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l(\"size\"),l(\"family\"),l(\"color\"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r(\"hoverlabel.bgcolor\",o.bgcolor),r(\"hoverlabel.bordercolor\",o.bordercolor),r(\"hoverlabel.namelength\",o.namelength),n.coerceFont(r,\"hoverlabel.font\",o.font),r(\"hoverlabel.align\",o.align)}},{\"../../lib\":515,\"../color\":367,\"./helpers\":403}],406:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r(\"clickmode\"),r(\"hovermode\")}},{\"../../lib\":515,\"./layout_attributes\":408}],407:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../dragelement\"),o=t(\"./helpers\"),s=t(\"./layout_attributes\"),l=t(\"./hover\");e.exports={moduleType:\"component\",name:\"fx\",constants:t(\"./constants\"),schema:{layout:s},attributes:t(\"./attributes\"),layoutAttributes:s,supplyLayoutGlobalDefaults:t(\"./layout_global_defaults\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,\"hoverlabel.\"+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,\"hoverinfo\",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll(\"g.hovertext\").remove(),e.selectAll(\".spikeline\").remove()},click:t(\"./click\")}},{\"../../lib\":515,\"../dragelement\":386,\"./attributes\":398,\"./calc\":399,\"./click\":400,\"./constants\":401,\"./defaults\":402,\"./helpers\":403,\"./hover\":404,\"./layout_attributes\":408,\"./layout_defaults\":409,\"./layout_global_defaults\":410,\"@plotly/d3\":58}],408:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\"),a=i({editType:\"none\"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:\"flaglist\",flags:[\"event\",\"select\"],dflt:\"event\",editType:\"plot\",extras:[\"none\"]},dragmode:{valType:\"enumerated\",values:[\"zoom\",\"pan\",\"select\",\"lasso\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:a,grouptitlefont:i({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},namelength:{valType:\"integer\",min:-1,dflt:15,editType:\"none\"},editType:\"none\"},selectdirection:{valType:\"enumerated\",values:[\"h\",\"v\",\"d\",\"any\"],dflt:\"any\",editType:\"none\"}}},{\"../../plots/font_attributes\":594,\"./constants\":401}],409:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"./hovermode_defaults\"),o=t(\"./hoverlabel_defaults\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r(\"hoverdistance\"),r(\"spikedistance\")),\"select\"===r(\"dragmode\")&&r(\"selectdirection\");var s=e._has(\"mapbox\"),l=e._has(\"geo\"),u=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===u||s&&l&&2===u)&&(e.dragmode=\"pan\"),o(t,e,r),n.coerceFont(r,\"hoverlabel.grouptitlefont\",e.hoverlabel.font)}},{\"../../lib\":515,\"./hoverlabel_defaults\":405,\"./hovermode_defaults\":406,\"./layout_attributes\":408}],410:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./hoverlabel_defaults\"),a=t(\"./layout_attributes\");e.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},{\"../../lib\":515,\"./hoverlabel_defaults\":405,\"./layout_attributes\":408}],411:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../lib/regex\").counter,a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/cartesian/constants\").idRegex,s=t(\"../../plot_api/plot_template\"),l={rows:{valType:\"integer\",min:1,editType:\"plot\"},roworder:{valType:\"enumerated\",values:[\"top to bottom\",\"bottom to top\"],dflt:\"top to bottom\",editType:\"plot\"},columns:{valType:\"integer\",min:1,editType:\"plot\"},subplots:{valType:\"info_array\",freeLength:!0,dimensions:2,items:{valType:\"enumerated\",values:[i(\"xy\").toString(),\"\"],editType:\"plot\"},editType:\"plot\"},xaxes:{valType:\"info_array\",freeLength:!0,items:{valType:\"enumerated\",values:[o.x.toString(),\"\"],editType:\"plot\"},editType:\"plot\"},yaxes:{valType:\"info_array\",freeLength:!0,items:{valType:\"enumerated\",values:[o.y.toString(),\"\"],editType:\"plot\"},editType:\"plot\"},pattern:{valType:\"enumerated\",values:[\"independent\",\"coupled\"],dflt:\"coupled\",editType:\"plot\"},xgap:{valType:\"number\",min:0,max:1,editType:\"plot\"},ygap:{valType:\"number\",min:0,max:1,editType:\"plot\"},domain:a({name:\"grid\",editType:\"plot\",noGridCell:!0},{}),xside:{valType:\"enumerated\",values:[\"bottom\",\"bottom plot\",\"top plot\",\"top\"],dflt:\"bottom plot\",editType:\"plot\"},yside:{valType:\"enumerated\",values:[\"left\",\"left plot\",\"right plot\",\"right\"],dflt:\"left plot\",editType:\"plot\"},editType:\"plot\"};function u(t,e,r){var n=e[r+\"axes\"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function c(t,e,r,n,i,a){var o=e(t+\"gap\",r),s=e(\"domain.\"+t);e(t+\"side\",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h<i;h++){var p=u+c*h;l[a?i-1-h:h]=[p,p+f]}return l}function f(t,e,r,n,i){var a,o=new Array(r);function s(t,r){-1!==e.indexOf(r)&&void 0===n[r]?(o[t]=r,n[r]=t):o[t]=\"\"}if(Array.isArray(t))for(a=0;a<r;a++)s(a,t[a]);else for(s(0,i),a=1;a<r;a++)s(a,i+(a+1));return o}e.exports={moduleType:\"component\",name:\"grid\",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(t,e){var r=t.grid||{},i=u(e,r,\"x\"),a=u(e,r,\"y\");if(t.grid||i||a){var o,f,h=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),p=Array.isArray(i),d=Array.isArray(a),g=p&&i!==r.xaxes&&d&&a!==r.yaxes;h?(o=r.subplots.length,f=r.subplots[0].length):(d&&(o=a.length),p&&(f=i.length));var v=s.newContainer(e,\"grid\"),m=T(\"rows\",o),y=T(\"columns\",f);if(m*y>1){h||p||d||\"independent\"===T(\"pattern\")&&(h=!0),v._hasSubplotGrid=h;var x,b,_=\"top to bottom\"===T(\"roworder\"),w=h?.2:.1,k=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),v._domains={x:c(\"x\",T,w,x,y),y:c(\"y\",T,k,b,m,_)}}else delete e.grid}function T(t,e){return n.coerce(r,v,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,c,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,v=r.columns,m=\"independent\"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n<g;n++){var _=l[n]=new Array(v),w=x[n]||[];for(i=0;i<v;i++)if(m?(s=1===b?\"xy\":\"x\"+b+\"y\"+b,b++):s=w[i],_[i]=\"\",-1!==p.cartesian.indexOf(s)){if(c=s.indexOf(\"y\"),a=s.slice(0,c),o=s.slice(c),void 0!==y[a]&&y[a]!==i||void 0!==y[o]&&y[o]!==n)continue;_[i]=s,y[a]=i,y[o]=n}}}else{var k=u(e,h,\"x\"),T=u(e,h,\"y\");r.xaxes=f(k,p.xaxis,v,y,\"x\"),r.yaxes=f(T,p.yaxis,g,y,\"y\")}var M=r._anchors={},A=\"top to bottom\"===r.roworder;for(var S in y){var E,C,L,P=S.charAt(0),O=r[P+\"side\"];if(O.length<8)M[S]=\"free\";else if(\"x\"===P){if(\"t\"===O.charAt(0)===A?(E=0,C=1,L=g):(E=g-1,C=-1,L=-1),d){var I=y[S];for(n=E;n!==L;n+=C)if((s=l[n][I])&&(c=s.indexOf(\"y\"),s.slice(0,c)===S)){M[S]=s.slice(c);break}}else for(n=E;n!==L;n+=C)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(S+o)){M[S]=o;break}}else if(\"l\"===O.charAt(0)?(E=0,C=1,L=v):(E=v-1,C=-1,L=-1),d){var D=y[S];for(n=E;n!==L;n+=C)if((s=l[D][n])&&(c=s.indexOf(\"y\"),s.slice(c)===S)){M[S]=s.slice(0,c);break}}else for(n=E;n!==L;n+=C)if(a=r.xaxes[n],-1!==p.cartesian.indexOf(a+S)){M[S]=a;break}}}}}},{\"../../lib\":515,\"../../lib/regex\":532,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/constants\":573,\"../../plots/domain\":593}],412:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/constants\"),i=t(\"../../plot_api/plot_template\").templatedArray;t(\"../../constants/axis_placeable_objects\"),e.exports=i(\"image\",{visible:{valType:\"boolean\",dflt:!0,editType:\"arraydraw\"},source:{valType:\"string\",editType:\"arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},sizex:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizey:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizing:{valType:\"enumerated\",values:[\"fill\",\"contain\",\"stretch\"],dflt:\"contain\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},x:{valType:\"any\",dflt:0,editType:\"arraydraw\"},y:{valType:\"any\",dflt:0,editType:\"arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"top\",editType:\"arraydraw\"},xref:{valType:\"enumerated\",values:[\"paper\",n.idRegex.x.toString()],dflt:\"paper\",editType:\"arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",n.idRegex.y.toString()],dflt:\"paper\",editType:\"arraydraw\"},editType:\"arraydraw\"})},{\"../../constants/axis_placeable_objects\":484,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/constants\":573}],413:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib/to_log_range\");e.exports=function(t,e,r,a){e=e||{};var o=\"log\"===r&&\"linear\"===e.type,s=\"linear\"===r&&\"log\"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,f=e._id.charAt(0),h=0;h<c.length;h++)if(u=\"images[\"+h+\"].\",(l=c[h])[f+\"ref\"]===e._id){var p=l[f],d=l[\"size\"+f],g=null,v=null;if(o){g=i(p,e.range);var m=d/Math.pow(10,g)/2;v=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else v=(g=Math.pow(10,p))*(Math.pow(10,d/2)-Math.pow(10,-d/2));n(g)?n(v)||(v=null):(g=null,v=null),a(u+f,g),a(u+\"size\"+f,v)}}},{\"../../lib/to_log_range\":543,\"fast-isnumeric\":190}],414:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./attributes\");function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a(\"source\");if(!a(\"visible\",!!s))return e;a(\"layer\"),a(\"xanchor\"),a(\"yanchor\"),a(\"sizex\"),a(\"sizey\"),a(\"sizing\"),a(\"opacity\");for(var l={_fullLayout:r},u=[\"x\",\"y\"],c=0;c<2;c++){var f=u[c],h=i.coerceRef(t,e,l,f,\"paper\",void 0);\"paper\"!==h&&i.getFromId(l,h)._imgIndices.push(e._index),i.coercePosition(e,l,a,h,f,0)}return e}e.exports=function(t,e){a(t,e,{name:\"images\",handleItemDefaults:s})}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../../plots/cartesian/axes\":566,\"./attributes\":412}],415:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../drawing\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/axis_ids\"),s=t(\"../../constants/xmlns_namespaces\");e.exports=function(t){var e,r,l=t._fullLayout,u=[],c={},f=[];for(r=0;r<l.images.length;r++){var h=l.images[r];if(h.visible)if(\"below\"===h.layer&&\"paper\"!==h.xref&&\"paper\"!==h.yref){e=o.ref2id(h.xref)+o.ref2id(h.yref);var p=l._plots[e];if(!p){f.push(h);continue}p.mainplot&&(e=p.mainplot.id),c[e]||(c[e]=[]),c[e].push(h)}else\"above\"===h.layer?u.push(h):f.push(h)}var d={left:{sizing:\"xMin\",offset:0},center:{sizing:\"xMid\",offset:-.5},right:{sizing:\"xMax\",offset:-1}},g={top:{sizing:\"YMin\",offset:0},middle:{sizing:\"YMid\",offset:-.5},bottom:{sizing:\"YMax\",offset:-1}};function v(e){var r=n.select(this);if(this._imgSrc!==e.source)if(r.attr(\"xmlns\",s.svg),e.source&&\"data:\"===e.source.slice(0,5))r.attr(\"xlink:href\",e.source),this._imgSrc=e.source;else{var i=new Promise(function(t){var n=new Image;function i(){r.remove(),t()}this.img=n,n.setAttribute(\"crossOrigin\",\"anonymous\"),n.onerror=i,n.onload=function(){var e=document.createElement(\"canvas\");e.width=this.width,e.height=this.height,e.getContext(\"2d\",{willReadFrequently:!0}).drawImage(this,0,0);var n=e.toDataURL(\"image/png\");r.attr(\"xlink:href\",n),t()},r.on(\"error\",i),n.src=e.source,this._imgSrc=e.source}.bind(this));t._promises.push(i)}}function m(e){var r,o,s=n.select(this),u=a.getFromId(t,e.xref),c=a.getFromId(t,e.yref),f=\"domain\"===a.getRefType(e.xref),h=\"domain\"===a.getRefType(e.yref),p=l._size;r=void 0!==u?\"string\"==typeof e.xref&&f?u._length*e.sizex:Math.abs(u.l2p(e.sizex)-u.l2p(0)):e.sizex*p.w,o=void 0!==c?\"string\"==typeof e.yref&&h?c._length*e.sizey:Math.abs(c.l2p(e.sizey)-c.l2p(0)):e.sizey*p.h;var v,m,y=r*d[e.xanchor].offset,x=o*g[e.yanchor].offset,b=d[e.xanchor].sizing+g[e.yanchor].sizing;switch(v=void 0!==u?\"string\"==typeof e.xref&&f?u._length*e.x+u._offset:u.r2p(e.x)+u._offset:e.x*p.w+p.l,v+=y,m=void 0!==c?\"string\"==typeof e.yref&&h?c._length*(1-e.y)+c._offset:c.r2p(e.y)+c._offset:p.h-e.y*p.h+p.t,m+=x,e.sizing){case\"fill\":b+=\" slice\";break;case\"stretch\":b=\"none\"}s.attr({x:v,y:m,width:r,height:o,preserveAspectRatio:b,opacity:e.opacity});var _=(u&&\"domain\"!==a.getRefType(e.xref)?u._id:\"\")+(c&&\"domain\"!==a.getRefType(e.yref)?c._id:\"\");i.setClipUrl(s,_?\"clip\"+l._uid+_:null,t)}var y=l._imageLowerLayer.selectAll(\"image\").data(f),x=l._imageUpperLayer.selectAll(\"image\").data(u);y.enter().append(\"image\"),x.enter().append(\"image\"),y.exit().remove(),x.exit().remove(),y.each((function(t){v.bind(this)(t),m.bind(this)(t)})),x.each((function(t){v.bind(this)(t),m.bind(this)(t)}));var b=Object.keys(l._plots);for(r=0;r<b.length;r++){e=b[r];var _=l._plots[e];if(_.imagelayer){var w=_.imagelayer.selectAll(\"image\").data(c[e]||[]);w.enter().append(\"image\"),w.exit().remove(),w.each((function(t){v.bind(this)(t),m.bind(this)(t)}))}}}},{\"../../constants/xmlns_namespaces\":492,\"../../plots/cartesian/axes\":566,\"../../plots/cartesian/axis_ids\":570,\"../drawing\":389,\"@plotly/d3\":58}],416:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"images\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"images\"),draw:t(\"./draw\"),convertCoords:t(\"./convert_coords\")}},{\"../../plots/cartesian/include_components\":577,\"./attributes\":412,\"./convert_coords\":413,\"./defaults\":414,\"./draw\":415}],417:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\");e.exports={bgcolor:{valType:\"color\",editType:\"legend\"},bordercolor:{valType:\"color\",dflt:i.defaultLine,editType:\"legend\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"legend\"},font:n({editType:\"legend\"}),grouptitlefont:n({editType:\"legend\"}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"v\",editType:\"legend\"},traceorder:{valType:\"flaglist\",flags:[\"reversed\",\"grouped\"],extras:[\"normal\"],editType:\"legend\"},tracegroupgap:{valType:\"number\",min:0,dflt:10,editType:\"legend\"},entrywidth:{valType:\"number\",min:0,editType:\"legend\"},entrywidthmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\",editType:\"legend\"},itemsizing:{valType:\"enumerated\",values:[\"trace\",\"constant\"],dflt:\"trace\",editType:\"legend\"},itemwidth:{valType:\"number\",min:30,dflt:30,editType:\"legend\"},itemclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],dflt:\"toggle\",editType:\"legend\"},itemdoubleclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],dflt:\"toggleothers\",editType:\"legend\"},groupclick:{valType:\"enumerated\",values:[\"toggleitem\",\"togglegroup\"],dflt:\"togglegroup\",editType:\"legend\"},x:{valType:\"number\",min:-2,max:3,editType:\"legend\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"legend\"},y:{valType:\"number\",min:-2,max:3,editType:\"legend\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],editType:\"legend\"},uirevision:{valType:\"any\",editType:\"none\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"legend\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"legend\"},font:n({editType:\"legend\"}),side:{valType:\"enumerated\",values:[\"top\",\"left\",\"top left\"],editType:\"legend\"},editType:\"legend\"},editType:\"legend\"}},{\"../../plots/font_attributes\":594,\"../color/attributes\":366}],418:[function(t,e,r){\"use strict\";e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:\"#808BA4\",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},{}],419:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plot_api/plot_template\"),o=t(\"../../plots/attributes\"),s=t(\"./attributes\"),l=t(\"../../plots/layout_attributes\"),u=t(\"./helpers\");e.exports=function(t,e,r){var c,f=t.legend||{},h=a.newContainer(e,\"legend\");function p(t,e){return i.coerce(f,h,s,t,e)}for(var d=function(t,e){var r=c._input,n=c;return i.coerce(r,n,o,t,e)},g=e.font||{},v=i.coerceFont(p,\"grouptitlefont\",i.extendFlat({},g,{size:Math.round(1.1*g.size)})),m=0,y=!1,x=\"normal\",b=0;b<r.length;b++)(c=r[b]).visible&&((c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&!1===c._module.attributes.showlegend.dflt))&&(m++,c.showlegend&&(y=!0,(n.traceIs(c,\"pie-like\")||!0===c._input.showlegend)&&m++),i.coerceFont(d,\"legendgrouptitle.font\",v)),(n.traceIs(c,\"bar\")&&\"stack\"===e.barmode||-1!==[\"tonextx\",\"tonexty\"].indexOf(c.fill))&&(x=u.isGrouped({traceorder:x})?\"grouped+reversed\":\"reversed\"),void 0!==c.legendgroup&&\"\"!==c.legendgroup&&(x=u.isReversed({traceorder:x})?\"reversed+grouped\":\"grouped\"));var _=i.coerce(t,e,l,\"showlegend\",y&&m>1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p(\"uirevision\",e.uirevision),!1!==_)){p(\"bgcolor\",e.paper_bgcolor),p(\"bordercolor\"),p(\"borderwidth\");var w,k,T,M=i.coerceFont(p,\"font\",e.font),A=\"h\"===p(\"orientation\");if(A?(w=0,n.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?(k=1.1,T=\"bottom\"):(k=-.1,T=\"top\")):(w=1.02,k=1,T=\"auto\"),p(\"traceorder\",x),u.isGrouped(e.legend)&&p(\"tracegroupgap\"),p(\"entrywidth\"),p(\"entrywidthmode\"),p(\"itemsizing\"),p(\"itemwidth\"),p(\"itemclick\"),p(\"itemdoubleclick\"),p(\"groupclick\"),p(\"x\",w),p(\"xanchor\"),p(\"y\",k),p(\"yanchor\",T),p(\"valign\"),i.noneOrAll(f,h,[\"x\",\"y\"]),p(\"title.text\")){p(\"title.side\",A?\"left\":\"top\");var S=i.extendFlat({},M,{size:i.bigFont(M.size)});i.coerceFont(p,\"title.font\",S)}}}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../plots/attributes\":562,\"../../plots/layout_attributes\":619,\"../../registry\":647,\"./attributes\":417,\"./helpers\":423}],420:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib/events\"),l=t(\"../dragelement\"),u=t(\"../drawing\"),c=t(\"../color\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./handle_click\"),p=t(\"./constants\"),d=t(\"../../constants/alignment\"),g=d.LINE_SPACING,v=d.FROM_TL,m=d.FROM_BR,y=t(\"./get_legend_data\"),x=t(\"./style\"),b=t(\"./helpers\");function _(t,e){var r,s=t._fullLayout,f=\"legend\"+s._uid,h=e._inHover;if(h?(r=e.layer,f+=\"-hover\"):r=s._infolayer,r){var d;if(t._legendMouseDownTime||(t._legendMouseDownTime=0),h){if(!e.entries)return;d=y(e.entries,e)}else{if(!t.calcdata)return;d=s.showlegend&&y(t.calcdata,e)}var g=s.hiddenlabels||[];if(!(h||s.showlegend&&d.length))return r.selectAll(\".legend\").remove(),s._topdefs.select(\"#\"+f).remove(),a.autoMargin(t,\"legend\");var _=i.ensureSingle(r,\"g\",\"legend\",(function(t){h||t.attr(\"pointer-events\",\"all\")})),M=i.ensureSingleById(s._topdefs,\"clipPath\",f,(function(t){t.append(\"rect\")})),L=i.ensureSingle(_,\"rect\",\"bg\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));L.call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\");var P=i.ensureSingle(_,\"g\",\"scrollbox\"),O=e.title;if(e._titleWidth=0,e._titleHeight=0,O.text){var I=i.ensureSingle(P,\"text\",\"legendtitletext\");I.attr(\"text-anchor\",\"start\").call(u.font,O.font).text(O.text),S(I,P,t,e,1)}else P.selectAll(\".legendtitletext\").remove();var D=i.ensureSingle(_,\"rect\",\"scrollbar\",(function(t){t.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)})),z=P.selectAll(\"g.groups\").data(d);z.enter().append(\"g\").attr(\"class\",\"groups\"),z.exit().remove();var R=z.selectAll(\"g.traces\").data(i.identity);R.enter().append(\"g\").attr(\"class\",\"traces\"),R.exit().remove(),R.style(\"opacity\",(function(t){var e=t[0].trace;return o.traceIs(e,\"pie-like\")?-1!==g.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1})).each((function(){n.select(this).call(T,t,e)})).call(x,t,e).each((function(){h||n.select(this).call(A,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),c=\"fraction\"===i.entrywidthmode,f=i.borderwidth,h=2*f,d=p.itemGap,g=i.itemwidth+2*d,v=2*(f+d),m=C(i),y=i.y<0||0===i.y&&\"top\"===m,x=i.y>1||1===i.y&&\"bottom\"===m,_=i.tracegroupgap,k={};i._maxHeight=Math.max(y||x?a.height/2:o.h,30);var T=0;i._width=0,i._height=0;var M=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf(\"left\")&&(e=t._titleWidth),-1!==n.indexOf(\"top\")&&(r=t._titleHeight)),[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;u.setTranslate(this,f+M[0],f+M[1]+i._height+e/2+d),i._height+=e,i._width=Math.max(i._width,t[0].width)})),T=g+i._width,i._width+=d+g+h,i._height+=v,l&&(e.each((function(t,e){u.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var A=E(i),S=i.x<0||0===i.x&&\"right\"===A,L=i.x>1||1===i.x&&\"left\"===A,P=x||y,O=a.width/2;i._maxWidth=Math.max(S?P&&\"left\"===A?o.l+o.w:O:L?P&&\"right\"===A?o.r+o.w:O:o.w,2*g);var I=0,D=0;r.each((function(t){var e=w(t,i,g);I=Math.max(I,e),D+=e})),T=null;var z=0;if(l){var R=0,F=0,N=0;e.each((function(){var t=0,e=0;n.select(this).selectAll(\"g.traces\").each((function(r){var n=w(r,i,g),a=r[0].height;u.setTranslate(this,M[0],M[1]+f+d+a/2+e),e+=a,t=Math.max(t,n),k[r[0].trace.legendgroup]=t}));var r=t+d;F>0&&r+f+F>i._maxWidth?(z=Math.max(z,F),F=0,N+=R+_,R=e):R=Math.max(R,e),u.setTranslate(this,F,N),F+=r})),i._width=Math.max(z,F)+f,i._height=N+R+v}else{var B=r.size(),j=D+h+(B-1)*d<i._maxWidth,U=0,V=0,H=0,q=0;r.each((function(t){var e=t[0].height,r=w(t,i,g),n=j?r:I;c||(n+=d),n+f+V-d>=i._maxWidth&&(z=Math.max(z,q),V=0,H+=U,i._height+=U,U=0),u.setTranslate(this,M[0]+f+V,M[1]+f+H+e/2+d),q=V+r+d,V+=n,U=Math.max(U,e)})),j?(i._width=V+h,i._height=U+v):(i._width=Math.max(z,q)+h,i._height+=U+v)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(f+p.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(f+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var G=t._context.edits,Y=G.legendText||G.legendPosition;r.each((function(t){var e=n.select(this).select(\".legendtoggle\"),r=t[0].height,a=t[0].trace.legendgroup,o=w(t,i,g);l&&\"\"!==a&&(o=k[a]);var f=Y?g:T||o;s||c||(f+=d/2),u.setRect(e,0,-r/2,f,r)}))}(t,z,R,e)},function(){var c,d,g,y,x=s._size,b=e.borderwidth;if(!h){if(function(t){var e=t._fullLayout.legend,r=E(e),n=C(e);return a.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e._width*v[r],r:e._width*m[r],b:e._effHeight*m[n],t:e._effHeight*v[n]})}(t))return;var w=x.l+x.w*e.x-v[E(e)]*e._width,T=x.t+x.h*(1-e.y)-v[C(e)]*e._effHeight;if(s.margin.autoexpand){var A=w,S=T;w=i.constrain(w,0,s.width-e._width),T=i.constrain(T,0,s.height-e._effHeight),w!==A&&i.log(\"Constrain legend.x to make legend fit inside graph\"),T!==S&&i.log(\"Constrain legend.y to make legend fit inside graph\")}u.setTranslate(_,w,T)}if(D.on(\".drag\",null),_.on(\"wheel\",null),h||e._height<=e._maxHeight||t._context.staticPlot){var O=e._effHeight;h&&(O=e._height),L.attr({width:e._width-b,height:O-b,x:b/2,y:b/2}),u.setTranslate(P,0,0),M.select(\"rect\").attr({width:e._width-2*b,height:O-2*b,x:b,y:b}),u.setClipUrl(P,f,t),u.setRect(D,0,0,0,0),delete e._scrollY}else{var I,z,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),N=e._effHeight-F-2*p.scrollBarMargin,B=e._height-e._effHeight,j=N/B,U=Math.min(e._scrollY||0,B);L.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),M.select(\"rect\").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),u.setClipUrl(P,f,t),q(U,F,j),_.on(\"wheel\",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/N*B,0,B),F,j),0!==U&&U!==B&&n.event.preventDefault()}));var V=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;I=\"touchstart\"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on(\"drag\",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(z=\"touchmove\"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,B)}(R,I,z),F,j))}));D.call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){var t=n.event.sourceEvent;\"touchstart\"===t.type&&(I=t.changedTouches[0].clientY,R=U)})).on(\"drag\",(function(){var t=n.event.sourceEvent;\"touchmove\"===t.type&&(z=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,B)}(R,I,z),F,j))}));P.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,u.setTranslate(P,0,-r),u.setRect(D,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),M.select(\"rect\").attr(\"y\",b+r)}t._context.edits.legendPosition&&(_.classed(\"cursor-move\",!0),l.init({element:_.node(),gd:t,prepFn:function(){var t=u.getTranslate(_);g=t.x,y=t.y},moveFn:function(t,r){var n=g+t,i=y+r;u.setTranslate(_,n,i),c=l.align(n,0,x.l,x.l+x.w,e.xanchor),d=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==c&&void 0!==d&&o.call(\"_guiRelayout\",t,{\"legend.x\":c,\"legend.y\":d})},clickFn:function(e,n){var i=r.selectAll(\"g.traces\").filter((function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom}));i.size()>0&&k(t,_,i,e,n)}}))}],t)}}function w(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return\"fraction\"===a?e._maxWidth*o:r+(o||i)}function k(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,\"pie-like\")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,\"plotly_legendclick\",l)&&(1===n?e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay):2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,\"plotly_legenddoubleclick\",l)&&h(r,t,n)))}function T(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,c=o.traceIs(l,\"pie-like\"),h=!r._inHover&&e._context.edits.legendText&&!c,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=c?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var g=i.ensureSingle(t,\"text\",\"legendtext\");g.attr(\"text-anchor\",\"start\").call(u.font,a).text(h?M(n,d):n);var v=r.itemwidth+2*p.itemGap;f.positionText(g,v,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(S,t,e,r).on(\"edit\",(function(n){this.text(M(n,d)).call(S,t,e,r);var a=s.trace._fullInput||{},u={};if(o.hasTransform(a,\"groupby\")){var c=o.getTransformIndices(a,\"groupby\"),f=c[c.length-1],h=i.keyedContainer(a,\"transforms[\"+f+\"].styles\",\"target\",\"value.name\");h.set(s.trace._group,n),u=h.constructUpdate()}else u.name=n;return o.call(\"_guiRestyle\",e,u,l.index)})):S(g,t,e,r)}function M(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||\"\").length;n>0;n--)t+=\" \";return t}function A(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,\"rect\",\"legendtoggle\",(function(t){e._context.staticPlot||t.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),t.call(c.fill,\"rgba(0,0,0,0)\")}));e._context.staticPlot||(s.on(\"mousedown\",(function(){(r=(new Date).getTime())-e._legendMouseDownTime<a?o+=1:(o=1,e._legendMouseDownTime=r)})),s.on(\"mouseup\",(function(){if(!e._dragged&&!e._editing){var r=e._fullLayout.legend;(new Date).getTime()-e._legendMouseDownTime>a&&(o=Math.max(o-1,1)),k(e,r,t,o,n.event)}})))}function S(t,e,r,n,i){n._inHover&&t.attr(\"data-notex\",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=t.select(\"g[class*=math-group]\"),o=a.node();r||(r=e._fullLayout.legend);var s,l,c=r.borderwidth,h=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*g;if(o){var d=u.bBox(o);s=d.height,l=d.width,1===n?u.setTranslate(a,c,c+.75*s):u.setTranslate(a,0,.25*s)}else{var v=t.select(1===n?\".legendtitletext\":\".legendtext\"),m=f.lineCount(v),y=v.node();if(s=h*m,l=y?u.bBox(y).width:0,1===n)\"left\"===r.title.side&&(l+=2*p.itemGap),f.positionText(v,c+p.titlePad,c+h);else{var x=2*p.itemGap+r.itemwidth;i.groupTitle&&(x=p.itemGap,l-=r.itemwidth),f.positionText(v,x,-h*((m-1)/2-.3))}}1===n?(r._titleWidth=l,r._titleHeight=s):(i.lineHeight=h,i.height=Math.max(s,16)+3,i.width=l)}else t.remove()}(e,r,n,i)}))}function E(t){return i.isRightAnchor(t)?\"right\":i.isCenterAnchor(t)?\"center\":\"left\"}function C(t){return i.isBottomAnchor(t)?\"bottom\":i.isMiddleAnchor(t)?\"middle\":\"top\"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),_(t,e)}},{\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/events\":504,\"../../lib/svg_text_utils\":541,\"../../plots/plots\":628,\"../../registry\":647,\"../color\":367,\"../dragelement\":386,\"../drawing\":389,\"./constants\":418,\"./get_legend_data\":421,\"./handle_click\":422,\"./helpers\":423,\"./style\":425,\"@plotly/d3\":58}],421:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./helpers\");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),u={},c=[],f=!1,h={},p=0,d=0;function g(t,r){if(\"\"!==t&&i.isGrouped(e))-1===c.indexOf(t)?(c.push(t),f=!0,u[t]=[r]):u[t].push(r);else{var n=\"~~i\"+p;c.push(n),u[n]=[r],p++}}for(r=0;r<t.length;r++){var v=t[r],m=v[0],y=m.trace,x=y.legendgroup;if(o||y.visible&&y.showlegend)if(n.traceIs(y,\"pie-like\"))for(h[x]||(h[x]={}),a=0;a<v.length;a++){var b=v[a].label;h[x][b]||(g(x,{label:b,color:v[a].color,i:v[a].i,trace:y,pts:v[a].pts}),h[x][b]=!0,d=Math.max(d,(b||\"\").length))}else g(x,m),d=Math.max(d,(y.name||\"\").length)}if(!c.length)return[];var _=!f||!s,w=[];for(r=0;r<c.length;r++){var k=u[c[r]];_?w.push(k[0]):w.push(k)}for(_&&(w=[w]),r=0;r<w.length;r++){var T=1/0;for(a=0;a<w[r].length;a++){var M=w[r][a].trace.legendrank;T>M&&(T=M)}w[r][0]._groupMinRank=T,w[r][0]._preGroupSort=r}var A=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;r<w.length;r++){w[r].forEach((function(t,e){t._preSort=e})),w[r].sort(A);var S=w[r][0].trace,E=null;for(a=0;a<w[r].length;a++){var C=w[r][a].trace.legendgrouptitle;if(C&&C.text){E=C,o&&(C.font=e._groupTitleFont);break}}if(l&&w[r].reverse(),E){var L=!1;for(a=0;a<w[r].length;a++)if(n.traceIs(w[r][a].trace,\"pie-like\")){L=!0;break}w[r].unshift({i:-1,groupTitle:E,noClick:L,trace:{showlegend:S.showlegend,legendgroup:S.legendgroup,visible:\"toggleitem\"===e.groupclick||S.visible}})}for(a=0;a<w[r].length;a++)w[r][a]=[w[r][a]]}return e._lgroupsLength=w.length,e._maxNameLength=d,w}},{\"../../registry\":647,\"./helpers\":423}],422:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=!0;e.exports=function(t,e,r){var o=e._fullLayout;if(!e._dragged&&!e._editing){var s,l=o.legend.itemclick,u=o.legend.itemdoubleclick,c=o.legend.groupclick;if(1===r&&\"toggle\"===l&&\"toggleothers\"===u&&a&&e.data&&e._context.showTips?(n.notifier(n._(e,\"Double-click on legend to isolate one trace\"),\"long\"),a=!1):a=!1,1===r?s=l:2===r&&(s=u),s){var f=\"togglegroup\"===c,h=o.hiddenlabels?o.hiddenlabels.slice():[],p=t.data()[0][0];if(!p.groupTitle||!p.noClick){var d,g,v,m,y,x=e._fullData,b=p.trace,_=b.legendgroup,w={},k=[],T=[],M=[];if(i.traceIs(b,\"pie-like\")){var A=p.label,S=h.indexOf(A);\"toggle\"===s?-1===S?h.push(A):h.splice(S,1):\"toggleothers\"===s&&(h=[],e.calcdata[0].forEach((function(t){A!==t.label&&h.push(t.label)})),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===h.length&&-1===S&&(h=[])),i.call(\"_guiRelayout\",e,\"hiddenlabels\",h)}else{var E,C=_&&_.length,L=[];if(C)for(d=0;d<x.length;d++)(E=x[d]).visible&&E.legendgroup===_&&L.push(d);if(\"toggle\"===s){var P;switch(b.visible){case!0:P=\"legendonly\";break;case!1:P=!1;break;case\"legendonly\":P=!0}if(C)if(f)for(d=0;d<x.length;d++)!1!==x[d].visible&&x[d].legendgroup===_&&j(x[d],P);else j(b,P);else j(b,P)}else if(\"toggleothers\"===s){var O,I,D,z,R=!0;for(d=0;d<x.length;d++)if(O=x[d]===b,D=!0!==x[d].showlegend,!(O||D||(I=C&&x[d].legendgroup===_)||!0!==x[d].visible||i.traceIs(x[d],\"notLegendIsolatable\"))){R=!1;break}for(d=0;d<x.length;d++)if(!1!==x[d].visible&&!i.traceIs(x[d],\"notLegendIsolatable\"))switch(b.visible){case\"legendonly\":j(x[d],!0);break;case!0:z=!!R||\"legendonly\",O=x[d]===b,D=!0!==x[d].showlegend&&!x[d].legendgroup,I=O||C&&x[d].legendgroup===_,j(x[d],!(!I&&!D)||z)}}for(d=0;d<T.length;d++)if(v=T[d]){var F=v.constructUpdate(),N=Object.keys(F);for(g=0;g<N.length;g++)m=N[g],(w[m]=w[m]||[])[M[d]]=F[m]}for(y=Object.keys(w),d=0;d<y.length;d++)for(m=y[d],g=0;g<k.length;g++)w[m].hasOwnProperty(g)||(w[m][g]=void 0);i.call(\"_guiRestyle\",e,w,k)}}}}function B(t,e,r){var n=k.indexOf(t),i=w[e];return i||(i=w[e]=[]),-1===k.indexOf(t)&&(k.push(t),n=k.length-1),i[n]=r,n}function j(t,e){if(!p.groupTitle||f){var r=t._fullInput;if(i.hasTransform(r,\"groupby\")){var a=T[r.index];if(!a){var o=i.getTransformIndices(r,\"groupby\"),s=o[o.length-1];a=n.keyedContainer(r,\"transforms[\"+s+\"].styles\",\"target\",\"value.visible\"),T[r.index]=a}var l=a.get(t._group);void 0===l&&(l=!0),!1!==l&&a.set(t._group,e),M[r.index]=B(r.index,\"visible\",!1!==r.visible)}else{var u=!1!==r.visible&&e;B(r.index,\"visible\",u)}}}}},{\"../../lib\":515,\"../../registry\":647}],423:[function(t,e,r){\"use strict\";r.isGrouped=function(t){return-1!==(t.traceorder||\"\").indexOf(\"grouped\")},r.isVertical=function(t){return\"h\"!==t.orientation},r.isReversed=function(t){return-1!==(t.traceorder||\"\").indexOf(\"reversed\")}},{}],424:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"legend\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),draw:t(\"./draw\"),style:t(\"./style\")}},{\"./attributes\":417,\"./defaults\":419,\"./draw\":420,\"./style\":425}],425:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=a.strTranslate,s=t(\"../drawing\"),l=t(\"../color\"),u=t(\"../colorscale/helpers\").extractOpts,c=t(\"../../traces/scatter/subtypes\"),f=t(\"../../traces/pie/style_one\"),h=t(\"../../traces/pie/helpers\").castOption,p=t(\"./constants\");function d(t,e){return(e?\"radial\":\"horizontal\")+(t?\"\":\"reversed\")}function g(t){var e=t[0].trace,r=e.contours,n=c.hasLines(e),i=c.hasMarkers(e),a=e.visible&&e.fill&&\"none\"!==e.fill,o=!1,s=!1;if(r){var l=r.coloring;\"lines\"===l?o=!0:n=\"none\"===l||\"heatmap\"===l||r.showlines,\"constraint\"===r.type?a=\"=\"!==r._operation:\"fill\"!==l&&\"heatmap\"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function v(t,e,r){return t&&a.isArrayOrTypedArray(t)?e:t>r?r:t}e.exports=function(t,e,r){var m=e._fullLayout;r||(r=m.legend);var y=\"constant\"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function k(t,a,o){var c=t[0].trace,f=c.marker||{},h=f.line||{},p=o?c.visible&&c.type===o:i.traceIs(c,\"bar\"),d=n.select(a).select(\"g.legendpoints\").selectAll(\"path.legend\"+o).data(p?[t]:[]);d.enter().append(\"path\").classed(\"legend\"+o,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style(\"stroke-width\",o+\"px\");var p=a.mcc;if(!r._inHover&&\"mc\"in a){var d=u(f),g=d.mid;void 0===g&&(g=(d.max+d.min)/2),p=s.tryColorscale(f,\"\")(g)}var m=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,\"\");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),k=y.fgopacity,T=v(y.size,8,10),M=v(y.solidity,.5,1),A=\"legend-\"+c.uid;i.call(s.pattern,\"legend\",e,A,x,T,M,p,y.fillmode,b,_,k)}else i.call(l.fill,m);o&&l.stroke(i,a.mlc||h.color)}))}function T(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),u=n.select(e).select(\"g.legendpoints\").selectAll(\"path.legend\"+r).data(l?[t]:[]);if(u.enter().append(\"path\").classed(\"legend\"+r,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),u.exit().remove(),u.size()){var c=(s.marker||{}).line,p=w(h(c.width,o.pts),c,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=c.color;var g=a.minExtend(o,{trace:d});f(u,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,\"g\",\"layers\");i.style(\"opacity\",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,u=t[0].height;if(\"middle\"!==s&&l&&u){var c={top:1,bottom:-1}[s]*(.5*(l-u+3));i.attr(\"transform\",o(0,c))}else i.attr(\"transform\",null);i.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0),i.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var f=i.selectAll(\"g.legendsymbols\").data([t]);f.enter().append(\"g\").classed(\"legendsymbols\",!0),f.selectAll(\"g.legendpoints\").data([t]).enter().append(\"g\").classed(\"legendpoints\",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case\"histogram2d\":case\"heatmap\":o=[[\"M-15,-2V4H15V-2Z\"]],r=!0;break;case\"choropleth\":case\"choroplethmapbox\":o=[[\"M-6,-6V6H6V-6Z\"]],r=!0;break;case\"densitymapbox\":o=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],r=\"radial\";break;case\"cone\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],r=!1;break;case\"streamtube\":o=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],r=!1;break;case\"surface\":o=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],r=!0;break;case\"mesh3d\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!1;break;case\"volume\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],r=!0;break;case\"isosurface\":o=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],r=!1}var c=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(o);c.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),c.exit().remove(),c.each((function(t,o){var c,f=n.select(this),h=u(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var v=p.length;c=0===o?p[g?v-1:0][1]:1===o?p[g?0:v-1][1]:p[Math.floor((v-1)/2)][1]}}else{var m=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(m)?m[o]||m[0]:m}f.attr(\"d\",t[0]),c?f.call(l.fill,c):f.call((function(t){if(t.size()){var n=\"legendfill-\"+i.uid;s.gradient(t,e,n,d(g,\"radial\"===r),p,\"fill\")}}))}))})).each((function(t){var e=t[0].trace,r=\"waterfall\"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,k(t,this,\"waterfall\")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(a);o.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",_).style(\"stroke-miterlimit\",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr(\"d\",t[1]).style(\"stroke-width\",a+\"px\").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){k(t,this,\"funnel\")})).each((function(t){k(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(r.visible&&i.traceIs(r,\"box-violin\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",_),o.exit().remove(),o.each((function(){var t=n.select(this);if(\"all\"!==r.boxpoints&&\"all\"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style(\"stroke-width\",i+\"px\").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var u=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});o.call(s.pointStyle,u,e)}}))})).each((function(t){T(t,this,\"funnelarea\")})).each((function(t){T(t,this,\"pie\")})).each((function(t){var r,i,o=g(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,v=o.anyFill,m=o.anyLine,y=t[0],b=y.trace,_=u(b),k=_.colorscale,T=_.reversescale,M=c.hasMarkers(b)||!v?\"M5,0\":m?\"M5,-2\":\"M5,-3\",A=n.select(this),S=A.select(\".legendfill\").selectAll(\"path\").data(l||p?[t]:[]);if(S.enter().append(\"path\").classed(\"js-fill\",!0),S.exit().remove(),S.attr(\"d\",M+\"h\"+x+\"v6h-\"+x+\"z\").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e);else{var r=\"legendfill-\"+b.uid;s.gradient(t,e,r,d(T),k,\"fill\")}})),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var C=A.select(\".legendlines\").selectAll(\"path\").data(f||h?[r]:[]);C.enter().append(\"path\").classed(\"js-line\",!0),C.exit().remove(),C.attr(\"d\",M+(h?\"l\"+x+\",0.0001\":\"h\"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r=\"legendline-\"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(T),k,\"stroke\")}})})).each((function(t){var r,i,o=g(t),l=o.anyFill,u=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,v=!h&&!u&&!l&&c.hasText(d);function m(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||v||f){var b={},w={};if(h){b.mc=m(\"marker.color\",x),b.mx=m(\"marker.symbol\",x),b.mo=m(\"marker.opacity\",a.mean,[.2,1]),b.mlc=m(\"marker.line.color\",x),b.mlw=m(\"marker.line.width\",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var k=m(\"marker.size\",a.mean,[2,16],12);b.ms=k,w.marker.size=k}f&&(w.line={width:m(\"line.width\",x,[0,10],5)}),v&&(b.tx=\"Aa\",b.tp=m(\"textposition\",x),b.ts=10,b.tc=m(\"textfont.color\",x),b.tf=m(\"textfont.family\",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var T=n.select(this).select(\"g.legendpoints\"),M=T.selectAll(\"path.scatterpts\").data(h?r:[]);M.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",_),M.exit().remove(),M.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var A=T.selectAll(\"g.pointtext\").data(v?r:[]);A.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",_),A.exit().remove(),A.selectAll(\"text\").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(e.visible&&\"candlestick\"===e.type?[t,t]:[]);r.enter().append(\"path\").classed(\"legendcandle\",!0).attr(\"d\",(function(t,e){return e?\"M-15,0H-8M-8,6V-6H8Z\":\"M15,0H8M8,-6V6H-8Z\"})).attr(\"transform\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"stroke-width\",o+\"px\").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(e.visible&&\"ohlc\"===e.type?[t,t]:[]);r.enter().append(\"path\").classed(\"legendohlc\",!0).attr(\"d\",(function(t,e){return e?\"M-15,0H0M-8,-6V0\":\"M15,0H0M8,6V0\"})).attr(\"transform\",_).style(\"stroke-miterlimit\",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?\"increasing\":\"decreasing\"],o=w(void 0,a.line,5,2);i.style(\"fill\",\"none\").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{\"../../lib\":515,\"../../registry\":647,\"../../traces/pie/helpers\":915,\"../../traces/pie/style_one\":921,\"../../traces/scatter/subtypes\":961,\"../color\":367,\"../colorscale/helpers\":378,\"../drawing\":389,\"./constants\":418,\"@plotly/d3\":58}],426:[function(t,e,r){\"use strict\";t(\"./constants\"),e.exports={editType:\"modebar\",orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\",editType:\"modebar\"},bgcolor:{valType:\"color\",editType:\"modebar\"},color:{valType:\"color\",editType:\"modebar\"},activecolor:{valType:\"color\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}},{\"./constants\":428}],427:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/plots\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../fonts/ploticon\"),s=t(\"../shapes/draw\").eraseActiveShape,l=t(\"../../lib\"),u=l._,c=e.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute(\"data-attr\"),l=o.getAttribute(\"data-val\")||!0,u=t._fullLayout,c={},f=a.list(t,null,!0),h=u._cartesianSpikesEnabled;if(\"zoom\"===s){var p,d=\"in\"===l?.5:2,g=(1+d)/2,v=(1-d)/2;for(i=0;i<f.length;i++)if(!(r=f[i]).fixedrange)if(p=r._name,\"auto\"===l)c[p+\".autorange\"]=!0;else if(\"reset\"===l){if(void 0===r._rangeInitial)c[p+\".autorange\"]=!0;else{var m=r._rangeInitial.slice();c[p+\".range[0]\"]=m[0],c[p+\".range[1]\"]=m[1]}void 0!==r._showSpikeInitial&&(c[p+\".showspikes\"]=r._showSpikeInitial,\"on\"!==h||r._showSpikeInitial||(h=\"off\"))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[g*y[0]+v*y[1],g*y[1]+v*y[0]];c[p+\".range[0]\"]=r.l2r(x[0]),c[p+\".range[1]\"]=r.l2r(x[1])}}else\"hovermode\"!==s||\"x\"!==l&&\"y\"!==l||(l=u._isHoriz?\"y\":\"x\",o.setAttribute(\"data-val\",l)),c[s]=l;u._cartesianSpikesEnabled=h,n.call(\"_guiRelayout\",t,c)}function h(t,e){for(var r=e.currentTarget,i=r.getAttribute(\"data-attr\"),a=r.getAttribute(\"data-val\")||!0,o=t._fullLayout._subplots.gl3d||[],s={},l=i.split(\".\"),u=0;u<o.length;u++)s[o[u]+\".\"+l[1]]=a;var c=\"pan\"===a?a:\"zoom\";s.dragmode=c,n.call(\"_guiRelayout\",t,s)}function p(t,e){for(var r=e.currentTarget.getAttribute(\"data-attr\"),i=\"resetLastSave\"===r,a=\"resetDefault\"===r,o=t._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c,f=s[u],h=f+\".camera\",p=f+\".aspectratio\",d=f+\".aspectmode\",g=o[f]._scene;i?(l[h+\".up\"]=g.viewInitial.up,l[h+\".eye\"]=g.viewInitial.eye,l[h+\".center\"]=g.viewInitial.center,c=!0):a&&(l[h+\".up\"]=null,l[h+\".eye\"]=null,l[h+\".center\"]=null,c=!0),c&&(l[p+\".x\"]=g.viewInitial.aspectratio.x,l[p+\".y\"]=g.viewInitial.aspectratio.y,l[p+\".z\"]=g.viewInitial.aspectratio.z,l[d]=g.viewInitial.aspectmode)}n.call(\"_guiRelayout\",t,l)}function d(t,e){var r=e.currentTarget,n=r._previousVal,i=t._fullLayout,a=i._subplots.gl3d||[],o=[\"xaxis\",\"yaxis\",\"zaxis\"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var u=0;u<a.length;u++){var c=a[u],f=i[c],h=c+\".hovermode\";s[h]=f.hovermode,l[h]=!1;for(var p=0;p<3;p++){var d=o[p],g=c+\".\"+d+\".showspikes\";l[g]=!1,s[g]=f[d].showspikes}}r._previousVal=s}return l}function g(t,e){for(var r=e.currentTarget,i=r.getAttribute(\"data-attr\"),a=r.getAttribute(\"data-val\")||!0,o=t._fullLayout,s=o._subplots.geo||[],l=0;l<s.length;l++){var u=s[l],c=o[u];if(\"zoom\"===i){var f=c.projection.scale,h=\"in\"===a?2*f:.5*f;n.call(\"_guiRelayout\",t,u+\".projection.scale\",h)}}\"reset\"===i&&x(t,\"geo\")}function v(t){var e=t._fullLayout;return!e.hovermode&&(e._has(\"cartesian\")?e._isHoriz?\"y\":\"x\":\"closest\")}function m(t){var e=v(t);n.call(\"_guiRelayout\",t,\"hovermode\",e)}function y(t,e){for(var r=e.currentTarget.getAttribute(\"data-val\"),i=t._fullLayout,a=i._subplots.mapbox||[],o={},s=0;s<a.length;s++){var l=a[s],u=i[l].zoom,c=\"in\"===r?1.05*u:u/1.05;o[l+\".zoom\"]=c}n.call(\"_guiRelayout\",t,o)}function x(t,e){for(var r=t._fullLayout,i=r._subplots[e]||[],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];a[s+\".\"+f]=l[f]}n.call(\"_guiRelayout\",t,a)}c.toImage={name:\"toImage\",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||\"png\";return u(t,\"png\"===e?\"Download plot as a png\":\"Download plot\")},icon:o.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||\"png\"};l.notifier(u(t,\"Taking snapshot - this may take a few seconds\"),\"long\"),\"svg\"!==r.format&&l.isIE()&&(l.notifier(u(t,\"IE only supports svg.  Changing format to svg.\"),\"long\"),r.format=\"svg\"),[\"filename\",\"width\",\"height\",\"scale\"].forEach((function(t){t in e&&(r[t]=e[t])})),n.call(\"downloadImage\",t,r).then((function(e){l.notifier(u(t,\"Snapshot succeeded\")+\" - \"+e,\"long\")})).catch((function(){l.notifier(u(t,\"Sorry, there was a problem downloading your snapshot!\"),\"long\")}))}},c.sendDataToCloud={name:\"sendDataToCloud\",title:function(t){return u(t,\"Edit in Chart Studio\")},icon:o.disk,click:function(t){i.sendDataToCloud(t)}},c.editInChartStudio={name:\"editInChartStudio\",title:function(t){return u(t,\"Edit in Chart Studio\")},icon:o.pencil,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:\"zoom2d\",_cat:\"zoom\",title:function(t){return u(t,\"Zoom\")},attr:\"dragmode\",val:\"zoom\",icon:o.zoombox,click:f},c.pan2d={name:\"pan2d\",_cat:\"pan\",title:function(t){return u(t,\"Pan\")},attr:\"dragmode\",val:\"pan\",icon:o.pan,click:f},c.select2d={name:\"select2d\",_cat:\"select\",title:function(t){return u(t,\"Box Select\")},attr:\"dragmode\",val:\"select\",icon:o.selectbox,click:f},c.lasso2d={name:\"lasso2d\",_cat:\"lasso\",title:function(t){return u(t,\"Lasso Select\")},attr:\"dragmode\",val:\"lasso\",icon:o.lasso,click:f},c.drawclosedpath={name:\"drawclosedpath\",title:function(t){return u(t,\"Draw closed freeform\")},attr:\"dragmode\",val:\"drawclosedpath\",icon:o.drawclosedpath,click:f},c.drawopenpath={name:\"drawopenpath\",title:function(t){return u(t,\"Draw open freeform\")},attr:\"dragmode\",val:\"drawopenpath\",icon:o.drawopenpath,click:f},c.drawline={name:\"drawline\",title:function(t){return u(t,\"Draw line\")},attr:\"dragmode\",val:\"drawline\",icon:o.drawline,click:f},c.drawrect={name:\"drawrect\",title:function(t){return u(t,\"Draw rectangle\")},attr:\"dragmode\",val:\"drawrect\",icon:o.drawrect,click:f},c.drawcircle={name:\"drawcircle\",title:function(t){return u(t,\"Draw circle\")},attr:\"dragmode\",val:\"drawcircle\",icon:o.drawcircle,click:f},c.eraseshape={name:\"eraseshape\",title:function(t){return u(t,\"Erase active shape\")},icon:o.eraseshape,click:s},c.zoomIn2d={name:\"zoomIn2d\",_cat:\"zoomin\",title:function(t){return u(t,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:o.zoom_plus,click:f},c.zoomOut2d={name:\"zoomOut2d\",_cat:\"zoomout\",title:function(t){return u(t,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:o.zoom_minus,click:f},c.autoScale2d={name:\"autoScale2d\",_cat:\"autoscale\",title:function(t){return u(t,\"Autoscale\")},attr:\"zoom\",val:\"auto\",icon:o.autoscale,click:f},c.resetScale2d={name:\"resetScale2d\",_cat:\"resetscale\",title:function(t){return u(t,\"Reset axes\")},attr:\"zoom\",val:\"reset\",icon:o.home,click:f},c.hoverClosestCartesian={name:\"hoverClosestCartesian\",_cat:\"hoverclosest\",title:function(t){return u(t,\"Show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:o.tooltip_basic,gravity:\"ne\",click:f},c.hoverCompareCartesian={name:\"hoverCompareCartesian\",_cat:\"hoverCompare\",title:function(t){return u(t,\"Compare data on hover\")},attr:\"hovermode\",val:function(t){return t._fullLayout._isHoriz?\"y\":\"x\"},icon:o.tooltip_compare,gravity:\"ne\",click:f},c.zoom3d={name:\"zoom3d\",_cat:\"zoom\",title:function(t){return u(t,\"Zoom\")},attr:\"scene.dragmode\",val:\"zoom\",icon:o.zoombox,click:h},c.pan3d={name:\"pan3d\",_cat:\"pan\",title:function(t){return u(t,\"Pan\")},attr:\"scene.dragmode\",val:\"pan\",icon:o.pan,click:h},c.orbitRotation={name:\"orbitRotation\",title:function(t){return u(t,\"Orbital rotation\")},attr:\"scene.dragmode\",val:\"orbit\",icon:o[\"3d_rotate\"],click:h},c.tableRotation={name:\"tableRotation\",title:function(t){return u(t,\"Turntable rotation\")},attr:\"scene.dragmode\",val:\"turntable\",icon:o[\"z-axis\"],click:h},c.resetCameraDefault3d={name:\"resetCameraDefault3d\",_cat:\"resetCameraDefault\",title:function(t){return u(t,\"Reset camera to default\")},attr:\"resetDefault\",icon:o.home,click:p},c.resetCameraLastSave3d={name:\"resetCameraLastSave3d\",_cat:\"resetCameraLastSave\",title:function(t){return u(t,\"Reset camera to last save\")},attr:\"resetLastSave\",icon:o.movie,click:p},c.hoverClosest3d={name:\"hoverClosest3d\",_cat:\"hoverclosest\",title:function(t){return u(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:o.tooltip_basic,gravity:\"ne\",click:function(t,e){var r=d(t,e);n.call(\"_guiRelayout\",t,r)}},c.zoomInGeo={name:\"zoomInGeo\",_cat:\"zoomin\",title:function(t){return u(t,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:o.zoom_plus,click:g},c.zoomOutGeo={name:\"zoomOutGeo\",_cat:\"zoomout\",title:function(t){return u(t,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:o.zoom_minus,click:g},c.resetGeo={name:\"resetGeo\",_cat:\"reset\",title:function(t){return u(t,\"Reset\")},attr:\"reset\",val:null,icon:o.autoscale,click:g},c.hoverClosestGeo={name:\"hoverClosestGeo\",_cat:\"hoverclosest\",title:function(t){return u(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:o.tooltip_basic,gravity:\"ne\",click:m},c.hoverClosestGl2d={name:\"hoverClosestGl2d\",_cat:\"hoverclosest\",title:function(t){return u(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:o.tooltip_basic,gravity:\"ne\",click:m},c.hoverClosestPie={name:\"hoverClosestPie\",_cat:\"hoverclosest\",title:function(t){return u(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:o.tooltip_basic,gravity:\"ne\",click:m},c.resetViewSankey={name:\"resetSankeyGroup\",title:function(t){return u(t,\"Reset view\")},icon:o.home,click:function(t){for(var e={\"node.groups\":[],\"node.x\":[],\"node.y\":[]},r=0;r<t._fullData.length;r++){var i=t._fullData[r]._viewInitial;e[\"node.groups\"].push(i.node.groups.slice()),e[\"node.x\"].push(i.node.x.slice()),e[\"node.y\"].push(i.node.y.slice())}n.call(\"restyle\",t,e)}},c.toggleHover={name:\"toggleHover\",title:function(t){return u(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:o.tooltip_basic,gravity:\"ne\",click:function(t,e){var r=d(t,e);r.hovermode=v(t),n.call(\"_guiRelayout\",t,r)}},c.resetViews={name:\"resetViews\",title:function(t){return u(t,\"Reset views\")},icon:o.home,click:function(t,e){var r=e.currentTarget;r.setAttribute(\"data-attr\",\"zoom\"),r.setAttribute(\"data-val\",\"reset\"),f(t,e),r.setAttribute(\"data-attr\",\"resetLastSave\"),p(t,e),x(t,\"geo\"),x(t,\"mapbox\")}},c.toggleSpikelines={name:\"toggleSpikelines\",title:function(t){return u(t,\"Toggle Spike Lines\")},icon:o.spikeline,attr:\"_cartesianSpikesEnabled\",val:\"on\",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=\"on\"===r?\"off\":\"on\",n.call(\"_guiRelayout\",t,function(t){for(var e=\"on\"===t._fullLayout._cartesianSpikesEnabled,r=a.list(t,null,!0),n={},i=0;i<r.length;i++){var o=r[i];n[o._name+\".showspikes\"]=!!e||o._showSpikeInitial}return n}(t))}},c.resetViewMapbox={name:\"resetViewMapbox\",_cat:\"resetView\",title:function(t){return u(t,\"Reset view\")},attr:\"reset\",icon:o.home,click:function(t){x(t,\"mapbox\")}},c.zoomInMapbox={name:\"zoomInMapbox\",_cat:\"zoomin\",title:function(t){return u(t,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:o.zoom_plus,click:y},c.zoomOutMapbox={name:\"zoomOutMapbox\",_cat:\"zoomout\",title:function(t){return u(t,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:o.zoom_minus,click:y}},{\"../../fonts/ploticon\":494,\"../../lib\":515,\"../../plots/cartesian/axis_ids\":570,\"../../plots/plots\":628,\"../../registry\":647,\"../shapes/draw\":462}],428:[function(t,e,r){\"use strict\";var n=t(\"./buttons\"),i=Object.keys(n),a=[\"drawline\",\"drawopenpath\",\"drawclosedpath\",\"drawcircle\",\"drawrect\",\"eraseshape\"],o=[\"v1hovermode\",\"hoverclosest\",\"hovercompare\",\"togglehover\",\"togglespikelines\"].concat(a),s=[];i.forEach((function(t){!function(t){if(-1===o.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),e.exports={DRAW_MODES:a,backButtons:o,foreButtons:s}},{\"./buttons\":427}],429:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"../../plot_api/plot_template\"),o=t(\"./attributes\");e.exports=function(t,e){var r=t.modebar||{},s=a.newContainer(e,\"modebar\");function l(t,e){return n.coerce(r,s,o,t,e)}l(\"orientation\"),l(\"bgcolor\",i.addOpacity(e.paper_bgcolor,.5));var u=i.contrast(i.rgb(e.modebar.bgcolor));l(\"color\",i.addOpacity(u,.3)),l(\"activecolor\",i.addOpacity(u,.7)),l(\"uirevision\",e.uirevision),l(\"add\"),l(\"remove\")}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../color\":367,\"./attributes\":426}],430:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"modebar\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),manage:t(\"./manage\")}},{\"./attributes\":426,\"./defaults\":429,\"./manage\":431}],431:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axis_ids\"),i=t(\"../../traces/scatter/subtypes\"),a=t(\"../../registry\"),o=t(\"../fx/helpers\").isUnifiedHover,s=t(\"./modebar\"),l=t(\"./buttons\"),u=t(\"./constants\").DRAW_MODES,c=t(\"../../lib\").extendDeep;function f(t){var e=t._fullLayout,r=t._fullData,s=t._context;function c(t,e){if(\"string\"==typeof e){if(e.toLowerCase()===t.toLowerCase())return!0}else{var r=e.name,n=e._cat||e.name;if(r===t||n===t.toLowerCase())return!0}return!1}var f=e.modebar.add;\"string\"==typeof f&&(f=[f]);var h=e.modebar.remove;\"string\"==typeof h&&(h=[h]);var p=s.modeBarButtonsToAdd.concat(f.filter((function(t){for(var e=0;e<s.modeBarButtonsToRemove.length;e++)if(c(t,s.modeBarButtonsToRemove[e]))return!1;return!0}))),d=s.modeBarButtonsToRemove.concat(h.filter((function(t){for(var e=0;e<s.modeBarButtonsToAdd.length;e++)if(c(t,s.modeBarButtonsToAdd[e]))return!1;return!0}))),g=e._has(\"cartesian\"),v=e._has(\"gl3d\"),m=e._has(\"geo\"),y=e._has(\"pie\"),x=e._has(\"funnelarea\"),b=e._has(\"gl2d\"),_=e._has(\"ternary\"),w=e._has(\"mapbox\"),k=e._has(\"polar\"),T=e._has(\"smith\"),M=e._has(\"sankey\"),A=function(t){for(var e=n.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(e),S=o(e.hovermode),E=[];function C(t){if(t.length){for(var e=[],r=0;r<t.length;r++){for(var n=t[r],i=l[n],a=i.name.toLowerCase(),o=(i._cat||i.name).toLowerCase(),s=!1,u=0;u<d.length;u++){var c=d[u].toLowerCase();if(c===a||c===o){s=!0;break}}s||e.push(l[n])}E.push(e)}}var L=[\"toImage\"];s.showEditInChartStudio?L.push(\"editInChartStudio\"):s.showSendToCloud&&L.push(\"sendDataToCloud\"),C(L);var P=[],O=[],I=[],D=[];(g||b||y||x||_)+m+v+w+k+T>1?(O=[\"toggleHover\"],I=[\"resetViews\"]):m?(P=[\"zoomInGeo\",\"zoomOutGeo\"],O=[\"hoverClosestGeo\"],I=[\"resetGeo\"]):v?(O=[\"hoverClosest3d\"],I=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):w?(P=[\"zoomInMapbox\",\"zoomOutMapbox\"],O=[\"toggleHover\"],I=[\"resetViewMapbox\"]):b?O=[\"hoverClosestGl2d\"]:y?O=[\"hoverClosestPie\"]:M?(O=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],I=[\"resetViewSankey\"]):O=[\"toggleHover\"],g&&(O=[\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]),(function(t){for(var e=0;e<t.length;e++)if(!a.traceIs(t[e],\"noHover\"))return!1;return!0}(r)||S)&&(O=[]),!g&&!b||A||(P=[\"zoomIn2d\",\"zoomOut2d\",\"autoScale2d\"],\"resetViews\"!==I[0]&&(I=[\"resetScale2d\"])),v?D=[\"zoom3d\",\"pan3d\",\"orbitRotation\",\"tableRotation\"]:(g||b)&&!A||_?D=[\"zoom2d\",\"pan2d\"]:w||m?D=[\"pan2d\"]:k&&(D=[\"zoom2d\"]),function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(a.traceIs(n,\"scatter-like\")?(i.hasMarkers(n)||i.hasText(n))&&(e=!0):a.traceIs(n,\"box-violin\")&&\"all\"!==n.boxpoints&&\"all\"!==n.points||(e=!0))}return e}(r)&&D.push(\"select2d\",\"lasso2d\");var z=[],R=function(t){-1===z.indexOf(t)&&-1!==O.indexOf(t)&&z.push(t)};if(Array.isArray(p)){for(var F=[],N=0;N<p.length;N++){var B=p[N];\"string\"==typeof B?(B=B.toLowerCase(),-1!==u.indexOf(B)?(e._has(\"mapbox\")||e._has(\"cartesian\"))&&D.push(B):\"togglespikelines\"===B?R(\"toggleSpikelines\"):\"togglehover\"===B?R(\"toggleHover\"):\"hovercompare\"===B?R(\"hoverCompareCartesian\"):\"hoverclosest\"===B?(R(\"hoverClosestCartesian\"),R(\"hoverClosestGeo\"),R(\"hoverClosest3d\"),R(\"hoverClosestGl2d\"),R(\"hoverClosestPie\")):\"v1hovermode\"===B&&(R(\"toggleHover\"),R(\"hoverClosestCartesian\"),R(\"hoverCompareCartesian\"),R(\"hoverClosestGeo\"),R(\"hoverClosest3d\"),R(\"hoverClosestGl2d\"),R(\"hoverClosestPie\"))):F.push(B)}p=F}return C(D),C(P.concat(I)),C(z),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}(E,p)}e.exports=function(t){var e=t._fullLayout,r=t._context,n=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error([\"*modeBarButtonsToRemove* configuration options\",\"must be an array.\"].join(\" \"));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error([\"*modeBarButtonsToAdd* configuration options\",\"must be an array.\"].join(\" \"));var i,a=r.modeBarButtons;i=Array.isArray(a)&&a.length?function(t){for(var e=c([],t),r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if(\"string\"==typeof a){if(void 0===l[a])throw new Error([\"*modeBarButtons* configuration options\",\"invalid button name\"].join(\" \"));e[r][i]=l[a]}}return e}(a):!r.displayModeBar&&r.watermark?[]:f(t),n?n.update(t,i):e._modeBar=s(t,i)}else n&&(n.destroy(),delete e._modeBar)}},{\"../../lib\":515,\"../../plots/cartesian/axis_ids\":570,\"../../registry\":647,\"../../traces/scatter/subtypes\":961,\"../fx/helpers\":403,\"./buttons\":427,\"./constants\":428,\"./modebar\":432}],432:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../fonts/ploticon\"),s=t(\"../../version\").version,l=new DOMParser;function u(t){this.container=t.container,this.element=document.createElement(\"div\"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var c=u.prototype;c.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i=\"modebar-\"+n._uid;this.element.setAttribute(\"id\",i),this._uid=i,this.element.className=\"modebar\",\"hover\"===r.displayModeBar&&(this.element.className+=\" modebar--hover ease-bg\"),\"v\"===n.modebar.orientation&&(this.element.className+=\" vertical\",e=e.reverse());var o=n.modebar,s=\"hover\"===r.displayModeBar?\".js-plotly-plot .plotly:hover \":\"\";a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,s+\"#\"+i+\" .modebar-group\",\"background-color: \"+o.bgcolor),a.addRelatedStyleRule(i,\"#\"+i+\" .modebar-btn .icon path\",\"fill: \"+o.color),a.addRelatedStyleRule(i,\"#\"+i+\" .modebar-btn:hover .icon path\",\"fill: \"+o.activecolor),a.addRelatedStyleRule(i,\"#\"+i+\" .modebar-btn.active .icon path\",\"fill: \"+o.activecolor);var l=!this.hasButtons(e),u=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(l||u||c)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+\" watermark\"),\"v\"===n.modebar.orientation?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()},c.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error(\"must provide button 'name' in button config\");if(-1!==e.buttonsNames.indexOf(n))throw new Error(\"button name '\"+n+\"' is taken\");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},c.createGroup=function(){var t=document.createElement(\"div\");return t.className=\"modebar-group\",t},c.createButton=function(t){var e=this,r=document.createElement(\"a\");r.setAttribute(\"rel\",\"tooltip\"),r.className=\"modebar-btn\";var i=t.title;void 0===i?i=t.name:\"function\"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute(\"data-title\",i),void 0!==t.attr&&r.setAttribute(\"data-attr\",t.attr);var a=t.val;if(void 0!==a&&(\"function\"==typeof a&&(a=a(this.graphInfo)),r.setAttribute(\"data-val\",a)),\"function\"!=typeof t.click)throw new Error(\"must provide button 'click' function in button config\");r.addEventListener(\"click\",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute(\"data-toggle\",t.toggle||!1),t.toggle&&n.select(r).classed(\"active\",!0);var s=t.icon;return\"function\"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute(\"data-gravity\",t.gravity||\"n\"),r},c.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n=\"http://www.w3.org/2000/svg\";if(t.path){(e=document.createElementNS(n,\"svg\")).setAttribute(\"viewBox\",[0,0,t.width,r].join(\" \")),e.setAttribute(\"class\",\"icon\");var a=document.createElementNS(n,\"path\");a.setAttribute(\"d\",t.path),t.transform?a.setAttribute(\"transform\",t.transform):void 0!==t.ascent&&a.setAttribute(\"transform\",\"matrix(1 0 0 -1 0 \"+t.ascent+\")\"),e.appendChild(a)}return t.svg&&(e=l.parseFromString(t.svg,\"application/xml\").childNodes[0]),e.setAttribute(\"height\",\"1em\"),e.setAttribute(\"width\",\"1em\"),e},c.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute(\"data-attr\"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute(\"data-val\")||!0,o=t.getAttribute(\"data-attr\"),s=\"true\"===t.getAttribute(\"data-toggle\"),l=n.select(t);if(s)o===r&&l.classed(\"active\",!l.classed(\"active\"));else{var u=null===o?o:a.nestedProperty(e,o).get();l.classed(\"active\",u===i)}}))},c.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},c.getLogo=function(){var t=this.createGroup(),e=document.createElement(\"a\");return e.href=\"https://plotly.com/\",e.target=\"_blank\",e.setAttribute(\"data-title\",a._(this.graphInfo,\"Produced with Plotly.js\")+\" (v\"+s+\")\"),e.className=\"modebar-btn plotlyjsicon modebar-btn--logo\",e.appendChild(this.createIcon(o.newplotlylogo)),t.appendChild(e),t},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){a.removeElement(this.container.querySelector(\".modebar\")),a.deleteRelatedStyleRule(this._uid)},e.exports=function(t,e){var r=t._fullLayout,i=new u({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&n.select(i.element).append(\"span\").classed(\"badge-private float--left\",!0).text(\"PRIVATE\"),i}},{\"../../fonts/ploticon\":494,\"../../lib\":515,\"../../version\":1132,\"@plotly/d3\":58,\"fast-isnumeric\":190}],433:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\"),a=(0,t(\"../../plot_api/plot_template\").templatedArray)(\"button\",{visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},step:{valType:\"enumerated\",values:[\"month\",\"year\",\"day\",\"hour\",\"minute\",\"second\",\"all\"],dflt:\"month\",editType:\"plot\"},stepmode:{valType:\"enumerated\",values:[\"backward\",\"todate\"],dflt:\"backward\",editType:\"plot\"},count:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},label:{valType:\"string\",editType:\"plot\"},editType:\"plot\"});e.exports={visible:{valType:\"boolean\",editType:\"plot\"},buttons:a,x:{valType:\"number\",min:-2,max:3,editType:\"plot\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"plot\"},y:{valType:\"number\",min:-2,max:3,editType:\"plot\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"bottom\",editType:\"plot\"},font:n({editType:\"plot\"}),bgcolor:{valType:\"color\",dflt:i.lightLine,editType:\"plot\"},activecolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:i.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"}},{\"../../plot_api/plot_template\":555,\"../../plots/font_attributes\":594,\"../color/attributes\":366}],434:[function(t,e,r){\"use strict\";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],435:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"../../plot_api/plot_template\"),o=t(\"../../plots/array_container_defaults\"),s=t(\"./attributes\"),l=t(\"./constants\");function u(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o(\"visible\")){var l=o(\"step\");\"all\"!==l&&(!a||\"gregorian\"===a||\"month\"!==l&&\"year\"!==l?o(\"stepmode\"):e.stepmode=\"backward\",o(\"count\")),o(\"label\")}}e.exports=function(t,e,r,c,f){var h=t.rangeselector||{},p=a.newContainer(e,\"rangeselector\");function d(t,e){return n.coerce(h,p,s,t,e)}if(d(\"visible\",o(h,p,{name:\"buttons\",handleItemDefaults:u,calendar:f}).length>0)){var g=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+l.yPad]}(e,r,c);d(\"x\",g[0]),d(\"y\",g[1]),n.noneOrAll(t,e,[\"x\",\"y\"]),d(\"xanchor\"),d(\"yanchor\"),n.coerceFont(d,\"font\",r.font);var v=d(\"bgcolor\");d(\"activecolor\",i.contrast(v,l.lightAmount,l.darkAmount)),d(\"bordercolor\"),d(\"borderwidth\")}}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../plots/array_container_defaults\":561,\"../color\":367,\"./attributes\":433,\"./constants\":434}],436:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../plots/plots\"),o=t(\"../color\"),s=t(\"../drawing\"),l=t(\"../../lib\"),u=l.strTranslate,c=t(\"../../lib/svg_text_utils\"),f=t(\"../../plots/cartesian/axis_ids\"),h=t(\"../../constants/alignment\"),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR,v=t(\"./constants\"),m=t(\"./get_update_object\");function y(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,\"rect\",\"selector-rect\",(function(t){t.attr(\"shape-rendering\",\"crispEdges\")}));n.attr({rx:v.rx,ry:v.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style(\"stroke-width\",e.borderwidth+\"px\")}function b(t,e,r,n){var i,a;l.ensureSingle(t,\"text\",\"selector-text\",(function(t){t.attr(\"text-anchor\",\"middle\")})).call(s.font,e.font).text((i=r,a=n._fullLayout._meta,i.label?a?l.templateString(i.label,a):i.label:\"all\"===i.step?\"all\":i.count+i.step.charAt(0))).call((function(t){c.convertToTspans(t,n)}))}e.exports=function(t){var e=t._fullLayout._infolayer.selectAll(\".rangeselector\").data(function(t){for(var e=f.list(t,\"x\",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),y);e.enter().append(\"g\").classed(\"rangeselector\",!0),e.exit().remove(),e.style({cursor:\"pointer\",\"pointer-events\":\"all\"}),e.each((function(e){var r=n.select(this),o=e,f=o.rangeselector,h=r.selectAll(\"g.button\").data(l.filterVisible(f.buttons));h.enter().append(\"g\").classed(\"button\",!0),h.exit().remove(),h.each((function(e){var r=n.select(this),a=m(o,e);e._isActive=function(t,e,r){if(\"all\"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(x,f,e),r.call(b,f,e,t),r.on(\"click\",(function(){t._dragged||i.call(\"_guiRelayout\",t,a)})),r.on(\"mouseover\",(function(){e._isHovered=!0,r.call(x,f,e)})),r.on(\"mouseout\",(function(){e._isHovered=!1,r.call(x,f,e)}))})),function(t,e,r,i,o){var f=0,h=0,m=r.borderwidth;e.each((function(){var t=n.select(this).select(\".selector-text\"),e=r.font.size*p,i=Math.max(e*c.lineCount(t),16)+3;h=Math.max(h,i)})),e.each((function(){var t=n.select(this),e=t.select(\".selector-rect\"),i=t.select(\".selector-text\"),a=i.node()&&s.bBox(i.node()).width,o=r.font.size*p,l=c.lineCount(i),d=Math.max(a+10,v.minButtonWidth);t.attr(\"transform\",u(m+f,m)),e.attr({x:0,y:0,width:d,height:h}),c.positionText(i,d/2,h/2-(l-1)*o/2+3),f+=d+5}));var y=t._fullLayout._size,x=y.l+y.w*r.x,b=y.t+y.h*(1-r.y),_=\"left\";l.isRightAnchor(r)&&(x-=f,_=\"right\"),l.isCenterAnchor(r)&&(x-=f/2,_=\"center\");var w=\"top\";l.isBottomAnchor(r)&&(b-=h,w=\"bottom\"),l.isMiddleAnchor(r)&&(b-=h/2,w=\"middle\"),f=Math.ceil(f),h=Math.ceil(h),x=Math.round(x),b=Math.round(b),a.autoMargin(t,i+\"-range-selector\",{x:r.x,y:r.y,l:f*d[_],r:f*g[_],b:h*g[w],t:h*d[w]}),o.attr(\"transform\",u(x,b))}(t,h,f,o._name,r)}))}},{\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axis_ids\":570,\"../../plots/plots\":628,\"../../registry\":647,\"../color\":367,\"../drawing\":389,\"./constants\":434,\"./get_update_object\":437,\"@plotly/d3\":58}],437:[function(t,e,r){\"use strict\";var n=t(\"d3-time\"),i=t(\"../../lib\").titleCase;e.exports=function(t,e){var r=t._name,a={};if(\"all\"===e.step)a[r+\".autorange\"]=!0;else{var o=function(t,e){var r,a=t.range,o=new Date(t.r2l(a[1])),s=e.step,l=n[\"utc\"+i(s)],u=e.count;switch(e.stepmode){case\"backward\":r=t.l2r(+l.offset(o,-u));break;case\"todate\":var c=l.offset(o,-u);r=t.l2r(+l.ceil(c))}return[r,a[1]]}(t,e);a[r+\".range[0]\"]=o[0],a[r+\".range[1]\"]=o[1]}return a}},{\"../../lib\":515,\"d3-time\":122}],438:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"rangeselector\",schema:{subplots:{xaxis:{rangeselector:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),draw:t(\"./draw\")}},{\"./attributes\":433,\"./defaults\":435,\"./draw\":436}],439:[function(t,e,r){\"use strict\";var n=t(\"../color/attributes\");e.exports={bgcolor:{valType:\"color\",dflt:n.background,editType:\"plot\"},bordercolor:{valType:\"color\",dflt:n.defaultLine,editType:\"plot\"},borderwidth:{valType:\"integer\",dflt:0,min:0,editType:\"plot\"},autorange:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"calc\",impliedEdits:{\"^autorange\":!1}}],editType:\"calc\",impliedEdits:{autorange:!1}},thickness:{valType:\"number\",dflt:.15,min:0,max:1,editType:\"plot\"},visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"}},{\"../color/attributes\":366}],440:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axis_ids\").list,i=t(\"../../plots/cartesian/autorange\").getAutoRange,a=t(\"./constants\");e.exports=function(t){for(var e=n(t,\"x\",!0),r=0;r<e.length;r++){var o=e[r],s=o[a.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},{\"../../plots/cartesian/autorange\":565,\"../../plots/cartesian/axis_ids\":570,\"./constants\":441}],441:[function(t,e,r){\"use strict\";e.exports={name:\"rangeslider\",containerClassName:\"rangeslider-container\",bgClassName:\"rangeslider-bg\",rangePlotClassName:\"rangeslider-rangeplot\",maskMinClassName:\"rangeslider-mask-min\",maskMaxClassName:\"rangeslider-mask-max\",slideBoxClassName:\"rangeslider-slidebox\",grabberMinClassName:\"rangeslider-grabber-min\",grabAreaMinClassName:\"rangeslider-grabarea-min\",handleMinClassName:\"rangeslider-handle-min\",grabberMaxClassName:\"rangeslider-grabber-max\",grabAreaMaxClassName:\"rangeslider-grabarea-max\",handleMaxClassName:\"rangeslider-handle-max\",maskMinOppAxisClassName:\"rangeslider-mask-min-opp-axis\",maskMaxOppAxisClassName:\"rangeslider-mask-max-opp-axis\",maskColor:\"rgba(0,0,0,0.4)\",maskOppAxisColor:\"rgba(0,0,0,0.2)\",slideBoxFill:\"transparent\",slideBoxCursor:\"ew-resize\",grabAreaFill:\"transparent\",grabAreaCursor:\"col-resize\",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],442:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plot_api/plot_template\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"./attributes\"),s=t(\"./oppaxis_attributes\");e.exports=function(t,e,r){var l=t[r],u=e[r];if(l.rangeslider||e._requestRangeslider[u._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var c,f,h=l.rangeslider,p=i.newContainer(u,\"rangeslider\");if(_(\"visible\")){_(\"bgcolor\",e.plot_bgcolor),_(\"bordercolor\"),_(\"borderwidth\"),_(\"thickness\"),_(\"autorange\",!u.isValidRange(h.range)),_(\"range\");var d=e._subplots;if(d)for(var g=d.cartesian.filter((function(t){return t.substr(0,t.indexOf(\"y\"))===a.name2id(r)})).map((function(t){return t.substr(t.indexOf(\"y\"),t.length)})),v=n.simpleMap(g,a.id2name),m=0;m<v.length;m++){var y=v[m];c=h[y]||{},f=i.newContainer(p,y,\"yaxis\");var x,b=e[y];c.range&&b.isValidRange(c.range)&&(x=\"fixed\"),\"match\"!==w(\"rangemode\",x)&&w(\"range\",b.range.slice())}p._input=h}}function _(t,e){return n.coerce(h,p,o,t,e)}function w(t,e){return n.coerce(c,f,s,t,e)}}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/axis_ids\":570,\"./attributes\":439,\"./oppaxis_attributes\":446}],443:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../plots/plots\"),o=t(\"../../lib\"),s=o.strTranslate,l=t(\"../drawing\"),u=t(\"../color\"),c=t(\"../titles\"),f=t(\"../../plots/cartesian\"),h=t(\"../../plots/cartesian/axis_ids\"),p=t(\"../dragelement\"),d=t(\"../../lib/setcursor\"),g=t(\"./constants\");function v(t,e,r,a){if(!e._context.staticPlot){var s=t.select(\"rect.\"+g.slideBoxClassName).node(),l=t.select(\"rect.\"+g.grabAreaMinClassName).node(),u=t.select(\"rect.\"+g.grabAreaMaxClassName).node();t.on(\"mousedown\",c),t.on(\"touchstart\",c)}function c(){var c=n.event,f=c.target,h=c.clientX||c.touches[0].clientX,g=h-t.node().getBoundingClientRect().left,v=a.d2p(r._rl[0]),m=a.d2p(r._rl[1]),y=p.coverSlip();function x(t){var c,p,x,b=+(t.clientX||t.touches[0].clientX)-h;switch(f){case s:x=\"ew-resize\",c=v+b,p=m+b;break;case l:x=\"col-resize\",c=v+b,p=m;break;case u:x=\"col-resize\",c=v,p=m+b;break;default:x=\"ew-resize\",c=g,p=g+b}if(p<c){var _=p;p=c,c=_}a._pixelMin=c,a._pixelMax=p,d(n.select(y),x),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){i.call(\"_guiRelayout\",e,r._name+\".range\",[s,l])}))}(0,e,r,a)}function b(){y.removeEventListener(\"mousemove\",x),y.removeEventListener(\"mouseup\",b),this.removeEventListener(\"touchmove\",x),this.removeEventListener(\"touchend\",b),o.removeElement(y)}this.addEventListener(\"touchmove\",x),this.addEventListener(\"touchend\",b),y.addEventListener(\"mousemove\",x),y.addEventListener(\"mouseup\",b)}}function m(t,e,r,n){var i=o.ensureSingle(t,\"rect\",g.bgClassName,(function(t){t.attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"})})),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,c=-n._offsetShift,f=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(c,c),\"stroke-width\":f}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function y(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,\"clipPath\",n._clipId,(function(t){t.append(\"rect\").attr({x:0,y:0})})).select(\"rect\").attr({width:n._width,height:n._height})}function x(t,e,r,i){var s,u=e.calcdata,c=t.selectAll(\"g.\"+g.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append(\"g\").attr(\"class\",(function(t){return g.rangePlotClassName+\" \"+t})).call(l.setClipUrl,i._clipId,e),c.order(),c.exit().remove(),c.each((function(t,o){var l=n.select(this),c=0===o,p=h.getFromId(e,t,\"y\"),d=p._name,g=i[d],v={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(v.layout.xaxis.rangebreaks=r.rangebreaks),v.layout[d]={type:p.type,domain:[0,1],range:\"match\"!==g.rangemode?g.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(v.layout[d].rangebreaks=p.rangebreaks),a.supplyDefaults(v);var m=v._fullLayout.xaxis,y=v._fullLayout[d];m.clearCalc(),m.setScale(),y.clearCalc(),y.setScale();var x={id:t,plotgroup:l,xaxis:m,yaxis:y,isRangePlot:!0};c?s=x:(x.mainplot=\"xy\",x.mainplotinfo=s),f.rangePlot(e,x,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(u,t))}))}function b(t,e,r,n,i){o.ensureSingle(t,\"rect\",g.maskMinClassName,(function(t){t.attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"})})).attr(\"height\",n._height).call(u.fill,g.maskColor),o.ensureSingle(t,\"rect\",g.maskMaxClassName,(function(t){t.attr({y:0,\"shape-rendering\":\"crispEdges\"})})).attr(\"height\",n._height).call(u.fill,g.maskColor),\"match\"!==i.rangemode&&(o.ensureSingle(t,\"rect\",g.maskMinOppAxisClassName,(function(t){t.attr({y:0,\"shape-rendering\":\"crispEdges\"})})).attr(\"width\",n._width).call(u.fill,g.maskOppAxisColor),o.ensureSingle(t,\"rect\",g.maskMaxOppAxisClassName,(function(t){t.attr({y:0,\"shape-rendering\":\"crispEdges\"})})).attr(\"width\",n._width).style(\"border-top\",g.maskOppBorder).call(u.fill,g.maskOppAxisColor))}function _(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,\"rect\",g.slideBoxClassName,(function(t){t.attr({y:0,cursor:g.slideBoxCursor,\"shape-rendering\":\"crispEdges\"})})).attr({height:n._height,fill:g.slideBoxFill})}function w(t,e,r,n){var i=o.ensureSingle(t,\"g\",g.grabberMinClassName),a=o.ensureSingle(t,\"g\",g.grabberMaxClassName),s={x:0,width:g.handleWidth,rx:g.handleRadius,fill:u.background,stroke:u.defaultLine,\"stroke-width\":g.handleStrokeWidth,\"shape-rendering\":\"crispEdges\"},l={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(i,\"rect\",g.handleMinClassName,(function(t){t.attr(s)})).attr(l),o.ensureSingle(a,\"rect\",g.handleMaxClassName,(function(t){t.attr(s)})).attr(l);var c={width:g.grabAreaWidth,x:0,y:0,fill:g.grabAreaFill,cursor:e._context.staticPlot?void 0:g.grabAreaCursor};o.ensureSingle(i,\"rect\",g.grabAreaMinClassName,(function(t){t.attr(c)})).attr(\"height\",n._height),o.ensureSingle(a,\"rect\",g.grabAreaMaxClassName,(function(t){t.attr(c)})).attr(\"height\",n._height)}e.exports=function(t){for(var e=t._fullLayout,r=e._rangeSliderData,i=0;i<r.length;i++){var a=r[i][g.name];a._clipId=a._id+\"-\"+e._uid}var l=e._infolayer.selectAll(\"g.\"+g.containerClassName).data(r,(function(t){return t._name}));l.exit().each((function(t){var r=t[g.name];e._topdefs.select(\"#\"+r._clipId).remove()})).remove(),0!==r.length&&(l.enter().append(\"g\").classed(g.containerClassName,!0).attr(\"pointer-events\",\"all\"),l.each((function(r){var i=n.select(this),a=r[g.name],l=e[h.id2name(r.anchor)],u=a[h.id2name(r.anchor)];if(a.range){var f,p=o.simpleMap(a.range,r.r2l),d=o.simpleMap(r.range,r.r2l);f=d[0]<d[1]?[Math.min(p[0],d[0]),Math.max(p[1],d[1])]:[Math.max(p[0],d[0]),Math.min(p[1],d[1])],a.range=a._input.range=o.simpleMap(f,r.l2r)}r.cleanRange(\"rangeslider.range\");var k=e._size,T=r.domain;a._width=k.w*(T[1]-T[0]);var M=Math.round(k.l+k.w*T[0]),A=Math.round(k.t+k.h*(1-r._counterDomainMin)+(\"bottom\"===r.side?r._depth:0)+a._offsetShift+g.extraPad);i.attr(\"transform\",s(M,A)),a._rl=o.simpleMap(a.range,r.r2l);var S=a._rl[0],E=a._rl[1],C=E-S;if(a.p2d=function(t){return t/a._width*C+S},a.d2p=function(t){return(t-S)/C*a._width},r.rangebreaks){var L=r.locateBreaks(S,E);if(L.length){var P,O,I=0;for(P=0;P<L.length;P++)I+=(O=L[P]).max-O.min;var D=a._width/(E-S-I),z=[-D*S];for(P=0;P<L.length;P++)O=L[P],z.push(z[z.length-1]-D*(O.max-O.min));for(a.d2p=function(t){for(var e=z[0],r=0;r<L.length;r++){var n=L[r];if(t>=n.max)e=z[r+1];else if(t<n.min)break}return e+D*t},P=0;P<L.length;P++)(O=L[P]).pmin=a.d2p(O.min),O.pmax=a.d2p(O.max);a.p2d=function(t){for(var e=z[0],r=0;r<L.length;r++){var n=L[r];if(t>=n.pmax)e=z[r+1];else if(t<n.pmin)break}return(t-e)/D}}}if(\"match\"!==u.rangemode){var R=l.r2l(u.range[0]),F=l.r2l(u.range[1])-R;a.d2pOppAxis=function(t){return(t-R)/F*a._height}}i.call(m,t,r,a).call(y,t,r,a).call(x,t,r,a).call(b,t,r,a,u).call(_,t,r,a).call(w,t,r,a),v(i,t,r,a),function(t,e,r,n,i,a){var l=g.handleWidth/2;function u(t){return o.constrain(t,0,n._width)}function c(t){return o.constrain(t,0,n._height)}function f(t){return o.constrain(t,-l,n._width+l)}var h=u(n.d2p(r._rl[0])),p=u(n.d2p(r._rl[1]));if(t.select(\"rect.\"+g.slideBoxClassName).attr(\"x\",h).attr(\"width\",p-h),t.select(\"rect.\"+g.maskMinClassName).attr(\"width\",h),t.select(\"rect.\"+g.maskMaxClassName).attr(\"x\",p).attr(\"width\",n._width-p),\"match\"!==a.rangemode){var d=n._height-c(n.d2pOppAxis(i._rl[1])),v=n._height-c(n.d2pOppAxis(i._rl[0]));t.select(\"rect.\"+g.maskMinOppAxisClassName).attr(\"x\",h).attr(\"height\",d).attr(\"width\",p-h),t.select(\"rect.\"+g.maskMaxOppAxisClassName).attr(\"x\",h).attr(\"y\",v).attr(\"height\",n._height-v).attr(\"width\",p-h),t.select(\"rect.\"+g.slideBoxClassName).attr(\"y\",d).attr(\"height\",v-d)}var m=.5,y=Math.round(f(h-l))-m,x=Math.round(f(p-l))+m;t.select(\"g.\"+g.grabberMinClassName).attr(\"transform\",s(y,m)),t.select(\"g.\"+g.grabberMaxClassName).attr(\"transform\",s(x,m))}(i,0,r,a,l,u),\"bottom\"===r.side&&c.draw(t,r._id+\"title\",{propContainer:r,propName:r._name+\".title\",placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:A+a._height+a._offsetShift+10+1.5*r.title.font.size,\"text-anchor\":\"middle\"}})})))}},{\"../../lib\":515,\"../../lib/setcursor\":536,\"../../plots/cartesian\":578,\"../../plots/cartesian/axis_ids\":570,\"../../plots/plots\":628,\"../../registry\":647,\"../color\":367,\"../dragelement\":386,\"../drawing\":389,\"../titles\":476,\"./constants\":441,\"@plotly/d3\":58}],444:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axis_ids\"),i=t(\"../../lib/svg_text_utils\"),a=t(\"./constants\"),o=t(\"../../constants/alignment\").LINE_SPACING,s=a.name;function l(t){var e=t&&t[s];return e&&e.visible}r.isVisible=l,r.makeData=function(t){var e=n.list({_fullLayout:t},\"x\",!0),r=t.margin,i=[];if(!t._has(\"gl2d\"))for(var a=0;a<e.length;a++){var o=e[a];if(l(o)){i.push(o);var u=o[s];u._id=s+o._id,u._height=(t.height-r.b-r.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}t._rangeSliderData=i},r.autoMarginOpts=function(t,e){var r=t._fullLayout,n=e[s],l=e._id.charAt(0),u=0,c=0;return\"bottom\"===e.side&&(u=e._depth,e.title.text!==r._dfltTitle[l]&&(c=1.5*e.title.font.size+10+n._offsetShift,c+=(e.title.text.match(i.BR_TAG_ALL)||[]).length*e.title.font.size*o)),{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:n._height+u+Math.max(r.margin.b,c),pad:a.extraPad+2*n._offsetShift}}},{\"../../constants/alignment\":483,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axis_ids\":570,\"./constants\":441}],445:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"./oppaxis_attributes\"),o=t(\"./helpers\");e.exports={moduleType:\"component\",name:\"rangeslider\",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),calcAutorange:t(\"./calc_autorange\"),draw:t(\"./draw\"),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},{\"../../lib\":515,\"./attributes\":439,\"./calc_autorange\":440,\"./defaults\":442,\"./draw\":443,\"./helpers\":444,\"./oppaxis_attributes\":446}],446:[function(t,e,r){\"use strict\";e.exports={_isSubplotObj:!0,rangemode:{valType:\"enumerated\",values:[\"auto\",\"fixed\",\"match\"],dflt:\"match\",editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},editType:\"calc\"}},{}],447:[function(t,e,r){\"use strict\";var n=t(\"../annotations/attributes\"),i=t(\"../../traces/scatter/attributes\").line,a=t(\"../drawing/attributes\").dash,o=t(\"../../lib/extend\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=t(\"../../plot_api/plot_template\").templatedArray;t(\"../../constants/axis_placeable_objects\"),e.exports=s(l(\"selection\",{type:{valType:\"enumerated\",values:[\"rect\",\"path\"]},xref:o({},n.xref,{}),yref:o({},n.yref,{}),x0:{valType:\"any\"},x1:{valType:\"any\"},y0:{valType:\"any\"},y1:{valType:\"any\"},path:{valType:\"string\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:.7,editType:\"arraydraw\"},line:{color:i.color,width:o({},i.width,{min:1,dflt:1}),dash:o({},a,{dflt:\"dot\"})}}),\"arraydraw\",\"from-root\")},{\"../../constants/axis_placeable_objects\":484,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plot_api/plot_template\":555,\"../../traces/scatter/attributes\":936,\"../annotations/attributes\":350,\"../drawing/attributes\":388}],448:[function(t,e,r){\"use strict\";e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:\"-select\"}},{}],449:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./attributes\"),s=t(\"../shapes/helpers\");function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var l=a(\"path\"),u=\"path\"!==a(\"type\",l?\"path\":\"rect\");u&&delete e.path,a(\"opacity\"),a(\"line.color\"),a(\"line.width\"),a(\"line.dash\");for(var c=[\"x\",\"y\"],f=0;f<2;f++){var h,p,d,g=c[f],v={_fullLayout:r},m=i.coerceRef(t,e,v,g);if((h=i.getFromId(v,m))._selectionIndices.push(e._index),d=s.rangeToShapePosition(h),p=s.shapePositionToRange(h),u){var y=g+\"0\",x=g+\"1\",b=t[y],_=t[x];t[y]=p(t[y],!0),t[x]=p(t[x],!0),i.coercePosition(e,v,a,m,y),i.coercePosition(e,v,a,m,x);var w=e[y],k=e[x];void 0!==w&&void 0!==k&&(e[y]=d(w),e[x]=d(k),t[y]=b,t[x]=_)}}u&&n.noneOrAll(t,e,[\"x0\",\"x1\",\"y0\",\"y1\"])}e.exports=function(t,e){a(t,e,{name:\"selections\",handleItemDefaults:l});for(var r=e.selections,n=0;n<r.length;n++){var i=r[n];i&&void 0===i.path&&(void 0!==i.x0&&void 0!==i.x1&&void 0!==i.y0&&void 0!==i.y1||(e.selections[n]=null))}}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../../plots/cartesian/axes\":566,\"../shapes/helpers\":469,\"./attributes\":447}],450:[function(t,e,r){\"use strict\";var n=t(\"../shapes/draw_newshape/helpers\").readPaths,i=t(\"../shapes/display_outlines\"),a=t(\"../shapes/handle_outline\").clearOutlineControllers,o=t(\"../color\"),s=t(\"../drawing\"),l=t(\"../../plot_api/plot_template\").arrayEditor,u=t(\"../shapes/helpers\"),c=u.getPathString;function f(t){var e=t._fullLayout;for(var r in a(t),e._selectionLayer.selectAll(\"path\").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll(\"path\").remove()}for(var i=0;i<e.selections.length;i++)p(t,i)}function h(t){return t._context.editSelection}function p(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index=\"'+e+'\"]').remove();var r=u.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,p=r.plotinfo;a._input&&function(r){var u=c(t,a),v={\"data-index\":e,\"fill-rule\":\"evenodd\",d:u},m=a.opacity,y=\"rgba(0,0,0,0)\",x=a.line.color||o.contrast(t._fullLayout.plot_bgcolor),b=a.line.width,_=a.line.dash;b||(b=5,_=\"solid\");var w=h(t)&&t._fullLayout._activeSelectionIndex===e;w&&(y=t._fullLayout.activeselection.fillcolor,m=t._fullLayout.activeselection.opacity);for(var k=[],T=1;T>=0;T--){var M=r.append(\"path\").attr(v).style(\"opacity\",T?.1:m).call(o.stroke,x).call(o.fill,y).call(s.dashLine,T?\"solid\":_,T?4+b:b);if(d(M,t,a),w){var A=l(t.layout,\"selections\",a);M.style({cursor:\"move\"});var S={element:M.node(),plotinfo:p,gd:t,editHelpers:A,isActiveSelection:!0},E=n(u,t);i(E,M,S)}else M.style(\"pointer-events\",T?\"all\":\"none\");k[T]=M}var C=k[0];k[1].node().addEventListener(\"click\",(function(){return function(t,e){if(h(t)){var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void g(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=g,f(t)}}}(t,C)}))}(t._fullLayout._selectionLayer)}function d(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,\"clip\"+e._fullLayout._uid+n,e)}function g(t){h(t)&&t._fullLayout._activeSelectionIndex>=0&&(a(t),delete t._fullLayout._activeSelectionIndex,f(t))}e.exports={draw:f,drawOne:p,activateLastSelection:function(t){if(h(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=g,f(t)}}}},{\"../../plot_api/plot_template\":555,\"../color\":367,\"../drawing\":389,\"../shapes/display_outlines\":461,\"../shapes/draw_newshape/helpers\":466,\"../shapes/handle_outline\":468,\"../shapes/helpers\":469}],451:[function(t,e,r){\"use strict\";var n=t(\"../../drawing/attributes\").dash,i=t(\"../../../lib/extend\").extendFlat;e.exports={newselection:{mode:{valType:\"enumerated\",values:[\"immediate\",\"gradual\"],dflt:\"immediate\",editType:\"none\"},line:{color:{valType:\"color\",editType:\"none\"},width:{valType:\"number\",min:1,dflt:1,editType:\"none\"},dash:i({},n,{dflt:\"dot\",editType:\"none\"}),editType:\"none\"},editType:\"none\"},activeselection:{fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"none\"},opacity:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"none\"},editType:\"none\"}}},{\"../../../lib/extend\":505,\"../../drawing/attributes\":388}],452:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){r(\"newselection.mode\"),r(\"newselection.line.width\")&&(r(\"newselection.line.color\"),r(\"newselection.line.dash\")),r(\"activeselection.fillcolor\"),r(\"activeselection.opacity\")}},{}],453:[function(t,e,r){\"use strict\";var n=t(\"../../dragelement/helpers\").selectMode,i=t(\"../../shapes/handle_outline\").clearOutline,a=t(\"../../shapes/draw_newshape/helpers\"),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;e.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute(\"d\"),u=e.gd,c=u._fullLayout.newselection,f=e.plotinfo,h=f.xaxis,p=f.yaxis,d=e.isActiveSelection,g=e.dragmode,v=(u.layout||{}).selections||[];if(!n(g)&&void 0!==d){var m=u._fullLayout._activeSelectionIndex;if(m<v.length)switch(u._fullLayout.selections[m].type){case\"rect\":g=\"select\";break;case\"path\":g=\"lasso\"}}var y,x=o(a,u,f,d),b={xref:h._id,yref:p._id,opacity:c.opacity,line:{color:c.line.color,width:c.line.width,dash:c.line.dash}};1===x.length&&(y=x[0]),y&&5===y.length&&\"select\"===g?(b.type=\"rect\",b.x0=y[0][1],b.y0=y[0][2],b.x1=y[2][1],b.y1=y[2][2]):(b.type=\"path\",h&&p&&l(x,h,p),b.path=s(x),y=null),i(u);for(var _=e.editHelpers,w=(_||{}).modifyItem,k=[],T=0;T<v.length;T++){var M=u._fullLayout.selections[T];if(M){if(k[T]=M._input,void 0!==d&&T===u._fullLayout._activeSelectionIndex){var A=b;switch(M.type){case\"rect\":w(\"x0\",A.x0),w(\"x1\",A.x1),w(\"y0\",A.y0),w(\"y1\",A.y1);break;case\"path\":w(\"path\",A.path)}}}else k[T]=M}return void 0===d?(k.push(b),k):_?_.getUpdateObj():{}}}}},{\"../../dragelement/helpers\":385,\"../../shapes/draw_newshape/helpers\":466,\"../../shapes/handle_outline\":468}],454:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").strTranslate;function i(t,e){switch(t.type){case\"log\":return t.p2d(e);case\"date\":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}e.exports={p2r:i,r2p:function(t,e){switch(t.type){case\"log\":return t.d2p(e);case\"date\":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e=\"y\"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},{\"../../lib\":515}],455:[function(t,e,r){\"use strict\";var n=t(\"./draw\"),i=t(\"./select\");e.exports={moduleType:\"component\",name:\"selections\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),supplyDrawNewSelectionDefaults:t(\"./draw_newselection/defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"selections\"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},{\"../../plots/cartesian/include_components\":577,\"./attributes\":447,\"./defaults\":449,\"./draw\":450,\"./draw_newselection/defaults\":452,\"./select\":456}],456:[function(t,e,r){\"use strict\";var n=t(\"polybooljs\"),i=t(\"point-in-polygon/nested\"),a=t(\"../../registry\"),o=t(\"../drawing\").dashStyle,s=t(\"../color\"),l=t(\"../fx\"),u=t(\"../fx/helpers\").makeEventData,c=t(\"../dragelement/helpers\"),f=c.freeMode,h=c.rectMode,p=c.drawMode,d=c.openMode,g=c.selectMode,v=t(\"../shapes/helpers\"),m=t(\"../shapes/constants\"),y=t(\"../shapes/display_outlines\"),x=t(\"../shapes/handle_outline\").clearOutline,b=t(\"../shapes/draw_newshape/helpers\"),_=b.handleEllipse,w=b.readPaths,k=t(\"../shapes/draw_newshape/newshapes\"),T=t(\"./draw_newselection/newselections\"),M=t(\"./draw\").activateLastSelection,A=t(\"../../lib\"),S=A.sorterAsc,E=t(\"../../lib/polygon\"),C=t(\"../../lib/throttle\"),L=t(\"../../plots/cartesian/axis_ids\").getFromId,P=t(\"../../lib/clear_gl_canvases\"),O=t(\"../../plot_api/subroutines\").redrawReglTraces,I=t(\"./constants\"),D=I.MINSELECT,z=E.filter,R=E.tester,F=t(\"./helpers\"),N=F.p2r,B=F.axValue,j=F.getTransform;function U(t){return void 0!==t.subplot}function V(t,e,r,n,i,a,o){var s,l,u,c,f,h,p,g,v,m=e._hoverdata,x=e._fullLayout.clickmode.indexOf(\"event\")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(m)){Y(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(m,s=Z(e,r,n,i));if(_.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,_):function(t){var e,r,n=0;for(r=0;r<t.length;r++)if((e=t[r].cd[0].trace).selectedpoints){if(e.selectedpoints.length>1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=J(_))){for(o&&o.remove(),v=0;v<s.length;v++)(l=s[v])._module.selectPoints(l,!1);$(e,s),W(a),x&&ht(e)}else{for(p=t.shiftKey&&(void 0!==h?h:J(_)),u=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}(_.pointNumber,_.searchInfo,p),c=G(a.selectionDefs.concat([u])),v=0;v<s.length;v++)if(f=tt(s[v]._module.selectPoints(s[v],c),s[v]),b.length)for(var w=0;w<f.length;w++)b.push(f[w]);else b=f;if($(e,s,g={points:b}),u&&a&&a.selectionDefs.push(u),o){var k=a.mergedPolygons,T=d(a.dragmode);y(et(k,T),o,a)}x&&ft(e,g)}}}function H(t){return\"pointNumber\"in t&&\"searchInfo\"in t}function q(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&&n===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function G(t){if(t.length){for(var e=[],r=H(t[0])?0:t[0][0][0],n=r,i=H(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(H(t[o]))e.push(q(t[o]));else{var s=R(t[o]);s.subtract=!!t[o].subtract,e.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!e[o].subtract);return a},isRect:!1,degenerate:!1}}}function Y(t,e,r){var n=e._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(t.shiftKey||t.altKey)&&!(p(a)&&d(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):s&&i.selection||W(r),o||(x(e),n._lastSelectedSubplot=i.id)}function W(t,e){var r=t.dragmode,n=t.plotinfo,i=t.gd;(function(t){return t._fullLayout._activeShapeIndex>=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=p(r),l=g(r);if(s||l){var u,c,f=o.selectAll(\".select-outline-\"+n.id);f&&i._fullLayout._outlining&&(s&&(u=k(f,t)),u&&a.call(\"_guiRelayout\",i,{shapes:u}),l&&!U(t)&&(c=T(f,t)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call(\"_guiRelayout\",i,{selections:c}).then((function(){e&&M(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function X(t){return t._id}function Z(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(X),u=r.map(X);for(o=0;o<t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&&a._module&&a._module.selectPoints)if(!U({subplot:n})||a.subplot!==n&&a.geo!==n)if(\"splom\"===a.type){if(a._xaxes[l[0]]&&a._yaxes[u[0]]){var c=K(a._module,i,e[0],r[0]);c.scene=t._fullLayout._splomScenes[a.uid],s.push(c)}}else if(\"sankey\"===a.type){var f=K(a._module,i,e[0],r[0]);s.push(f)}else{if(-1===l.indexOf(a.xaxis))continue;if(-1===u.indexOf(a.yaxis))continue;s.push(K(a._module,i,L(t,a.xaxis),L(t,a.yaxis)))}else s.push(K(a._module,i,e[0],r[0]));return s}function K(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}function J(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function $(t,e,r){var n,i;for(n=0;n<e.length;n++){var o=e[n].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[o.uid]||{};void 0===s.selectedpoints&&(s.selectedpoints=o._input.selectedpoints||null)}if(r){var l=r.points||[];for(n=0;n<e.length;n++)(i=e[n].cd[0].trace)._input.selectedpoints=i._fullInput.selectedpoints=[],i._fullInput!==i&&(i.selectedpoints=[]);for(var u=0;u<l.length;u++){var c=l[u],f=c.data,h=c.fullData,p=c.pointIndex,d=c.pointIndices;d?([].push.apply(f.selectedpoints,d),i._fullInput!==i&&[].push.apply(h.selectedpoints,d)):(f.selectedpoints.push(p),i._fullInput!==i&&h.selectedpoints.push(p))}}else for(n=0;n<e.length;n++)delete(i=e[n].cd[0].trace).selectedpoints,delete i._input.selectedpoints,i._fullInput!==i&&delete i._fullInput.selectedpoints;!function(t,e){for(var r=!1,n=0;n<e.length;n++){var i=e[n],o=i.cd;a.traceIs(o[0].trace,\"regl\")&&(r=!0);var s=i._module,l=s.styleOnSelect||s.style;l&&(l(t,o,o[0].node3),o[0].nodeRangePlot3&&l(t,o,o[0].nodeRangePlot3))}r&&(P(t),O(t))}(t,e)}function Q(t,e,r){for(var i=(r?n.difference:n.union)({regions:t},{regions:[e]}).regions.reverse(),a=0;a<i.length;a++){var o=i[a];o.subtract=st(o,i.slice(0,a))}return i}function tt(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=u(t[i],n,r);return t}function et(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<t[n].length;i++){r[n][i]=[],r[n][i][0]=i?\"L\":\"M\";for(var a=0;a<t[n][i].length;a++)r[n][i].push(t[n][i][a])}e||r[n].push([\"Z\",r[n][0][1],r[n][0][2]])}return r}function rt(t,e){for(var r,n,i=[],a=[],o=0;o<e.length;o++){var s=e[o];n=s._module.selectPoints(s,t),a.push(n),r=tt(n,s),i=i.concat(r)}return i}function nt(t,e,r,n,i){var a,o,s,l=!!n;i&&(a=i.plotinfo,o=i.xaxes[0]._id,s=i.yaxes[0]._id);var u=[],c=[],f=ot(t),h=t._fullLayout;if(a){var d=h._zoomlayer,v=h.dragmode,m=p(v),y=g(v);if(m||y){var x=L(t,o,\"x\"),b=L(t,s,\"y\");if(x&&b){var _=d.selectAll(\".select-outline-\"+a.id);if(_&&t._fullLayout._outlining&&_.length){for(var k=_[0][0].getAttribute(\"d\"),T=w(k,t,a),M=[],A=0;A<T.length;A++){for(var S=T[A],E=[],C=0;C<S.length;C++)E.push([lt(x,S[C][1]),lt(b,S[C][2])]);E.xref=o,E.yref=s,E.subtract=st(E,M),M.push(E)}f=f.concat(M)}}}}var P=o&&s?[o+s]:h._subplots.cartesian;!function(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var n=e[r][0].trace,i=t._fullLayout._splomScenes;if(i){var a=i[n.uid];a&&(a.selectBatch=[])}}}(t);for(var O={},I=0;I<P.length;I++){var D=P[I],z=D.indexOf(\"y\"),R=D.slice(0,z),F=D.slice(z),N=o&&s?r:void 0;if(N=at(f,R,F,N)){var B=n;if(!l){var j=L(t,R,\"x\"),U=L(t,F,\"y\");B=Z(t,[j],[U],D);for(var V=0;V<B.length;V++){var H=B[V],q=H.cd[0],G=q.trace;if(\"scattergl\"===H._module.name&&!q.t.xpx){var Y=G.x,W=G.y,X=G._length;q.t.xpx=[],q.t.ypx=[];for(var K=0;K<X;K++)q.t.xpx[K]=j.c2p(Y[K]),q.t.ypx[K]=U.c2p(W[K])}\"splom\"===H._module.name&&(O[G.uid]||(O[G.uid]=!0))}}var J=rt(N,B);u=u.concat(J),c=c.concat(B)}}var Q={points:u};$(t,c,Q);var tt=h.clickmode.indexOf(\"event\")>-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,pt=et[0].yref;if(nt&&pt){var dt=ut(et);ct([L(t,nt,\"x\"),L(t,pt,\"y\")])(Q,dt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ft(t,Q),h._reselect=!1}if(!a&&h._deselect){var gt=h._deselect;(function(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];if(i.xaxis&&i.xaxis._id===t&&i.yaxis&&i.yaxis._id===e)return!0}return!1})(o=gt.xref,s=gt.yref,c)||it(t,o,s,n),tt&&(Q.points.length?ft(t,Q):ht(t)),h._deselect=!1}return{eventData:Q,selectionTesters:r}}function it(t,e,r,n){n=Z(t,[L(t,e,\"x\")],[L(t,r,\"y\")],e+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}$(t,n)}function at(t,e,r,n){for(var i,a=0;a<t.length;a++){var o=t[a];e===o.xref&&r===o.yref&&(i?n=G(i=Q(i,o,!!o.subtract)):(i=[o],n=R(o)))}return n}function ot(t,e){for(var r=[],n=t._fullLayout,i=n.selections,a=i.length,o=0;o<a;o++)if(!e||o===n._activeSelectionIndex){var s=i[o];if(s){var l,u,c,f,h,p=s.xref,d=s.yref,g=L(t,p,\"x\"),y=L(t,d,\"y\");if(\"rect\"===s.type){h=[];var x=lt(g,s.x0),b=lt(g,s.x1),_=lt(y,s.y0),w=lt(y,s.y1);h=[[x,_],[x,w],[b,w],[b,_]],l=Math.min(x,b),u=Math.max(x,b),c=Math.min(_,w),f=Math.max(_,w),h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=p,h.yref=d,h.subtract=!1,h.isRect=!0,r.push(h)}else if(\"path\"===s.type)for(var k=s.path.split(\"Z\"),T=[],M=0;M<k.length;M++){var A=k[M];if(A){A+=\"Z\";var S=v.extractPathCoords(A,m.paramIsX,\"raw\"),E=v.extractPathCoords(A,m.paramIsY,\"raw\");l=1/0,u=-1/0,c=1/0,f=-1/0,h=[];for(var C=0;C<S.length;C++){var P=lt(g,S[C]),O=lt(y,E[C]);h.push([P,O]),l=Math.min(P,l),u=Math.max(P,u),c=Math.min(O,c),f=Math.max(O,f)}h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=p,h.yref=d,h.subtract=st(h,T),T.push(h),r.push(h)}}}}return r}function st(t,e){for(var r=!1,n=0;n<e.length;n++)for(var a=e[n],o=0;o<t.length;o++)if(i(t[o],a)){r=!r;break}return r}function lt(t,e){return\"date\"===t.type&&(e=e.replace(\"_\",\" \")),\"log\"===t.type?t.c2p(e):t.r2p(e,null,t.calendar)}function ut(t){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];r=(r=r.concat(i)).concat([i[0]])}return(a=r).isRect=5===a.length&&a[0][0]===a[4][0]&&a[0][1]===a[4][1]&&a[0][0]===a[1][0]&&a[2][0]===a[3][0]&&a[0][1]===a[3][1]&&a[1][1]===a[2][1]||a[0][1]===a[1][1]&&a[2][1]===a[3][1]&&a[0][0]===a[3][0]&&a[1][0]===a[2][0],a.isRect&&(a.xmin=Math.min(a[0][0],a[2][0]),a.xmax=Math.max(a[0][0],a[2][0]),a.ymin=Math.min(a[0][1],a[2][1]),a.ymax=Math.max(a[0][1],a[2][1])),a;var a}function ct(t){return function(e,r){for(var n,i,a=0;a<t.length;a++){var o=t[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+\"min\"],c=r[l+\"max\"];void 0!==u&&void 0!==c&&(n[s]=[N(o,u),N(o,c)].sort(S))}else i||(i={}),i[s]=r.map(B(o))}n&&(e.range=n),i&&(e.lassoPoints=i)}}function ft(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit(\"plotly_selected\",e)}function ht(t){t.emit(\"plotly_deselect\",null)}e.exports={reselect:nt,prepSelect:function(t,e,r,n,i){var u=!U(n),c=f(i),v=h(i),m=d(i),x=p(i),b=g(i),w=\"drawcircle\"===i,k=\"drawline\"===i||w,T=n.gd,M=T._fullLayout,S=b&&\"immediate\"===M.newselection.mode&&u,E=M._zoomlayer,L=n.element.getBoundingClientRect(),P=n.plotinfo,O=j(P),F=e-L.left,N=r-L.top;M._calcInverseTransform(T);var B=A.apply3DTransform(M._invTransform)(F,N);F=B[0],N=B[1];var H,q,X,K,J,tt,at,ot=M._invScaleX,st=M._invScaleY,lt=F,pt=N,dt=\"M\"+F+\",\"+N,gt=n.xaxes[0],vt=n.yaxes[0],mt=gt._length,yt=vt._length,xt=t.altKey&&!(p(i)&&m);Y(t,T,n),c&&(H=z([[F,N]],I.BENDPX));var bt=E.selectAll(\"path.select-outline-\"+P.id).data([1]),_t=x?M.newshape:M.newselection,wt=x&&!m?_t.fillcolor:\"rgba(0,0,0,0)\",kt=_t.line.color||(u?s.contrast(T._fullLayout.plot_bgcolor):\"#7f7f7f\");bt.enter().append(\"path\").attr(\"class\",\"select-outline select-outline-\"+P.id).style({opacity:x?_t.opacity/2:1,\"stroke-dasharray\":o(_t.line.dash,_t.line.width),\"stroke-width\":_t.line.width+\"px\",\"shape-rendering\":\"crispEdges\"}).call(s.stroke,kt).call(s.fill,wt).attr(\"fill-rule\",\"evenodd\").classed(\"cursor-move\",!!x).attr(\"transform\",O).attr(\"d\",dt+\"Z\");var Tt=E.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:s.background,stroke:s.defaultLine,\"stroke-width\":1}).attr(\"transform\",O).attr(\"d\",\"M0,0Z\"),Mt=M._uid+I.SELECTID,At=[],St=Z(T,n.xaxes,n.yaxes,n.subplot);S&&!t.shiftKey&&(n._clearSubplotSelections=function(){if(u){var t=gt._id,e=vt._id;it(T,t,e,St);for(var r=(T.layout||{}).selections||[],n=[],i=!1,o=0;o<r.length;o++){var s=M.selections[o];s.xref!==t||s.yref!==e?n.push(r[o]):i=!0}i&&(T._fullLayout._noEmitSelectedAtStart=!0,a.call(\"_guiRelayout\",T,{selections:n}))}});var Et=function(t){return t.plotinfo.fillRangeItems||ct(t.xaxes.concat(t.yaxes))}(n);n.moveFn=function(t,e){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),lt=Math.max(0,Math.min(mt,ot*t+F)),pt=Math.max(0,Math.min(yt,st*e+N));var r=Math.abs(lt-F),i=Math.abs(pt-N);if(v){var a,o,s;if(b){var l=M.selectdirection;switch(a=\"any\"===l?i<Math.min(.6*r,D)?\"h\":r<Math.min(.6*i,D)?\"v\":\"d\":l){case\"h\":o=w?yt/2:0,s=yt;break;case\"v\":o=w?mt/2:0,s=mt}}if(x)switch(M.newshape.drawdirection){case\"vertical\":a=\"h\",o=w?yt/2:0,s=yt;break;case\"horizontal\":a=\"v\",o=w?mt/2:0,s=mt;break;case\"ortho\":r<i?(a=\"h\",o=N,s=pt):(a=\"v\",o=F,s=lt);break;default:a=\"d\"}\"h\"===a?((K=k?_(w,[lt,o],[lt,s]):[[F,o],[F,s],[lt,s],[lt,o]]).xmin=k?lt:Math.min(F,lt),K.xmax=k?lt:Math.max(F,lt),K.ymin=Math.min(o,s),K.ymax=Math.max(o,s),Tt.attr(\"d\",\"M\"+K.xmin+\",\"+(N-D)+\"h-4v\"+2*D+\"h4ZM\"+(K.xmax-1)+\",\"+(N-D)+\"h4v\"+2*D+\"h-4Z\")):\"v\"===a?((K=k?_(w,[o,pt],[s,pt]):[[o,N],[o,pt],[s,pt],[s,N]]).xmin=Math.min(o,s),K.xmax=Math.max(o,s),K.ymin=k?pt:Math.min(N,pt),K.ymax=k?pt:Math.max(N,pt),Tt.attr(\"d\",\"M\"+(F-D)+\",\"+K.ymin+\"v-4h\"+2*D+\"v4ZM\"+(F-D)+\",\"+(K.ymax-1)+\"v4h\"+2*D+\"v-4Z\")):\"d\"===a&&((K=k?_(w,[F,N],[lt,pt]):[[F,N],[F,pt],[lt,pt],[lt,N]]).xmin=Math.min(F,lt),K.xmax=Math.max(F,lt),K.ymin=Math.min(N,pt),K.ymax=Math.max(N,pt),Tt.attr(\"d\",\"M0,0Z\"))}else c&&(H.addPt([lt,pt]),K=H.filtered);if(n.selectionDefs&&n.selectionDefs.length?(X=Q(n.mergedPolygons,K,xt),K.subtract=xt,q=G(n.selectionDefs.concat([K]))):(X=[K],q=R(K)),y(et(X,m),bt,n),b){var u,f=nt(T,!1),h=f.eventData?f.eventData.points.slice():[];f=nt(T,!1,q,St,n),q=f.selectionTesters,at=f.eventData,u=H?H.filtered:ut(X),C.throttle(Mt,I.SELECTDELAY,(function(){for(var t=(At=rt(q,St)).slice(),e=0;e<h.length;e++){for(var r=h[e],n=!1,i=0;i<t.length;i++)if(t[i].curveNumber===r.curveNumber&&t[i].pointNumber===r.pointNumber){n=!0;break}n||t.push(r)}t.length&&(at||(at={}),at.points=t),Et(at,u),function(t,e){t.emit(\"plotly_selecting\",e)}(T,at)}))}},n.clickFn=function(t,e){if(Tt.remove(),T._fullLayout._activeShapeIndex>=0)T._fullLayout._deactivateShape(T);else if(!x){var r=M.clickmode;C.done(Mt).then((function(){if(C.clear(Mt),2===t){for(bt.remove(),J=0;J<St.length;J++)(tt=St[J])._module.selectPoints(tt,!1);if($(T,St),W(n),ht(T),St.length){var i=St[0].xaxis,o=St[0].yaxis;if(i&&o){for(var s=[],u=T._fullLayout.selections,c=0;c<u.length;c++){var f=u[c];f&&(f.xref===i._id&&f.yref===o._id||s.push(f))}s.length<u.length&&(T._fullLayout._noEmitSelectedAtStart=!0,a.call(\"_guiRelayout\",T,{selections:s}))}}}else r.indexOf(\"select\")>-1&&V(e,T,n.xaxes,n.yaxes,n.subplot,n,bt),\"event\"===r&&ft(T,void 0);l.click(T,e)})).catch(A.error)}},n.doneFn=function(){Tt.remove(),C.done(Mt).then((function(){C.clear(Mt),!S&&K&&n.selectionDefs&&(K.subtract=xt,n.selectionDefs.push(K),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,X)),(S||x)&&W(n,S),n.doneFnCompleted&&n.doneFnCompleted(At),b&&ft(T,at)})).catch(A.error)}},clearOutline:x,clearSelectionsCache:W,selectOnClick:V}},{\"../../lib\":515,\"../../lib/clear_gl_canvases\":499,\"../../lib/polygon\":527,\"../../lib/throttle\":542,\"../../plot_api/subroutines\":556,\"../../plots/cartesian/axis_ids\":570,\"../../registry\":647,\"../color\":367,\"../dragelement/helpers\":385,\"../drawing\":389,\"../fx\":407,\"../fx/helpers\":403,\"../shapes/constants\":459,\"../shapes/display_outlines\":461,\"../shapes/draw_newshape/helpers\":466,\"../shapes/draw_newshape/newshapes\":467,\"../shapes/handle_outline\":468,\"../shapes/helpers\":469,\"./constants\":448,\"./draw\":450,\"./draw_newselection/newselections\":453,\"./helpers\":454,\"point-in-polygon/nested\":254,polybooljs:255}],457:[function(t,e,r){\"use strict\";var n=t(\"../annotations/attributes\"),i=t(\"../../traces/scatter/attributes\").line,a=t(\"../drawing/attributes\").dash,o=t(\"../../lib/extend\").extendFlat,s=t(\"../../plot_api/plot_template\").templatedArray;t(\"../../constants/axis_placeable_objects\"),e.exports=s(\"shape\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc+arraydraw\"},type:{valType:\"enumerated\",values:[\"circle\",\"rect\",\"path\",\"line\"],editType:\"calc+arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},xref:o({},n.xref,{}),xsizemode:{valType:\"enumerated\",values:[\"scaled\",\"pixel\"],dflt:\"scaled\",editType:\"calc+arraydraw\"},xanchor:{valType:\"any\",editType:\"calc+arraydraw\"},x0:{valType:\"any\",editType:\"calc+arraydraw\"},x1:{valType:\"any\",editType:\"calc+arraydraw\"},yref:o({},n.yref,{}),ysizemode:{valType:\"enumerated\",values:[\"scaled\",\"pixel\"],dflt:\"scaled\",editType:\"calc+arraydraw\"},yanchor:{valType:\"any\",editType:\"calc+arraydraw\"},y0:{valType:\"any\",editType:\"calc+arraydraw\"},y1:{valType:\"any\",editType:\"calc+arraydraw\"},path:{valType:\"string\",editType:\"calc+arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},line:{color:o({},i.color,{editType:\"arraydraw\"}),width:o({},i.width,{editType:\"calc+arraydraw\"}),dash:o({},a,{editType:\"arraydraw\"}),editType:\"calc+arraydraw\"},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},fillrule:{valType:\"enumerated\",values:[\"evenodd\",\"nonzero\"],dflt:\"evenodd\",editType:\"arraydraw\"},editable:{valType:\"boolean\",dflt:!1,editType:\"calc+arraydraw\"},editType:\"arraydraw\"})},{\"../../constants/axis_placeable_objects\":484,\"../../lib/extend\":505,\"../../plot_api/plot_template\":555,\"../../traces/scatter/attributes\":936,\"../annotations/attributes\":350,\"../drawing/attributes\":388}],458:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"./constants\"),o=t(\"./helpers\");function s(t){return u(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return u(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function u(t,e,r,i,s,l){var u=t/2,c=l;if(\"pixel\"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p<0?Math.abs(p)+u:u,g=h>0?h+u:u;return{ppad:u,ppadplus:c?d:g,ppadminus:c?g:d}}return{ppad:u}}function c(t,e,r,n,i){var s=\"category\"===t.type||\"multicategory\"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,u,c,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for(\"date\"===t.type&&(s=o.decodeDate(s)),l=0;l<d.length;l++)void 0!==(u=i[d[l].charAt(0)].drawn)&&(!(c=d[l].substr(1).match(a.paramRE))||c.length<u||((f=s(c[u]))<h&&(h=f),f>p&&(p=f)));return p>=h?[h,p]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o<r.length;o++){var u,f,h=r[o];h._extremes={};var p=i.getRefType(h.xref),d=i.getRefType(h.yref);if(\"paper\"!==h.xref&&\"domain\"!==p){var g=\"pixel\"===h.xsizemode?h.xanchor:h.x0,v=\"pixel\"===h.xsizemode?h.xanchor:h.x1;(f=c(u=i.getFromId(t,h.xref),g,v,h.path,a.paramIsX))&&(h._extremes[u._id]=i.findExtremes(u,f,s(h)))}if(\"paper\"!==h.yref&&\"domain\"!==d){var m=\"pixel\"===h.ysizemode?h.yanchor:h.y0,y=\"pixel\"===h.ysizemode?h.yanchor:h.y1;(f=c(u=i.getFromId(t,h.yref),m,y,h.path,a.paramIsY))&&(h._extremes[u._id]=i.findExtremes(u,f,l(h)))}}}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"./constants\":459,\"./helpers\":469}],459:[function(t,e,r){\"use strict\";e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],460:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./attributes\"),s=t(\"./helpers\");function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(a(\"visible\")){var l=a(\"path\"),u=\"path\"!==a(\"type\",l?\"path\":\"rect\");u&&delete e.path,a(\"editable\"),a(\"layer\"),a(\"opacity\"),a(\"fillcolor\"),a(\"fillrule\"),a(\"line.width\")&&(a(\"line.color\"),a(\"line.dash\"));for(var c=a(\"xsizemode\"),f=a(\"ysizemode\"),h=[\"x\",\"y\"],p=0;p<2;p++){var d,g,v,m=h[p],y=m+\"anchor\",x=\"x\"===m?c:f,b={_fullLayout:r},_=i.coerceRef(t,e,b,m,void 0,\"paper\");if(\"range\"===i.getRefType(_)?((d=i.getFromId(b,_))._shapeIndices.push(e._index),v=s.rangeToShapePosition(d),g=s.shapePositionToRange(d)):g=v=n.identity,u){var w=m+\"0\",k=m+\"1\",T=t[w],M=t[k];t[w]=g(t[w],!0),t[k]=g(t[k],!0),\"pixel\"===x?(a(w,0),a(k,10)):(i.coercePosition(e,b,a,_,w,.25),i.coercePosition(e,b,a,_,k,.75)),e[w]=v(e[w]),e[k]=v(e[k]),t[w]=T,t[k]=M}if(\"pixel\"===x){var A=t[y];t[y]=g(t[y],!0),i.coercePosition(e,b,a,_,y,.25),e[y]=v(e[y]),t[y]=A}}u&&n.noneOrAll(t,e,[\"x0\",\"x1\",\"y0\",\"y1\"])}}e.exports=function(t,e){a(t,e,{name:\"shapes\",handleItemDefaults:l})}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../../plots/cartesian/axes\":566,\"./attributes\":457,\"./helpers\":469}],461:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").strTranslate,i=t(\"../dragelement\"),a=t(\"../dragelement/helpers\"),o=a.drawMode,s=a.selectMode,l=t(\"../../registry\"),u=t(\"../color\"),c=t(\"./draw_newshape/constants\"),f=c.i000,h=c.i090,p=c.i180,d=c.i270,g=t(\"./handle_outline\").clearOutlineControllers,v=t(\"./draw_newshape/helpers\"),m=v.pointsOnRectangle,y=v.pointsOnEllipse,x=v.writePaths,b=t(\"./draw_newshape/newshapes\"),_=t(\"../selections/draw_newselection/newselections\");function w(t,e){var r,n,i,a=t[e][1],o=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===a&&i===o&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}e.exports=function t(e,r,a,c){c||(c=0);var v=a.gd;function k(){t(e,r,a,c++),y(e[0])&&T({redrawing:!0})}function T(t){var e={};void 0!==a.isActiveShape&&(a.isActiveShape=!1,e=b(r,a)),void 0!==a.isActiveSelection&&(a.isActiveSelection=!1,e=_(r,a),v._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?\"relayout\":\"_guiRelayout\",v,e)}var M,A,S,E,C,L=v._fullLayout._zoomlayer,P=a.dragmode,O=o(P),I=s(P);function D(t){S=+t.srcElement.getAttribute(\"data-i\"),E=+t.srcElement.getAttribute(\"data-j\"),M[S][E].moveFn=z}function z(t,r){if(e.length){var n=C[S][E][1],i=C[S][E][2],o=e[S],s=o.length;if(m(o)){var l=t,u=r;a.isActiveSelection&&(w(o,E)[1]===o[E][1]?u=0:l=0);for(var c=0;c<s;c++)if(c!==E){var f=o[c];f[1]===o[E][1]&&(f[1]=n+l),f[2]===o[E][2]&&(f[2]=i+u)}if(o[E][1]=n+l,o[E][2]=i+u,!m(o))for(var h=0;h<s;h++)for(var p=0;p<o[h].length;p++)o[h][p]=C[S][h][p]}else o[E][1]=n+t,o[E][2]=i+r;k()}}function R(){T()}function F(t,r){if(2===t){S=+r.srcElement.getAttribute(\"data-i\"),E=+r.srcElement.getAttribute(\"data-j\");var n=e[S];m(n)||y(n)||function(){if(e.length&&e[S]&&e[S].length){for(var t=[],r=0;r<e[S].length;r++)r!==E&&t.push(e[S][r]);t.length>1&&(2!==t.length||\"Z\"!==t[1][0])&&(0===E&&(t[0][0]=\"M\"),e[S]=t,k(),T())}}()}}function N(t,r){(function(t,r){if(e.length)for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)for(var a=0;a+2<e[n][i].length;a+=2)e[n][i][a+1]=C[n][i][a+1]+t,e[n][i][a+2]=C[n][i][a+2]+r})(t,r),k()}function B(t){(S=+t.srcElement.getAttribute(\"data-i\"))||(S=0),A[S].moveFn=N}function j(){T()}function U(t){2===t&&function(t){if(s(t._fullLayout.dragmode)){g(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var n=[],i=0;i<r.length;i++)i!==e&&n.push(r[i]);delete t._fullLayout._activeSelectionIndex;var a=t._fullLayout.selections[e];t._fullLayout._deselect={xref:a.xref,yref:a.yref},l.call(\"_guiRelayout\",t,{selections:n})}}}(v)}(O||I)&&(v._fullLayout._outlining=!0),g(v),r.attr(\"d\",x(e)),c||!a.isActiveShape&&!a.isActiveSelection||(C=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t[r]=[];for(var i=0;i<n.length;i++){t[r][i]=[];for(var a=0;a<n[i].length;a++)t[r][i][a]=n[i][a]}}return t}([],e),function(t){M=[];for(var r=0;r<e.length;r++){var o=e[r],s=m(o),l=!s&&y(o);M[r]=[];for(var c=o.length,g=0;g<c;g++)if(\"Z\"!==o[g][0]&&(!l||g===f||g===h||g===p||g===d)){var x,b=s&&a.isActiveSelection;b&&(x=w(o,g));var _=o[g][1],k=o[g][2],T=t.append(b?\"rect\":\"circle\").attr(\"data-i\",r).attr(\"data-j\",g).style({fill:u.background,stroke:u.defaultLine,\"stroke-width\":1,\"shape-rendering\":\"crispEdges\"});if(b){var A=x[1]-_,S=x[2]-k,E=S?5:Math.max(Math.min(25,Math.abs(A)-5),5),C=A?5:Math.max(Math.min(25,Math.abs(S)-5),5);T.classed(S?\"cursor-ew-resize\":\"cursor-ns-resize\",!0).attr(\"width\",E).attr(\"height\",C).attr(\"x\",_-E/2).attr(\"y\",k-C/2).attr(\"transform\",n(A/2,S/2))}else T.classed(\"cursor-grab\",!0).attr(\"r\",5).attr(\"cx\",_).attr(\"cy\",k);M[r][g]={element:T.node(),gd:v,prepFn:D,doneFn:R,clickFn:F},i.init(M[r][g])}}}(L.append(\"g\").attr(\"class\",\"outline-controllers\")),A=[],e.length&&(A[0]={element:r[0][0],gd:v,prepFn:B,doneFn:j,clickFn:U},i.init(A[0])))}},{\"../../lib\":515,\"../../registry\":647,\"../color\":367,\"../dragelement\":386,\"../dragelement/helpers\":385,\"../selections/draw_newselection/newselections\":453,\"./draw_newshape/constants\":464,\"./draw_newshape/helpers\":466,\"./draw_newshape/newshapes\":467,\"./handle_outline\":468}],462:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"./draw_newshape/helpers\").readPaths,s=t(\"./display_outlines\"),l=t(\"./handle_outline\").clearOutlineControllers,u=t(\"../color\"),c=t(\"../drawing\"),f=t(\"../../plot_api/plot_template\").arrayEditor,h=t(\"../dragelement\"),p=t(\"../../lib/setcursor\"),d=t(\"./constants\"),g=t(\"./helpers\"),v=g.getPathString;function m(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll(\"path\").remove(),e._shapeLowerLayer.selectAll(\"path\").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll(\"path\").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&b(t,i)}function y(t){return!!t._fullLayout._outlining}function x(t){return!t._context.edits.shapePosition}function b(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index=\"'+e+'\"]').remove();var r=g.makeShapesOptionsAndPlotinfo(t,e),l=r.options,b=r.plotinfo;function T(r){var T=v(t,l),M={\"data-index\":e,\"fill-rule\":l.fillrule,d:T},A=l.opacity,S=l.fillcolor,E=l.line.width?l.line.color:\"rgba(0,0,0,0)\",C=l.line.width,L=l.line.dash;C||!0!==l.editable||(C=5,L=\"solid\");var P=\"Z\"!==T[T.length-1],O=x(t)&&l.editable&&t._fullLayout._activeShapeIndex===e;O&&(S=P?\"rgba(0,0,0,0)\":t._fullLayout.activeshape.fillcolor,A=t._fullLayout.activeshape.opacity);var I,D=r.append(\"path\").attr(M).style(\"opacity\",A).call(u.stroke,E).call(u.fill,S).call(c.dashLine,L,C);if(_(D,t,l),(O||t._context.edits.shapePosition)&&(I=f(t.layout,\"shapes\",l)),O){D.style({cursor:\"move\"});var z={element:D.node(),plotinfo:b,gd:t,editHelpers:I,isActiveShape:!0},R=o(T,t);s(R,D,z)}else t._context.edits.shapePosition?function(t,e,r,o,s,l){var u,f,m,x,b,k,T,M,A,S,E,C,L,P,O,I,D=10,z=10,R=\"pixel\"===r.xsizemode,F=\"pixel\"===r.ysizemode,N=\"line\"===r.type,B=\"path\"===r.type,j=l.modifyItem,U=a.getFromId(t,r.xref),V=a.getRefType(r.xref),H=a.getFromId(t,r.yref),q=a.getRefType(r.yref),G=g.getDataToPixel(t,U,!1,V),Y=g.getDataToPixel(t,H,!0,q),W=g.getPixelToData(t,U,!1,V),X=g.getPixelToData(t,H,!0,q),Z=J(),K={element:Z.node(),gd:t,prepFn:tt,doneFn:et,clickFn:rt};function J(){return N?$():e}function $(){var t=10,n=Math.max(r.line.width,t),i=s.append(\"g\").attr(\"data-index\",o);i.append(\"path\").attr(\"d\",e.attr(\"d\")).style({cursor:\"move\",\"stroke-width\":n,\"stroke-opacity\":\"0\"});var a={\"fill-opacity\":\"0\"},l=Math.max(n/2,t);return i.append(\"circle\").attr({\"data-line-point\":\"start-point\",cx:R?G(r.xanchor)+r.x0:G(r.x0),cy:F?Y(r.yanchor)-r.y0:Y(r.y0),r:l}).style(a).classed(\"cursor-grab\",!0),i.append(\"circle\").attr({\"data-line-point\":\"end-point\",cx:R?G(r.xanchor)+r.x1:G(r.x1),cy:F?Y(r.yanchor)-r.y1:Y(r.y1),r:l}).style(a).classed(\"cursor-grab\",!0),i}function Q(r){if(y(t))I=null;else if(N)I=\"path\"===r.target.tagName?\"move\":\"start-point\"===r.target.attributes[\"data-line-point\"].value?\"resize-over-start-point\":\"resize-over-end-point\";else{var n=K.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!B&&i>D&&a>z&&!r.shiftKey?h.getCursor(o/i,1-s/a):\"move\";p(e,l),I=l.split(\"-\")[0]}}function tt(n){y(t)||(R&&(b=G(r.xanchor)),F&&(k=Y(r.yanchor)),\"path\"===r.type?O=r.path:(u=R?r.x0:G(r.x0),f=F?r.y0:Y(r.y0),m=R?r.x1:G(r.x1),x=F?r.y1:Y(r.y1)),u<m?(A=u,L=\"x0\",S=m,P=\"x1\"):(A=m,L=\"x1\",S=u,P=\"x0\"),!F&&f<x||F&&f>x?(T=f,E=\"y0\",M=x,C=\"y1\"):(T=x,E=\"y1\",M=f,C=\"y0\"),Q(n),at(s,r),st(e,r,t),K.moveFn=\"move\"===I?nt:it,K.altKey=n.altKey)}function et(){y(t)||(p(e),ot(s),_(e,t,r),n.call(\"_guiRelayout\",t,l.getUpdateObj()))}function rt(){y(t)||ot(s)}function nt(n,i){if(\"path\"===r.type){var a=function(t){return t},o=a,l=a;R?j(\"xanchor\",r.xanchor=W(b+n)):(o=function(t){return W(G(t)+n)},U&&\"date\"===U.type&&(o=g.encodeDate(o))),F?j(\"yanchor\",r.yanchor=X(k+i)):(l=function(t){return X(Y(t)+i)},H&&\"date\"===H.type&&(l=g.encodeDate(l))),j(\"path\",r.path=w(O,o,l))}else R?j(\"xanchor\",r.xanchor=W(b+n)):(j(\"x0\",r.x0=W(u+n)),j(\"x1\",r.x1=W(m+n))),F?j(\"yanchor\",r.yanchor=X(k+i)):(j(\"y0\",r.y0=X(f+i)),j(\"y1\",r.y1=X(x+i)));e.attr(\"d\",v(t,r)),at(s,r)}function it(n,i){if(B){var a=function(t){return t},o=a,l=a;R?j(\"xanchor\",r.xanchor=W(b+n)):(o=function(t){return W(G(t)+n)},U&&\"date\"===U.type&&(o=g.encodeDate(o))),F?j(\"yanchor\",r.yanchor=X(k+i)):(l=function(t){return X(Y(t)+i)},H&&\"date\"===H.type&&(l=g.encodeDate(l))),j(\"path\",r.path=w(O,o,l))}else if(N){if(\"resize-over-start-point\"===I){var c=u+n,h=F?f-i:f+i;j(\"x0\",r.x0=R?c:W(c)),j(\"y0\",r.y0=F?h:X(h))}else if(\"resize-over-end-point\"===I){var p=m+n,d=F?x-i:x+i;j(\"x1\",r.x1=R?p:W(p)),j(\"y1\",r.y1=F?d:X(d))}}else{var y=function(t){return-1!==I.indexOf(t)},_=y(\"n\"),V=y(\"s\"),q=y(\"w\"),Z=y(\"e\"),K=_?T+i:T,J=V?M+i:M,$=q?A+n:A,Q=Z?S+n:S;F&&(_&&(K=T-i),V&&(J=M-i)),(!F&&J-K>z||F&&K-J>z)&&(j(E,r[E]=F?K:X(K)),j(C,r[C]=F?J:X(J))),Q-$>D&&(j(L,r[L]=R?$:W($)),j(P,r[P]=R?Q:W(Q)))}e.attr(\"d\",v(t,r)),at(s,r)}function at(t,e){function r(){var r=\"path\"!==e.type,n=t.selectAll(\".visual-cue\").data([0]),a=1;n.enter().append(\"path\").attr({fill:\"#fff\",\"fill-rule\":\"evenodd\",stroke:\"#000\",\"stroke-width\":a}).classed(\"visual-cue\",!0);var o=G(R?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),s=Y(F?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(o=g.roundPositionForSharpStrokeRendering(o,a),s=g.roundPositionForSharpStrokeRendering(s,a),R&&F){var l=\"M\"+(o-1-a)+\",\"+(s-1-a)+\"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z\";n.attr(\"d\",l)}else if(R){var u=\"M\"+(o-1-a)+\",\"+(s-9-a)+\"v18 h2 v-18 Z\";n.attr(\"d\",u)}else{var c=\"M\"+(o-9-a)+\",\"+(s-1-a)+\"h18 v2 h-18 Z\";n.attr(\"d\",c)}}(R||F)&&r()}function ot(t){t.selectAll(\".visual-cue\").remove()}function st(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l=\"\";\"paper\"===n||o.autorange||(l+=n),\"paper\"===i||s.autorange||(l+=i),c.setClipUrl(t,l?\"clip\"+r._fullLayout._uid+l:null,r)}h.init(K),Z.node().onmousemove=Q}(t,D,l,e,r,I):!0===l.editable&&D.style(\"pointer-events\",P||u.opacity(S)*A<=.5?\"stroke\":\"all\");D.node().addEventListener(\"click\",(function(){return function(t,e){if(x(t)){var r=+e.node().getAttribute(\"data-index\");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void k(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=k,m(t)}}}(t,D)}))}l._input&&!1!==l.visible&&(\"below\"!==l.layer?T(t._fullLayout._shapeUpperLayer):\"paper\"===l.xref||\"paper\"===l.yref?T(t._fullLayout._shapeLowerLayer):b._hadPlotinfo?T((b.mainplotinfo||b).shapelayer):T(t._fullLayout._shapeLowerLayer))}function _(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,\"\").replace(/[xyz][1-9]* *domain/g,\"\");c.setClipUrl(t,n?\"clip\"+e._fullLayout._uid+n:null,e)}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function k(t){x(t)&&t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t))}e.exports={draw:m,drawOne:b,eraseActiveShape:function(t){if(x(t)){l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var i=[],a=0;a<r.length;a++)a!==e&&i.push(r[a]);delete t._fullLayout._activeShapeIndex,n.call(\"_guiRelayout\",t,{shapes:i})}}}}},{\"../../lib\":515,\"../../lib/setcursor\":536,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"../color\":367,\"../dragelement\":386,\"../drawing\":389,\"./constants\":459,\"./display_outlines\":461,\"./draw_newshape/helpers\":466,\"./handle_outline\":468,\"./helpers\":469}],463:[function(t,e,r){\"use strict\";var n=t(\"../../drawing/attributes\").dash,i=t(\"../../../lib/extend\").extendFlat;e.exports={newshape:{line:{color:{valType:\"color\",editType:\"none\"},width:{valType:\"number\",min:0,dflt:4,editType:\"none\"},dash:i({},n,{dflt:\"solid\",editType:\"none\"}),editType:\"none\"},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"none\"},fillrule:{valType:\"enumerated\",values:[\"evenodd\",\"nonzero\"],dflt:\"evenodd\",editType:\"none\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"none\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"none\"},drawdirection:{valType:\"enumerated\",values:[\"ortho\",\"horizontal\",\"vertical\",\"diagonal\"],dflt:\"diagonal\",editType:\"none\"},editType:\"none\"},activeshape:{fillcolor:{valType:\"color\",dflt:\"rgb(255,0,255)\",editType:\"none\"},opacity:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"none\"},editType:\"none\"}}},{\"../../../lib/extend\":505,\"../../drawing/attributes\":388}],464:[function(t,e,r){\"use strict\";e.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},{}],465:[function(t,e,r){\"use strict\";var n=t(\"../../color\");e.exports=function(t,e,r){if(r(\"newshape.drawdirection\"),r(\"newshape.layer\"),r(\"newshape.fillcolor\"),r(\"newshape.fillrule\"),r(\"newshape.opacity\"),r(\"newshape.line.width\")){var i=(t||{}).plot_bgcolor||\"#FFF\";r(\"newshape.line.color\",n.contrast(i)),r(\"newshape.line.dash\")}r(\"activeshape.fillcolor\"),r(\"activeshape.opacity\")}},{\"../../color\":367}],466:[function(t,e,r){\"use strict\";var n=t(\"parse-svg-path\"),i=t(\"./constants\"),a=i.CIRCLE_SIDES,o=i.SQRT2,s=t(\"../../selections/helpers\"),l=s.p2r,u=s.r2p,c=[0,3,4,5,6,1,2],f=[0,3,4,1,2];function h(t,e){return Math.abs(t-e)<=1e-6}function p(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}r.writePaths=function(t){var e=t.length;if(!e)return\"M0,0Z\";for(var r=\"\",n=0;n<e;n++)for(var i=t[n].length,a=0;a<i;a++){var o=t[n][a][0];if(\"Z\"===o)r+=\"Z\";else for(var s=t[n][a].length,l=0;l<s;l++){var u=l;\"Q\"===o||\"S\"===o?u=f[l]:\"C\"===o&&(u=c[l]),r+=t[n][a][u],l>0&&l<s-1&&(r+=\",\")}}return r},r.readPaths=function(t,e,r,i){var o,s,c,f=n(t),h=[],p=-1,d=0,g=0,v=function(){s=d,c=g};v();for(var m=0;m<f.length;m++){var y,x,b,_,w=[],k=f[m][0],T=k;switch(k){case\"M\":p++,h[p]=[],d=+f[m][1],g=+f[m][2],w.push([T,d,g]),v();break;case\"Q\":case\"S\":y=+f[m][1],b=+f[m][2],d=+f[m][3],g=+f[m][4],w.push([T,d,g,y,b]);break;case\"C\":y=+f[m][1],b=+f[m][2],x=+f[m][3],_=+f[m][4],d=+f[m][5],g=+f[m][6],w.push([T,d,g,y,b,x,_]);break;case\"T\":case\"L\":d=+f[m][1],g=+f[m][2],w.push([T,d,g]);break;case\"H\":T=\"L\",d=+f[m][1],w.push([T,d,g]);break;case\"V\":T=\"L\",g=+f[m][1],w.push([T,d,g]);break;case\"A\":T=\"L\";var M=+f[m][1],A=+f[m][2];+f[m][4]||(M=-M,A=-A);var S=d-M,E=g;for(o=1;o<=a/2;o++){var C=2*Math.PI*o/a;w.push([T,S+M*Math.cos(C),E+A*Math.sin(C)])}break;case\"Z\":d===s&&g===c||(d=s,g=c,w.push([T,d,g]))}for(var L=(r||{}).domain,P=e._fullLayout._size,O=r&&\"pixel\"===r.xsizemode,I=r&&\"pixel\"===r.ysizemode,D=!1===i,z=0;z<w.length;z++){for(o=0;o+2<7;o+=2){var R=w[z][o+1],F=w[z][o+2];void 0!==R&&void 0!==F&&(d=R,g=F,r&&(r.xaxis&&r.xaxis.p2r?(D&&(R-=r.xaxis._offset),R=O?u(r.xaxis,r.xanchor)+R:l(r.xaxis,R)):(D&&(R-=P.l),L?R=L.x[0]+R/P.w:R/=P.w),r.yaxis&&r.yaxis.p2r?(D&&(F-=r.yaxis._offset),F=I?u(r.yaxis,r.yanchor)-F:l(r.yaxis,F)):(D&&(F-=P.t),F=L?L.y[1]-F/P.h:1-F/P.h)),w[z][o+1]=R,w[z][o+2]=F)}h[p].push(w[z].slice())}}return h},r.pointsOnRectangle=function(t){if(5!==t.length)return!1;for(var e=1;e<3;e++){if(!h(t[0][e]-t[1][e],t[3][e]-t[2][e]))return!1;if(!h(t[0][e]-t[3][e],t[1][e]-t[2][e]))return!1}return!(!h(t[0][1],t[1][1])&&!h(t[0][1],t[3][1])||!(p(t[0],t[1])*p(t[0],t[3])))},r.pointsOnEllipse=function(t){var e=t.length;if(e!==a+1)return!1;e=a;for(var r=0;r<e;r++){var n=(2*e-r)%e,i=(e/2+n)%e,o=(e/2+r)%e;if(!h(p(t[r],t[o]),p(t[n],t[i])))return!1}return!0},r.handleEllipse=function(t,e,n){if(!t)return[e,n];var i=r.ellipseOver({x0:e[0],y0:e[1],x1:n[0],y1:n[1]}),s=(i.x1+i.x0)/2,l=(i.y1+i.y0)/2,u=(i.x1-i.x0)/2,c=(i.y1-i.y0)/2;u||(u=c/=o),c||(c=u/=o);for(var f=[],h=0;h<a;h++){var p=2*h*Math.PI/a;f.push([s+u*Math.cos(p),l+c*Math.sin(p)])}return f},r.ellipseOver=function(t){var e=t.x0,r=t.y0,n=t.x1,i=t.y1,a=n-e,s=i-r,l=((e-=a)+n)/2,u=((r-=s)+i)/2;return{x0:l-(a*=o),y0:u-(s*=o),x1:l+a,y1:u+s}},r.fixDatesForPaths=function(t,e,r){var n=\"date\"===e.type,i=\"date\"===r.type;if(!n&&!i)return t;for(var a=0;a<t.length;a++)for(var o=0;o<t[a].length;o++)for(var s=0;s+2<t[a][o].length;s+=2)n&&(t[a][o][s+1]=t[a][o][s+1].replace(\" \",\"_\")),i&&(t[a][o][s+2]=t[a][o][s+2].replace(\" \",\"_\"));return t}},{\"../../selections/helpers\":454,\"./constants\":464,\"parse-svg-path\":250}],467:[function(t,e,r){\"use strict\";var n=t(\"../../dragelement/helpers\"),i=n.drawMode,a=n.openMode,o=t(\"./constants\"),s=o.i000,l=o.i090,u=o.i180,c=o.i270,f=o.cos45,h=o.sin45,p=t(\"../../selections/helpers\"),d=p.p2r,g=p.r2p,v=t(\".././handle_outline\").clearOutline,m=t(\"./helpers\"),y=m.readPaths,x=m.writePaths,b=m.ellipseOver,_=m.fixDatesForPaths;e.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var n=r.getAttribute(\"d\"),o=e.gd,p=o._fullLayout.newshape,m=e.plotinfo,w=m.xaxis,k=m.yaxis,T=!!m.domain||!m.xaxis,M=!!m.domain||!m.yaxis,A=e.isActiveShape,S=e.dragmode,E=(o.layout||{}).shapes||[];if(!i(S)&&void 0!==A){var C=o._fullLayout._activeShapeIndex;if(C<E.length)switch(o._fullLayout.shapes[C].type){case\"rect\":S=\"drawrect\";break;case\"circle\":S=\"drawcircle\";break;case\"line\":S=\"drawline\";break;case\"path\":var L=E[C].path||\"\";S=\"Z\"===L[L.length-1]?\"drawclosedpath\":\"drawopenpath\"}}var P,O=a(S),I=y(n,o,m,A),D={editable:!0,xref:T?\"paper\":w._id,yref:M?\"paper\":k._id,layer:p.layer,opacity:p.opacity,line:{color:p.line.color,width:p.line.width,dash:p.line.dash}};if(O||(D.fillcolor=p.fillcolor,D.fillrule=p.fillrule),1===I.length&&(P=I[0]),P&&5===P.length&&\"drawrect\"===S)D.type=\"rect\",D.x0=P[0][1],D.y0=P[0][2],D.x1=P[2][1],D.y1=P[2][2];else if(P&&\"drawline\"===S)D.type=\"line\",D.x0=P[0][1],D.y0=P[0][2],D.x1=P[1][1],D.y1=P[1][2];else if(P&&\"drawcircle\"===S){D.type=\"circle\";var z=P[s][1],R=P[l][1],F=P[u][1],N=P[c][1],B=P[s][2],j=P[l][2],U=P[u][2],V=P[c][2],H=m.xaxis&&(\"date\"===m.xaxis.type||\"log\"===m.xaxis.type),q=m.yaxis&&(\"date\"===m.yaxis.type||\"log\"===m.yaxis.type);H&&(z=g(m.xaxis,z),R=g(m.xaxis,R),F=g(m.xaxis,F),N=g(m.xaxis,N)),q&&(B=g(m.yaxis,B),j=g(m.yaxis,j),U=g(m.yaxis,U),V=g(m.yaxis,V));var G=(R+N)/2,Y=(B+U)/2,W=b({x0:G,y0:Y,x1:G+(N-R+F-z)/2*f,y1:Y+(V-j+U-B)/2*h});H&&(W.x0=d(m.xaxis,W.x0),W.x1=d(m.xaxis,W.x1)),q&&(W.y0=d(m.yaxis,W.y0),W.y1=d(m.yaxis,W.y1)),D.x0=W.x0,D.y0=W.y0,D.x1=W.x1,D.y1=W.y1}else D.type=\"path\",w&&k&&_(I,w,k),D.path=x(I),P=null;v(o);for(var X=e.editHelpers,Z=(X||{}).modifyItem,K=[],J=0;J<E.length;J++){var $=o._fullLayout.shapes[J];if(K[J]=$._input,void 0!==A&&J===o._fullLayout._activeShapeIndex){var Q=D;switch($.type){case\"line\":case\"rect\":case\"circle\":Z(\"x0\",Q.x0),Z(\"x1\",Q.x1),Z(\"y0\",Q.y0),Z(\"y1\",Q.y1);break;case\"path\":Z(\"path\",Q.path)}}}return void 0===A?(K.push(D),K):X?X.getUpdateObj():{}}}}},{\"../../dragelement/helpers\":385,\"../../selections/helpers\":454,\".././handle_outline\":468,\"./constants\":464,\"./helpers\":466}],468:[function(t,e,r){\"use strict\";e.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(\".outline-controllers\").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(\".select-outline\").remove(),t._fullLayout._outlining=!1}}},{}],469:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\");r.rangeToShapePosition=function(t){return\"log\"===t.type?t.r2d:function(t){return t}},r.shapePositionToRange=function(t){return\"log\"===t.type?t.d2r:function(t){return t}},r.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace(\"_\",\" \")),t(e)}},r.encodeDate=function(t){return function(e){return t(e).replace(\" \",\"_\")}},r.extractPathCoords=function(t,e,r){var a=[];return t.match(n.segmentRE).forEach((function(t){var o=e[t.charAt(0)].drawn;if(void 0!==o){var s=t.substr(1).match(n.paramRE);if(s&&!(s.length<o)){var l=s[o],u=r?l:i.cleanNumber(l);a.push(u)}}})),a},r.getDataToPixel=function(t,e,n,i){var a,o=t._fullLayout._size;if(e)if(\"domain\"===i)a=function(t){return e._length*(n?1-t:t)+e._offset};else{var s=r.shapePositionToRange(e);a=function(t){return e._offset+e.r2p(s(t,!0))},\"date\"===e.type&&(a=r.decodeDate(a))}else a=n?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.w*t};return a},r.getPixelToData=function(t,e,n,i){var a,o=t._fullLayout._size;if(e)if(\"domain\"===i)a=function(t){var r=(t-e._offset)/e._length;return n?1-r:r};else{var s=r.rangeToShapePosition(e);a=function(t){return s(e.p2r(t-e._offset))}}else a=n?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a},r.roundPositionForSharpStrokeRendering=function(t,e){var r=1===Math.round(e%2),n=Math.round(t);return r?n+.5:n},r.makeShapesOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.shapes[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&\"paper\"!==r.xref&&(n.xaxis=t._fullLayout[r.xref+\"axis\"]),r.yref&&\"paper\"!==r.yref&&(n.yaxis=t._fullLayout[r.yref+\"axis\"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},r.makeSelectionsOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.selections[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=t._fullLayout[r.xref+\"axis\"]),r.yref&&(n.yaxis=t._fullLayout[r.yref+\"axis\"])),{options:r,plotinfo:n}},r.getPathString=function(t,e){var o,s,l,u,c,f,h,p,d=e.type,g=a.getRefType(e.xref),v=a.getRefType(e.yref),m=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(m?\"domain\"===g?s=function(t){return m._offset+m._length*t}:(o=r.shapePositionToRange(m),s=function(t){return m._offset+m.r2p(o(t,!0))}):s=function(t){return x.l+x.w*t},y?\"domain\"===v?u=function(t){return y._offset+y._length*(1-t)}:(l=r.shapePositionToRange(y),u=function(t){return y._offset+y.r2p(l(t,!0))}):u=function(t){return x.t+x.h*(1-t)},\"path\"===d)return m&&\"date\"===m.type&&(s=r.decodeDate(s)),y&&\"date\"===y.type&&(u=r.decodeDate(u)),function(t,e,r){var a=t.path,o=t.xsizemode,s=t.ysizemode,l=t.xanchor,u=t.yanchor;return a.replace(n.segmentRE,(function(t){var a=0,c=t.charAt(0),f=n.paramIsX[c],h=n.paramIsY[c],p=n.numParams[c],d=t.substr(1).replace(n.paramRE,(function(t){return f[a]?t=\"pixel\"===o?e(l)+Number(t):e(t):h[a]&&(t=\"pixel\"===s?r(u)-Number(t):r(t)),++a>p&&(t=\"X\"),t}));return a>p&&(d=d.replace(/[\\s,]*X.*/,\"\"),i.log(\"Ignoring extra params in segment \"+t)),c+d}))}(e,s,u);if(\"pixel\"===e.xsizemode){var b=s(e.xanchor);c=b+e.x0,f=b+e.x1}else c=s(e.x0),f=s(e.x1);if(\"pixel\"===e.ysizemode){var _=u(e.yanchor);h=_-e.y0,p=_-e.y1}else h=u(e.y0),p=u(e.y1);if(\"line\"===d)return\"M\"+c+\",\"+h+\"L\"+f+\",\"+p;if(\"rect\"===d)return\"M\"+c+\",\"+h+\"H\"+f+\"V\"+p+\"H\"+c+\"Z\";var w=(c+f)/2,k=(h+p)/2,T=Math.abs(w-c),M=Math.abs(k-h),A=\"A\"+T+\",\"+M,S=w+T+\",\"+k;return\"M\"+S+A+\" 0 1,1 \"+w+\",\"+(k-M)+A+\" 0 0,1 \"+S+\"Z\"}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"./constants\":459}],470:[function(t,e,r){\"use strict\";var n=t(\"./draw\");e.exports={moduleType:\"component\",name:\"shapes\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),supplyDrawNewShapeDefaults:t(\"./draw_newshape/defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"shapes\"),calcAutorange:t(\"./calc_autorange\"),draw:n.draw,drawOne:n.drawOne}},{\"../../plots/cartesian/include_components\":577,\"./attributes\":457,\"./calc_autorange\":458,\"./defaults\":460,\"./draw\":462,\"./draw_newshape/defaults\":465}],471:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../plots/pad_attributes\"),a=t(\"../../lib/extend\").extendDeepAll,o=t(\"../../plot_api/edit_types\").overrideAll,s=t(\"../../plots/animation_attributes\"),l=t(\"../../plot_api/plot_template\").templatedArray,u=t(\"./constants\"),c=l(\"step\",{visible:{valType:\"boolean\",dflt:!0},method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\"},value:{valType:\"string\"},execute:{valType:\"boolean\",dflt:!0}});e.exports=o(l(\"slider\",{visible:{valType:\"boolean\",dflt:!0},active:{valType:\"number\",min:0,dflt:0},steps:c,lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\",min:-2,max:3,dflt:0},pad:a(i({editType:\"arraydraw\"}),{},{t:{dflt:20}}),xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\"},y:{valType:\"number\",min:-2,max:3,dflt:0},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"top\"},transition:{duration:{valType:\"number\",min:0,dflt:150},easing:{valType:\"enumerated\",values:s.transition.easing.values,dflt:\"cubic-in-out\"}},currentvalue:{visible:{valType:\"boolean\",dflt:!0},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\"},offset:{valType:\"number\",dflt:10},prefix:{valType:\"string\"},suffix:{valType:\"string\"},font:n({})},font:n({}),activebgcolor:{valType:\"color\",dflt:u.gripBgActiveColor},bgcolor:{valType:\"color\",dflt:u.railBgColor},bordercolor:{valType:\"color\",dflt:u.railBorderColor},borderwidth:{valType:\"number\",min:0,dflt:u.railBorderWidth},ticklen:{valType:\"number\",min:0,dflt:u.tickLength},tickcolor:{valType:\"color\",dflt:u.tickColor},tickwidth:{valType:\"number\",min:0,dflt:1},minorticklen:{valType:\"number\",min:0,dflt:u.minorTickLength}}),\"arraydraw\",\"from-root\")},{\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plot_api/plot_template\":555,\"../../plots/animation_attributes\":560,\"../../plots/font_attributes\":594,\"../../plots/pad_attributes\":627,\"./constants\":472}],472:[function(t,e,r){\"use strict\";e.exports={name:\"sliders\",containerClassName:\"slider-container\",groupClassName:\"slider-group\",inputAreaClass:\"slider-input-area\",railRectClass:\"slider-rail-rect\",railTouchRectClass:\"slider-rail-touch-rect\",gripRectClass:\"slider-grip-rect\",tickRectClass:\"slider-tick-rect\",inputProxyClass:\"slider-input-proxy\",labelsClass:\"slider-labels\",labelGroupClass:\"slider-label-group\",labelClass:\"slider-label\",currentValueClass:\"slider-current-value\",railHeight:5,menuIndexAttrName:\"slider-active-index\",autoMarginIdRoot:\"slider-\",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:\"#bec8d9\",railBgColor:\"#f8fafc\",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:\"#bec8d9\",gripBgColor:\"#f6f8fa\",gripBgActiveColor:\"#dbdde0\",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:\"#333\",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:\"#333\",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],473:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/array_container_defaults\"),a=t(\"./attributes\"),o=t(\"./constants\").name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:\"steps\",handleItemDefaults:u}),l=0,c=0;c<s.length;c++)s[c].visible&&l++;if(l<2?e.visible=!1:o(\"visible\")){e._stepCount=l;var f=e._visibleSteps=n.filterVisible(s);(s[o(\"active\")]||{}).visible||(e.active=f[0]._index),o(\"x\"),o(\"y\"),n.noneOrAll(t,e,[\"x\",\"y\"]),o(\"xanchor\"),o(\"yanchor\"),o(\"len\"),o(\"lenmode\"),o(\"pad.t\"),o(\"pad.r\"),o(\"pad.b\"),o(\"pad.l\"),n.coerceFont(o,\"font\",r.font),o(\"currentvalue.visible\")&&(o(\"currentvalue.xanchor\"),o(\"currentvalue.prefix\"),o(\"currentvalue.suffix\"),o(\"currentvalue.offset\"),n.coerceFont(o,\"currentvalue.font\",e.font)),o(\"transition.duration\"),o(\"transition.easing\"),o(\"bgcolor\"),o(\"activebgcolor\"),o(\"bordercolor\"),o(\"borderwidth\"),o(\"ticklen\"),o(\"tickwidth\"),o(\"tickcolor\"),o(\"minorticklen\")}}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if(\"skip\"===t.method||Array.isArray(t.args)?r(\"visible\"):e.visible=!1){r(\"method\"),r(\"args\");var i=r(\"label\",\"step-\"+e._index);r(\"value\",i),r(\"execute\")}}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"./attributes\":471,\"./constants\":472}],474:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=s.strTranslate,u=t(\"../../lib/svg_text_utils\"),c=t(\"../../plot_api/plot_template\").arrayEditor,f=t(\"./constants\"),h=t(\"../../constants/alignment\"),p=h.LINE_SPACING,d=h.FROM_TL,g=h.FROM_BR;function v(t){return f.autoMarginIdRoot+t._index}function m(t){return t._index}function y(t,e){var r=o.tester.selectAll(\"g.\"+f.labelGroupClass).data(e._visibleSteps);r.enter().append(\"g\").classed(f.labelGroupClass,!0);var a=0,l=0;r.each((function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);l=Math.max(l,i.height),a=Math.max(a,i.width)}})),r.remove();var c=e._dims={};c.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var h=t._fullLayout._size;c.lx=h.l+h.w*e.x,c.ly=h.t+h.h*(1-e.y),\"fraction\"===e.lenmode?c.outerLength=Math.round(h.w*e.len):c.outerLength=e.len,c.inputAreaStart=0,c.inputAreaLength=Math.round(c.outerLength-e.pad.l-e.pad.r);var p=(c.inputAreaLength-2*f.stepInset)/(e._stepCount-1),m=a+f.labelPadding;if(c.labelStride=Math.max(1,Math.ceil(m/p)),c.labelHeight=l,c.currentValueMaxWidth=0,c.currentValueHeight=0,c.currentValueTotalHeight=0,c.currentValueMaxLines=1,e.currentvalue.visible){var y=o.tester.append(\"g\");r.each((function(t){var r=x(y,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=u.lineCount(r);c.currentValueMaxWidth=Math.max(c.currentValueMaxWidth,Math.ceil(n.width)),c.currentValueHeight=Math.max(c.currentValueHeight,Math.ceil(n.height)),c.currentValueMaxLines=Math.max(c.currentValueMaxLines,i)})),c.currentValueTotalHeight=c.currentValueHeight+e.currentvalue.offset,y.remove()}c.height=c.currentValueTotalHeight+f.tickOffset+e.ticklen+f.labelOffset+c.labelHeight+e.pad.t+e.pad.b;var b=\"left\";s.isRightAnchor(e)&&(c.lx-=c.outerLength,b=\"right\"),s.isCenterAnchor(e)&&(c.lx-=c.outerLength/2,b=\"center\");var w=\"top\";s.isBottomAnchor(e)&&(c.ly-=c.height,w=\"bottom\"),s.isMiddleAnchor(e)&&(c.ly-=c.height/2,w=\"middle\"),c.outerLength=Math.ceil(c.outerLength),c.height=Math.ceil(c.height),c.lx=Math.round(c.lx),c.ly=Math.round(c.ly);var k={y:e.y,b:c.height*g[w],t:c.height*d[w]};\"fraction\"===e.lenmode?(k.l=0,k.xl=e.x-e.len*d[b],k.r=0,k.xr=e.x+e.len*g[b]):(k.x=e.x,k.l=c.outerLength*d[b],k.r=c.outerLength*g[b]),i.autoMargin(t,v(e),k)}function x(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case\"right\":n=a.inputAreaLength-f.currentValueInset-a.currentValueMaxWidth,i=\"left\";break;case\"center\":n=.5*a.inputAreaLength,i=\"middle\";break;default:n=f.currentValueInset,i=\"left\"}var l=s.ensureSingle(t,\"text\",f.labelClass,(function(t){t.attr({\"text-anchor\":i,\"data-notex\":1})})),c=e.currentvalue.prefix?e.currentvalue.prefix:\"\";if(\"string\"==typeof r)c+=r;else{var h=e.steps[e.active].label,d=e._gd._fullLayout._meta;d&&(h=s.templateString(h,d)),c+=h}e.currentvalue.suffix&&(c+=e.currentvalue.suffix),l.call(o.font,e.currentvalue.font).text(c).call(u.convertToTspans,e._gd);var g=u.lineCount(l),v=(a.currentValueMaxLines+1-g)*e.currentvalue.font.size*p;return u.positionText(l,n,v),l}}function b(t,e,r){s.ensureSingle(t,\"rect\",f.gripRectClass,(function(n){n.call(M,e,t,r).style(\"pointer-events\",\"all\")})).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style(\"stroke-width\",r.borderwidth+\"px\")}function _(t,e,r){var n=s.ensureSingle(t,\"text\",f.labelClass,(function(t){t.attr({\"text-anchor\":\"middle\",\"data-notex\":1})})),i=e.step.label,a=r._gd._fullLayout._meta;return a&&(i=s.templateString(i,a)),n.call(o.font,r.font).text(i).call(u.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,\"g\",f.labelsClass),i=e._dims,a=r.selectAll(\"g.\"+f.labelGroupClass).data(i.labelSteps);a.enter().append(\"g\").classed(f.labelGroupClass,!0),a.exit().remove(),a.each((function(t){var r=n.select(this);r.call(_,t,e),o.setTranslate(r,E(e,t.fraction),f.tickOffset+e.ticklen+e.font.size*p+f.labelOffset+i.currentValueTotalHeight)}))}function k(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&T(t,e,r,o,!0,i)}function T(t,e,r,n,a,o){var s=r.active;r.active=n,c(t.layout,f.name,r).applyUpdate(\"active\",n);var l=r.steps[r.active];e.call(S,r,o),e.call(x,r),t.emit(\"plotly_sliderchange\",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function M(t,e,r){var i=r.node(),o=n.select(e);function s(){return r.data()[0]}function l(){var t=s();e.emit(\"plotly_sliderstart\",{slider:t});var l=r.select(\".\"+f.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(a.fill,t.activebgcolor);var u=C(t,n.mouse(i)[0]);function c(){var t=s(),a=C(t,n.mouse(i)[0]);k(e,r,t,a,!1)}function h(){var t=s();t._dragging=!1,l.call(a.fill,t.bgcolor),o.on(\"mouseup\",null),o.on(\"mousemove\",null),o.on(\"touchend\",null),o.on(\"touchmove\",null),e.emit(\"plotly_sliderend\",{slider:t,step:t.steps[t.active]})}k(e,r,t,u,!0),t._dragging=!0,o.on(\"mousemove\",c),o.on(\"touchmove\",c),o.on(\"mouseup\",h),o.on(\"touchend\",h)}t.on(\"mousedown\",l),t.on(\"touchstart\",l)}function A(t,e){var r=t.selectAll(\"rect.\"+f.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append(\"rect\").classed(f.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+\"px\",\"shape-rendering\":\"crispEdges\"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(a.fill,e.tickcolor),o.setTranslate(l,E(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?f.tickOffset:f.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select(\"rect.\"+f.gripRectClass),i=0,a=0;a<e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=E(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr(\"transform\",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function C(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,\"rect\",f.railTouchRectClass,(function(n){n.call(M,e,t,r).style(\"pointer-events\",\"all\")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr(\"opacity\",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function P(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,\"rect\",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,\"shape-rendering\":\"crispEdges\"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[f.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(e,t),a=e._infolayer.selectAll(\"g.\"+f.containerClassName).data(r.length>0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,v(e))}if(a.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"ew-resize\"),a.exit().each((function(){n.select(this).selectAll(\"g.\"+f.groupClassName).each(s)})).remove(),0!==r.length){var l=a.selectAll(\"g.\"+f.groupClassName).data(r,m);l.enter().append(\"g\").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var u=0;u<r.length;u++){var c=r[u];y(t,c)}l.each((function(e){var r=n.select(this);(function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n<r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})})(e),i.manageCommandObserver(t,e,e._visibleSteps,(function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||T(t,r,n,e.index,!1,!0))})),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(x,r).call(P,r).call(w,r).call(A,r).call(L,t,r).call(b,t,r);var n=r._dims;o.setTranslate(e,n.lx+r.pad.l,n.ly+r.pad.t),e.call(S,r,!1),e.call(x,r)}(t,n.select(this),e)}))}}},{\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plot_api/plot_template\":555,\"../../plots/plots\":628,\"../color\":367,\"../drawing\":389,\"./constants\":472,\"@plotly/d3\":58}],475:[function(t,e,r){\"use strict\";var n=t(\"./constants\");e.exports={moduleType:\"component\",name:n.name,layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),draw:t(\"./draw\")}},{\"./attributes\":471,\"./constants\":472,\"./defaults\":473,\"./draw\":474}],476:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,u=t(\"../drawing\"),c=t(\"../color\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"../../constants/interactions\"),p=t(\"../../constants/alignment\").OPPOSITE_SIDE,d=/ [XY][0-9]* /;e.exports={draw:function(t,e,r){var g,v=r.propContainer,m=r.propName,y=r.placeholder,x=r.traceIndex,b=r.avoid||{},_=r.attributes,w=r.transform,k=r.containerGroup,T=t._fullLayout,M=1,A=!1,S=v.title,E=(S&&S.text?S.text:\"\").trim(),C=S&&S.font?S.font:{},L=C.family,P=C.size,O=C.color;\"title.text\"===m?g=\"titleText\":-1!==m.indexOf(\"axis\")?g=\"axisTitleText\":m.indexOf(!0)&&(g=\"colorbarTitleText\");var I=t._context.edits[g];\"\"===E?M=0:E.replace(d,\" % \")===y.replace(d,\" % \")&&(M=.2,A=!0,I||(E=\"\")),r._meta?E=s.templateString(E,r._meta):T._meta&&(E=s.templateString(E,T._meta));var D,z=E||I;k||(k=s.ensureSingle(T._infolayer,\"g\",\"g-\"+e),D=T._hColorbarMoveTitle);var R=k.selectAll(\"text\").data(z?[0]:[]);if(R.enter().append(\"text\"),R.text(E).attr(\"class\",e),R.exit().remove(),!z)return k;function F(t){s.syncOrAsync([N,B],t)}function N(e){var r;return!w&&D&&(w={}),w?(r=\"\",w.rotate&&(r+=\"rotate(\"+[w.rotate,_.x,_.y]+\")\"),(w.offset||D)&&(r+=l(0,(w.offset||0)-(D||0)))):r=null,e.attr(\"transform\",r),e.style({\"font-family\":L,\"font-size\":n.round(P,2)+\"px\",fill:c.rgb(O),opacity:M*c.opacity(O),\"font-weight\":a.fontWeight}).attr(_).call(f.convertToTspans,t),a.previousPromises(t)}function B(t){var e=n.select(t.node().parentNode);if(b&&b.selection&&b.side&&E){e.attr(\"transform\",null);var r=p[b.side],a=\"left\"===b.side||\"top\"===b.side?-1:1,o=i(b.pad)?b.pad:2,c=u.bBox(e.node()),f={left:0,top:0,right:T.width,bottom:T.height},h=b.maxShift||a*(f[b.side]-c[b.side]),d=0;if(h<0)d=h;else{var g=b.offsetLeft||0,v=b.offsetTop||0;c.left-=g,c.right-=g,c.top-=v,c.bottom-=v,b.selection.each((function(){var t=u.bBox(this);s.bBoxIntersect(c,t,o)&&(d=Math.max(d,a*(t[b.side]-c[r])+o))})),d=Math.min(h,d)}if(d>0||h<0){var m={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr(\"transform\",l(m[0],m[1]))}}}return R.call(F),I&&(E?R.on(\".opacity\",null):(M=0,A=!0,R.text(y).on(\"mouseover.opacity\",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style(\"opacity\",1)})).on(\"mouseout.opacity\",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style(\"opacity\",0)}))),R.call(f.makeEditable,{gd:t}).on(\"edit\",(function(e){void 0!==x?o.call(\"_guiRestyle\",t,m,e,x):o.call(\"_guiRelayout\",t,m,e)})).on(\"cancel\",(function(){this.text(this.attr(\"data-unformatted\")).call(F)})).on(\"input\",(function(t){this.text(t||\" \").call(f.positionText,_.x,_.y)}))),R.classed(\"js-placeholder\",A),k}}},{\"../../constants/alignment\":483,\"../../constants/interactions\":490,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/plots\":628,\"../../registry\":647,\"../color\":367,\"../drawing\":389,\"@plotly/d3\":58,\"fast-isnumeric\":190}],477:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"../../plot_api/edit_types\").overrideAll,s=t(\"../../plots/pad_attributes\"),l=t(\"../../plot_api/plot_template\").templatedArray,u=l(\"button\",{visible:{valType:\"boolean\"},method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},args2:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\",dflt:\"\"},execute:{valType:\"boolean\",dflt:!0}});e.exports=o(l(\"updatemenu\",{_arrayAttrRegexps:[/^updatemenus\\[(0|[1-9][0-9]+)\\]\\.buttons/],visible:{valType:\"boolean\"},type:{valType:\"enumerated\",values:[\"dropdown\",\"buttons\"],dflt:\"dropdown\"},direction:{valType:\"enumerated\",values:[\"left\",\"right\",\"up\",\"down\"],dflt:\"down\"},active:{valType:\"integer\",min:-1,dflt:0},showactive:{valType:\"boolean\",dflt:!0},buttons:u,x:{valType:\"number\",min:-2,max:3,dflt:-.05},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"right\"},y:{valType:\"number\",min:-2,max:3,dflt:1},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"top\"},pad:a(s({editType:\"arraydraw\"}),{}),font:n({}),bgcolor:{valType:\"color\"},bordercolor:{valType:\"color\",dflt:i.borderLine},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"arraydraw\"}}),\"arraydraw\",\"from-root\")},{\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plot_api/plot_template\":555,\"../../plots/font_attributes\":594,\"../../plots/pad_attributes\":627,\"../color/attributes\":366}],478:[function(t,e,r){\"use strict\";e.exports={name:\"updatemenus\",containerClassName:\"updatemenu-container\",headerGroupClassName:\"updatemenu-header-group\",headerClassName:\"updatemenu-header\",headerArrowClassName:\"updatemenu-header-arrow\",dropdownButtonGroupClassName:\"updatemenu-dropdown-button-group\",dropdownButtonClassName:\"updatemenu-dropdown-button\",buttonClassName:\"updatemenu-button\",itemRectClassName:\"updatemenu-item-rect\",itemTextClassName:\"updatemenu-item-text\",menuIndexAttrName:\"updatemenu-active-index\",autoMarginIdRoot:\"updatemenu-\",blankHeaderOpts:{label:\"  \"},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:\"#F4FAFF\",hoverColor:\"#F4FAFF\",arrowSymbol:{left:\"◄\",right:\"►\",up:\"▲\",down:\"▼\"}}},{}],479:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/array_container_defaults\"),a=t(\"./attributes\"),o=t(\"./constants\").name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o(\"visible\",i(t,e,{name:\"buttons\",handleItemDefaults:u}).length>0)&&(o(\"active\"),o(\"direction\"),o(\"type\"),o(\"showactive\"),o(\"x\"),o(\"y\"),n.noneOrAll(t,e,[\"x\",\"y\"]),o(\"xanchor\"),o(\"yanchor\"),o(\"pad.t\"),o(\"pad.r\"),o(\"pad.b\"),o(\"pad.l\"),n.coerceFont(o,\"font\",r.font),o(\"bgcolor\",r.paper_bgcolor),o(\"bordercolor\"),o(\"borderwidth\"))}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r(\"visible\",\"skip\"===t.method||Array.isArray(t.args))&&(r(\"method\"),r(\"args\"),r(\"args2\"),r(\"label\"),r(\"execute\"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"./attributes\":477,\"./constants\":478}],480:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),u=t(\"../../plot_api/plot_template\").arrayEditor,c=t(\"../../constants/alignment\").LINE_SPACING,f=t(\"./constants\"),h=t(\"./scrollbox\");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,u(t.layout,f.name,e).applyUpdate(\"active\",o),\"buttons\"===e.type?m(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(f.menuIndexAttrName,\"-1\"),v(t,n,i,a,e),s||m(t,n,i,a,e))}function v(t,e,r,n,i){var a=s.ensureSingle(e,\"g\",f.headerClassName,(function(t){t.style(\"pointer-events\",\"all\")})),l=i._dims,u=i.active,c=i.buttons[u]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,c,t).call(A,i,h,p),s.ensureSingle(e,\"text\",f.headerArrowClassName,(function(t){t.attr(\"text-anchor\",\"end\").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on(\"click\",(function(){r.call(S,String(d(r,i)?-1:i._index)),m(t,e,r,n,i)})),a.on(\"mouseover\",(function(){a.call(w)})),a.on(\"mouseout\",(function(){a.call(k,i)})),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,a,o){r||(r=e).attr(\"pointer-events\",\"all\");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&\"buttons\"!==o.type?[]:o.buttons,u=\"dropdown\"===o.type?f.dropdownButtonClassName:f.buttonClassName,c=r.selectAll(\"g.\"+u).data(s.filterVisible(l)),h=c.enter().append(\"g\").classed(u,!0),p=c.exit();\"dropdown\"===o.type?(h.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),p.transition().attr(\"opacity\",\"0\").remove()):p.remove();var d=0,v=0,m=o._dims,x=-1!==[\"up\",\"down\"].indexOf(o.direction);\"dropdown\"===o.type&&(x?v=m.headerHeight+f.gapButtonHeader:d=m.headerWidth+f.gapButtonHeader),\"dropdown\"===o.type&&\"up\"===o.direction&&(v=-f.gapButtonHeader+f.gapButton-m.openHeight),\"dropdown\"===o.type&&\"left\"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-m.openWidth);var b={x:m.lx+d+o.pad.l,y:m.ly+v+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(y,o,s,t).call(A,o,b),u.on(\"click\",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit(\"plotly_buttonclicked\",{menu:o,button:s,active:o.active}))})),u.on(\"mouseover\",(function(){u.call(w)})),u.on(\"mouseout\",(function(){u.call(k,o),c.call(_,o)}))})),c.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,a&&(c.size()?function(t,e,r,n,i,a){var o,s,l,u=i.direction,c=\"up\"===u||\"down\"===u,h=i._dims,p=i.active;if(c)for(s=0,l=0;l<p;l++)s+=h.heights[l]+f.gapButton;else for(o=0,l=0;l<p;l++)o+=h.widths[l]+f.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),n.vbar&&n.vbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\")}(0,0,0,a,o,T):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr(\"opacity\",\"0\").each(\"end\",(function(){e=!1,r||t.disable()})),r&&t.vbar.transition().attr(\"opacity\",\"0\").each(\"end\",(function(){r=!1,e||t.disable()}))}(a))}function y(t,e,r,n){t.call(x,e).call(b,e,r,n)}function x(t,e){s.ensureSingle(t,\"rect\",f.itemRectClassName,(function(t){t.attr({rx:f.rx,ry:f.ry,\"shape-rendering\":\"crispEdges\"})})).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\")}function b(t,e,r,n){var i=s.ensureSingle(t,\"text\",f.itemTextClassName,(function(t){t.attr({\"text-anchor\":\"start\",\"data-notex\":1})})),a=r.label,u=n._fullLayout._meta;u&&(a=s.templateString(a,u)),i.call(o.font,e.font).text(a).call(l.convertToTspans,n)}function _(t,e){var r=e.active;t.each((function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select(\"rect.\"+f.itemRectClassName).call(a.fill,f.activeColor)}))}function w(t){t.select(\"rect.\"+f.itemRectClassName).call(a.fill,f.hoverColor)}function k(t,e){t.select(\"rect.\"+f.itemRectClassName).call(a.fill,e.bgcolor)}function T(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll(\"g.\"+f.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append(\"g\").classed(f.dropdownButtonClassName,!0);var u=-1!==[\"up\",\"down\"].indexOf(e.direction);a.each((function(i,a){var s=n.select(this);s.call(y,e,i,t);var h=s.select(\".\"+f.itemTextClassName),p=h.node()&&o.bBox(h.node()).width,d=Math.max(p+f.textPadX,f.minWidth),g=e.font.size*c,v=l.lineCount(h),m=Math.max(g*v,f.minHeight)+f.textOffsetY;m=Math.ceil(m),d=Math.ceil(d),r.widths[a]=d,r.heights[a]=m,r.height1=Math.max(r.height1,m),r.width1=Math.max(r.width1,d),u?(r.totalWidth=Math.max(r.totalWidth,d),r.openWidth=r.totalWidth,r.totalHeight+=m+f.gapButton,r.openHeight+=m+f.gapButton):(r.totalWidth+=d+f.gapButton,r.openWidth+=d+f.gapButton,r.totalHeight=Math.max(r.totalHeight,m),r.openHeight=r.totalHeight)})),u?r.totalHeight-=f.gapButton:r.totalWidth-=f.gapButton,r.headerWidth=r.width1+f.arrowPadX,r.headerHeight=r.height1,\"dropdown\"===e.type&&(u?(r.width1+=f.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=f.arrowPadX),a.remove();var h=r.totalWidth+e.pad.l+e.pad.r,p=r.totalHeight+e.pad.t+e.pad.b,d=t._fullLayout._size;r.lx=d.l+d.w*e.x,r.ly=d.t+d.h*(1-e.y);var g=\"left\";s.isRightAnchor(e)&&(r.lx-=h,g=\"right\"),s.isCenterAnchor(e)&&(r.lx-=h/2,g=\"center\");var v=\"top\";s.isBottomAnchor(e)&&(r.ly-=p,v=\"bottom\"),s.isMiddleAnchor(e)&&(r.ly-=p/2,v=\"middle\"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),i.autoMargin(t,M(e),{x:e.x,y:e.y,l:h*({right:1,center:.5}[g]||0),r:h*({left:1,center:.5}[g]||0),b:p*({top:1,middle:.5}[v]||0),t:p*({bottom:1,middle:.5}[v]||0)})}function M(t){return f.autoMarginIdRoot+t._index}function A(t,e,r,n){n=n||{};var i=t.select(\".\"+f.itemRectClassName),a=t.select(\".\"+f.itemTextClassName),s=e.borderwidth,u=r.index,h=e._dims;o.setTranslate(t,s+r.x,s+r.y);var p=-1!==[\"up\",\"down\"].indexOf(e.direction),d=n.height||(p?h.heights[u]:h.height1);i.attr({x:0,y:0,width:n.width||(p?h.width1:h.widths[u]),height:d});var g=e.font.size*c,v=(l.lineCount(a)-1)*g/2;l.positionText(a,f.textOffsetX,d/2-v+f.textOffsetY),p?r.y+=h.heights[u]+r.yPad:r.x+=h.widths[u]+r.xPad,r.index++}function S(t,e){t.attr(f.menuIndexAttrName,e||\"-1\").selectAll(\"g.\"+f.dropdownButtonClassName).remove()}e.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[f.name]);function a(e){i.autoMargin(t,M(e))}var o=e._menulayer.selectAll(\"g.\"+f.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append(\"g\").classed(f.containerClassName,!0).style(\"cursor\",\"pointer\"),o.exit().each((function(){n.select(this).selectAll(\"g.\"+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll(\"g.\"+f.headerGroupClassName).data(r,p);l.enter().append(\"g\").classed(f.headerGroupClassName,!0);for(var u=s.ensureSingle(o,\"g\",f.dropdownButtonGroupClassName,(function(t){t.style(\"pointer-events\",\"all\")})),c=0;c<r.length;c++){var y=r[c];T(t,y)}var x=\"updatemenus\"+e._uid,b=new h(t,u,x);l.enter().size()&&(u.node().parentNode.appendChild(u.node()),u.call(S)),l.exit().each((function(t){u.call(S),a(t)})).remove(),l.each((function(e){var r=n.select(this),a=\"dropdown\"===e.type?u:null;i.manageCommandObserver(t,e,e.buttons,(function(n){g(t,e,e.buttons[n.index],r,a,b,n.index,!0)})),\"dropdown\"===e.type?(v(t,r,u,b,e),d(u,e)&&m(t,r,u,b,e)):m(t,r,null,null,e)}))}}},{\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plot_api/plot_template\":555,\"../../plots/plots\":628,\"../color\":367,\"../drawing\":389,\"./constants\":478,\"./scrollbox\":482,\"@plotly/d3\":58}],481:[function(t,e,r){arguments[4][475][0].apply(r,arguments)},{\"./attributes\":477,\"./constants\":478,\"./defaults\":479,\"./draw\":480,dup:475}],482:[function(t,e,r){\"use strict\";e.exports=s;var n=t(\"@plotly/d3\"),i=t(\"../color\"),a=t(\"../drawing\"),o=t(\"../../lib\");function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(\"rect.scrollbox-bg\").data([0]),this.bg.exit().on(\".drag\",null).on(\"wheel\",null).remove(),this.bg.enter().append(\"rect\").classed(\"scrollbox-bg\",!0).style(\"pointer-events\",\"all\").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor=\"#808BA4\",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,u=o.height;this.position=t;var c,f,h,p,d=this.position.l,g=this.position.w,v=this.position.t,m=this.position.h,y=this.position.direction,x=\"down\"===y,b=\"left\"===y,_=\"up\"===y,w=g,k=m;x||b||\"right\"===y||_||(this.position.direction=\"down\",x=!0),x||_?(f=(c=d)+w,x?(h=v,k=(p=Math.min(h+k,u))-h):k=(p=v+k)-(h=Math.max(p-k,0))):(p=(h=v)+k,b?w=(f=d+w)-(c=Math.max(f-w,0)):(c=d,w=(f=Math.min(c+w,l))-c)),this._box={l:c,t:h,w,h:k};var T=g>w,M=s.barLength+2*s.barPad,A=s.barWidth+2*s.barPad,S=d,E=v+m;E+A>u&&(E=u-A);var C=this.container.selectAll(\"rect.scrollbar-horizontal\").data(T?[0]:[]);C.exit().on(\".drag\",null).remove(),C.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(i.fill,s.barColor),T?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:M,height:A}),this._hbarXMin=S+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=m>k,P=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,I=d+g,D=v;I+P>l&&(I=l-P);var z=this.container.selectAll(\"rect.scrollbar-vertical\").data(L?[0]:[]);z.exit().on(\".drag\",null).remove(),z.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(i.fill,s.barColor),L?(this.vbar=z.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:D,width:P,height:O}),this._vbarYMin=D+O/2,this._vbarTranslateMax=k-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=c-.5,N=L?f+P+.5:f+.5,B=h-.5,j=T?p+A+.5:p+.5,U=o._topdefs.selectAll(\"#\"+R).data(T||L?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",R).append(\"rect\"),T||L?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(j)-Math.floor(B)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:v,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),T||L){var V=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault()})).on(\"drag\",this._onBoxDrag.bind(this));this.container.on(\"wheel\",null).on(\"wheel\",this._onBoxWheel.bind(this)).on(\".drag\",null).call(V);var H=n.behavior.drag().on(\"dragstart\",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on(\"drag\",this._onBarDrag.bind(this));T&&this.hbar.on(\".drag\",null).call(H),L&&this.vbar.on(\".drag\",null).call(H)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(\".drag\",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(\".drag\",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{\"../../lib\":515,\"../color\":367,\"../drawing\":389,\"@plotly/d3\":58}],483:[function(t,e,r){\"use strict\";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],484:[function(t,e,r){\"use strict\";e.exports={axisRefDescription:function(t,e,r){return[\"If set to a\",t,\"axis id (e.g. *\"+t+\"* or\",\"*\"+t+\"2*), the `\"+t+\"` position refers to a\",t,\"coordinate. If set to *paper*, the `\"+t+\"`\",\"position refers to the distance from the\",e,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",e,\"(\"+r+\"). If set to a\",t,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",e,\"of the domain of that axis: e.g.,\",\"*\"+t+\"2 domain* refers to the domain of the second\",t,\" axis and a\",t,\"position of 0.5 refers to the\",\"point between the\",e,\"and the\",r,\"of the domain of the\",\"second\",t,\"axis.\"].join(\" \")}}},{}],485:[function(t,e,r){\"use strict\";e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"▲\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"▼\"}}},{}],486:[function(t,e,r){\"use strict\";e.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}},{}],487:[function(t,e,r){\"use strict\";e.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}},{}],488:[function(t,e,r){\"use strict\";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],489:[function(t,e,r){\"use strict\";e.exports={circle:\"●\",\"circle-open\":\"○\",square:\"■\",\"square-open\":\"□\",diamond:\"◆\",\"diamond-open\":\"◇\",cross:\"+\",x:\"❌\"}},{}],490:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],491:[function(t,e,r){\"use strict\";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:\"−\"}},{}],492:[function(t,e,r){\"use strict\";r.xmlns=\"http://www.w3.org/2000/xmlns/\",r.svg=\"http://www.w3.org/2000/svg\",r.xlink=\"http://www.w3.org/1999/xlink\",r.svgAttrs={xmlns:r.svg,\"xmlns:xlink\":r.xlink}},{}],493:[function(t,e,r){\"use strict\";r.version=t(\"./version\").version,t(\"native-promise-only\"),t(\"../build/plotcss\");for(var n=t(\"./registry\"),i=r.register=n.register,a=t(\"./plot_api\"),o=Object.keys(a),s=0;s<o.length;s++){var l=o[s];\"_\"!==l.charAt(0)&&(r[l]=a[l]),i({moduleType:\"apiMethod\",name:l,fn:a[l]})}i(t(\"./traces/scatter\")),i([t(\"./components/legend\"),t(\"./components/fx\"),t(\"./components/annotations\"),t(\"./components/annotations3d\"),t(\"./components/selections\"),t(\"./components/shapes\"),t(\"./components/images\"),t(\"./components/updatemenus\"),t(\"./components/sliders\"),t(\"./components/rangeslider\"),t(\"./components/rangeselector\"),t(\"./components/grid\"),t(\"./components/errorbars\"),t(\"./components/colorscale\"),t(\"./components/colorbar\"),t(\"./components/modebar\")]),i([t(\"./locale-en\"),t(\"./locale-en-us\")]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),r.Icons=t(\"./fonts/ploticon\");var u=t(\"./components/fx\"),c=t(\"./plots/plots\");r.Plots={resize:c.resize,graphJson:c.graphJson,sendDataToCloud:c.sendDataToCloud},r.Fx={hover:u.hover,unhover:u.unhover,loneHover:u.loneHover,loneUnhover:u.loneUnhover},r.Snapshot=t(\"./snapshot\"),r.PlotSchema=t(\"./plot_api/plot_schema\")},{\"../build/plotcss\":1,\"./components/annotations\":358,\"./components/annotations3d\":363,\"./components/colorbar\":373,\"./components/colorscale\":379,\"./components/errorbars\":395,\"./components/fx\":407,\"./components/grid\":411,\"./components/images\":416,\"./components/legend\":424,\"./components/modebar\":430,\"./components/rangeselector\":438,\"./components/rangeslider\":445,\"./components/selections\":455,\"./components/shapes\":470,\"./components/sliders\":475,\"./components/updatemenus\":481,\"./fonts/ploticon\":494,\"./locale-en\":546,\"./locale-en-us\":545,\"./plot_api\":550,\"./plot_api/plot_schema\":554,\"./plots/plots\":628,\"./registry\":647,\"./snapshot\":652,\"./traces/scatter\":948,\"./version\":1132,\"native-promise-only\":245}],494:[function(t,e,r){\"use strict\";e.exports={undo:{width:857.1,height:1e3,path:\"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z\",transform:\"matrix(1 0 0 -1 0 850)\"},home:{width:928.6,height:1e3,path:\"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z\",transform:\"matrix(1 0 0 -1 0 850)\"},\"camera-retro\":{width:1e3,height:1e3,path:\"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z\",transform:\"matrix(1 0 0 -1 0 850)\"},zoombox:{width:1e3,height:1e3,path:\"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z\",transform:\"matrix(1 0 0 -1 0 850)\"},pan:{width:1e3,height:1e3,path:\"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z\",transform:\"matrix(1 0 0 -1 0 850)\"},zoom_plus:{width:875,height:1e3,path:\"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z\",transform:\"matrix(1 0 0 -1 0 850)\"},zoom_minus:{width:875,height:1e3,path:\"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z\",transform:\"matrix(1 0 0 -1 0 850)\"},autoscale:{width:1e3,height:1e3,path:\"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z\",transform:\"matrix(1 0 0 -1 0 850)\"},tooltip_basic:{width:1500,height:1e3,path:\"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z\",transform:\"matrix(1 0 0 -1 0 850)\"},tooltip_compare:{width:1125,height:1e3,path:\"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z\",transform:\"matrix(1 0 0 -1 0 850)\"},plotlylogo:{width:1542,height:1e3,path:\"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z\",transform:\"matrix(1 0 0 -1 0 850)\"},\"z-axis\":{width:1e3,height:1e3,path:\"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z\",transform:\"matrix(1 0 0 -1 0 850)\"},\"3d_rotate\":{width:1e3,height:1e3,path:\"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z\",transform:\"matrix(1 0 0 -1 0 850)\"},camera:{width:1e3,height:1e3,path:\"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z\",transform:\"matrix(1 0 0 -1 0 850)\"},movie:{width:1e3,height:1e3,path:\"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z\",transform:\"matrix(1 0 0 -1 0 850)\"},question:{width:857.1,height:1e3,path:\"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z\",transform:\"matrix(1 0 0 -1 0 850)\"},disk:{width:857.1,height:1e3,path:\"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z\",transform:\"matrix(1 0 0 -1 0 850)\"},drawopenpath:{width:70,height:70,path:\"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z\",transform:\"matrix(1 0 0 1 -15 -15)\"},drawclosedpath:{width:90,height:90,path:\"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z\",transform:\"matrix(1 0 0 1 -5 -5)\"},lasso:{width:1031,height:1e3,path:\"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z\",transform:\"matrix(1 0 0 -1 0 850)\"},selectbox:{width:1e3,height:1e3,path:\"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z\",transform:\"matrix(1 0 0 -1 0 850)\"},drawline:{width:70,height:70,path:\"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z\",transform:\"matrix(1 0 0 1 -15 -15)\"},drawrect:{width:80,height:80,path:\"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},drawcircle:{width:80,height:80,path:\"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},eraseshape:{width:80,height:80,path:\"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},spikeline:{width:1e3,height:1e3,path:\"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z\",transform:\"matrix(1.5 0 0 -1.5 0 850)\"},pencil:{width:1792,height:1792,path:\"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z\",transform:\"matrix(1 0 0 1 0 1)\"},newplotlylogo:{name:\"newplotlylogo\",svg:[\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>\",\"<defs>\",\" <style>\",\"  .cls-0{fill:#000;}\",\"  .cls-1{fill:#FFF;}\",\"  .cls-2{fill:#F26;}\",\"  .cls-3{fill:#D69;}\",\"  .cls-4{fill:#BAC;}\",\"  .cls-5{fill:#9EF;}\",\" </style>\",\"</defs>\",\" <title>plotly-logomark</title>\",\" <g id='symbol'>\",\"  <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>\",\"  <circle class='cls-5' cx='102' cy='30' r='6'/>\",\"  <circle class='cls-4' cx='78' cy='30' r='6'/>\",\"  <circle class='cls-4' cx='78' cy='54' r='6'/>\",\"  <circle class='cls-3' cx='54' cy='30' r='6'/>\",\"  <circle class='cls-2' cx='30' cy='30' r='6'/>\",\"  <circle class='cls-2' cx='30' cy='54' r='6'/>\",\"  <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>\",\"  <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>\",\"  <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>\",\"  <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>\",\" </g>\",\"</svg>\"].join(\"\")}}},{}],495:[function(t,e,r){\"use strict\";r.isLeftAnchor=function(t){return\"left\"===t.xanchor||\"auto\"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return\"center\"===t.xanchor||\"auto\"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return\"top\"===t.yanchor||\"auto\"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return\"middle\"===t.yanchor||\"auto\"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return\"bottom\"===t.yanchor||\"auto\"===t.yanchor&&t.y<=1/3}},{}],496:[function(t,e,r){\"use strict\";var n=t(\"./mod\"),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function u(t,e){return a(e-t,s)}function c(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,u){i=i||0,a=a||0;var c,f,h,p,d,g=l([r,n]);function v(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(c=0,f=o,h=s):r<n?(c=r,h=n):(c=n,h=r),t<e?(p=t,d=e):(p=e,d=t);var m,y=Math.abs(h-c)<=o?0:1;function x(t,e,r){return\"A\"+[t,t]+\" \"+[0,y,r]+\" \"+v(t,e)}return g?m=null===p?\"M\"+v(d,c)+x(d,f,0)+x(d,h,0)+\"Z\":\"M\"+v(p,c)+x(p,f,0)+x(p,h,0)+\"ZM\"+v(d,c)+x(d,f,1)+x(d,h,1)+\"Z\":null===p?(m=\"M\"+v(d,c)+x(d,h,0),u&&(m+=\"L0,0Z\")):m=\"M\"+v(p,c)+\"L\"+v(d,c)+x(d,h,0)+\"L\"+v(p,h)+x(p,c,1)+\"Z\",m}e.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:u,angleDist:function(t,e){return Math.abs(u(t,e))},isFullCircle:l,isAngleInsideSector:c,isPtInsideSector:function(t,e,r,n){return!!c(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},{\"./mod\":522}],497:[function(t,e,r){\"use strict\";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;i<t.length;i++)n=e(n,t[i].length);return n}return t.length}return 0}r.isTypedArray=o,r.isArrayOrTypedArray=s,r.isArray1D=function(t){return!s(t[0])},r.ensureArray=function(t,e){return n(t)||(t=[]),t.length=e,t},r.concat=function(){var t,e,r,i,a,o,s,l,u=[],c=!0,f=0;for(r=0;r<arguments.length;r++)(o=(i=arguments[r]).length)&&(e?u.push(i):(e=i,a=o),n(i)?t=!1:(c=!1,f?t!==i.constructor&&(t=!1):t=i.constructor),f+=o);if(!f)return[];if(!u.length)return e;if(c)return e.concat.apply(e,u);if(t){for((s=new t(f)).set(e),r=0;r<u.length;r++)i=u[r],s.set(i,a),a+=i.length;return s}for(s=new Array(f),l=0;l<e.length;l++)s[l]=e[l];for(r=0;r<u.length;r++){for(i=u[r],l=0;l<i.length;l++)s[a+l]=i[l];a+=l}return s},r.maxRowLength=function(t){return l(t,Math.max,0)},r.minRowLength=function(t){return l(t,Math.min,1/0)}},{}],498:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../constants/numerical\").BADNUM,a=/^['\"%,$#\\s']+|[, ]|['\"%,$#\\s']+$/g;e.exports=function(t){return\"string\"==typeof t&&(t=t.replace(a,\"\")),n(t)?Number(t):i}},{\"../constants/numerical\":491,\"fast-isnumeric\":190}],499:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},{}],500:[function(t,e,r){\"use strict\";e.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener(\"resize\",t._responsiveChartHandler),delete t._responsiveChartHandler)}},{}],501:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../plots/attributes\"),o=t(\"../components/colorscale/scales\"),s=t(\"../components/color\"),l=t(\"../constants/interactions\").DESELECTDIM,u=t(\"./nested_property\"),c=t(\"./regex\").counter,f=t(\"./mod\").modHalf,h=t(\"./array\").isArrayOrTypedArray;function p(t,e){var n=r.valObjectMeta[e.valType];if(e.arrayOk&&h(t))return!0;if(n.validateFunction)return n.validateFunction(t,e);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,e),a!==i}r.valObjectMeta={data_array:{coerceFunction:function(t,e,r){h(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if(\"/\"===i.charAt(0)&&\"/\"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if(\"string\"!=typeof t){var i=\"number\"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(r);\"string\"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||\"string\"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if(\"string\"==typeof t){for(var i=t.split(\"+\"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join(\"+\")):e.set(r)}else e.set(r);else e.set(t)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(t)}},info_array:{coerceFunction:function(t,e,n,i){function a(t,e,n){var i,a={set:function(t){i=t}};return void 0===n&&(n=e.dflt),r.valObjectMeta[e.valType].coerceFunction(t,a,n,e),i}var o=2===i.dimensions||\"1-2\"===i.dimensions&&Array.isArray(t)&&Array.isArray(t[0]);if(Array.isArray(t)){var s,l,u,c,f,h,p=i.items,d=[],g=Array.isArray(p),v=g&&o&&Array.isArray(p[0]),m=o&&g&&!v,y=g&&!m?p.length:t.length;if(n=Array.isArray(n)?n:[],o)for(s=0;s<y;s++)for(d[s]=[],u=Array.isArray(t[s])?t[s]:[],f=m?p.length:g?p[s].length:u.length,l=0;l<f;l++)c=m?p[l]:g?p[s][l]:p,void 0!==(h=a(u[l],c,(n[s]||[])[l]))&&(d[s][l]=h);else for(s=0;s<y;s++)void 0!==(h=a(t[s],g?p[s]:p,n[s]))&&(d[s]=h);e.set(d)}else e.set(n)},validateFunction:function(t,e){if(!Array.isArray(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&&t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(i){if(!Array.isArray(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!p(t[a][o],n?r[a][o]:r))return!1}else if(!p(t[a],n?r[a]:r))return!1;return!0}}},r.coerce=function(t,e,n,i,a){var o=u(n,i).get(),s=u(t,i),l=u(e,i),c=s.get(),f=e._template;if(void 0===c&&f&&(c=u(f,i).get(),f=0),void 0===a&&(a=o.dflt),o.arrayOk&&h(c))return l.set(c),c;var d=r.valObjectMeta[o.valType].coerceFunction;d(c,l,a,o);var g=l.get();return f&&g===a&&!p(c,o)&&(d(c=u(f,i).get(),l,a,o),g=l.get()),g},r.coerce2=function(t,e,n,i,a){var o=u(t,i),s=r.coerce(t,e,n,i,a);return null!=o.get()&&s},r.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+\".family\",r.family),n.size=t(e+\".size\",r.size),n.color=t(e+\".color\",r.color),n},r.coercePattern=function(t,e,r,n){if(t(e+\".shape\")){t(e+\".solidity\"),t(e+\".size\");var i=\"overlay\"===t(e+\".fillmode\");if(!n){var a=t(e+\".bgcolor\",i?r:void 0);t(e+\".fgcolor\",i?s.contrast(a):r)}t(e+\".fgopacity\",i?.5:1)}},r.coerceHoverinfo=function(t,e,n){var i,o=e._module.attributes,s=o.hoverinfo?o:a,l=s.hoverinfo;if(1===n._dataLength){var u=\"all\"===l.dflt?l.flags.slice():l.dflt.split(\"+\");u.splice(u.indexOf(\"name\"),1),i=u.join(\"+\")}return r.coerce(t,e,s,\"hoverinfo\",i)},r.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;void 0!==i&&(h(i)||t.selected||t.unselected||(r=i,n=l*i),e(\"selected.marker.opacity\",r),e(\"unselected.marker.opacity\",n))}},r.validate=p},{\"../components/color\":367,\"../components/colorscale/scales\":382,\"../constants/interactions\":490,\"../plots/attributes\":562,\"./array\":497,\"./mod\":522,\"./nested_property\":523,\"./regex\":532,\"fast-isnumeric\":190,tinycolor2:313}],502:[function(t,e,r){\"use strict\";var n,i,a=t(\"d3-time-format\").timeFormat,o=t(\"fast-isnumeric\"),s=t(\"./loggers\"),l=t(\"./mod\").mod,u=t(\"../constants/numerical\"),c=u.BADNUM,f=u.ONEDAY,h=u.ONEHOUR,p=u.ONEMIN,d=u.ONESEC,g=u.EPOCHJD,v=t(\"../registry\"),m=t(\"d3-time-format\").utcFormat,y=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)(-(\\d?\\d)(-(\\d?\\d)([ Tt]([01]?\\d|2[0-3])(:([0-5]\\d)(:([0-5]\\d(\\.\\d+)?))?(Z|z|[+\\-]\\d\\d(:?\\d\\d)?)?)?)?)?)?\\s*$/m,x=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)(-(\\d?\\di?)(-(\\d?\\d)([ Tt]([01]?\\d|2[0-3])(:([0-5]\\d)(:([0-5]\\d(\\.\\d+)?))?(Z|z|[+\\-]\\d\\d(:?\\d\\d)?)?)?)?)?)?\\s*$/m,b=(new Date).getFullYear()-70;function _(t){return t&&v.componentsRegistry.calendars&&\"string\"==typeof t&&\"gregorian\"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}r.dateTick0=function(t,e){var n=function(t,e){return _(t)?e?v.getComponentMethod(\"calendars\",\"CANONICAL_SUNDAY\")[t]:v.getComponentMethod(\"calendars\",\"CANONICAL_TICK\")[t]:e?\"2000-01-02\":\"2000-01-01\"}(t,!!e);if(e<2)return n;var i=r.dateTime2ms(n,t);return i+=f*(e-1),r.ms2DateTime(i,0,t)},r.dfltRange=function(t){return _(t)?v.getComponentMethod(\"calendars\",\"DFLTRANGE\")[t]:[\"2000-01-01\",\"2001-01-01\"]},r.isJSDate=function(t){return\"object\"==typeof t&&null!==t&&\"function\"==typeof t.getTime},r.dateTime2ms=function(t,e){if(r.isJSDate(t)){var a=t.getTimezoneOffset()*p,o=(t.getUTCMinutes()-t.getMinutes())*p+(t.getUTCSeconds()-t.getSeconds())*d+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*p;a=a-s/2+l(o-a+s/2,s)}return(t=Number(t)-a)>=n&&t<=i?t:c}if(\"string\"!=typeof t&&\"number\"!=typeof t)return c;t=String(t);var u=_(e),m=t.charAt(0);!u||\"G\"!==m&&\"g\"!==m||(t=t.substr(1),e=\"\");var w=u&&\"chinese\"===e.substr(0,7),k=t.match(w?x:y);if(!k)return c;var T=k[1],M=k[3]||\"1\",A=Number(k[5]||1),S=Number(k[7]||0),E=Number(k[9]||0),C=Number(k[11]||0);if(u){if(2===T.length)return c;var L;T=Number(T);try{var P=v.getComponentMethod(\"calendars\",\"getCal\")(e);if(w){var O=\"i\"===M.charAt(M.length-1);M=parseInt(M,10),L=P.newDate(T,P.toMonthIndex(T,M,O),A)}else L=P.newDate(T,Number(M),A)}catch(t){return c}return L?(L.toJD()-g)*f+S*h+E*p+C*d:c}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),M-=1;var I=new Date(Date.UTC(2e3,M,A,S,E));return I.setUTCFullYear(T),I.getUTCMonth()!==M||I.getUTCDate()!==A?c:I.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms(\"-9999\"),i=r.MAX_MS=r.dateTime2ms(\"9999-12-31 23:59:59.9999\"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==c};var k=90*f,T=3*h,M=5*p;function A(t,e,r,n,i){if((e||r||n||i)&&(t+=\" \"+w(e,2)+\":\"+w(r,2),(n||i)&&(t+=\":\"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+=\".\"+w(i,a)}return t}r.ms2DateTime=function(t,e,r){if(\"number\"!=typeof t||!(t>=n&&t<=i))return c;e||(e=0);var a,o,s,u,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+g,E=Math.floor(l(t,f));try{a=v.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(S).formatDate(\"yyyy-mm-dd\")}catch(t){a=m(\"G%Y-%m-%d\")(new Date(w))}if(\"-\"===a.charAt(0))for(;a.length<11;)a=\"-0\"+a.substr(1);else for(;a.length<10;)a=\"0\"+a;o=e<k?Math.floor(E/h):0,s=e<k?Math.floor(E%h/p):0,u=e<T?Math.floor(E%p/d):0,y=e<M?E%d*10+b:0}else x=new Date(w),a=m(\"%Y-%m-%d\")(x),o=e<k?x.getUTCHours():0,s=e<k?x.getUTCMinutes():0,u=e<T?x.getUTCSeconds():0,y=e<M?10*x.getUTCMilliseconds()+b:0;return A(a,o,s,u,y)},r.ms2DateTimeLocal=function(t){if(!(t>=n+f&&t<=i-f))return c;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return A(a(\"%Y-%m-%d\")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===c)return e;if(r.isJSDate(t)||\"number\"==typeof t&&isFinite(t)){if(_(n))return s.error(\"JS Dates and milliseconds are incompatible with world calendars\",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error(\"unrecognized date\",t),e;return t};var S=/%\\d?f/g,E=/%h/g,C={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};function L(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,\"\")||\"0\"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(E,(function(){return C[r(\"%q\")(i)]})),_(n))try{t=v.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,n)}catch(t){return\"Invalid\"}return r(t)(i)}var P=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if(\"y\"===r)e=a.year;else if(\"m\"===r)e=a.month;else{if(\"d\"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+\":\"+w(l(Math.floor(r/p),60),2);if(\"M\"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),P[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,\"\").replace(/[\\.]$/,\"\")),n+=\":\"+i}return n}(t,r)+\"\\n\"+L(a.dayMonthYear,t,n,i);e=a.dayMonth+\"\\n\"+a.year}return L(e,t,n,i)};var O=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+g,a=v.getComponentMethod(\"calendars\",\"getCal\")(r),o=a.fromJD(i);return e%12?a.add(o,e,\"m\"):a.add(o,e/12,\"y\"),(o.toJD()-g)*f+n}catch(e){s.error(\"invalid ms \"+t+\" in calendar \"+r)}var u=new Date(t+O);return u.setUTCMonth(u.getUTCMonth()+e)+n-O},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,u=_(e)&&v.getComponentMethod(\"calendars\",\"getCal\")(e),c=0;c<t.length;c++)if(n=t[c],o(n)){if(!(n%f))if(u)try{1===(r=u.fromJD(n/f+g)).day()?1===r.month()?i++:a++:s++}catch(t){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?i++:a++:s++}else l++;s+=a+=i;var h=t.length-l;return{exactYears:i/h,exactMonths:a/h,exactDays:s/h}}},{\"../constants/numerical\":491,\"../registry\":647,\"./loggers\":519,\"./mod\":522,\"d3-time-format\":120,\"fast-isnumeric\":190}],503:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./loggers\"),a=t(\"./matrix\"),o=t(\"gl-mat4\");function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n=\"plotly.js-style-\"+t,a=document.getElementById(n);a||((a=document.createElement(\"style\")).setAttribute(\"id\",n),a.appendChild(document.createTextNode(\"\")),document.head.appendChild(a));var o=a.sheet;o.insertRule?o.insertRule(e+\"{\"+r+\"}\",0):o.addRule?o.addRule(e,r,0):i.warn(\"addStyleRule failed\")}function u(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue(\"-webkit-transform\")||e.getPropertyValue(\"-moz-transform\")||e.getPropertyValue(\"-ms-transform\")||e.getPropertyValue(\"-o-transform\")||e.getPropertyValue(\"transform\");return\"none\"===r?null:r.replace(\"matrix\",\"\").replace(\"3d\",\"\").slice(1,-1).split(\",\").map((function(t){return+t}))}function c(t){for(var e=[];f(t);)e.push(t),t=t.parentNode;return e}function f(t){return t&&(t instanceof Element||t instanceof HTMLElement)}e.exports={getGraphDiv:function(t){var e;if(\"string\"==typeof t){if(null===(e=document.getElementById(t)))throw new Error(\"No DOM element with id '\"+t+\"' exists on the page.\");return e}if(null==t)throw new Error(\"DOM element provided is null or undefined\");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed(\"js-plotly-plot\")},removeElement:s,addStyleRule:function(t,e){l(\"global\",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e=\"plotly.js-style-\"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=c(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=u(t);if(e){var n=a.convertCssMatrix(e);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:u,getElementAndAncestors:c,equalDomRects:function(t,e){return t&&e&&t.x===e.x&&t.y===e.y&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},{\"./loggers\":519,\"./matrix\":521,\"@plotly/d3\":58,\"gl-mat4\":210}],504:[function(t,e,r){\"use strict\";var n=t(\"events\").EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){\"undefined\"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;\"undefined\"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};e.exports=i},{events:84}],505:[function(t,e,r){\"use strict\";var n=t(\"./is_plain_object.js\"),i=Array.isArray;function a(t,e,r,o){var s,l,u,c,f,h,p=t[0],d=t.length;if(2===d&&i(p)&&i(t[1])&&0===p.length){if(function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&\"object\"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],p))return p;p.splice(0,p.length)}for(var g=1;g<d;g++)for(l in s=t[g])u=p[l],c=s[l],o&&i(c)?p[l]=c:e&&c&&(n(c)||(f=i(c)))?(f?(f=!1,h=u&&i(u)?u:[]):h=u&&n(u)?u:{},p[l]=a([h,c],e,r,o)):(void 0!==c||r)&&(p[l]=c);return p}r.extendFlat=function(){return a(arguments,!1,!1,!1)},r.extendDeep=function(){return a(arguments,!0,!1,!1)},r.extendDeepAll=function(){return a(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return a(arguments,!0,!1,!0)}},{\"./is_plain_object.js\":516}],506:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},{}],507:[function(t,e,r){\"use strict\";function n(t){return!0===t.visible}function i(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}e.exports=function(t){for(var e=(s=t,Array.isArray(s)&&Array.isArray(s[0])&&s[0][0]&&s[0][0].trace?i:n),r=[],a=0;a<t.length;a++){var o=t[a];e(o)&&r.push(o)}var s;return r}},{}],508:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"country-regex\"),a=t(\"@turf/area\"),o=t(\"@turf/centroid\"),s=t(\"@turf/bbox\"),l=t(\"./identity\"),u=t(\"./loggers\"),c=t(\"./is_plain_object\"),f=t(\"./nested_property\"),h=t(\"./polygon\"),p=Object.keys(i),d={\"ISO-3\":l,\"USA-states\":l,\"country names\":function(t){for(var e=0;e<p.length;e++){var r=p[e];if(new RegExp(i[r]).test(t.trim().toLowerCase()))return r}return u.log(\"Unrecognized country name: \"+t+\".\"),!1}};function g(t){var e=t.geojson,r=window.PlotlyGeoAssets||{},n=\"string\"==typeof e?r[e]:e;return c(n)?n:(u.error(\"Oops ... something went wrong when fetching \"+e),!1)}e.exports={locationToFeature:function(t,e,r){if(!e||\"string\"!=typeof e)return!1;var n,i,a,o=d[t](e);if(o){if(\"USA-states\"===t)for(n=[],a=0;a<r.length;a++)(i=r[a]).properties&&i.properties.gu&&\"USA\"===i.properties.gu&&n.push(i);else n=r;for(a=0;a<n.length;a++)if((i=n[a]).id===o)return i;u.log([\"Location with id\",o,\"does not have a matching topojson feature at this resolution.\"].join(\" \"))}return!1},feature2polygons:function(t){var e,r,n,i,a=t.geometry,o=a.coordinates,s=t.id,l=[];function u(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}switch(e=\"RUS\"===s||\"FJI\"===s?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;i<t.length;i++)e[i]=[t[i][0]<0?t[i][0]+360:t[i][0],t[i][1]];l.push(h.tester(e))}:\"ATA\"===s?function(t){var e=u(t);if(null===e)return l.push(h.tester(t));var r=new Array(t.length+1),n=0;for(i=0;i<t.length;i++)i>e?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case\"MultiPolygon\":for(r=0;r<o.length;r++)for(n=0;n<o[r].length;n++)e(o[r][n]);break;case\"Polygon\":for(r=0;r<o.length;r++)e(o[r])}return l},getTraceGeojson:g,extractTraceFeature:function(t){var e=t[0].trace,r=g(e);if(!r)return!1;var n,i={},s=[];for(n=0;n<e._length;n++){var l=t[n];(l.loc||0===l.loc)&&(i[l.loc]=l)}function c(t){var r=f(t,e.featureidkey||\"id\").get(),n=i[r];if(n){var l=t.geometry;if(\"Polygon\"===l.type||\"MultiPolygon\"===l.type){var c={type:\"Feature\",id:r,geometry:l,properties:{}};c.properties.ct=function(t){var e,r=t.geometry;if(\"MultiPolygon\"===r.type)for(var n=r.coordinates,i=0,s=0;s<n.length;s++){var l={type:\"Polygon\",coordinates:n[s]},u=a.default(l);u>i&&(i=u,e=l)}else e=r;return o.default(e).geometry.coordinates}(c),n.fIn=t,n.fOut=c,s.push(c)}else u.log([\"Location\",n.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete i[r]}switch(r.type){case\"FeatureCollection\":var h=r.features;for(n=0;n<h.length;n++)c(h[n]);break;case\"Feature\":c(r);break;default:return u.warn([\"Invalid GeoJSON type\",(r.type||\"none\")+\".\",\"Traces with locationmode *geojson-id* only support\",\"*FeatureCollection* and *Feature* types.\"].join(\" \")),!1}for(var p in i)u.log([\"Location *\"+p+\"*\",\"does not have a matching feature with id-key\",\"*\"+e.featureidkey+\"*.\"].join(\" \"));return s},fetchTraceGeoData:function(t){var e=window.PlotlyGeoAssets||{},r=[];function i(t){return new Promise((function(r,i){n.json(t,(function(n,a){if(n){delete e[t];var o=404===n.status?'GeoJSON at URL \"'+t+'\" does not exist.':\"Unexpected error while fetching from \"+t;return i(new Error(o))}return e[t]=a,r(a)}))}))}function a(t){return new Promise((function(r,n){var i=0,a=setInterval((function(){return e[t]&&\"pending\"!==e[t]?(clearInterval(a),r(e[t])):i>100?(clearInterval(a),n(\"Unexpected error while fetching from \"+t)):void i++}),50)}))}for(var o=0;o<t.length;o++){var s=t[o][0].trace.geojson;\"string\"==typeof s&&(e[s]?\"pending\"===e[s]&&r.push(a(s)):(e[s]=\"pending\",r.push(i(s))))}return r},computeBbox:function(t){return s.default(t)}}},{\"./identity\":513,\"./is_plain_object\":516,\"./loggers\":519,\"./nested_property\":523,\"./polygon\":527,\"@plotly/d3\":58,\"@turf/area\":61,\"@turf/bbox\":64,\"@turf/centroid\":67,\"country-regex\":94}],509:[function(t,e,r){\"use strict\";var n=t(\"../constants/numerical\").BADNUM;r.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:\"LineString\",coordinates:t[0]}:{type:\"MultiLineString\",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:\"Polygon\",coordinates:t};for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=[t[r]];return{type:\"MultiPolygon\",coordinates:e}},r.makeBlank=function(){return{type:\"Point\",coordinates:[]}}},{\"../constants/numerical\":491}],510:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"./mod\").mod;function s(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,f=n-e,h=a-e,p=s-a,d=l*p-c*f;if(0===d)return null;var g=(u*p-c*h)/d,v=(u*f-l*h)/d;return v<0||v>1||g<0||g>1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,i,a,o,u){if(s(t,e,r,n,i,a,o,u))return 0;var c=r-t,f=n-e,h=o-i,p=u-a,d=c*c+f*f,g=h*h+p*p,v=Math.min(l(c,f,d,i-t,a-e),l(c,f,d,o-t,u-e),l(h,p,g,t-i,e-a),l(h,p,g,r-i,n-a));return Math.sqrt(v)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),u=t.getPointAtLength(o(r+s/2,e)),c=Math.atan((u.y-l.y)/(u.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+u.x)/6,y:(4*f.y+l.y+u.y)/6,theta:c};return n[r]=h,h},r.clearLocationCache=function(){i=null},r.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,u=0,c=t.getTotalLength(),f=c;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===c&&(i=r);var u=r.x<a?a-r.x:r.x>o?r.x-o:0,f=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(u*u+f*f)}for(var p=h(u);p;){if((u+=p+r)>f)return;p=h(u)}for(p=h(f);p;){if(u>(f-=p+r))return;p=h(f)}return{min:u,max:f,len:f-u,total:c,isClosed:0===u&&f===c&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,u=n.iterationLimit||30,c=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f<u;){if(i=(h+p)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)<l)return a;c*o>0?p=i:h=i,f++}return a}},{\"./mod\":522}],511:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"color-normalize\"),o=t(\"../components/colorscale\"),s=t(\"../components/color/attributes\").defaultLine,l=t(\"./array\").isArrayOrTypedArray,u=a(s);function c(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return u;var e=a(t);return e.length?e:u}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,v=l(g),m=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=v?function(t,e){return void 0===t[e]?u:a(n(t[e]))}:f,s=m?function(t,e){return void 0===t[e]?1:h(t[e])}:h,v||m)for(var b=0;b<r;b++)p=i(g,b),d=s(e,b),x[b]=c(p,d);else x=c(a(g),e);return x},parseColorScale:function(t){var e=o.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=o.flipScale(e.colorscale)),r.map((function(t){var e=t[0],r=i(t[1]).toRgb();return{index:e,rgb:[r.r,r.g,r.b,r.a]}}))}}},{\"../components/color/attributes\":366,\"../components/colorscale\":379,\"./array\":497,\"color-normalize\":89,\"fast-isnumeric\":190,tinycolor2:313}],512:[function(t,e,r){\"use strict\";var n=t(\"./identity\");function i(t){return[t]}e.exports={keyFun:function(t){return t.key},repeat:i,descend:n,wrap:i,unwrap:function(t){return t[0]}}},{\"./identity\":513}],513:[function(t,e,r){\"use strict\";e.exports=function(t){return t}},{}],514:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf(\"e+\")&&(n=+o)}}return n}},{}],515:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"d3-format\").format,o=t(\"fast-isnumeric\"),s=t(\"../constants/numerical\"),l=s.FP_SAFE,u=-l,c=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:\"0.f\"===t?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: \"'+e+'\"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t(\"./nested_property\"),f.keyedContainer=t(\"./keyed_container\"),f.relativeAttr=t(\"./relative_attr\"),f.isPlainObject=t(\"./is_plain_object\"),f.toLogRange=t(\"./to_log_range\"),f.relinkPrivateKeys=t(\"./relink_private\");var p=t(\"./array\");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t(\"./mod\");f.mod=d.mod,f.modHalf=d.modHalf;var g=t(\"./coerce\");f.valObjectMeta=g.valObjectMeta,f.coerce=g.coerce,f.coerce2=g.coerce2,f.coerceFont=g.coerceFont,f.coercePattern=g.coercePattern,f.coerceHoverinfo=g.coerceHoverinfo,f.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,f.validate=g.validate;var v=t(\"./dates\");f.dateTime2ms=v.dateTime2ms,f.isDateTime=v.isDateTime,f.ms2DateTime=v.ms2DateTime,f.ms2DateTimeLocal=v.ms2DateTimeLocal,f.cleanDate=v.cleanDate,f.isJSDate=v.isJSDate,f.formatDate=v.formatDate,f.incrementMonth=v.incrementMonth,f.dateTick0=v.dateTick0,f.dfltRange=v.dfltRange,f.findExactDates=v.findExactDates,f.MIN_MS=v.MIN_MS,f.MAX_MS=v.MAX_MS;var m=t(\"./search\");f.findBin=m.findBin,f.sorterAsc=m.sorterAsc,f.sorterDes=m.sorterDes,f.distinctVals=m.distinctVals,f.roundUp=m.roundUp,f.sort=m.sort,f.findIndexOfMin=m.findIndexOfMin,f.sortObjectKeys=t(\"./sort_object_keys\");var y=t(\"./stats\");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t(\"./matrix\");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t(\"./angles\");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t(\"./anchor_utils\");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t(\"./geometry2d\");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var k=t(\"./extend\");f.extendFlat=k.extendFlat,f.extendDeep=k.extendDeep,f.extendDeepAll=k.extendDeepAll,f.extendDeepNoArrays=k.extendDeepNoArrays;var T=t(\"./loggers\");f.log=T.log,f.warn=T.warn,f.error=T.error;var M=t(\"./regex\");f.counterRegex=M.counter;var A=t(\"./throttle\");f.throttle=A.throttle,f.throttleDone=A.done,f.clearThrottle=A.clear;var S=t(\"./dom\");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;i<n.length;i++)e[n[i]]=+r;return e}f.getGraphDiv=S.getGraphDiv,f.isPlotDiv=S.isPlotDiv,f.removeElement=S.removeElement,f.addStyleRule=S.addStyleRule,f.addRelatedStyleRule=S.addRelatedStyleRule,f.deleteRelatedStyleRule=S.deleteRelatedStyleRule,f.getFullTransformMatrix=S.getFullTransformMatrix,f.getElementTransformMatrix=S.getElementTransformMatrix,f.getElementAndAncestors=S.getElementAndAncestors,f.equalDomRects=S.equalDomRects,f.clearResponsive=t(\"./clear_responsive\"),f.preserveDrawingBuffer=t(\"./preserve_drawing_buffer\"),f.makeTraceGroups=t(\"./make_trace_groups\"),f._=t(\"./localize\"),f.notifier=t(\"./notifier\"),f.filterUnique=t(\"./filter_unique\"),f.filterVisible=t(\"./filter_visible\"),f.pushUnique=t(\"./push_unique\"),f.increment=t(\"./increment\"),f.cleanNumber=t(\"./clean_number\"),f.ensureNumber=function(t){return o(t)?(t=Number(t))>l||t<u?c:t:c},f.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&o(t)&&t>=0&&t%1==0},f.noop=t(\"./noop\"),f.identity=t(\"./identity\"),f.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},f.swapAttrs=function(t,e,r,n){r||(r=\"x\"),n||(n=\"y\");for(var i=0;i<e.length;i++){var a=e[i],o=f.nestedProperty(t,a.replace(\"?\",r)),s=f.nestedProperty(t,a.replace(\"?\",n)),l=o.get();o.set(s.get()),s.set(l)}},f.raiseToTop=function(t){t.parentNode.appendChild(t)},f.cancelTransition=function(t){return t.transition().duration(0)},f.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s<a;s++)o[s]=e(t[s],r,n,i);return o},f.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return\"0\";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),l=\"\";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)l=Math.floor(Math.random()*n).toString(n)+l;u&&(o=Math.pow(n,u),l=Math.floor(Math.random()*o).toString(n)+l);var c=parseInt(l,n);return e&&e[l]||c!==1/0&&c>=Math.pow(2,r)?i>10?(f.warn(\"randstr failed uniqueness\"),l):t(e,r,n,(i||0)+1):l},f.OptionControl=function(t,e){t||(t={}),e||(e=\"opt\");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r[\"_\"+e]=t,r},f.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r<l;r++)u[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},f.mergeArray=function(t,e,r,n){var i=\"function\"==typeof n;if(f.isArrayOrTypedArray(t))for(var a=Math.min(t.length,e.length),o=0;o<a;o++){var s=t[o];e[o][r]=i?n(s):s}},f.mergeArrayCastPositive=function(t,e,r){return f.mergeArray(t,e,r,(function(t){var e=+t;return isFinite(e)&&e>0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},f.castOption=function(t,e,r,n){n=n||f.identity;var i=f.nestedProperty(t,r).get();return f.isArrayOrTypedArray(i)?Array.isArray(e)&&f.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},f.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=f.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},f.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=E(o));for(var s=0;s<a.length;s++){var l=a[s];if(f.isIndex(l)||f.isArrayOrTypedArray(l)&&f.isIndex(l[0])&&f.isIndex(l[1])){var u=n?n[l]:l,c=r?r[u]:u;void 0!==(i=c)&&i<t.length&&(t[c].selected=1)}}},f.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=E(r),i=[],a=0;a<e.length;a++){var o=e[a];if(f.isIndex(o)){var s=n[o];f.isIndex(s)&&i.push(s)}}return i}return e},f.getTargetArray=function(t,e){var r=e.target;if(\"string\"==typeof r&&r){var n=f.nestedProperty(t,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},f.minExtend=function(t,e){var r={};\"object\"!=typeof e&&(e={});var n,i,a,o=Object.keys(t);for(n=0;n<o.length;n++)a=t[i=o[n]],\"_\"!==i.charAt(0)&&\"function\"!=typeof a&&(\"module\"===i?r[i]=a:Array.isArray(a)?r[i]=\"colorscale\"===i?a.slice():a.slice(0,3):f.isTypedArray(a)?r[i]=a.subarray(0,3):r[i]=a&&\"object\"==typeof a?f.minExtend(t[i],e[i]):a);for(o=Object.keys(e),n=0;n<o.length;n++)\"object\"==typeof(a=e[i=o[n]])&&i in r&&\"object\"==typeof r[i]||(r[i]=a);return r},f.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},f.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},f.isIE=function(){return void 0!==window.navigator.msSaveBlob};var C=/Version\\/[\\d\\.]+.*Safari/;f.isSafari=function(){return C.test(window.navigator.userAgent)};var L=/iPad|iPhone|iPod/;f.isIOS=function(){return L.test(window.navigator.userAgent)};var P=/Firefox\\/(\\d+)\\.\\d+/;f.getFirefoxVersion=function(){var t=P.exec(window.navigator.userAgent);if(t&&2===t.length){var e=parseInt(t[1]);if(!isNaN(e))return e}return null},f.isD3Selection=function(t){return t instanceof n.selection},f.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?\".\"+r:\"\"));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},f.ensureSingleById=function(t,e,r,n){var i=t.select(e+\"#\"+r);if(i.size())return i;var a=t.append(e).attr(\"id\",r);return n&&a.call(n),a},f.objectFromPath=function(t,e){for(var r,n=t.split(\".\"),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\\[([0-9]+)\\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var O=/^([^\\[\\.]+)\\.(.+)?/,I=/^([^\\.]+)\\[([0-9]+)\\](\\.)?(.+)?/;f.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if(\"object\"==typeof t&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(O))?(i=t[r],n=e[1],delete t[r],t[n]=f.extendDeepNoArrays(t[n]||{},f.objectFromPath(r,f.expandObjectPaths(i))[n])):(e=r.match(I))?(i=t[r],n=e[1],a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],\".\"===e[3]?(s=e[4],o=t[n][a]=t[n][a]||{},f.extendDeepNoArrays(o,f.objectFromPath(s,f.expandObjectPaths(i)))):t[n][a]=f.expandObjectPaths(i)):t[r]=f.expandObjectPaths(t[r]));return t},f.numSeparate=function(t,e,r){if(r||(r=!1),\"string\"!=typeof e||0===e.length)throw new Error(\"Separator string required for formatting!\");\"number\"==typeof t&&(t=String(t));var n=/(\\d+)(\\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split(\".\"),s=o[0],l=o.length>1?i+o[1]:\"\";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,\"$1\"+a+\"$2\");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var D=/^\\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return D.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:\"\"}))};var z={max:10,count:0,name:\"hovertemplate\"};f.hovertemplateString=function(){return N.apply(z,arguments)};var R={max:10,count:0,name:\"texttemplate\"};f.texttemplateString=function(){return N.apply(R,arguments)};var F=/^[:|\\|]/;function N(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var u,c,h,p=\"_xother\"===s||\"_yother\"===s,d=\"_xother_\"===s||\"_yother_\"===s,g=\"xother_\"===s||\"yother_\"===s,v=\"xother\"===s||\"yother\"===s||p||g||d,m=s;if((p||d)&&(m=m.substring(1)),(g||d)&&(m=m.substring(0,m.length-1)),v){if(void 0===(u=e[m]))return\"\"}else for(h=3;h<a.length;h++)if(c=a[h]){if(c.hasOwnProperty(m)){u=c[m];break}if(D.test(m)||(u=f.nestedProperty(c,m).get(),(u=o[m]||f.nestedProperty(c,m).get())&&(o[m]=u)),void 0!==u)break}if(void 0===u&&n)return n.count<n.max&&(f.warn(\"Variable '\"+m+\"' in \"+n.name+\" could not be found!\"),u=t),n.count===n.max&&f.warn(\"Too many \"+n.name+\" warnings - additional warnings will be suppressed\"),n.count++,t;if(l){var y;if(\":\"===l[0]&&(u=(y=r?r.numberFormat:f.numberFormat)(l.replace(F,\"\"))(u)),\"|\"===l[0]){y=r?r.timeFormat:i;var x=f.dateTime2ms(u);u=f.formatDate(x,l.replace(F,\"\"),!1,y)}}else{var b=m+\"Label\";e.hasOwnProperty(b)&&(u=e[b])}return v&&(u=\"(\"+u+\")\",(p||d)&&(u=\" \"+u),(g||d)&&(u+=\" \")),u}))}f.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(i=10*i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var B=2e9;f.seedPseudoRandom=function(){B=2e9},f.pseudoRandom=function(){var t=B;return B=(69069*B+1)%4294967296,Math.abs(B-t)<429496729?f.pseudoRandom():B/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,\"htx\",\"hovertext\");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,\"tx\",\"text\");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+\"%\",n=0;n<e;n++)-1!==r.indexOf(\".\")&&(r=(r=r.replace(\"0%\",\"%\")).replace(\".%\",\"%\"));return r},f.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||\"none\"===e},f.strTranslate=function(t,e){return t||e?\"translate(\"+t+\",\"+e+\")\":\"\"},f.strRotate=function(t){return t?\"rotate(\"+t+\")\":\"\"},f.strScale=function(t){return 1!==t?\"scale(\"+t+\")\":\"\"},f.getTextTransform=function(t){var e=t.noCenter,r=t.textX,n=t.textY,i=t.targetX,a=t.targetY,o=t.anchorX||0,s=t.anchorY||0,l=t.rotate,u=t.scale;return u?u>1&&(u=1):u=0,f.strTranslate(i-u*(r+o),a-u*(n+s))+f.strScale(u)+(l?\"rotate(\"+l+(e?\"\":\" \"+r+\" \"+n)+\")\":\"\")},f.setTransormAndDisplay=function(t,e){t.attr(\"transform\",f.getTextTransform(e)),t.style(\"display\",e.scale?null:\"none\")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{\"../constants/numerical\":491,\"./anchor_utils\":495,\"./angles\":496,\"./array\":497,\"./clean_number\":498,\"./clear_responsive\":500,\"./coerce\":501,\"./dates\":502,\"./dom\":503,\"./extend\":505,\"./filter_unique\":506,\"./filter_visible\":507,\"./geometry2d\":510,\"./identity\":513,\"./increment\":514,\"./is_plain_object\":516,\"./keyed_container\":517,\"./localize\":518,\"./loggers\":519,\"./make_trace_groups\":520,\"./matrix\":521,\"./mod\":522,\"./nested_property\":523,\"./noop\":524,\"./notifier\":525,\"./preserve_drawing_buffer\":529,\"./push_unique\":530,\"./regex\":532,\"./relative_attr\":533,\"./relink_private\":534,\"./search\":535,\"./sort_object_keys\":538,\"./stats\":539,\"./throttle\":542,\"./to_log_range\":543,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],516:[function(t,e,r){\"use strict\";e.exports=function(t){return window&&window.process&&window.process.versions?\"[object Object]\"===Object.prototype.toString.call(t):\"[object Object]\"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty(\"hasOwnProperty\")}},{}],517:[function(t,e,r){\"use strict\";var n=t(\"./nested_property\"),i=/^\\w*$/;e.exports=function(t,e,r,a){var o,s,l;r=r||\"name\",a=a||\"value\";var u={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||\"\";var c={};if(s)for(o=0;o<s.length;o++)c[s[o][r]]=o;var f=i.test(a),h={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=c[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,c[t]=o}else e!==(f?s[o][a]:n(s[o],a).get())&&(i|=2);var p=s[o]=s[o]||{};return p[r]=t,f?p[a]=e:n(p,a).set(e),null!==e&&(i&=-5),u[o]=u[o]|i,h},get:function(t){if(s){var e=c[t];return void 0===e?void 0:f?s[e][a]:n(s[e],a).get()}},rename:function(t,e){var n=c[t];return void 0===n||(u[n]=1|u[n],c[e]=n,delete c[t],s[n][r]=e),h},remove:function(t){var e=c[t];if(void 0===e)return h;var i=s[e];if(Object.keys(i).length>2)return u[e]=2|u[e],h.set(t,null);if(f){for(o=e;o<s.length;o++)u[o]=3|u[o];for(o=e;o<s.length;o++)c[s[o][r]]--;s.splice(e,1),delete c[t]}else n(i,a).set(null),u[e]=6|u[e];return h},constructUpdate:function(){for(var t,i,o={},l=Object.keys(u),c=0;c<l.length;c++)i=l[c],t=e+\"[\"+i+\"]\",s[i]?(1&u[i]&&(o[t+\".\"+r]=s[i][r]),2&u[i]&&(o[t+\".\"+a]=f?4&u[i]?null:s[i][a]:4&u[i]?null:n(s[i],a).get())):o[t]=null;return o}};return h}},{\"./nested_property\":523}],518:[function(t,e,r){\"use strict\";var n=t(\"../registry\");e.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var u=r.split(\"-\")[0];if(u===r)break;r=u}return e}},{\"../registry\":647}],519:[function(t,e,r){\"use strict\";var n=t(\"../plot_api/plot_config\").dfltConfig,i=t(\"./notifier\"),a=e.exports={};a.log=function(){var t;if(n.logging>1){var e=[\"LOG:\"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join(\"<br>\"),\"long\")}},a.warn=function(){var t;if(n.logging>0){var e=[\"WARN:\"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join(\"<br>\"),\"stick\")}},a.error=function(){var t;if(n.logging>0){var e=[\"ERROR:\"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join(\"<br>\"),\"stick\")}}},{\"../plot_api/plot_config\":553,\"./notifier\":525}],520:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t,e,r){var i=t.selectAll(\"g.\"+r.replace(/\\s/g,\".\")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append(\"g\").attr(\"class\",r),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each((function(t){t[0][a]=n.select(this)})),i}},{\"@plotly/d3\":58}],521:[function(t,e,r){\"use strict\";var n=t(\"gl-mat4\");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},r.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},r.dot=function(t,e){if(!t.length||!e.length||t.length!==e.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=r.dot(t[i],e);else if(e[0].length){var o=r.transposeRagged(e);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=r.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*e[i];return n},r.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},r.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},r.rotationXYMatrix=function(t,e,n){return r.dot(r.dot(r.translationMatrix(e,n),r.rotationMatrix(t)),r.translationMatrix(-e,-n))},r.apply3DTransform=function(t){return function(){var e=arguments,n=1===arguments.length?e[0]:[e[0],e[1],e[2]||0];return r.dot(t,[n[0],n[1],n[2],1]).slice(0,3)}},r.apply2DTransform=function(t){return function(){var e=arguments;3===e.length&&(e=e[0]);var n=1===arguments.length?e[0]:[e[0],e[1]];return r.dot(t,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(t){var e=r.apply2DTransform(t);return function(t){return e(t.slice(0,2)).concat(e(t.slice(2,4)))}},r.convertCssMatrix=function(t){if(t){var e=t.length;if(16===e)return t;if(6===e)return[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},r.inverseTransformMatrix=function(t){var e=[];return n.invert(e,t),[[e[0],e[1],e[2],e[3]],[e[4],e[5],e[6],e[7]],[e[8],e[9],e[10],e[11]],[e[12],e[13],e[14],e[15]]]}},{\"gl-mat4\":210}],522:[function(t,e,r){\"use strict\";e.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},{}],523:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,u=t;for(s=0;s<e.length-1;s++){if(-1===(r=e[s])){for(n=!0,o=[],l=0;l<u.length;l++)o[l]=a(u[l],e.slice(s+1))(),o[l]!==o[0]&&(n=!1);return n?o[0]:o}if(\"number\"==typeof r&&!i(u))return;if(\"object\"!=typeof(u=u[r])||null===u)return}if(\"object\"==typeof u&&null!==u&&null!==(o=u[e[s]]))return o}}e.exports=function(t,e){if(n(e))e=String(e);else if(\"string\"!=typeof e||\"[-1]\"===e.substr(e.length-4))throw\"bad property string\";for(var r,i,o,s=0,u=e.split(\".\");s<u.length;){if(r=String(u[s]).match(/^([^\\[\\]]*)((\\[\\-?[0-9]*\\])+)$/)){if(r[1])u[s]=r[1];else{if(0!==s)throw\"bad property string\";u.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split(\"][\"),o=0;o<i.length;o++)s++,u.splice(s,0,Number(i[o]))}s++}return\"object\"!=typeof t?function(t,e,r){return{set:function(){throw\"bad container\"},get:function(){},astr:e,parts:r,obj:t}}(t,e,u):{set:l(t,u,e),get:a(t,u),astr:e,parts:u,obj:t}};var o=/(^|\\.)args\\[/;function s(t,e){return void 0===t||null===t&&!e.match(o)}function l(t,e,r){return function(n){var a,o,l=t,h=\"\",p=[[t,h]],d=s(n,r);for(o=0;o<e.length-1;o++){if(\"number\"==typeof(a=e[o])&&!i(l))throw\"array index but container is not an array\";if(-1===a){if(d=!c(l,e.slice(o+1),n,r))break;return}if(!f(l,a,e[o+1],d))break;if(\"object\"!=typeof(l=l[a])||null===l)throw\"container is not an object\";h=u(h,a),p.push([l,h])}if(d){if(o===e.length-1&&(delete l[e[o]],Array.isArray(l)&&+e[o]==l.length-1))for(;l.length&&void 0===l[l.length-1];)l.pop()}else l[e[o]]=n}}function u(t,e){var r=e;return n(e)?r=\"[\"+e+\"]\":t&&(r=\".\"+e),t+r}function c(t,e,r,n){var a,o=i(r),u=!0,c=r,h=n.replace(\"-1\",0),p=!o&&s(r,h),d=e[0];for(a=0;a<t.length;a++)h=n.replace(\"-1\",a),o&&(p=s(c=r[a%r.length],h)),p&&(u=!1),f(t,a,d,p)&&l(t[a],e,n.replace(\"-1\",a))(c);return u}function f(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]=\"number\"==typeof r?[]:{}}return!0}},{\"./array\":497,\"fast-isnumeric\":190}],524:[function(t,e,r){\"use strict\";e.exports=function(){}},{}],525:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=[];e.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:\"long\"===e&&(r=3e3);var o=n.select(\"body\").selectAll(\".plotly-notifier\").data([0]);o.enter().append(\"div\").classed(\"plotly-notifier\",!0),o.selectAll(\".notifier-note\").data(a).enter().append(\"div\").classed(\"notifier-note\",!0).style(\"opacity\",0).each((function(t){var i=n.select(this);i.append(\"button\").classed(\"notifier-close\",!0).html(\"&times;\").on(\"click\",(function(){i.transition().call(s)}));for(var a=i.append(\"p\"),o=t.split(/<br\\s*\\/?>/g),l=0;l<o.length;l++)l&&a.append(\"br\"),a.append(\"span\").text(o[l]);\"stick\"===e?i.transition().duration(350).style(\"opacity\",1):i.transition().duration(700).style(\"opacity\",1).transition().delay(r).call(s)}))}function s(t){t.duration(700).style(\"opacity\",0).each(\"end\",(function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()}))}}},{\"@plotly/d3\":58,\"fast-isnumeric\":190}],526:[function(t,e,r){\"use strict\";var n=t(\"./setcursor\"),i=\"data-savedcursor\";e.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr(\"class\")||\"\").split(\" \"),o=0;o<a.length;o++){var s=a[o];0===s.indexOf(\"cursor-\")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,\"!!\")}n(t,e)}else r&&(t.attr(i,null),\"!!\"===r?n(t):n(t,r))}},{\"./setcursor\":536}],527:[function(t,e,r){\"use strict\";var n=t(\"./matrix\").dot,i=t(\"../constants/numerical\").BADNUM,a=e.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,u=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,l=function(t){return t[1]===r[0][1]}));var c=!0,f=r[0];for(e=1;e<r.length;e++)if(f[0]!==r[e][0]||f[1]!==r[e][1]){c=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:u?function(t,e){var r=t[0],u=t[1];return!(r===i||r<n||r>a||u===i||u<o||u>s||e&&l(t))}:function(t,e){var l=t[0],u=t[1];if(l===i||l<n||l>a||u===i||u<o||u>s)return!1;var c,f,h,p,d,g=r.length,v=r[0][0],m=r[0][1],y=0;for(c=1;c<g;c++)if(f=v,h=m,v=r[c][0],m=r[c][1],!(l<(p=Math.min(f,v))||l>Math.max(f,v)||u>Math.max(h,m)))if(u<Math.min(h,m))l!==p&&y++;else{if(u===(d=v===f?u:h+(l-f)*(m-h)/(v-f)))return 1!==c||!e;u<=d&&l!==p&&y++}return y%2==1},isRect:u,degenerate:c}},a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],u=[t[r][0]-l[0],t[r][1]-l[1]],c=n(u,u),f=Math.sqrt(c),h=[-u[1]/f,u[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,u))<0||s>c||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u<t.length;u++)(u===t.length-1||a.isSegmentBent(t,l,u+1,e))&&(r.push(t[u]),r.length<s-2&&(n=u,i=r.length-1),l=u)}return t.length>1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},{\"../constants/numerical\":491,\"./matrix\":521}],528:[function(t,e,n){(function(r){(function(){\"use strict\";var n=t(\"./show_no_webgl_msg\"),i=t(\"regl\");e.exports=function(t,e,a){var o=t._fullLayout,s=!0;return o._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(a);else if(!n.pick||o._has(\"parcoords\")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[],cachedCode:a||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener(\"webglcontextlost\",(function(e){t&&t.emit&&t.emit(\"plotly_webglcontextlost\",{event:e,layer:n.key})}),!1)}})),s||n({container:o._glcontainer.node()}),s}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./show_no_webgl_msg\":537,regl:284}],529:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"is-mobile\");e.exports=function(t){var e;if(\"string\"!=typeof(e=t&&t.hasOwnProperty(\"userAgent\")?t.userAgent:function(){var t;return\"undefined\"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]),t}()))return!0;var r=i({ua:{headers:{\"user-agent\":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(\" \"),o=1;o<a.length;o++)if(-1!==a[o].indexOf(\"Safari\"))for(var s=o-1;s>-1;s--){var l=a[s];if(\"Version/\"===l.substr(0,8)){var u=l.substr(8).split(\".\")[0];if(n(u)&&(u=+u),u>=13)return!0}}return r}},{\"fast-isnumeric\":190,\"is-mobile\":234}],530:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n<t.length;n++)if(t[n]instanceof RegExp&&t[n].toString()===r)return t;t.push(e)}else!e&&0!==e||-1!==t.indexOf(e)||t.push(e);return t}},{}],531:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_config\").dfltConfig,a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},plotDo:function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:\"object\"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)}};e.exports=a},{\"../lib\":515,\"../plot_api/plot_config\":553}],532:[function(t,e,r){\"use strict\";r.counter=function(t,e,r,n){var i=(e||\"\")+(r?\"\":\"$\"),a=!1===n?\"\":\"^\";return\"xy\"===t?new RegExp(a+\"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?\"+i):new RegExp(a+t+\"([2-9]|[1-9][0-9]+)?\"+i)}},{}],533:[function(t,e,r){\"use strict\";var n=/^(.*)(\\.[^\\.\\[\\]]+|\\[\\d\\])$/,i=/^[^\\.\\[\\]]+$/;e.exports=function(t,e){for(;e;){var r=t.match(n);if(r)t=r[1];else{if(!t.match(i))throw new Error(\"bad relativeAttr call:\"+[t,e]);t=\"\"}if(\"^\"!==e.charAt(0))break;e=e.slice(1)}return t&&\"[\"!==e.charAt(0)?t+\".\"+e:t+e}},{}],534:[function(t,e,r){\"use strict\";var n=t(\"./array\").isArrayOrTypedArray,i=t(\"./is_plain_object\");e.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if(\"_\"===a.charAt(0)||\"function\"==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&&n(s)&&i(o[0])){if(\"customdata\"===a||\"ids\"===a)continue;for(var l=Math.min(o.length,s.length),u=0;u<l;u++)s[u]!==o[u]&&i(o[u])&&i(s[u])&&t(s[u],o[u])}else i(o)&&i(s)&&(t(s,o),Object.keys(s).length||delete e[a])}}},{\"./array\":497,\"./is_plain_object\":516}],535:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./loggers\"),a=t(\"./identity\"),o=t(\"../constants/numerical\").BADNUM,s=1e-9;function l(t,e){return t<e}function u(t,e){return t<=e}function c(t,e){return t>e}function f(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var a,o,h=0,p=e.length,d=0,g=p>1?(e[p-1]-e[0])/(p-1):1;for(o=g>=0?r?l:u:r?f:c,t+=g*s*(r?-1:1)*(g>=0?1:-1);h<p&&d++<100;)o(e[a=Math.floor((h+p)/2)],t)?h=a+1:p=a;return d>90&&i.log(\"Long binary search...\"),h-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],u=0;u<=e;u++){var c=n[u],f=c-i;void 0===i?(l.push(c),i=c):f>s&&(a=Math.min(a,f),l.push(c),i=c)}return{vals:l,minDiff:a}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=u((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]},r.sort=function(t,e){for(var r=0,n=0,i=1;i<t.length;i++){var a=e(t[i],t[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;i<t.length;i++){var o=e(t[i]);o<n&&(n=o,r=i)}return r}},{\"../constants/numerical\":491,\"./identity\":513,\"./loggers\":519,\"fast-isnumeric\":190}],536:[function(t,e,r){\"use strict\";e.exports=function(t,e){(t.attr(\"class\")||\"\").split(\" \").forEach((function(e){0===e.indexOf(\"cursor-\")&&t.classed(e,!1)})),e&&t.classed(\"cursor-\"+e,!0)}},{}],537:[function(t,e,r){\"use strict\";var n=t(\"../components/color\"),i=function(){};e.exports=function(t){for(var e in t)\"function\"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement(\"div\");r.className=\"no-webgl\",r.style.cursor=\"pointer\",r.style.fontSize=\"24px\",r.style.color=n.defaults[0],r.style.position=\"absolute\",r.style.left=r.style.top=\"0px\",r.style.width=r.style.height=\"100%\",r.style[\"background-color\"]=n.lightLine,r.style[\"z-index\"]=30;var a=document.createElement(\"p\");return a.textContent=\"WebGL is not supported by your browser - visit https://get.webgl.org for more info\",a.style.position=\"relative\",a.style.top=\"50%\",a.style.left=\"50%\",a.style.height=\"30%\",a.style.width=\"50%\",a.style.margin=\"-15% 0 0 -25%\",r.appendChild(a),t.container.appendChild(r),t.container.style.background=\"#FFFFFF\",t.container.onclick=function(){window.open(\"https://get.webgl.org\")},!1}},{\"../components/color\":367}],538:[function(t,e,r){\"use strict\";e.exports=function(t){return Object.keys(t).sort()}},{}],539:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./array\").isArrayOrTypedArray;r.aggNums=function(t,e,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=r.aggNums(t,e,a[s]);a=l}for(s=0;s<o;s++)n(e)?n(a[s])&&(e=t(+e,+a[s])):e=a[s];return e},r.len=function(t){return r.aggNums((function(t){return t+1}),0,t)},r.mean=function(t,e){return e||(e=r.len(t)),r.aggNums((function(t,e){return t+e}),0,t)/e},r.midRange=function(t){if(void 0!==t&&0!==t.length)return(r.aggNums(Math.max,null,t)+r.aggNums(Math.min,null,t))/2},r.variance=function(t,e,i){return e||(e=r.len(t)),n(i)||(i=r.mean(t,e)),r.aggNums((function(t,e){return t+Math.pow(e-i,2)}),0,t)/e},r.stdev=function(t,e,n){return Math.sqrt(r.variance(t,e,n))},r.median=function(t){var e=t.slice().sort();return r.interp(e,.5)},r.interp=function(t,e){if(!n(e))throw\"n should be a finite number\";if((e=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{\"./array\":497,\"fast-isnumeric\":190}],540:[function(t,e,r){\"use strict\";var n=t(\"color-normalize\");e.exports=function(t){return t?n(t):[0,0,0,1]}},{\"color-normalize\":89}],541:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=i.strTranslate,o=t(\"../constants/xmlns_namespaces\"),s=t(\"../constants/alignment\").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,v){var S=t.text(),E=!t.attr(\"data-notex\")&&e&&e._context.typesetMath&&\"undefined\"!=typeof MathJax&&S.match(l),P=n.select(t.node().parentNode);if(!P.empty()){var O=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return O+=\"-math\",P.selectAll(\"svg.\"+O).remove(),P.selectAll(\"g.\"+O+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":S,\"data-math\":\"N\"}),E?(e&&e._promises||[]).push(new Promise((function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a=parseInt((MathJax.version||\"\").split(\".\")[0]);if(2===a||3===a){var o,s,l,h,p=function(){return s=i.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:\"none\",tex2jax:{inlineMath:f},displayAlign:\"left\"})},d=function(){s=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f},g=function(){if(\"SVG\"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer(\"SVG\")},v=function(){\"svg\"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output=\"svg\")},m=function(){var r,o=\"math-output-\"+i.randstr({},64),s=(h=n.select(\"body\").append(\"div\").attr({id:o}).style({visibility:\"hidden\",position:\"absolute\",\"font-size\":e.fontSize+\"px\"}).text((r=t,r.replace(u,\"\\\\lt \").replace(c,\"\\\\gt \")))).node();return 2===a?MathJax.Hub.Typeset(s):MathJax.typeset([s])},y=function(){var e=h.select(2===a?\".MathJax_SVG\":\".MathJax\"),o=!e.empty()&&h.select(\"svg\").node();if(o){var s,l=o.getBoundingClientRect();s=2===a?n.select(\"body\").select(\"#MathJax_SVG_glyphs\"):e.select(\"defs\"),r(e,s,l)}else i.log(\"There was an error in the tex syntax.\",t),r();h.remove()},x=function(){if(\"SVG\"!==o)return MathJax.Hub.setRenderer(o)},b=function(){\"svg\"!==o&&(MathJax.config.startup.output=o)},_=function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(s)},w=function(){MathJax.config=s};2===a?MathJax.Hub.Queue(p,g,m,y,x,_):3===a&&(d(),v(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){m(),y(),b(),w()})))}else i.warn(\"No MathJax version:\",MathJax.version)}(E[2],o,(function(n,i,o){P.selectAll(\"svg.\"+O).remove(),P.selectAll(\"g.\"+O+\"-group\").remove();var s=n&&n.select(\"svg\");if(!s||!s.node())return I(),void e();var l=P.append(\"g\").classed(O+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":S,\"data-math\":\"Y\"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class:O,height:c,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var f=t.node().style.fill||\"black\",h=s.select(\"g\");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),d=p.width,g=p.height;(d>u||g>c)&&(s.style(\"overflow\",\"hidden\"),d=(p=s.node().getBoundingClientRect()).width,g=p.height);var m=+t.attr(\"x\"),y=+t.attr(\"y\"),x=-(r||t.node().getBoundingClientRect().height)/4;if(\"y\"===O[0])l.attr({transform:\"rotate(\"+[-90,m,y]+\")\"+a(-d/2,x-g/2)});else if(\"l\"===O[0])y=x-g/2;else if(\"a\"===O[0]&&0!==O.indexOf(\"atitle\"))m=0,y=x;else{var b=t.attr(\"text-anchor\");m-=d*(\"middle\"===b?.5:\"end\"===b?1:0),y=y+x-g/2}s.attr({x:m,y}),v&&v.call(t,l),e(l)}))}))):I(),t}function I(){P.empty()||(O=t.attr(\"class\")+\"-math\",P.select(\"svg.\"+O).remove()),t.text(\"\").style(\"white-space\",\"pre\"),function(t,e){e=e.replace(m,\" \");var r,a=!1,l=[],u=-1;function c(){u++;var e=document.createElementNS(o.svg,\"tspan\");n.select(e).attr({class:\"line\",dy:u*s+\"em\"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a<i.length;a++)f(i[a])}function f(t){var e,i=t.type,a={};if(\"a\"===i){e=\"a\";var s=t.target,u=t.href,c=t.popup;u&&(a={\"xlink:xlink:show\":\"_blank\"===s||\"_\"!==s.charAt(0)?\"new\":\"replace\",target:s,\"xlink:xlink:href\":u},c&&(a.onclick='window.open(this.href.baseVal,this.target.baseVal,\"'+c+'\");return false;'))}else e=\"tspan\";t.style&&(a.style=t.style);var f=document.createElementNS(o.svg,e);if(\"sup\"===i||\"sub\"===i){v(r,g),r.appendChild(f);var h=document.createElementNS(o.svg,\"tspan\");v(h,g),n.select(h).attr(\"dy\",d[i]),a.dy=p[i],r.appendChild(f),r.appendChild(h)}else r.appendChild(f);n.select(f).attr(a),r=t.node=f,l.push(t)}function v(t,e){t.appendChild(document.createTextNode(e))}function S(t){if(1!==l.length){var n=l.pop();t!==n.type&&i.log(\"Start tag <\"+n.type+\"> doesnt match end tag <\"+t+\">. Pretending it did match.\",e),r=l[l.length-1].node}else i.log(\"Ignoring unexpected end tag </\"+t+\">.\",e)}b.test(e)?c():(r=t,l=[{node:t}]);for(var E=e.split(y),P=0;P<E.length;P++){var O=E[P],I=O.match(x),D=I&&I[2].toLowerCase(),z=h[D];if(\"br\"===D)c();else if(void 0===z)v(r,C(O));else if(I[1])S(D);else{var R=I[4],F={type:D},N=M(R,_);if(N?(N=N.replace(A,\"$1 fill:\"),z&&(N+=\";\"+z)):z&&(N=z),N&&(F.style=N),\"a\"===D){a=!0;var B=M(R,w);if(B){var j=L(B);j&&(F.href=j,F.target=M(R,k)||\"_blank\",F.popup=M(R,T))}}f(F)}}return a}(t.node(),S)&&t.style(\"pointer-events\",\"all\"),r.positionText(t),v&&v.call(t)}};var u=/(<|&lt;|&#60;)/g,c=/(>|&gt;|&#62;)/g,f=[[\"$\",\"$\"],[\"\\\\(\",\"\\\\)\"]],h={sup:\"font-size:70%\",sub:\"font-size:70%\",b:\"font-weight:bold\",i:\"font-style:italic\",a:\"cursor:pointer\",span:\"\",em:\"font-style:italic;font-weight:bold\"},p={sub:\"0.3em\",sup:\"-0.6em\"},d={sub:\"-0.21em\",sup:\"0.42em\"},g=\"​\",v=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],m=r.NEWLINES=/(\\r\\n?|\\n)/g,y=/(<[^<>]*>)/,x=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,b=/<br(\\s+.*)?>/i;r.BR_TAG_ALL=/<br(\\s+.*)?>/gi;var _=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,w=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,k=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,T=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function M(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&C(n)}var A=/(^|;)\\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:[\"br\"],i=\"...\".length,a=t.split(y),o=[],s=\"\",l=0,u=0;u<a.length;u++){var c=a[u],f=c.match(x),h=f&&f[2].toLowerCase();if(h)-1!==n.indexOf(h)&&(o.push(c),s=h);else{var p=c.length;if(l+p<r)o.push(c),l+=p;else if(l<r){var d=r-l;s&&(\"br\"!==s||d<=i||p<=i)&&o.pop(),r>i?o.push(c.substr(0,d-i)+\"...\"):o.push(c.substr(0,d));break}s=\"\"}}return o.join(\"\")};var S={mu:\"μ\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\" \",times:\"×\",plusmn:\"±\",deg:\"°\"},E=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function C(t){return t.replace(E,(function(t,e){return(\"#\"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}(\"x\"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==v.indexOf(i)&&-1!==v.indexOf(a)?e:\"\"}function P(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||\"top\",u=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a=\"bottom\"===l?function(){return u.bottom-n.height}:\"middle\"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o=\"right\"===s?function(){return u.right-n.width}:\"center\"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var t=o()-c.left,e=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+\"px\",left:t+\"px\",\"z-index\":1e3}),this}}r.convertEntities=C,r.sanitizeHTML=function(t){t=t.replace(m,\" \");for(var e=document.createElement(\"p\"),r=e,i=[],a=t.split(y),o=0;o<a.length;o++){var s=a[o],l=s.match(x),u=l&&l[2].toLowerCase();if(u in h)if(l[1])i.length&&(r=i.pop());else{var c=l[4],f=M(c,_),p=f?{style:f}:{};if(\"a\"===u){var d=M(c,w);if(d){var g=L(d);if(g){p.href=g;var v=M(c,k);v&&(p.target=v)}}}var b=document.createElement(u);r.appendChild(b),n.select(b).attr(p),r=b,i.push(b)}else r.appendChild(document.createTextNode(C(s)))}return e.innerHTML},r.lineCount=function(t){return t.selectAll(\"tspan.line\").size()||1},r.positionText=function(t,e,r){return t.each((function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i(\"x\",e),o=i(\"y\",r);\"text\"===this.nodeName&&t.selectAll(\"tspan.line\").attr({x:a,y:o})}))};var O=\"1px \";r.makeTextShadow=function(t){return\"1px 1px 1px \"+t+\", -1px -\"+O+O+t+\", 1px -\"+O+O+t+\", -\"+O+O+O+t},r.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch(\"edit\",\"input\",\"cancel\"),o=i||t;if(t.style({\"pointer-events\":i?\"none\":\"all\"}),1!==t.size())throw new Error(\"boo\");function s(){var i,s,u,c,f;i=n.select(r).select(\".svg-container\"),s=i.append(\"div\"),u=t.node().style,c=parseFloat(u.fontSize||12),void 0===(f=e.text)&&(f=t.attr(\"data-unformatted\")),s.classed(\"plugin-editable editable\",!0).style({position:\"absolute\",\"font-family\":u.fontFamily||\"Arial\",\"font-size\":c,color:e.fill||u.fill||\"black\",opacity:1,\"background-color\":e.background||\"transparent\",outline:\"#ffffff33 1px solid\",margin:[-c/8+1,0,0,-1].join(\"px \")+\"px\",padding:\"0\",\"box-sizing\":\"border-box\"}).attr({contenteditable:!0}).text(f).call(P(t,i,e)).on(\"blur\",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr(\"class\");(e=i?\".\"+i.split(\" \")[0]+\"-math-group\":\"[class*=-math-group]\")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on(\"mouseup\",null),a.edit.call(t,o)})).on(\"focus\",(function(){var t=this;r._editing=!0,n.select(document).on(\"mouseup\",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on(\"keyup\",(function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on(\"blur\",(function(){return!1})).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(P(t,i,e)))})).on(\"keydown\",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var h,p=o.attr(\"class\");(h=p?\".\"+p.split(\" \")[0]+\"-math-group\":\"[class*=-math-group]\")&&n.select(t.node().parentNode).select(h).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on(\"click\",s),n.rebind(t,a,\"on\")}},{\"../constants/alignment\":483,\"../constants/xmlns_namespaces\":492,\"../lib\":515,\"@plotly/d3\":58}],542:[function(t,e,r){\"use strict\";var n={};function i(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}r.throttle=function(t,e,r){var a=n[t],o=Date.now();if(!a){for(var s in n)n[s].ts<o-6e4&&delete n[s];a=n[t]={ts:0,timer:null}}function l(){r(),a.ts=Date.now(),a.onDone&&(a.onDone(),a.onDone=null)}i(a),o>a.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},r.clear=function(t){if(t)i(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],543:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{\"fast-isnumeric\":190}],544:[function(t,e,r){\"use strict\";var n=e.exports={},i=t(\"../plots/geo/constants\").locationmodeToLayer,a=t(\"topojson-client\").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,\"-\"),\"_\",t.resolution.toString(),\"m\"].join(\"\")},n.getTopojsonPath=function(t,e){return t+e+\".json\"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{\"../plots/geo/constants\":596,\"topojson-client\":316}],545:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en-US\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colorscale title\"},format:{date:\"%m/%d/%Y\"}}},{}],546:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colourscale title\"},format:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"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\"],periods:[\"AM\",\"PM\"],dateTime:\"%a %b %e %X %Y\",date:\"%d/%m/%Y\",time:\"%H:%M:%S\",decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],year:\"%Y\",month:\"%b %Y\",dayMonth:\"%b %-d\",dayMonthYear:\"%b %-d, %Y\"}}},{}],547:[function(t,e,r){\"use strict\";var n=t(\"../registry\");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split(\"[\")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\\[(0|[1-9][0-9]*)\\](\\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||\"\"}:{array:e,index:\"\",property:\"\"}}},{\"../registry\":647}],548:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=n.extendFlat,a=n.isPlainObject,o={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"clearAxisTypes\",\"plot\",\"style\",\"markerSize\",\"colorbars\"]},s={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"plot\",\"legend\",\"ticks\",\"axrange\",\"layoutstyle\",\"modebar\",\"camera\",\"arraydraw\",\"colorbars\"]},l=o.flags.slice().concat([\"fullReplot\"]),u=s.flags.slice().concat(\"layoutReplot\");function c(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function f(t,e,r){var n=i({},t);for(var o in n){var s=n[o];a(s)&&(n[o]=h(s,e,0,o))}return\"from-root\"===r&&(n.editType=e),n}function h(t,e,r,n){if(t.valType){var a=i({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=h(t.items[o],e)}return a}return f(t,e,\"_\"===n.charAt(0)?\"nested\":\"from-root\")}e.exports={traces:o,layout:s,traceFlags:function(){return c(l)},layoutFlags:function(){return c(u)},update:function(t,e){var r=e.editType;if(r&&\"none\"!==r)for(var n=r.split(\"+\"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:f}},{\"../lib\":515}],549:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"gl-mat4/fromQuat\"),a=t(\"../registry\"),o=t(\"../lib\"),s=t(\"../plots/plots\"),l=t(\"../plots/cartesian/axis_ids\"),u=t(\"../components/color\"),c=l.cleanId,f=l.getFromTrace,h=a.traceIs;function p(t,e){var r=t[e],n=e.charAt(0);r&&\"paper\"!==r&&(t[e]=c(r,n,!0))}function d(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&(\"string\"!=typeof t.title&&\"number\"!=typeof t.title||(t.title={text:t.title}),e(\"titlefont\",\"font\"),e(\"titleposition\",\"position\"),e(\"titleside\",\"side\"),e(\"titleoffset\",\"offset\"))}function g(t){if(!o.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,(\"string\"==typeof e||\"number\"==typeof e)&&String(e)}function v(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,a=Math.min(t.length,e.length);for(i=0;i<a&&t.charAt(i)===e.charAt(i);i++);return t.substr(0,i).trim()}function m(t){var e=\"middle\",r=\"center\";return\"string\"==typeof t&&(-1!==t.indexOf(\"top\")?e=\"top\":-1!==t.indexOf(\"bottom\")&&(e=\"bottom\"),-1!==t.indexOf(\"left\")?r=\"left\":-1!==t.indexOf(\"right\")&&(r=\"right\")),e+\" \"+r}function y(t,e){return e in t&&\"object\"==typeof t[e]&&0===Object.keys(t[e]).length}r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&o.log(\"Clearing previous rejected promises from queue.\"),t._promises=[]},r.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e<g.length;e++){var v=g[e];if(a&&a.test(v)){var m=t[v];m.anchor&&\"free\"!==m.anchor&&(m.anchor=c(m.anchor)),m.overlaying&&(m.overlaying=c(m.overlaying)),m.type||(m.isdate?m.type=\"date\":m.islog?m.type=\"log\":!1===m.isdate&&!1===m.islog&&(m.type=\"linear\")),\"withzero\"!==m.autorange&&\"tozero\"!==m.autorange||(m.autorange=!0,m.rangemode=\"tozero\"),delete m.islog,delete m.isdate,delete m.categories,y(m,\"domain\")&&delete m.domain,void 0!==m.autotick&&(void 0===m.tickmode&&(m.tickmode=m.autotick?\"auto\":\"linear\"),delete m.autotick),d(m)}else if(l&&l.test(v))d(t[v].radialaxis);else if(f&&f.test(v)){var x=t[v];d(x.aaxis),d(x.baxis),d(x.caxis)}else if(h&&h.test(v)){var b=t[v],_=b.cameraposition;if(Array.isArray(_)&&4===_[0].length){var w=_[0],k=_[1],T=_[2],M=i([],w),A=[];for(n=0;n<3;++n)A[n]=k[n]+T*M[2+4*n];b.camera={eye:{x:A[0],y:A[1],z:A[2]},center:{x:k[0],y:k[1],z:k[2]},up:{x:0,y:0,z:1}},delete b.cameraposition}d(b.xaxis),d(b.yaxis),d(b.zaxis)}}var S=Array.isArray(t.annotations)?t.annotations.length:0;for(e=0;e<S;e++){var E=t.annotations[e];o.isPlainObject(E)&&(E.ref&&(\"paper\"===E.ref?(E.xref=\"paper\",E.yref=\"paper\"):\"data\"===E.ref&&(E.xref=\"x\",E.yref=\"y\"),delete E.ref),p(E,\"xref\"),p(E,\"yref\"))}var C=Array.isArray(t.shapes)?t.shapes.length:0;for(e=0;e<C;e++){var L=t.shapes[e];o.isPlainObject(L)&&(p(L,\"xref\"),p(L,\"yref\"))}var P=Array.isArray(t.images)?t.images.length:0;for(e=0;e<P;e++){var O=t.images[e];o.isPlainObject(O)&&(p(O,\"xref\"),p(O,\"yref\"))}var I=t.legend;return I&&(I.x>3?(I.x=1.02,I.xanchor=\"left\"):I.x<-2&&(I.x=-.02,I.xanchor=\"right\"),I.y>3?(I.y=1.02,I.yanchor=\"bottom\"):I.y<-2&&(I.y=-.02,I.yanchor=\"top\")),d(t),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),u.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e<t.length;e++){var n,i=t[e];if(\"histogramy\"===i.type&&\"xbins\"in i&&!(\"ybins\"in i)&&(i.ybins=i.xbins,delete i.xbins),i.error_y&&\"opacity\"in i.error_y){var l=u.defaults,f=i.error_y.color||(h(i,\"bar\")?u.defaultLine:l[e%l.length]);i.error_y.color=u.addOpacity(u.rgb(f),u.opacity(f)*i.error_y.opacity),delete i.error_y.opacity}if(\"bardir\"in i&&(\"h\"!==i.bardir||!h(i,\"bar\")&&\"histogram\"!==i.type.substr(0,9)||(i.orientation=\"h\",r.swapXYData(i)),delete i.bardir),\"histogramy\"===i.type&&r.swapXYData(i),\"histogramx\"!==i.type&&\"histogramy\"!==i.type||(i.type=\"histogram\"),\"scl\"in i&&!(\"colorscale\"in i)&&(i.colorscale=i.scl,delete i.scl),\"reversescl\"in i&&!(\"reversescale\"in i)&&(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&&(i.xaxis=c(i.xaxis,\"x\")),i.yaxis&&(i.yaxis=c(i.yaxis,\"y\")),h(i,\"gl3d\")&&i.scene&&(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!h(i,\"pie-like\")&&!h(i,\"bar-like\"))if(Array.isArray(i.textposition))for(n=0;n<i.textposition.length;n++)i.textposition[n]=m(i.textposition[n]);else i.textposition&&(i.textposition=m(i.textposition));var p=a.getModule(i);if(p&&p.colorbar){var x=p.colorbar.container,b=x?i[x]:i;b&&b.colorscale&&(\"YIGnBu\"===b.colorscale&&(b.colorscale=\"YlGnBu\"),\"YIOrRd\"===b.colorscale&&(b.colorscale=\"YlOrRd\"))}if(\"surface\"===i.type&&o.isPlainObject(i.contours)){var _=[\"x\",\"y\",\"z\"];for(n=0;n<_.length;n++){var w=i.contours[_[n]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if(\"candlestick\"===i.type||\"ohlc\"===i.type){var k=!1!==(i.increasing||{}).showlegend,T=!1!==(i.decreasing||{}).showlegend,M=g(i.increasing),A=g(i.decreasing);if(!1!==M&&!1!==A){var S=v(M,A,k,T);S&&(i.name=S)}else!M&&!A||i.name||(i.name=M||A)}if(Array.isArray(i.transforms)){var E=i.transforms;for(n=0;n<E.length;n++){var C=E[n];if(o.isPlainObject(C))switch(C.type){case\"filter\":C.filtersrc&&(C.target=C.filtersrc,delete C.filtersrc),C.calendar&&(C.valuecalendar||(C.valuecalendar=C.calendar),delete C.calendar);break;case\"groupby\":if(C.styles=C.styles||C.style,C.styles&&!Array.isArray(C.styles)){var L=C.styles,P=Object.keys(L);C.styles=[];for(var O=0;O<P.length;O++)C.styles.push({target:P[O],value:L[P[O]]})}}}}y(i,\"line\")&&delete i.line,\"marker\"in i&&(y(i.marker,\"line\")&&delete i.marker.line,y(i,\"marker\")&&delete i.marker),u.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins),d(i),i.colorbar&&d(i.colorbar),i.marker&&i.marker.colorbar&&d(i.marker.colorbar),i.line&&i.line.colorbar&&d(i.line.colorbar),i.aaxis&&d(i.aaxis),i.baxis&&d(i.baxis)}},r.swapXYData=function(t){var e;if(o.swapAttrs(t,[\"?\",\"?0\",\"d?\",\"?bins\",\"nbins?\",\"autobin?\",\"?src\",\"error_?\"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n=\"copy_ystyle\"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(t,[\"error_?.copy_ystyle\"]),n&&o.swapAttrs(t,[\"error_?.color\",\"error_?.thickness\",\"error_?.width\"])}if(\"string\"==typeof t.hoverinfo){var i=t.hoverinfo.split(\"+\");for(e=0;e<i.length;e++)\"x\"===i[e]?i[e]=\"y\":\"y\"===i[e]&&(i[e]=\"x\");t.hoverinfo=i.join(\"+\")}},r.coerceTraceIndices=function(t,e){if(n(e))return[e];if(!Array.isArray(e)||!e.length)return t.data.map((function(t,e){return e}));if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)o.isIndex(e[i],t.data.length)?r.push(e[i]):o.warn(\"trace index (\",e[i],\") is not a number or is out of bounds\");return r}return e},r.manageArrayContainers=function(t,e,r){var i=t.obj,a=t.parts,s=a.length,l=a[s-1],u=n(l);if(u&&null===e){var c=a.slice(0,s-1).join(\".\");o.nestedProperty(i,c).get().splice(l,1)}else u&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var x=/(\\.[^\\[\\]\\.]+|\\[[^\\[\\]\\.]+\\])$/;function b(t){var e=t.search(x);if(e>0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var s=f(t,i,_[a]);if(s&&\"log\"!==s.type){var l=s._name,u=s._id.substr(1);if(\"scene\"===u.substr(0,5)){if(void 0!==r[u])continue;l=u+\".\"+l}var c=l+\".type\";void 0===r[l]&&void 0===r[c]&&o.nestedProperty(t.layout,c).set(null)}}}},{\"../components/color\":367,\"../lib\":515,\"../plots/cartesian/axis_ids\":570,\"../plots/plots\":628,\"../registry\":647,\"fast-isnumeric\":190,\"gl-mat4/fromQuat\":200}],550:[function(t,e,r){\"use strict\";var n=t(\"./plot_api\");r._doPlot=n._doPlot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r._guiRestyle=n._guiRestyle,r._guiRelayout=n._guiRelayout,r._guiUpdate=n._guiUpdate,r._storeDirectGUIEdit=n._storeDirectGUIEdit,r.react=n.react,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.setPlotConfig=n.setPlotConfig,r.toImage=t(\"./to_image\"),r.validate=t(\"./validate\"),r.downloadImage=t(\"../snapshot/download\");var i=t(\"./template_api\");r.makeTemplate=i.makeTemplate,r.validateTemplate=i.validateTemplate},{\"../snapshot/download\":649,\"./plot_api\":552,\"./template_api\":557,\"./to_image\":558,\"./validate\":559}],551:[function(t,e,r){\"use strict\";var n=t(\"../lib/is_plain_object\"),i=t(\"../lib/noop\"),a=t(\"../lib/loggers\"),o=t(\"../lib/search\").sorterAsc,s=t(\"../registry\");r.containerArrayMatch=t(\"./container_array_match\");var l=r.isAddVal=function(t){return\"add\"===t||n(t)},u=r.isRemoveVal=function(t){return null===t||\"remove\"===t};r.applyContainerArrayChanges=function(t,e,r,n,c){var f=e.astr,h=s.getComponentMethod(f,\"supplyLayoutDefaults\"),p=s.getComponentMethod(f,\"draw\"),d=s.getComponentMethod(f,\"drawOne\"),g=n.replot||n.recalc||h===i||p===i,v=t.layout,m=t._fullLayout;if(r[\"\"]){Object.keys(r).length>1&&a.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(u(y))e.set(null);else{if(!Array.isArray(y))return a.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!g&&(h(v,m),p(t),!0)}var x,b,_,w,k,T,M,A,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=c(m,f).get(),P=[],O=-1,I=C.length;for(x=0;x<S.length;x++)if(w=r[_=S[x]],k=Object.keys(w),T=w[\"\"],M=l(T),_<0||_>C.length-(M?0:1))a.warn(\"index out of range\",f,_);else if(void 0!==T)k.length>1&&a.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),u(T)?P.push(_):M?(\"add\"===T&&(T={}),C.splice(_,0,T),L&&L.splice(_,0,{})):a.warn(\"Unrecognized full object edit value\",f,_,T),-1===O&&(O=_);else for(b=0;b<k.length;b++)A=f+\"[\"+_+\"].\",c(C[_],k[b],A).set(w[k[b]]);for(x=P.length-1;x>=0;x--)C.splice(P[x],1),L&&L.splice(P[x],1);if(C.length?E||e.set(C):e.set(null),g)return!1;if(h(v,m),d!==i){var D;if(-1===O)D=S;else{for(I=Math.max(C.length,I),D=[],x=0;x<S.length&&!((_=S[x])>=O);x++)D.push(_);for(x=O;x<I;x++)D.push(x)}for(x=0;x<D.length;x++)d(t,D[x])}else p(t);return!0}},{\"../lib/is_plain_object\":516,\"../lib/loggers\":519,\"../lib/noop\":524,\"../lib/search\":535,\"../registry\":647,\"./container_array_match\":547}],552:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"has-hover\"),o=t(\"../lib\"),s=o.nestedProperty,l=t(\"../lib/events\"),u=t(\"../lib/queue\"),c=t(\"../registry\"),f=t(\"./plot_schema\"),h=t(\"../plots/plots\"),p=t(\"../plots/cartesian/axes\"),d=t(\"../components/drawing\"),g=t(\"../components/color\"),v=t(\"../plots/cartesian/graph_interact\").initInteractions,m=t(\"../constants/xmlns_namespaces\"),y=t(\"../components/selections\").clearOutline,x=t(\"./plot_config\").dfltConfig,b=t(\"./manage_arrays\"),_=t(\"./helpers\"),w=t(\"./subroutines\"),k=t(\"./edit_types\"),T=t(\"../plots/cartesian/constants\").AX_NAME_PATTERN,M=0;function A(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit(\"plotly_afterplot\")}function S(t,e){try{t._fullLayout._paper.style(\"background\",e)}catch(t){o.error(t)}}function E(t,e){S(t,g.combine(e,\"white\"))}function C(t,e){if(!t._context){t._context=o.extendDeep({},x);var r=n.select(\"base\");t._context._baseUrl=r.size()&&r.attr(\"href\")?window.location.href.split(\"#\")[0]:\"\"}var i,s,l,u=t._context;if(e){for(s=Object.keys(e),i=0;i<s.length;i++)\"editable\"!==(l=s[i])&&\"edits\"!==l&&l in u&&(\"setBackground\"===l&&\"opaque\"===e[l]?u[l]=E:u[l]=e[l]);e.plot3dPixelRatio&&!u.plotGlPixelRatio&&(u.plotGlPixelRatio=u.plot3dPixelRatio);var c=e.editable;if(void 0!==c)for(u.editable=c,s=Object.keys(u.edits),i=0;i<s.length;i++)u.edits[s[i]]=c;if(e.edits)for(s=Object.keys(e.edits),i=0;i<s.length;i++)(l=s[i])in u.edits&&(u.edits[l]=e.edits[l]);u._exportedPlot=e._exportedPlot}u.staticPlot&&(u.editable=!1,u.edits={},u.autosizable=!1,u.scrollZoom=!1,u.doubleClick=!1,u.showTips=!1,u.showLink=!1,u.displayModeBar=!1),\"hover\"!==u.displayModeBar||a||(u.displayModeBar=!0),\"transparent\"!==u.setBackground&&\"function\"==typeof u.setBackground||(u.setBackground=S),u._hasZeroHeight=u._hasZeroHeight||0===t.clientHeight,u._hasZeroWidth=u._hasZeroWidth||0===t.clientWidth;var f=u.scrollZoom,h=u._scrollZoom={};if(!0===f)h.cartesian=1,h.gl3d=1,h.geo=1,h.mapbox=1;else if(\"string\"==typeof f){var p=f.split(\"+\");for(i=0;i<p.length;i++)h[p[i]]=1}else!1!==f&&(h.gl3d=1,h.geo=1,h.mapbox=1)}function L(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function P(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error(\"all values in \"+r+\" must be integers\");if(i>=t.data.length||i<-t.data.length)throw new Error(r+\" must be valid indices for gd.data.\");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error(\"each index in \"+r+\" must be unique.\")}}function O(t,e,r){if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array.\");if(void 0===e)throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(e)||(e=[e]),P(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function I(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array\");if(!o.isPlainObject(e))throw new Error(\"update must be a key:value object\");if(void 0===r)throw new Error(\"indices must be an integer or array of integers\");for(var a in P(t,r,\"indices\"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error(\"attribute \"+a+\" must be an array of length equal to indices array length\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error(\"when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object\")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,u,c,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=L(r,t.data.length-1),e)for(var g=0;g<r.length;g++){if(a=t.data[r[g]],l=(u=s(a,d)).get(),c=e[d][g],!o.isArrayOrTypedArray(c))throw new Error(\"attribute: \"+d+\" index: \"+g+\" must be an array\");if(!o.isArrayOrTypedArray(l))throw new Error(\"cannot extend missing or non-array attribute: \"+d);if(l.constructor!==c.constructor)throw new Error(\"cannot extend array with an array of a different type: \"+d);f=h?n[d][g]:n,i(f)||(f=-1),p.push({prop:u,target:l,insert:c,maxp:Math.floor(f)})}return p}(t,e,r,n),u={},c={},f=0;f<l.length;f++){var h=l[f].prop,p=l[f].maxp,d=a(l[f].target,l[f].insert,p);h.set(d[0]),Array.isArray(u[h.astr])||(u[h.astr]=[]),u[h.astr].push(d[1]),Array.isArray(c[h.astr])||(c[h.astr]=[]),c[h.astr].push(l[f].target.length)}return{update:u,maxPoints:c}}function D(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var a={};if(\"string\"==typeof e)a[e]=n;else{if(!o.isPlainObject(e))return o.warn(\"Restyle fail.\",e,n,i),Promise.reject();a=o.extendFlat({},e),void 0===i&&(i=n)}Object.keys(a).length&&(t.changed=!0);var s=_.coerceTraceIndices(t,i),l=B(t,a,s),c=l.flags;c.calc&&(t.calcdata=void 0),c.clearAxisTypes&&_.clearAxisTypes(t,s,{});var f=[];c.fullReplot?f.push(r._doPlot):(f.push(h.previousPromises),h.supplyDefaults(t),c.markerSize&&(h.doCalcdata(t),H(f)),c.style&&f.push(w.doTraceStyle),c.colorbars&&f.push(w.doColorBars),f.push(A)),f.push(h.rehover,h.redrag,h.reselect),u.add(t,z,[t,l.undoit,l.traces],z,[t,l.redoit,l.traces]);var p=o.syncOrAsync(f,t);return p&&p.then||(p=Promise.resolve()),p.then((function(){return t.emit(\"plotly_restyle\",l.eventData),t}))}function R(t){return void 0===t?null:t}function F(t,e){return e?function(e,r,n){var i=s(e,r),a=i.set;return i.set=function(e){N((n||\"\")+r,i.get(),e,t),a(e)},i}:s}function N(t,e,r,n){if(Array.isArray(e)||Array.isArray(r))for(var i=Array.isArray(e)?e:[],a=Array.isArray(r)?r:[],s=Math.max(i.length,a.length),l=0;l<s;l++)N(t+\"[\"+l+\"]\",i[l],a[l],n);else if(o.isPlainObject(e)||o.isPlainObject(r)){var u=o.isPlainObject(e)?e:{},c=o.isPlainObject(r)?r:{},f=o.extendFlat({},u,c);for(var h in f)N(t+\".\"+h,u[h],c[h],n)}else void 0===n[t]&&(n[t]=R(e))}function B(t,e,r){var n,i=t._fullLayout,a=t._fullData,l=t.data,u=i._guiEditing,d=F(i._preGUI,u),g=o.extendDeepAll({},e);j(e);var v,m=k.traceFlags(),y={},x={};function b(){return r.map((function(){}))}function w(t){var e=p.id2name(t);-1===v.indexOf(e)&&v.push(e)}function T(t){return\"LAYOUT\"+t+\".autorange\"}function M(t){return\"LAYOUT\"+t+\".range\"}function A(t){for(var e=t;e<a.length;e++)if(a[e]._input===l[t])return a[e]}function S(n,a,o){if(Array.isArray(n))n.forEach((function(t){S(t,a,o)}));else if(!(n in e)&&!_.hasParent(e,n)){var s;if(\"LAYOUT\"===n.substr(0,6))s=d(t.layout,n.replace(\"LAYOUT\",\"\"));else{var c=r[o];s=F(i._tracePreGUI[A(c)._fullInput.uid],u)(l[c],n)}n in x||(x[n]=b()),void 0===x[n][o]&&(x[n][o]=R(s.get())),void 0!==a&&s.set(a)}}function E(t){return function(e){return a[e][t]}}function C(t){return function(e,n){return!1===e?a[r[n]][t]:null}}for(var L in e){if(_.hasParent(e,L))throw new Error(\"cannot set \"+L+\" and a parent attribute simultaneously\");var P,O,I,D,z,N,B=e[L];if(\"autobinx\"!==L&&\"autobiny\"!==L||(L=L.charAt(L.length-1)+\"bins\",B=Array.isArray(B)?B.map(C(L)):!1===B?r.map(E(L)):null),y[L]=B,\"LAYOUT\"!==L.substr(0,6)){for(x[L]=b(),n=0;n<r.length;n++)if(P=l[r[n]],O=A(r[n]),D=(I=F(i._tracePreGUI[O._fullInput.uid],u)(P,L)).get(),void 0!==(z=Array.isArray(B)?B[n%B.length]:B)){var U=I.parts[I.parts.length-1],V=L.substr(0,L.length-U.length-1),H=V?V+\".\":\"\",q=V?s(O,V).get():O;if((N=f.getTraceValObject(O,I.parts))&&N.impliedEdits&&null!==z)for(var G in N.impliedEdits)S(o.relativeAttr(L,G),N.impliedEdits[G],n);else if(\"thicknessmode\"!==U&&\"lenmode\"!==U||D===z||\"fraction\"!==z&&\"pixels\"!==z||!q){if(\"type\"===L&&(\"pie\"===z!=(\"pie\"===D)||\"funnelarea\"===z!=(\"funnelarea\"===D))){var Y=\"x\",W=\"y\";\"bar\"!==z&&\"bar\"!==D||\"h\"!==P.orientation||(Y=\"y\",W=\"x\"),o.swapAttrs(P,[\"?\",\"?src\"],\"labels\",Y),o.swapAttrs(P,[\"d?\",\"?0\"],\"label\",Y),o.swapAttrs(P,[\"?\",\"?src\"],\"values\",W),\"pie\"===D||\"funnelarea\"===D?(s(P,\"marker.color\").set(s(P,\"marker.colors\").get()),i._pielayer.selectAll(\"g.trace\").remove()):c.traceIs(P,\"cartesian\")&&s(P,\"marker.colors\").set(s(P,\"marker.color\").get())}}else{var X=i._size,Z=q.orient,K=\"top\"===Z||\"bottom\"===Z;if(\"thicknessmode\"===U){var J=K?X.h:X.w;S(H+\"thickness\",q.thickness*(\"fraction\"===z?1/J:J),n)}else{var $=K?X.w:X.h;S(H+\"len\",q.len*(\"fraction\"===z?1/$:$),n)}}if(x[L][n]=R(D),-1!==[\"swapxy\",\"swapxyaxes\",\"orientation\",\"orientationaxes\"].indexOf(L)){if(\"orientation\"===L){I.set(z);var Q=P.x&&!P.y?\"h\":\"v\";if((I.get()||Q)===O.orientation)continue}else\"orientationaxes\"===L&&(P.orientation={v:\"h\",h:\"v\"}[O.orientation]);_.swapXYData(P),m.calc=m.clearAxisTypes=!0}else-1!==h.dataArrayContainers.indexOf(I.parts[0])?(_.manageArrayContainers(I,z,x),m.calc=!0):(N?N.arrayOk&&!c.traceIs(O,\"regl\")&&(o.isArrayOrTypedArray(z)||o.isArrayOrTypedArray(D))?m.calc=!0:k.update(m,N):m.calc=!0,I.set(z))}if(-1!==[\"swapxyaxes\",\"orientationaxes\"].indexOf(L)&&p.swap(t,r),\"orientationaxes\"===L){var tt=s(t.layout,\"hovermode\"),et=tt.get();\"x\"===et?tt.set(\"y\"):\"y\"===et?tt.set(\"x\"):\"x unified\"===et?tt.set(\"y unified\"):\"y unified\"===et&&tt.set(\"x unified\")}if(-1!==[\"orientation\",\"type\"].indexOf(L)){for(v=[],n=0;n<r.length;n++){var rt=l[r[n]];c.traceIs(rt,\"cartesian\")&&(w(rt.xaxis||\"x\"),w(rt.yaxis||\"y\"))}S(v.map(T),!0,0),S(v.map(M),[0,1],0)}}else I=d(t.layout,L.replace(\"LAYOUT\",\"\")),x[L]=[R(I.get())],I.set(Array.isArray(B)?B[0]:B),m.calc=!0}return(m.calc||m.plot)&&(m.fullReplot=!0),{flags:m,undoit:x,redoit:y,traces:r,eventData:o.extendDeepNoArrays([],[g,r])}}function j(t){var e,r,n,i=o.counterRegex(\"axis\",\".title\",!1,!1),a=/colorbar\\.title$/,s=Object.keys(t);for(e=0;e<s.length;e++)r=s[e],n=t[r],\"title\"!==r&&!i.test(r)&&!a.test(r)||\"string\"!=typeof n&&\"number\"!=typeof n?r.indexOf(\"titlefont\")>-1&&-1===r.indexOf(\"grouptitlefont\")?l(r,r.replace(\"titlefont\",\"title.font\")):r.indexOf(\"titleposition\")>-1?l(r,r.replace(\"titleposition\",\"title.position\")):r.indexOf(\"titleside\")>-1?l(r,r.replace(\"titleside\",\"title.side\")):r.indexOf(\"titleoffset\")>-1&&l(r,r.replace(\"titleoffset\",\"title.offset\")):l(r,r.replace(\"title\",\"title.text\"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if(\"string\"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn(\"Relayout fail.\",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(A)),s.push(h.rehover,h.redrag,h.reselect),u.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit(\"plotly_relayout\",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if(\"axrange\"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var u in l._matchGroup)if(u!==a){var c=n[p.id2name(u)];c.autorange=l.autorange,c.range=l.range.slice(),c._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||\"\").indexOf(\"inside\")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)e[a]||r.push(a)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,\"redraw\")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,G=/^[xyz]axis[0-9]*\\.autorange$/,Y=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,u=l._guiEditing,h=F(l._preGUI,u),d=Object.keys(e),g=p.list(t),v=o.extendDeepAll({},e),m={};for(j(e),d=Object.keys(e),n=0;n<d.length;n++)if(0===d[n].indexOf(\"allaxes\")){for(i=0;i<g.length;i++){var y=g[i]._id.substr(1),x=-1!==y.indexOf(\"scene\")?y+\".\":\"\",w=d[n].replace(\"allaxes\",x+g[i]._name);e[w]||(e[w]=e[d[n]])}delete e[d[n]]}var M=k.layoutFlags(),A={},S={};function E(t,r){if(Array.isArray(t))t.forEach((function(t){E(t,r)}));else if(!(t in e)&&!_.hasParent(e,t)){var n=h(a,t);t in S||(S[t]=R(n.get())),void 0!==r&&n.set(r)}}var C,L={};function P(t){var e=p.name2id(t.split(\".\")[0]);return L[e]=1,e}for(var O in e){if(_.hasParent(e,O))throw new Error(\"cannot set \"+O+\" and a parent attribute simultaneously\");for(var I=h(a,O),D=e[O],z=I.parts.length-1;z>0&&\"string\"!=typeof I.parts[z];)z--;var N=I.parts[z],B=I.parts[z-1]+\".\"+N,U=I.parts.slice(0,z).join(\".\"),V=s(t.layout,U).get(),H=s(l,U).get(),W=I.get();if(void 0!==D){A[O]=D,S[O]=\"reverse\"===N?D:R(W);var Z=f.getLayoutValObject(l,I.parts);if(Z&&Z.impliedEdits&&null!==D)for(var K in Z.impliedEdits)E(o.relativeAttr(O,K),Z.impliedEdits[K]);if(-1!==[\"width\",\"height\"].indexOf(O))if(D){E(\"autosize\",null);var J=\"height\"===O?\"width\":\"height\";E(J,l[J])}else l[O]=t._initialAutoSize[O];else if(\"autosize\"===O)E(\"width\",D?null:l.width),E(\"height\",D?null:l.height);else if(B.match(q))P(B),s(l,U+\"._inputRange\").set(null);else if(B.match(G)){P(B),s(l,U+\"._inputRange\").set(null);var $=s(l,U).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else B.match(Y)&&s(l,U+\"._inputDomain\").set(null);if(\"type\"===N){C=V;var Q=\"linear\"===H.type&&\"log\"===D,tt=\"log\"===H.type&&\"linear\"===D;if(Q||tt){if(C&&C.range)if(H.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],rt=C.range[1];Q?(et<=0&&rt<=0&&E(U+\".autorange\",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+\".range[0]\",Math.log(et)/Math.LN10),E(U+\".range[1]\",Math.log(rt)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,et)),E(U+\".range[1]\",Math.pow(10,rt)))}else E(U+\".autorange\",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&\"radialaxis\"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],c.getComponentMethod(\"annotations\",\"convertCoords\")(t,H,D,E),c.getComponentMethod(\"images\",\"convertCoords\")(t,H,D,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);s(l,U+\"._inputRange\").set(null)}else if(N.match(T)){var nt=s(l,O).get(),it=(D||{}).type;it&&\"-\"!==it||(it=\"linear\"),c.getComponentMethod(\"annotations\",\"convertCoords\")(t,nt,it,E),c.getComponentMethod(\"images\",\"convertCoords\")(t,nt,it,E)}var at=b.containerArrayMatch(O);if(at){r=at.array,n=at.index;var ot=at.property,st=Z||{editType:\"calc\"};\"\"!==n&&\"\"===ot&&(b.isAddVal(D)?S[O]=null:b.isRemoveVal(D)?S[O]=(s(a,r).get()||[])[n]:o.warn(\"unrecognized full object value\",e)),k.update(M,st),m[r]||(m[r]={});var lt=m[r][n];lt||(lt=m[r][n]={}),lt[ot]=D,delete e[O]}else\"reverse\"===N?(V.range?V.range.reverse():(E(U+\".autorange\",!0),V.range=[1,0]),H.autorange?M.calc=!0:M.plot=!0):(\"dragmode\"===O&&(!1===D&&!1!==W||!1!==D&&!1===W)||l._has(\"scatter-like\")&&l._has(\"regl\")&&\"dragmode\"===O&&(\"lasso\"===D||\"select\"===D)&&\"lasso\"!==W&&\"select\"!==W||l._has(\"gl2d\")?M.plot=!0:Z?k.update(M,Z):M.calc=!0,I.set(D))}}for(r in m)b.applyContainerArrayChanges(t,h(a,r),m[r],M,h)||(M.plot=!0);for(var ut in L){var ct=(C=p.getFromId(t,ut))&&C._constraintGroup;if(ct)for(var ft in M.calc=!0,ct)L[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(X(t)||e.height||e.width)&&(M.plot=!0),(M.plot||M.calc)&&(M.layoutReplot=!0),{flags:M,rangesAltered:L,undoit:S,redoit:A,eventData:v}}function X(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function Z(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=B(t,o.extendFlat({},e),a),l=s.flags,c=W(t,o.extendFlat({},n)),f=c.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,c)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,c.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(A)),p.push(h.rehover,h.redrag,h.reselect),u.add(t,Z,[t,s.undoit,c.undoit,s.traces],Z,[t,s.redoit,c.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit(\"plotly_update\",{data:s.eventData,layout:c.eventData}),t}))}function K(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var J=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],$=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function Q(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t.match(n.pattern);if(i){var a=i[1]||\"\";return{head:a,tail:t.substr(a.length+1),attr:n.attr}}}}function tt(t,e){var r=s(e,t).get();if(void 0!==r)return r;var n=t.split(\".\");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=s(e,n.join(\".\")+\".uirevision\").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r<e.length;r++)if(e[r]._fullInput.uid===t)return r;return-1}function rt(t,e,r){for(var n=0;n<e.length;n++)if(e[n].uid===t)return n;return!e[r]||e[r].uid?-1:r}function nt(t,e){var r=o.isPlainObject(t),n=Array.isArray(t);return r||n?(r&&o.isPlainObject(e)||n&&Array.isArray(e))&&JSON.stringify(t)===JSON.stringify(e):t===e}function it(t,e,r,n){var i,a,l,u=n.getValObject,c=n.flags,f=n.immutable,h=n.inArray,p=n.arrayIndex;function d(){var t=i.editType;h&&-1!==t.indexOf(\"arraydraw\")?o.pushUnique(c.arrays[h],p):(k.update(c,i),\"none\"!==t&&c.nChanges++,n.transition&&i.anim&&c.nChangesAnim++,(q.test(l)||G.test(l))&&(c.rangesAltered[r[0]]=1),Y.test(l)&&s(e,\"_inputDomain\").set(null),\"datarevision\"===a&&(c.newDataRevision=1))}function g(t){return\"data_array\"===t.valType||t.arrayOk}for(a in t){if(c.calc&&!n.transition)return;var v=t[a],m=e[a],y=r.concat(a);if(l=y.join(\".\"),\"_\"!==a.charAt(0)&&\"function\"!=typeof v&&v!==m){if((\"tick0\"===a||\"dtick\"===a)&&\"geo\"!==r[0]){var x=e.tickmode;if(\"auto\"===x||\"array\"===x||!x)continue}if((\"range\"!==a||!e.autorange)&&(\"zmin\"!==a&&\"zmax\"!==a||\"contourcarpet\"!==e.type)&&(i=u(y))&&(!i._compareAsJSON||JSON.stringify(v)!==JSON.stringify(m))){var b,_=i.valType,w=g(i),T=Array.isArray(v),M=Array.isArray(m);if(T&&M){var A=\"_input_\"+a,S=t[A],E=e[A];if(Array.isArray(S)&&S===E)continue}if(void 0===m)w&&T?c.calc=!0:d();else if(i._isLinkedToArray){var C=[],L=!1;h||(c.arrays[a]=C);var P=Math.min(v.length,m.length),O=Math.max(v.length,m.length);if(P!==O){if(\"arraydraw\"!==i.editType){d();continue}L=!0}for(b=0;b<P;b++)it(v[b],m[b],y.concat(b),o.extendFlat({inArray:a,arrayIndex:b},n));if(L)for(b=P;b<O;b++)C.push(b)}else!_&&o.isPlainObject(v)?it(v,m,y,n):w?T&&M?(f&&(c.calc=!0),(f||n.newDataRevision)&&d()):T!==M?c.calc=!0:d():T&&M&&v.length===m.length&&String(v)===String(m)||d()}}}for(a in e)if(!(a in t)&&\"_\"!==a.charAt(0)&&\"function\"!=typeof e[a]){if(g(i=u(r.concat(a)))&&Array.isArray(e[a]))return void(c.calc=!0);d()}}function at(t,e){var r;for(r in t)if(\"_\"!==r.charAt(0)){var n=t[r],i=e[r];if(n!==i)if(o.isPlainObject(n)&&o.isPlainObject(i)){if(at(n,i))return!0}else{if(!Array.isArray(n)||!Array.isArray(i))return!0;if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a]){if(!o.isPlainObject(n[a])||!o.isPlainObject(i[a]))return!0;if(at(n[a],i[a]))return!0}}}}function ot(t){var e=t._fullLayout,r=t.getBoundingClientRect();if(!o.equalDomRects(r,e._lastBBox)){var n=e._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(t));e._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),e._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),e._lastBBox=r}}r.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t+\". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/\");var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=h.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function u(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,c){function f(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,_.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit(\"plotly_animatingframe\",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit(\"plotly_animated\"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit(\"plotly_animating\"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&f()};e()}var d,g,v=0;function m(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var y=[],x=null==e,b=Array.isArray(e);if(x||b||!o.isPlainObject(e)){if(x||-1!==[\"string\",\"number\"].indexOf(typeof e))for(d=0;d<n._frames.length;d++)(g=n._frames[d])&&(x||String(g.group)===String(e))&&y.push({type:\"byname\",name:String(g.name),data:m({name:g.name})});else if(b)for(d=0;d<e.length;d++){var w=e[d];-1!==[\"number\",\"string\"].indexOf(typeof w)?(w=String(w),y.push({type:\"byname\",name:w,data:m({name:w})})):o.isPlainObject(w)&&y.push({type:\"object\",data:m(o.extendFlat({},w))})}}else y.push({type:\"object\",data:m(o.extendFlat({},e))});for(d=0;d<y.length;d++)if(\"byname\"===(g=y[d]).type&&!n._frameHash[g.data.name])return o.warn('animate failure: frame not found: \"'+g.data.name+'\"'),void c();-1!==[\"next\",\"immediate\"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var e=n._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit(\"plotly_animationinterrupted\",[])}}(),\"reverse\"===r.direction&&y.reverse();var k=t._fullLayout._currentFrame;if(k&&r.fromcurrent){var T=-1;for(d=0;d<y.length;d++)if(\"byname\"===(g=y[d]).type&&g.name===k){T=d;break}if(T>0&&T<y.length-1){var M=[];for(d=0;d<y.length;d++)g=y[d],(\"byname\"!==y[d].type||d>T)&&M.push(g);y=M}}y.length>0?function(e){if(0!==e.length){for(var i=0;i<e.length;i++){var o;o=\"byname\"===e[i].type?h.computeFrame(t,e[i].name):e[i].data;var f=l(i),d=s(i);d.duration=Math.min(d.duration,f.duration);var g={frame:o,name:e[i].name,frameOpts:f,transitionOpts:d};i===e.length-1&&(g.onComplete=u(a,2),g.onInterrupt=c),n._frameQueue.push(g)}\"immediate\"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||p()}}(y):(t.emit(\"plotly_animated\"),a())}))},r.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t+\". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/\");var n,i,a,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error(\"addFrames failure: frameList must be an Array of frame definitions\"+e);var f=l.length+2*e.length,p=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,v=(c[g]||d[g]||{}).name,m=e[n].name,y=c[v]||d[v];v&&m&&\"number\"==typeof m&&y&&M<5&&(M++,o.warn('addFrames: overwriting frame \"'+(c[v]||d[v]).name+'\" with a frame whose name of type \"number\" also equates to \"'+v+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===M&&o.warn(\"addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.\")),d[g]={name:g},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index<e.index?1:0}));var x=[],b=[],_=l.length;for(n=p.length-1;n>=0;n--){if(\"number\"==typeof(i=p[n].frame).name&&o.warn(\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\"),!i.name)for(;c[i.name=\"frame \"+t._transitionData._counter++];);if(c[i.name]){for(a=0;a<l.length&&(l[a]||{}).name!==i.name;a++);x.push({type:\"replace\",index:a,value:i}),b.unshift({type:\"replace\",index:a,value:l[a]})}else s=Math.max(0,Math.min(p[n].index,_)),x.push({type:\"insert\",index:s,value:i}),b.unshift({type:\"delete\",index:s}),_++}var w=h.modifyFrames,k=h.modifyFrames,T=[t,b],A=[t,x];return u&&u.add(t,w,T,k,A),h.modifyFrames(t,x)},r.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice()).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:\"delete\",index:n}),s.unshift({type:\"insert\",index:n,value:i[n]});var l=h.modifyFrames,c=h.modifyFrames,f=[t,s],p=[t,a];return u&&u.add(t,l,f,c,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],c=r.deleteTraces,f=t,h=[e,l],p=[e,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array.\");if(void 0===e)throw new Error(\"traces must be defined.\");for(Array.isArray(e)||(e=[e]),n=0;n<e.length;n++)if(\"object\"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error(\"all values in traces array must be non-array objects\");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==e.length)throw new Error(\"if indices is specified, traces.length must equal indices.length\")}(e,n,i),Array.isArray(n)||(n=[n]),n=n.map((function(t){return o.extendFlat({},t)})),_.cleanData(n),a=0;a<n.length;a++)e.data.push(n[a]);for(a=0;a<n.length;a++)l.push(-n.length+a);if(void 0===i)return s=r.redraw(e),u.add(e,c,h,f,p),s;Array.isArray(i)||(i=[i]);try{O(e,l,i)}catch(t){throw e.data.splice(e.data.length-n.length,n.length),t}return u.startSequence(e),u.add(e,c,h,f,p),s=r.moveTraces(e,l,i),u.stopSequence(e),s},r.deleteTraces=function t(e,n){e=o.getGraphDiv(e);var i,a,s=[],l=r.addTraces,c=t,f=[e,s,n],h=[e,n];if(void 0===n)throw new Error(\"indices must be an integer or array of integers.\");for(Array.isArray(n)||(n=[n]),P(e,n,\"indices\"),(n=L(n,e.data.length-1)).sort(o.sorterDes),i=0;i<n.length;i+=1)a=e.data.splice(n[i],1)[0],s.push(a);var p=r.redraw(e);return u.add(e,l,f,c,h),p},r.extendTraces=function t(e,n,i,a){function s(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=D(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var u=r-e.length,c=t.length-u;n.set(t.subarray(c)),n.set(e,u),i.set(t.subarray(0,c))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]}var l=I(e=o.getGraphDiv(e),n,i,a,s),c=r.redraw(e),f=[e,l.update,i,l.maxPoints];return u.add(e,r.prependTraces,f,t,arguments),c},r.moveTraces=function t(e,n,i){var a,s=[],l=[],c=t,f=t,h=[e=o.getGraphDiv(e),i,n],p=[e,n,i];if(O(e,n,i),n=Array.isArray(n)?n:[n],void 0===i)for(i=[],a=0;a<n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=L(n,e.data.length-1),i=L(i,e.data.length-1),a=0;a<e.data.length;a++)-1===n.indexOf(a)&&s.push(e.data[a]);for(a=0;a<n.length;a++)l.push({newIndex:i[a],trace:e.data[n[a]]});for(l.sort((function(t,e){return t.newIndex-e.newIndex})),a=0;a<l.length;a+=1)s.splice(l[a].newIndex,0,l[a].trace);e.data=s;var d=r.redraw(e);return u.add(e,c,h,f,p),d},r.prependTraces=function t(e,n,i,a){function s(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=D(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var u=r-e.length;n.set(e),n.set(t.subarray(0,u),e.length),i.set(t.subarray(u))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]}var l=I(e=o.getGraphDiv(e),n,i,a,s),c=r.redraw(e),f=[e,l.update,i,l.maxPoints];return u.add(e,r.extendTraces,f,t,arguments),c},r.newPlot=function(t,e,n,i){return t=o.getGraphDiv(t),h.cleanPlot([],{},t._fullData||[],t._fullLayout||{}),h.purge(t),r._doPlot(t,e,n,i)},r._doPlot=function(t,e,i,a){var s;if(t=o.getGraphDiv(t),l.init(t),o.isPlainObject(e)){var u=e;e=u.data,i=u.layout,a=u.config,s=u.frames}if(!1===l.triggerHandler(t,\"plotly_beforeplot\",[e,i,a]))return Promise.reject();e||i||o.isPlotDiv(t)||o.warn(\"Calling _doPlot as if redrawing but this container doesn't yet have a plot.\",t),C(t,a),i||(i={}),n.select(t).classed(\"js-plotly-plot\",!0),d.makeTester(),Array.isArray(t._promises)||(t._promises=[]);var f=0===(t.data||[]).length&&Array.isArray(e);Array.isArray(e)&&(_.cleanData(e),f?t.data=e:t.data.push.apply(t.data,e),t.empty=!1),t.layout&&!f||(t.layout=_.cleanLayout(i)),h.supplyDefaults(t);var g=t._fullLayout,y=g._has(\"cartesian\");g._replotting=!0,(f||g._shouldCreateBgLayer)&&(function(t){var e=n.select(t),r=t._fullLayout;if(r._calcInverseTransform=ot,r._calcInverseTransform(t),r._container=e.selectAll(\".plot-container\").data([0]),r._container.enter().insert(\"div\",\":first-child\").classed(\"plot-container\",!0).classed(\"plotly\",!0),r._paperdiv=r._container.selectAll(\".svg-container\").data([0]),r._paperdiv.enter().append(\"div\").classed(\"user-select-none\",!0).classed(\"svg-container\",!0).style(\"position\",\"relative\"),r._glcontainer=r._paperdiv.selectAll(\".gl-container\").data([{}]),r._glcontainer.enter().append(\"div\").classed(\"gl-container\",!0),r._paperdiv.selectAll(\".main-svg\").remove(),r._paperdiv.select(\".modebar-container\").remove(),r._paper=r._paperdiv.insert(\"svg\",\":first-child\").classed(\"main-svg\",!0),r._toppaper=r._paperdiv.append(\"svg\").classed(\"main-svg\",!0),r._modebardiv=r._paperdiv.append(\"div\"),delete r._modeBar,r._hoverpaper=r._paperdiv.append(\"svg\").classed(\"main-svg\",!0),!r._uid){var i={};n.selectAll(\"defs\").each((function(){this.id&&(i[this.id.split(\"-\")[1]]=1)})),r._uid=o.randstr(i)}r._paperdiv.selectAll(\".main-svg\").attr(m.svgAttrs),r._defs=r._paper.append(\"defs\").attr(\"id\",\"defs-\"+r._uid),r._clips=r._defs.append(\"g\").classed(\"clips\",!0),r._topdefs=r._toppaper.append(\"defs\").attr(\"id\",\"topdefs-\"+r._uid),r._topclips=r._topdefs.append(\"g\").classed(\"clips\",!0),r._bgLayer=r._paper.append(\"g\").classed(\"bglayer\",!0),r._draggers=r._paper.append(\"g\").classed(\"draglayer\",!0);var a=r._paper.append(\"g\").classed(\"layer-below\",!0);r._imageLowerLayer=a.append(\"g\").classed(\"imagelayer\",!0),r._shapeLowerLayer=a.append(\"g\").classed(\"shapelayer\",!0),r._cartesianlayer=r._paper.append(\"g\").classed(\"cartesianlayer\",!0),r._polarlayer=r._paper.append(\"g\").classed(\"polarlayer\",!0),r._smithlayer=r._paper.append(\"g\").classed(\"smithlayer\",!0),r._ternarylayer=r._paper.append(\"g\").classed(\"ternarylayer\",!0),r._geolayer=r._paper.append(\"g\").classed(\"geolayer\",!0),r._funnelarealayer=r._paper.append(\"g\").classed(\"funnelarealayer\",!0),r._pielayer=r._paper.append(\"g\").classed(\"pielayer\",!0),r._iciclelayer=r._paper.append(\"g\").classed(\"iciclelayer\",!0),r._treemaplayer=r._paper.append(\"g\").classed(\"treemaplayer\",!0),r._sunburstlayer=r._paper.append(\"g\").classed(\"sunburstlayer\",!0),r._indicatorlayer=r._toppaper.append(\"g\").classed(\"indicatorlayer\",!0),r._glimages=r._paper.append(\"g\").classed(\"glimages\",!0);var s=r._toppaper.append(\"g\").classed(\"layer-above\",!0);r._imageUpperLayer=s.append(\"g\").classed(\"imagelayer\",!0),r._shapeUpperLayer=s.append(\"g\").classed(\"shapelayer\",!0),r._selectionLayer=r._toppaper.append(\"g\").classed(\"selectionlayer\",!0),r._infolayer=r._toppaper.append(\"g\").classed(\"infolayer\",!0),r._menulayer=r._toppaper.append(\"g\").classed(\"menulayer\",!0),r._zoomlayer=r._toppaper.append(\"g\").classed(\"zoomlayer\",!0),r._hoverlayer=r._hoverpaper.append(\"g\").classed(\"hoverlayer\",!0),r._modebardiv.classed(\"modebar-container\",!0).style(\"position\",\"absolute\").style(\"top\",\"0px\").style(\"right\",\"0px\"),t.emit(\"plotly_framework\")}(t),g._shouldCreateBgLayer&&delete g._shouldCreateBgLayer),d.initGradients(t),d.initPatterns(t),f&&p.saveShowSpikeInitial(t);var x=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;x&&h.doCalcdata(t);for(var b=0;b<t.calcdata.length;b++)t.calcdata[b][0].trace=t._fullData[b];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){o.isHidden(t)||h.resize(t)},window.addEventListener(\"resize\",t._responsiveChartHandler)):o.clearResponsive(t);var k=o.extendFlat({},g._size),T=0;function M(){if(h.clearAutoMarginIds(t),w.drawMarginPushers(t),p.allowAutoMargin(t),g._has(\"pie\"))for(var e=t._fullData,r=0;r<e.length;r++){var n=e[r];\"pie\"===n.type&&n.automargin&&h.allowAutoMargin(t,\"pie.\"+n.uid+\".automargin\")}return h.doAutoMargin(t),h.previousPromises(t)}function S(){t._transitioning||(w.doAutoRangeAndConstraints(t),f&&p.saveRangeInitial(t),c.getComponentMethod(\"rangeslider\",\"calcAutorange\")(t))}var E=[h.previousPromises,function(){if(s)return r.addFrames(t,s)},function e(){for(var r=g._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);!g._glcanvas&&g._has(\"gl\")&&(g._glcanvas=g._glcontainer.selectAll(\".gl-canvas\").data([{key:\"contextLayer\",context:!0,pick:!1},{key:\"focusLayer\",context:!1,pick:!1},{key:\"pickLayer\",context:!1,pick:!0}],(function(t){return t.key})),g._glcanvas.enter().append(\"canvas\").attr(\"class\",(function(t){return\"gl-canvas gl-canvas-\"+t.key.replace(\"Layer\",\"\")})).style({position:\"absolute\",top:0,left:0,overflow:\"visible\",\"pointer-events\":\"none\"}));var i=t._context.plotGlPixelRatio;if(g._glcanvas){g._glcanvas.attr(\"width\",g.width*i).attr(\"height\",g.height*i).style(\"width\",g.width+\"px\").style(\"height\",g.height+\"px\");var a=g._glcanvas.data()[0].regl;if(a&&(Math.floor(g.width*i)!==a._gl.drawingBufferWidth||Math.floor(g.height*i)!==a._gl.drawingBufferHeight)){var s=\"WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.\";if(!T)return o.log(s+\" Clearing graph and plotting again.\"),h.cleanPlot([],{},t._fullData,g),h.supplyDefaults(t),g=t._fullLayout,h.doCalcdata(t),T++,e();o.error(s)}}return\"h\"===g.modebar.orientation?g._modebardiv.style(\"height\",null).style(\"width\",\"100%\"):g._modebardiv.style(\"width\",null).style(\"height\",g.height+\"px\"),h.previousPromises(t)},M,function(){if(h.didMarginChange(k,g._size))return o.syncOrAsync([M,w.layoutStyles],t)}];y&&E.push((function(){if(x)return o.syncOrAsync([c.getComponentMethod(\"shapes\",\"calcAutorange\"),c.getComponentMethod(\"annotations\",\"calcAutorange\"),S],t);S()})),E.push(w.layoutStyles),y&&E.push((function(){return p.draw(t,f?\"\":\"redraw\")}),(function(t){t._fullLayout._insideTickLabelsAutorange&&U(t,t._fullLayout._insideTickLabelsAutorange).then((function(){t._fullLayout._insideTickLabelsAutorange=void 0}))})),E.push(w.drawData,w.finalDraw,v,h.addLinks,h.rehover,h.redrag,h.reselect,h.doAutoMargin,(function(t){t._fullLayout._insideTickLabelsAutorange&&f&&p.saveRangeInitial(t,!0)}),h.previousPromises);var L=o.syncOrAsync(E,t);return L&&L.then||(L=Promise.resolve()),L.then((function(){return A(t),t}))},r.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return h.cleanPlot([],{},r,e),h.purge(t),l.purge(t),e._container&&e._container.remove(),delete t._context,t},r.react=function(t,e,n,i){var a,l;t=o.getGraphDiv(t),_.clearPromiseQueue(t);var u=t._fullData,p=t._fullLayout;if(o.isPlotDiv(t)&&u&&p){if(o.isPlainObject(e)){var d=e;e=d.data,n=d.layout,i=d.config,a=d.frames}var g=!1;if(i){var v=o.extendDeep({},t._context);t._context=void 0,C(t,i),g=at(v,t._context)}t.data=e||[],_.cleanData(t.data),t.layout=n||{},_.cleanLayout(t.layout),function(t,e,r,n){var i,a,l,u,c,f,h,p,d,g,v=n._preGUI,m=[],y={},x={};for(i in v){if(c=Q(i,J)){if(d=c.head,g=c.tail,a=c.attr||d+\".uirevision\",(u=(l=s(n,a).get())&&tt(a,e))&&u===l){if(null===(f=v[i])&&(f=void 0),nt(p=(h=s(e,i)).get(),f)){void 0===p&&\"autorange\"===g&&m.push(d),h.set(R(s(n,i).get()));continue}if(\"autorange\"===g||\"range[\"===g.substr(0,6)){var b=v[d+\".range[0]\"],_=v[d+\".range[1]\"],w=v[d+\".autorange\"];if(w||null===w&&null===b&&null===_){if(!(d in y)){var k=s(e,d).get();y[d]=k&&(k.autorange||!1!==k.autorange&&(!k.range||2!==k.range.length))}if(y[d]){h.set(R(s(n,i).get()));continue}}}}}else o.warn(\"unrecognized GUI edit: \"+i);delete v[i],c&&\"range[\"===c.tail.substr(0,6)&&(x[c.head]=1)}for(var T=0;T<m.length;T++){var M=m[T];if(x[M]){var A=s(e,M).get();A&&delete A.autorange}}var S=n._tracePreGUI;for(var E in S){var C,L=S[E],P=null;for(i in L){if(!P){var O=et(E,r);if(O<0){delete S[E];break}var I=rt(E,t,(C=r[O]._fullInput).index);if(I<0){delete S[E];break}P=t[I]}if(c=Q(i,$)){if(c.attr?u=(l=s(n,c.attr).get())&&tt(c.attr,e):(l=C.uirevision,void 0===(u=P.uirevision)&&(u=e.uirevision)),u&&u===l&&(null===(f=L[i])&&(f=void 0),nt(p=(h=s(P,i)).get(),f))){h.set(R(s(C,i).get()));continue}}else o.warn(\"unrecognized GUI edit: \"+i+\" in trace uid \"+E);delete L[i]}}}(t.data,t.layout,u,p),h.supplyDefaults(t,{skipUpdateCalc:!0});var m=t._fullData,y=t._fullLayout,x=void 0===y.datarevision,b=y.transition,T=function(t,e,r,n,i){var a=k.layoutFlags();function o(t){return f.getLayoutValObject(r,t)}return a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0,it(e,r,[],{getValObject:o,flags:a,immutable:n,transition:i,gd:t}),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?\"all\":\"some\"),a}(t,p,y,x,b),M=T.newDataRevision,S=function(t,e,r,n,i,a){var o=e.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s,l,u=k.traceFlags();function c(t){var e=f.getTraceValObject(l,t);return!l._module.animatable&&e.anim&&(e.anim=!1),e}u.arrays={},u.nChanges=0,u.nChangesAnim=0;var p={getValObject:c,flags:u,immutable:n,transition:i,newDataRevision:a,gd:t},d={};for(s=0;s<e.length;s++)if(r[s]){if(l=r[s]._fullInput,h.hasMakesDataTransform(l)&&(l=r[s]),d[l.uid])continue;d[l.uid]=1,it(e[s]._fullInput,l,[],p)}return(u.calc||u.plot)&&(u.fullReplot=!0),i&&u.nChanges&&u.nChangesAnim&&(u.anim=u.nChanges===u.nChangesAnim&&o?\"all\":\"some\"),u}(t,u,m,x,b,M);if(X(t)&&(T.layoutReplot=!0),S.calc||T.calc){t.calcdata=void 0;for(var E=Object.getOwnPropertyNames(y),L=0;L<E.length;L++){var P=E[L],O=P.substring(0,5);if(\"xaxis\"===O||\"yaxis\"===O){var I=y[P]._emptyCategories;I&&I()}}}else h.supplyDefaultsUpdateCalc(t.calcdata,m);var D=[];if(a&&(t._transitionData={},h.createTransitionData(t),D.push((function(){return r.addFrames(t,a)}))),y.transition&&!g&&(S.anim||T.anim))T.ticks&&D.push(w.doTicksRelayout),h.doCalcdata(t),w.doAutoRangeAndConstraints(t),D.push((function(){return h.transitionFromReact(t,S,T,p)}));else if(S.fullReplot||T.layoutReplot||g)t._fullLayout._skipDefaults=!0,D.push(r._doPlot);else{for(var z in T.arrays){var F=T.arrays[z];if(F.length){var N=c.getComponentMethod(z,\"drawOne\");if(N!==o.noop)for(var B=0;B<F.length;B++)N(t,F[B]);else{var j=c.getComponentMethod(z,\"draw\");if(j===o.noop)throw new Error(\"cannot draw components: \"+z);j(t)}}}D.push(h.previousPromises),S.style&&D.push(w.doTraceStyle),(S.colorbars||T.colorbars)&&D.push(w.doColorBars),T.legend&&D.push(w.doLegend),T.layoutstyle&&D.push(w.layoutStyles),T.axrange&&H(D),T.ticks&&D.push(w.doTicksRelayout),T.modebar&&D.push(w.doModeBar),T.camera&&D.push(w.doCamera),D.push(A)}D.push(h.rehover,h.redrag,h.reselect),(l=o.syncOrAsync(D,t))&&l.then||(l=Promise.resolve(t))}else l=r.newPlot(t,e,n,i);return l.then((function(){return t.emit(\"plotly_react\",{data:e,layout:n}),t}))},r.redraw=function(t){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t);return _.cleanData(t.data),_.cleanLayout(t.layout),t.calcdata=void 0,r._doPlot(t).then((function(){return t.emit(\"plotly_redraw\"),t}))},r.relayout=U,r.restyle=z,r.setPlotConfig=function(t){return o.extendFlat(x,t)},r.update=Z,r._guiRelayout=K(U),r._guiRestyle=K(z),r._guiUpdate=K(Z),r._storeDirectGUIEdit=function(t,e,r){for(var n in r)N(n,s(t,n).get(),r[n],e)}},{\"../components/color\":367,\"../components/drawing\":389,\"../components/selections\":455,\"../constants/xmlns_namespaces\":492,\"../lib\":515,\"../lib/events\":504,\"../lib/queue\":531,\"../plots/cartesian/axes\":566,\"../plots/cartesian/constants\":573,\"../plots/cartesian/graph_interact\":576,\"../plots/plots\":628,\"../registry\":647,\"./edit_types\":548,\"./helpers\":549,\"./manage_arrays\":551,\"./plot_config\":553,\"./plot_schema\":554,\"./subroutines\":556,\"@plotly/d3\":58,\"fast-isnumeric\":190,\"has-hover\":228}],553:[function(t,e,r){\"use strict\";var n={staticPlot:{valType:\"boolean\",dflt:!1},typesetMath:{valType:\"boolean\",dflt:!0},plotlyServerURL:{valType:\"string\",dflt:\"\"},editable:{valType:\"boolean\",dflt:!1},edits:{annotationPosition:{valType:\"boolean\",dflt:!1},annotationTail:{valType:\"boolean\",dflt:!1},annotationText:{valType:\"boolean\",dflt:!1},axisTitleText:{valType:\"boolean\",dflt:!1},colorbarPosition:{valType:\"boolean\",dflt:!1},colorbarTitleText:{valType:\"boolean\",dflt:!1},legendPosition:{valType:\"boolean\",dflt:!1},legendText:{valType:\"boolean\",dflt:!1},shapePosition:{valType:\"boolean\",dflt:!1},titleText:{valType:\"boolean\",dflt:!1}},editSelection:{valType:\"boolean\",dflt:!0},autosizable:{valType:\"boolean\",dflt:!1},responsive:{valType:\"boolean\",dflt:!1},fillFrame:{valType:\"boolean\",dflt:!1},frameMargins:{valType:\"number\",dflt:0,min:0,max:.5},scrollZoom:{valType:\"flaglist\",flags:[\"cartesian\",\"gl3d\",\"geo\",\"mapbox\"],extras:[!0,!1],dflt:\"gl3d+geo+mapbox\"},doubleClick:{valType:\"enumerated\",values:[!1,\"reset\",\"autosize\",\"reset+autosize\"],dflt:\"reset+autosize\"},doubleClickDelay:{valType:\"number\",dflt:300,min:0},showAxisDragHandles:{valType:\"boolean\",dflt:!0},showAxisRangeEntryBoxes:{valType:\"boolean\",dflt:!0},showTips:{valType:\"boolean\",dflt:!0},showLink:{valType:\"boolean\",dflt:!1},linkText:{valType:\"string\",dflt:\"Edit chart\",noBlank:!0},sendData:{valType:\"boolean\",dflt:!0},showSources:{valType:\"any\",dflt:!1},displayModeBar:{valType:\"enumerated\",values:[\"hover\",!0,!1],dflt:\"hover\"},showSendToCloud:{valType:\"boolean\",dflt:!1},showEditInChartStudio:{valType:\"boolean\",dflt:!1},modeBarButtonsToRemove:{valType:\"any\",dflt:[]},modeBarButtonsToAdd:{valType:\"any\",dflt:[]},modeBarButtons:{valType:\"any\",dflt:!1},toImageButtonOptions:{valType:\"any\",dflt:{}},displaylogo:{valType:\"boolean\",dflt:!0},watermark:{valType:\"boolean\",dflt:!1},plotGlPixelRatio:{valType:\"number\",dflt:2,min:1,max:4},setBackground:{valType:\"any\",dflt:\"transparent\"},topojsonURL:{valType:\"string\",noBlank:!0,dflt:\"https://cdn.plot.ly/\"},mapboxAccessToken:{valType:\"string\",dflt:null},logging:{valType:\"integer\",min:0,max:2,dflt:1},notifyOnLogging:{valType:\"integer\",min:0,max:2,dflt:0},queueLength:{valType:\"integer\",min:0,dflt:0},globalTransforms:{valType:\"any\",dflt:[]},locale:{valType:\"string\",dflt:\"en-US\"},locales:{valType:\"any\",dflt:{}}},i={};(function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}})(n,i),e.exports={configAttributes:n,dfltConfig:i}},{}],554:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"../lib\"),a=t(\"../plots/attributes\"),o=t(\"../plots/layout_attributes\"),s=t(\"../plots/frame_attributes\"),l=t(\"../plots/animation_attributes\"),u=t(\"./plot_config\").configAttributes,c=t(\"./edit_types\"),f=i.extendDeepAll,h=i.isPlainObject,p=i.isArrayOrTypedArray,d=i.nestedProperty,g=i.valObjectMeta,v=\"_isSubplotObj\",m=\"_isLinkedToArray\",y=\"_deprecated\",x=[v,m,\"_arrayAttrRegexps\",y];function b(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(_(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!h(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!_(e[++r]))return!1}else if(\"info_array\"===t.valType){var i=e[++r];if(!_(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)T(r,e,e.attr[i]);else T(r,e,\"subplot\"===e.attr?e.name:e.attr);for(t in n.componentsRegistry){var a=(e=n.componentsRegistry[t]).schema;if(a&&(a.subplots||a.layout)){var s=a.subplots;if(s&&s.xaxis&&!s.yaxis)for(var l in s.xaxis)delete r.yaxis[l]}else\"colorscale\"===e.name?f(r,e.layoutAttributes):e.layoutAttributes&&M(r,e.layoutAttributes,e.name)}return{layoutAttributes:k(r)}}function k(t){return function(t){function e(t){return{valType:\"string\",editType:\"none\"}}function n(t,n,i){r.isValObject(t)?!0!==t.arrayOk&&\"data_array\"!==t.valType||(i[n+\"src\"]=e(n)):h(t)&&(t.role=\"object\")}r.crawl(t,n)}(t),function(t){function e(t,e,r){if(t){var n=t._isLinkedToArray;n&&(delete t._isLinkedToArray,r[e]={items:{}},r[e].items[n]=t,r[e].role=\"object\")}}r.crawl(t,e)}(t),function(t){function e(t){for(var r in t)if(h(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var n=0;n<t[r].length;n++)e(t[r][n]);else t[r]instanceof RegExp&&(t[r]=t[r].toString())}e(t)}(t),t}function T(t,e,r){var n=d(t,r),i=f({},e.layoutAttributes);i._isSubplotObj=!0,n.set(i)}function M(t,e,r){var n=d(t,r);n.set(f(n.get()||{},e))}r.IS_SUBPLOT_OBJ=v,r.IS_LINKED_TO_ARRAY=m,r.DEPRECATED=y,r.UNDERSCORE_ATTRS=x,r.get=function(){var t={};n.allTypes.forEach((function(e){t[e]=function(t){var e,i;i=(e=n.modules[t]._module).basePlotModule;var o={type:null},s=f({},a),l=f({},e.attributes);r.crawl(l,(function(t,e,r,n,i){d(s,i).set(void 0),void 0===t&&d(l,i).set(void 0)})),f(o,s),n.traceIs(t,\"noOpacity\")&&delete o.opacity,n.traceIs(t,\"showLegend\")||(delete o.showlegend,delete o.legendgroup),n.traceIs(t,\"noHover\")&&(delete o.hoverinfo,delete o.hoverlabel),e.selectPoints||delete o.selectedpoints,f(o,l),i.attributes&&f(o,i.attributes),o.type=t;var u={meta:e.meta||{},categories:e.categories||{},animatable:Boolean(e.animatable),type:t,attributes:k(o)};if(e.layoutAttributes){var c={};f(c,e.layoutAttributes),u.layoutAttributes=k(c)}return e.animatable||r.crawl(u,(function(t){r.isValObject(t)&&\"anim\"in t&&delete t.anim})),u}(e)}));var e,i={};return Object.keys(n.transformsRegistry).forEach((function(t){i[t]=function(t){var e=n.transformsRegistry[t],r=f({},e.attributes);return Object.keys(n.componentsRegistry).forEach((function(e){var i=n.componentsRegistry[e];i.schema&&i.schema.transforms&&i.schema.transforms[t]&&Object.keys(i.schema.transforms[t]).forEach((function(e){M(r,i.schema.transforms[t][e],e)}))})),{attributes:k(r)}}(t)})),{defs:{valObjects:g,metaKeys:x.concat([\"description\",\"role\",\"editType\",\"impliedEdits\"]),editType:{traces:c.traces,layout:c.layout},impliedEdits:{}},traces:t,layout:w(),transforms:i,frames:(e={frames:f({},s)},k(e),e.frames),animation:k(l),config:k(u)}},r.crawl=function(t,e,n,i){var a=n||0;i=i||\"\",Object.keys(t).forEach((function(n){var o=t[n];if(-1===x.indexOf(n)){var s=(i?i+\".\":\"\")+n;e(o,n,t,a,s),r.isValObject(o)||h(o)&&\"impliedEdits\"!==n&&r.crawl(o,e,a+1,s)}}))},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){var e,n,i=[],o=[],s=[];function l(t,r,n,i){o=o.slice(0,i).concat([r]),s=s.slice(0,i).concat([t&&t._isLinkedToArray]),t&&(\"data_array\"===t.valType||!0===t.arrayOk)&&(\"colorbar\"!==o[i-1]||\"ticktext\"!==r&&\"tickvals\"!==r)&&u(e,0,\"\")}function u(t,e,r){var a=t[o[e]],l=r+o[e];if(e===o.length-1)p(a)&&i.push(n+l);else if(s[e]){if(Array.isArray(a))for(var c=0;c<a.length;c++)h(a[c])&&u(a[c],e+1,l+\"[\"+c+\"].\")}else h(a)&&u(a,e+1,l+\".\")}e=t,n=\"\",r.crawl(a,l),t._module&&t._module.attributes&&r.crawl(t._module.attributes,l);var c=t.transforms;if(c)for(var f=0;f<c.length;f++){var d=c[f],g=d._module;g&&(n=\"transforms[\"+f+\"].\",e=d,r.crawl(g.attributes,l))}return i},r.getTraceValObject=function(t,e){var r,i,o=e[0],s=1;if(\"transforms\"===o){if(1===e.length)return a.transforms;var l=t.transforms;if(!Array.isArray(l)||!l.length)return!1;var u=e[1];if(!_(u)||u>=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[e[2]],s=3}else{var c=t._module;if(c||(c=(n.modules[t.type||a.type.dflt]||{})._module),!c)return!1;if(!(i=(r=c.attributes)&&r[o])){var f=c.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return b(i,e,s)},r.getLayoutValObject=function(t,e){return b(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var u;for(r=0;r<l.length;r++){if((a=l[r]).attrRegex&&a.attrRegex.test(e)){if(a.layoutAttrOverrides)return a.layoutAttrOverrides;!u&&a.layoutAttributes&&(u=a.layoutAttributes)}var c=a.baseLayoutAttrOverrides;if(c&&e in c)return c[e]}if(u)return u}var f=t._modules;if(f)for(r=0;r<f.length;r++)if((s=f[r].layoutAttributes)&&e in s)return s[e];for(i in n.componentsRegistry){if(\"colorscale\"===(a=n.componentsRegistry[i]).name&&0===e.indexOf(\"coloraxis\"))return a.layoutAttributes[e];if(!a.schema&&e===a.name)return a.layoutAttributes}return e in o&&o[e]}(t,e[0]),e,1)}},{\"../lib\":515,\"../plots/animation_attributes\":560,\"../plots/attributes\":562,\"../plots/frame_attributes\":595,\"../plots/layout_attributes\":619,\"../registry\":647,\"./edit_types\":548,\"./plot_config\":553}],555:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/attributes\"),a={name:{valType:\"string\",editType:\"none\"}};function o(t){return t&&\"string\"==typeof t}function s(t){var e=t.length-1;return\"s\"!==t.charAt(e)&&n.warn(\"bad argument to arrayDefaultKey: \"+t),t.substr(0,t.length-1)+\"defaults\"}a.templateitemname={valType:\"string\",editType:\"calc\"},r.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=a.name,e.templateitemname=a.templateitemname,e},r.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,\"type\"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},r.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},r.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[s(e)],a=n&&n[e];Array.isArray(a)&&a.length||(a=[]);var l={};return{newItem:function(t){var e={name:t.name,_input:t},n=e.templateitemname=t.templateitemname;if(!o(n))return e._template=i,e;for(var s=0;s<a.length;s++){var u=a[s];if(u.name===n)return l[n]=1,e._template=u,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<a.length;e++){var r=a[e],n=r.name;if(o(n)&&!l[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i.templateitemname=r.templateitemname,t.push(i),l[n]=1}}return t}}},r.arrayDefaultKey=s,r.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,a=r._index,o=a>=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+\"[\"+a+\"]\";function u(){s={},o&&(s[l]={},s[l].templateitemname=o)}function c(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+\".\"+t]=e}function f(){var t=s;return u(),t}return u(),{modifyBase:function(t,e){s[t]=e},modifyItem:c,getUpdateObj:f,applyUpdate:function(e,r){e&&c(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{\"../lib\":515,\"../plots/attributes\":562}],556:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../registry\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../lib/clear_gl_canvases\"),l=t(\"../components/color\"),u=t(\"../components/drawing\"),c=t(\"../components/titles\"),f=t(\"../components/modebar\"),h=t(\"../plots/cartesian/axes\"),p=t(\"../constants/alignment\"),d=t(\"../plots/cartesian/constraints\"),g=d.enforce,v=d.clean,m=t(\"../plots/cartesian/autorange\").doAutoRange,y=\"start\";function x(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&a[0]<e[1]&&a[1]>e[0])return!0}return!1}function b(t){var e,i,s,c,d,g,v=t._fullLayout,m=v._size,y=m.p,b=h.list(t,\"\",!0);if(v._paperdiv.style({width:t._context.responsive&&v.autosize&&!t._context._hasZeroWidth&&!t.layout.width?\"100%\":v.width+\"px\",height:t._context.responsive&&v.autosize&&!t._context._hasZeroHeight&&!t.layout.height?\"100%\":v.height+\"px\"}).selectAll(\".main-svg\").call(u.setSize,v.width,v.height),t._context.setBackground(t,v.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!v._has(\"cartesian\"))return a.previousPromises(t);function w(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-y-n:e._offset+e._length+y+n:m.t+m.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+y+n:e._offset-y-n:m.l+m.w*(t.position||0)+n%1}for(e=0;e<b.length;e++){var T=(c=b[e])._anchorAxis;c._linepositions={},c._lw=u.crispRound(t,c.linewidth,1),c._mainLinePosition=w(c,T,c.side),c._mainMirrorPosition=c.mirror&&T?w(c,T,p.OPPOSITE_SIDE[c.side]):null}var M=[],A=[],S=[],E=1===l.opacity(v.paper_bgcolor)&&1===l.opacity(v.plot_bgcolor)&&v.paper_bgcolor===v.plot_bgcolor;for(i in v._plots)if((s=v._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var C=s.xaxis.domain,L=s.yaxis.domain,P=s.plotgroup;if(x(C,L,S)){var O=P.node(),I=s.bg=o.ensureSingle(P,\"rect\",\"bg\");O.insertBefore(I.node(),O.childNodes[0]),A.push(i)}else P.select(\"rect.bg\").remove(),S.push([C,L]),E||(M.push(i),A.push(i))}var D,z,R,F,N,B,j,U,V,H,q,G,Y,W=v._bgLayer.selectAll(\".bg\").data(M);for(W.enter().append(\"rect\").classed(\"bg\",!0),W.exit().remove(),W.each((function(t){v._plots[t].bg=n.select(this)})),e=0;e<A.length;e++)s=v._plots[A[e]],d=s.xaxis,g=s.yaxis,s.bg&&void 0!==d._offset&&void 0!==g._offset&&s.bg.call(u.setRect,d._offset-y,g._offset-y,d._length+2*y,g._length+2*y).call(l.fill,v.plot_bgcolor).style(\"stroke-width\",0);if(!v._hasOnlyLargeSploms)for(i in v._plots){s=v._plots[i],d=s.xaxis,g=s.yaxis;var X,Z,K=s.clipId=\"clip\"+v._uid+i+\"plot\",J=o.ensureSingleById(v._clips,\"clipPath\",K,(function(t){t.classed(\"plotclip\",!0).append(\"rect\")}));s.clipRect=J.select(\"rect\").attr({width:d._length,height:g._length}),u.setTranslate(s.plot,d._offset,g._offset),s._hasClipOnAxisFalse?(X=null,Z=K):(X=K,Z=null),u.setClipUrl(s.plot,X,t),s.layerClipId=Z}function $(t){return\"M\"+D+\",\"+t+\"H\"+z}function Q(t){return\"M\"+d._offset+\",\"+t+\"h\"+d._length}function tt(t){return\"M\"+t+\",\"+U+\"V\"+j}function et(t){return\"M\"+t+\",\"+g._offset+\"v\"+g._length}function rt(t,e,r){if(!t.showline||i!==t._mainSubplot)return\"\";if(!t._anchorAxis)return r(t._mainLinePosition);var n=e(t._mainLinePosition);return t.mirror&&(n+=e(t._mainMirrorPosition)),n}for(i in v._plots){s=v._plots[i],d=s.xaxis,g=s.yaxis;var nt=\"M0,0\";_(d,i)&&(N=k(d,\"left\",g,b),D=d._offset-(N?y+N:0),B=k(d,\"right\",g,b),z=d._offset+d._length+(B?y+B:0),R=w(d,g,\"bottom\"),F=w(d,g,\"top\"),!(Y=!d._anchorAxis||i!==d._mainSubplot)||\"allticks\"!==d.mirror&&\"all\"!==d.mirror||(d._linepositions[i]=[R,F]),nt=rt(d,$,Q),Y&&d.showline&&(\"all\"===d.mirror||\"allticks\"===d.mirror)&&(nt+=$(R)+$(F)),s.xlines.style(\"stroke-width\",d._lw+\"px\").call(l.stroke,d.showline?d.linecolor:\"rgba(0,0,0,0)\")),s.xlines.attr(\"d\",nt);var it=\"M0,0\";_(g,i)&&(q=k(g,\"bottom\",d,b),j=g._offset+g._length+(q?y:0),G=k(g,\"top\",d,b),U=g._offset-(G?y:0),V=w(g,d,\"left\"),H=w(g,d,\"right\"),!(Y=!g._anchorAxis||i!==g._mainSubplot)||\"allticks\"!==g.mirror&&\"all\"!==g.mirror||(g._linepositions[i]=[V,H]),it=rt(g,tt,et),Y&&g.showline&&(\"all\"===g.mirror||\"allticks\"===g.mirror)&&(it+=tt(V)+tt(H)),s.ylines.style(\"stroke-width\",g._lw+\"px\").call(l.stroke,g.showline?g.linecolor:\"rgba(0,0,0,0)\")),s.ylines.attr(\"d\",it)}return h.makeClipPaths(t),a.previousPromises(t)}function _(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||\"all\"===t.mirror||\"allticks\"===t.mirror)}function w(t,e,r){if(!r.showline||!r._lw)return!1;if(\"all\"===r.mirror||\"allticks\"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=p.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function k(t,e,r,n){if(w(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&w(t,e,a))return a._lw}return 0}function T(t,e){var r=t.title,n=t._size,i=0;return e===y?i=r.pad.l:\"end\"===e&&(i=-r.pad.r),\"paper\"===r.xref?n.l+n.w*r.x+i:t.width*r.x+i}function M(t,e){var r=t.title,n=t._size,i=0;return\"0em\"!==e&&e?e===p.CAP_SHIFT+\"em\"&&(i=r.pad.t):i=-r.pad.b,\"auto\"===r.y?n.t/2:\"paper\"===r.yref?n.t+n.h-n.h*r.y+i:t.height-t.height*r.y+i}r.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,b],t)},r.drawMainTitle=function(t){var e=t._fullLayout,r=function(t){var e=t.title,r=\"middle\";return o.isRightAnchor(e)?r=\"end\":o.isLeftAnchor(e)&&(r=y),r}(e),n=function(t){var e=t.title,r=\"0em\";return o.isTopAnchor(e)?r=p.CAP_SHIFT+\"em\":o.isMiddleAnchor(e)&&(r=p.MID_SHIFT+\"em\"),r}(e);c.draw(t,\"gtitle\",{propContainer:e,propName:\"title.text\",placeholder:e._dfltTitle.plot,attributes:{x:T(e,r),y:M(e,n),\"text-anchor\":r,dy:n}})},r.doTraceStyle=function(t){var e,n=t.calcdata,o=[];for(e=0;e<n.length;e++){var l=n[e],u=l[0]||{},c=u.trace||{},f=c._module||{},h=f.arraysToCalcdata;h&&h(l,c);var p=f.editStyle;p&&o.push({fn:p,cd0:u})}if(o.length){for(e=0;e<o.length;e++){var d=o[e];d.fn(t,d.cd0)}s(t),r.redrawReglTraces(t)}return a.style(t),i.getComponentMethod(\"legend\",\"draw\")(t),a.previousPromises(t)},r.doColorBars=function(t){return i.getComponentMethod(\"colorbar\",\"draw\")(t),a.previousPromises(t)},r.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call(\"_doPlot\",t,\"\",e)},r.doLegend=function(t){return i.getComponentMethod(\"legend\",\"draw\")(t),a.previousPromises(t)},r.doTicksRelayout=function(t){return h.draw(t,\"redraw\"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),s(t),r.redrawReglTraces(t)),r.drawMainTitle(t),a.previousPromises(t)},r.doModeBar=function(t){var e=t._fullLayout;f.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},r.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setViewport(i)}},r.drawData=function(t){var e=t._fullLayout;s(t);for(var n=e._basePlotModules,o=0;o<n.length;o++)n[o].plot(t);return r.redrawReglTraces(t),a.style(t),i.getComponentMethod(\"selections\",\"draw\")(t),i.getComponentMethod(\"shapes\",\"draw\")(t),i.getComponentMethod(\"annotations\",\"draw\")(t),i.getComponentMethod(\"images\",\"draw\")(t),e._replotting=!1,a.previousPromises(t)},r.redrawReglTraces=function(t){var e=t._fullLayout;if(e._has(\"regl\")){var r,n,i=t._fullData,a=[],s=[];for(e._hasOnlyLargeSploms&&e._splomGrid.draw(),r=0;r<i.length;r++){var l=i[r];!0===l.visible&&0!==l._length&&(\"splom\"===l.type?e._splomScenes[l.uid].draw():\"scattergl\"===l.type?o.pushUnique(a,l.xaxis+l.yaxis):\"scatterpolargl\"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<a.length;r++)(n=e._plots[a[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=e[s[r]]._subplot)._scene&&n._scene.draw()}},r.doAutoRangeAndConstraints=function(t){for(var e,r=h.list(t,\"\",!0),n={},i=0;i<r.length;i++)if(!n[(e=r[i])._id]){n[e._id]=1,v(t,e),m(t,e);var a=e._matchGroup;if(a)for(var o in a){var s=h.getFromId(t,o);m(t,s,e.range),n[o]=1}}g(t)},r.finalDraw=function(t){i.getComponentMethod(\"rangeslider\",\"draw\")(t),i.getComponentMethod(\"rangeselector\",\"draw\")(t)},r.drawMarginPushers=function(t){i.getComponentMethod(\"legend\",\"draw\")(t),i.getComponentMethod(\"rangeselector\",\"draw\")(t),i.getComponentMethod(\"sliders\",\"draw\")(t),i.getComponentMethod(\"updatemenus\",\"draw\")(t),i.getComponentMethod(\"colorbar\",\"draw\")(t)}},{\"../components/color\":367,\"../components/drawing\":389,\"../components/modebar\":430,\"../components/titles\":476,\"../constants/alignment\":483,\"../lib\":515,\"../lib/clear_gl_canvases\":499,\"../plots/cartesian/autorange\":565,\"../plots/cartesian/axes\":566,\"../plots/cartesian/constraints\":574,\"../plots/plots\":628,\"../registry\":647,\"@plotly/d3\":58}],557:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=n.isPlainObject,a=t(\"./plot_schema\"),o=t(\"../plots/plots\"),s=t(\"../plots/attributes\"),l=t(\"./plot_template\"),u=t(\"./plot_config\").dfltConfig;function c(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))c(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a<r.length;a++){var s=r[a],u=o.newItem(s)._template;u&&c(u,s)}var f=o.defaultItems();for(a=0;a<f.length;a++)r.push(f[a]._template);for(a=0;a<r.length;a++)delete r[a].templateitemname}}for(r=0;r<o.length;r++){var u=o[r],h=t[u];if(u in e?s(h,e[u],u):e[u]=h,f(u)===u)for(var p in e){var d=f(p);p===d||d!==u||p in t||s(h,e[p],u)}}}function f(t){return t.replace(/[0-9]+$/,\"\")}function h(t,e,r,a,o){var s=o&&r(o);for(var u in t){var c=t[u],p=g(t,u,a),d=g(t,u,o),v=r(d);if(!v){var m=f(u);m!==u&&(v=r(d=g(t,m,o)))}if(!(s&&s===v||!v||v._noTemplating||\"data_array\"===v.valType||v.arrayOk&&Array.isArray(c)))if(!v.valType&&i(c))h(c,e,r,p,d);else if(v._isLinkedToArray&&Array.isArray(c))for(var y=!1,x=0,b={},_=0;_<c.length;_++){var w=c[_];if(i(w)){var k=w.name;if(k)b[k]||(h(w,e,r,g(c,x,p),g(c,x,d)),x++,b[k]=1);else if(!y){var T=g(t,l.arrayDefaultKey(u),a),M=g(c,x,p);h(w,e,r,M,g(c,x,d));var A=n.nestedProperty(e,M);n.nestedProperty(e,T).set(A.get()),A.set(null),y=!0}}}else n.nestedProperty(e,p).set(c)}}function p(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}function d(t,e){return a.getTraceValObject(t,n.nestedProperty({},e).parts)}function g(t,e,r){return r?Array.isArray(t)?r+\"[\"+e+\"]\":r+\".\"+e:e}function v(t){for(var e=0;e<t.length;e++)if(i(t[e]))return!0}function m(t){var e;switch(t.code){case\"data\":e=\"The template has no key data.\";break;case\"layout\":e=\"The template has no key layout.\";break;case\"missing\":e=t.path?\"There are no templates for item \"+t.path+\" with name \"+t.templateitemname:\"There are no templates for trace \"+t.index+\", of type \"+t.traceType+\".\";break;case\"unused\":e=t.path?\"The template item at \"+t.path+\" was not used in constructing the plot.\":t.dataCount?\"Some of the templates of type \"+t.traceType+\" were not used. The template has \"+t.templateCount+\" traces, the data only has \"+t.dataCount+\" of this type.\":\"The template has \"+t.templateCount+\" traces of type \"+t.traceType+\" but there are none in the data.\";break;case\"reused\":e=\"Some of the templates of type \"+t.traceType+\" were used more than once. The template has \"+t.templateCount+\" traces, the data has \"+t.dataCount+\" of this type.\"}return t.msg=e,t}r.makeTemplate=function(t){t=n.isPlainObject(t)?t:n.getGraphDiv(t),t=n.extendDeep({_context:u},{data:t.data,layout:t.layout}),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach((function(t){var e={};h(t,e,d.bind(null,t));var r=n.coerce(t,{},s,\"type\"),i=a.data[r];i||(i=a.data[r]=[]),i.push(e)})),h(r,a.layout,p.bind(null,r)),delete a.layout.template;var l=r.template;if(i(l)){var f,g,v,m,y,x,b=l.layout;i(b)&&c(b,a.layout);var _=l.data;if(i(_)){for(g in a.data)if(v=_[g],Array.isArray(v)){for(x=(y=a.data[g]).length,m=v.length,f=0;f<x;f++)c(v[f%m],y[f]);for(f=x;f<m;f++)y.push(n.extendDeep({},v[f]))}for(g in _)g in a.data||(a.data[g]=n.extendDeep([],_[g]))}}return a},r.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:u,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,c=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var h=r._fullLayout,p=r._fullData,d={};if(i(s)?(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)&&i(e[n])){var a,o=f(n),s=[];for(a=0;a<r.length;a++)s.push(g(e,n,r[a])),o!==n&&s.push(g(e,o,r[a]));for(a=0;a<s.length;a++)d[s[a]]=1;t(e[n],s)}}(h,[\"layout\"]),function t(e,r){for(var n in e)if(-1===n.indexOf(\"defaults\")&&i(e[n])){var a=g(e,n,r);d[a]?t(e[n],a):c.push({code:\"unused\",path:a})}}(s,\"layout\")):c.push({code:\"layout\"}),i(l)){for(var y,x={},b=0;b<p.length;b++){var _=p[b];x[y=_.type]=(x[y]||0)+1,_._fullInput._template||c.push({code:\"missing\",index:_._fullInput.index,traceType:y})}for(y in l){var w=l[y].length,k=x[y]||0;w>k?c.push({code:\"unused\",traceType:y,templateCount:w,dataCount:k}):k>w&&c.push({code:\"reused\",traceType:y,templateCount:w,dataCount:k})}}else c.push({code:\"data\"});if(function t(e,r){for(var n in e)if(\"_\"!==n.charAt(0)){var a=e[n],o=g(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&c.push({code:\"missing\",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&v(a)&&t(a,o)}}({data:p,layout:h},\"\"),c.length)return c.map(m)}},{\"../lib\":515,\"../plots/attributes\":562,\"../plots/plots\":628,\"./plot_config\":553,\"./plot_schema\":554,\"./plot_template\":555}],558:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./plot_api\"),a=t(\"../plots/plots\"),o=t(\"../lib\"),s=t(\"../snapshot/helpers\"),l=t(\"../snapshot/tosvg\"),u=t(\"../snapshot/svgtoimg\"),c=t(\"../version\").version,f={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],dflt:\"png\"},width:{valType:\"number\",min:1},height:{valType:\"number\",min:1},scale:{valType:\"number\",min:0,dflt:1},setBackground:{valType:\"any\",dflt:!1},imageDataOnly:{valType:\"boolean\",dflt:!1}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g(\"width\")&&null!==e.width||!g(\"height\")&&null!==e.height)throw new Error(\"Height and width should be pixel values.\");if(!g(\"format\"))throw new Error(\"Export format is not \"+o.join2(f.format.values,\", \",\" or \")+\".\");var v={};function m(t,r){return o.coerce(e,v,f,t,r)}var y=m(\"format\"),x=m(\"width\"),b=m(\"height\"),_=m(\"scale\"),w=m(\"setBackground\"),k=m(\"imageDataOnly\"),T=document.createElement(\"div\");T.style.position=\"absolute\",T.style.left=\"-5000px\",document.body.appendChild(T);var M=o.extendFlat({},h);x?M.width=x:null===e.width&&n(d.width)&&(M.width=d.width),b?M.height=b:null===e.height&&n(d.height)&&(M.height=d.height);var A=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(T);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(T._fullLayout))}))}function C(){return new Promise((function(t,e){var r=l(T,y,_),n=T._fullLayout.width,f=T._fullLayout.height;function h(){i.purge(T),document.body.removeChild(T)}if(\"full-json\"===y){var p=a.graphJson(T,!1,\"keepdata\",\"object\",!0,!0);return p.version=c,p=JSON.stringify(p),h(),t(k?p:s.encodeJSON(p))}if(h(),\"svg\"===y)return t(k?r:s.encodeSVG(r));var d=document.createElement(\"canvas\");d.id=o.randstr(),u({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(T,r,M,A).then(S).then(E).then(C).then((function(e){t(function(t){return k?t.replace(s.IMAGE_URL_PREFIX,\"\"):t}(e))})).catch((function(t){e(t)}))}))}},{\"../lib\":515,\"../plots/plots\":628,\"../snapshot/helpers\":651,\"../snapshot/svgtoimg\":653,\"../snapshot/tosvg\":655,\"../version\":1132,\"./plot_api\":552,\"fast-isnumeric\":190}],559:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/plots\"),a=t(\"./plot_schema\"),o=t(\"./plot_config\").dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h<f.length;h++){var p=f[h];if(\"transforms\"!==p){var m=o.slice();m.push(p);var y=t[p],x=e[p],b=v(r,p),_=(b||{}).valType,w=\"info_array\"===_,k=\"colorscale\"===_,T=(b||{}).items;if(g(r,p))if(s(y)&&s(x)&&\"any\"!==_)c(y,x,b,i,a,m);else if(w&&l(y)){y.length>x.length&&i.push(d(\"unused\",a,m.concat(x.length)));var M,A,S,E,C,L=x.length,P=Array.isArray(T);if(P&&(L=Math.min(L,T.length)),2===b.dimensions)for(A=0;A<L;A++)if(l(y[A])){y[A].length>x[A].length&&i.push(d(\"unused\",a,m.concat(A,x[A].length)));var O=x[A].length;for(M=0;M<(P?Math.min(O,T[A].length):O);M++)S=P?T[A][M]:T,E=y[A][M],C=x[A][M],n.validate(E,S)?C!==E&&C!==+E&&i.push(d(\"dynamic\",a,m.concat(A,M),E,C)):i.push(d(\"value\",a,m.concat(A,M),E))}else i.push(d(\"array\",a,m.concat(A),y[A]));else for(A=0;A<L;A++)S=P?T[A]:T,E=y[A],C=x[A],n.validate(E,S)?C!==E&&C!==+E&&i.push(d(\"dynamic\",a,m.concat(A),E,C)):i.push(d(\"value\",a,m.concat(A),E))}else if(b.items&&!w&&l(y)){var I,D,z=T[Object.keys(T)[0]],R=[];for(I=0;I<x.length;I++){var F=x[I]._index||I;if((D=m.slice()).push(F),s(y[F])&&s(x[I])){R.push(F);var N=y[F],B=x[I];s(N)&&!1!==N.visible&&!1===B.visible?i.push(d(\"invisible\",a,D)):c(N,B,z,i,a,D)}}for(I=0;I<y.length;I++)(D=m.slice()).push(I),s(y[I])?-1===R.indexOf(I)&&i.push(d(\"unused\",a,D)):i.push(d(\"object\",a,D,y[I]))}else!s(y)&&s(x)?i.push(d(\"object\",a,m,y)):u(y)||!u(x)||w||k?p in e?n.validate(y,b)?\"enumerated\"===b.valType&&(b.coerceNumber&&y!==+x||y!==x)&&i.push(d(\"dynamic\",a,m,y,x)):i.push(d(\"value\",a,m,y)):i.push(d(\"unused\",a,m,y)):i.push(d(\"array\",a,m,y));else i.push(d(\"schema\",a,m))}}return i}function f(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}e.exports=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var r,u,h=a.get(),p=[],g={_context:n.extendFlat({},o)};l(t)?(g.data=n.extendDeep([],t),r=t):(g.data=[],r=[],p.push(d(\"array\",\"data\"))),s(e)?(g.layout=n.extendDeep({},e),u=e):(g.layout={},u={},arguments.length>1&&p.push(d(\"object\",\"layout\"))),i.supplyDefaults(g);for(var v=g._fullData,m=r.length,y=0;y<m;y++){var x=r[y],b=[\"data\",y];if(s(x)){var _=v[y],w=_.type,k=h.traces[w].attributes;k.type={valType:\"enumerated\",values:[w]},!1===_.visible&&!1!==x.visible&&p.push(d(\"invisible\",b)),c(x,_,k,p,b);var T=x.transforms,M=_.transforms;if(T){l(T)||p.push(d(\"array\",b,[\"transforms\"])),b.push(\"transforms\");for(var A=0;A<T.length;A++){var S=[\"transforms\",A],E=T[A].type;if(s(T[A])){var C=h.transforms[E]?h.transforms[E].attributes:{};C.type={valType:\"enumerated\",values:Object.keys(h.transforms)},c(T[A],M[A],C,p,b,S)}else p.push(d(\"object\",b,S))}}}else p.push(d(\"object\",b))}return c(u,g._fullLayout,f(h,v),p,\"layout\"),0===p.length?void 0:p};var h={object:function(t,e){return(\"layout\"===t&&\"\"===e?\"The layout argument\":\"data\"===t[0]&&\"\"===e?\"Trace \"+t[1]+\" in the data argument\":p(t)+\"key \"+e)+\" must be linked to an object container\"},array:function(t,e){return(\"data\"===t?\"The data argument\":p(t)+\"key \"+e)+\" must be linked to an array container\"},schema:function(t,e){return p(t)+\"key \"+e+\" is not part of the schema\"},unused:function(t,e,r){var n=s(r)?\"container\":\"key\";return p(t)+n+\" \"+e+\" did not get coerced\"},dynamic:function(t,e,r,n){return[p(t)+\"key\",e,\"(set to '\"+r+\"')\",\"got reset to\",\"'\"+n+\"'\",\"during defaults.\"].join(\" \")},invisible:function(t,e){return(e?p(t)+\"item \"+e:\"Trace \"+t[1])+\" got defaulted to be not visible\"},value:function(t,e,r){return[p(t)+\"key \"+e,\"is set to an invalid value (\"+r+\")\"].join(\" \")}};function p(t){return l(t)?\"In data trace \"+t[1]+\", \":\"In \"+t+\", \"}function d(t,e,r,i,a){var o,s;r=r||\"\",l(e)?(o=e[0],s=e[1]):(o=e,s=null);var u=function(t){if(!l(t))return String(t);for(var e=\"\",r=0;r<t.length;r++){var n=t[r];\"number\"==typeof n?e=e.substr(0,e.length-1)+\"[\"+n+\"]\":e+=n,r<t.length-1&&(e+=\".\")}return e}(r),c=h[t](e,u,i,a);return n.log(c),{code:t,container:o,trace:s,path:r,astr:u,msg:c}}function g(t,e){var r=y(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function v(t,e){return e in t?t[e]:t[y(e).keyMinusId]}var m=n.counterRegex(\"([a-z]+)\");function y(t){var e=t.match(m);return{keyMinusId:e&&e[1],id:e&&e[2]}}},{\"../lib\":515,\"../plots/plots\":628,\"./plot_config\":553,\"./plot_schema\":554}],560:[function(t,e,r){\"use strict\";e.exports={mode:{valType:\"enumerated\",dflt:\"afterall\",values:[\"immediate\",\"next\",\"afterall\"]},direction:{valType:\"enumerated\",values:[\"forward\",\"reverse\"],dflt:\"forward\"},fromcurrent:{valType:\"boolean\",dflt:!1},frame:{duration:{valType:\"number\",min:0,dflt:500},redraw:{valType:\"boolean\",dflt:!0}},transition:{duration:{valType:\"number\",min:0,dflt:500,editType:\"none\"},easing:{valType:\"enumerated\",dflt:\"cubic-in-out\",values:[\"linear\",\"quad\",\"cubic\",\"sin\",\"exp\",\"circle\",\"elastic\",\"back\",\"bounce\",\"linear-in\",\"quad-in\",\"cubic-in\",\"sin-in\",\"exp-in\",\"circle-in\",\"elastic-in\",\"back-in\",\"bounce-in\",\"linear-out\",\"quad-out\",\"cubic-out\",\"sin-out\",\"exp-out\",\"circle-out\",\"elastic-out\",\"back-out\",\"bounce-out\",\"linear-in-out\",\"quad-in-out\",\"cubic-in-out\",\"sin-in-out\",\"exp-in-out\",\"circle-in-out\",\"elastic-in-out\",\"back-in-out\",\"bounce-in-out\"],editType:\"none\"},ordering:{valType:\"enumerated\",values:[\"layout first\",\"traces first\"],dflt:\"layout first\",editType:\"none\"}}}},{}],561:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_template\");e.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||\"visible\",u=e[s],c=n.isArrayOrTypedArray(t[s])?t[s]:[],f=e[s]=[],h=i.arrayTemplater(e,s,l);for(a=0;a<c.length;a++){var p=c[a];n.isPlainObject(p)?o=h.newItem(p):(o=h.newItem({}))[l]=!1,o._index=a,!1!==o[l]&&r.handleItemDefaults(p,o,e,r),f.push(o)}var d=h.defaultItems();for(a=0;a<d.length;a++)(o=d[a])._index=f.length,r.handleItemDefaults({},o,e,r,{}),f.push(o);if(n.isArrayOrTypedArray(u)){var g=Math.min(u.length,f.length);for(a=0;a<g;a++)n.relinkPrivateKeys(f[a],u[a])}return f}},{\"../lib\":515,\"../plot_api/plot_template\":555}],562:[function(t,e,r){\"use strict\";var n=t(\"./font_attributes\"),i=t(\"../components/fx/attributes\");e.exports={type:{valType:\"enumerated\",values:[],dflt:\"scatter\",editType:\"calc+clearAxisTypes\",_noTemplating:!0},visible:{valType:\"enumerated\",values:[!0,!1,\"legendonly\"],dflt:!0,editType:\"calc\"},showlegend:{valType:\"boolean\",dflt:!0,editType:\"style\"},legendgroup:{valType:\"string\",dflt:\"\",editType:\"style\"},legendgrouptitle:{text:{valType:\"string\",dflt:\"\",editType:\"style\"},font:n({editType:\"style\"}),editType:\"style\"},legendrank:{valType:\"number\",dflt:1e3,editType:\"style\"},legendwidth:{valType:\"number\",min:0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"style\"},name:{valType:\"string\",editType:\"style\"},uid:{valType:\"string\",editType:\"plot\",anim:!0},ids:{valType:\"data_array\",editType:\"calc\",anim:!0},customdata:{valType:\"data_array\",editType:\"calc\"},meta:{valType:\"any\",arrayOk:!0,editType:\"plot\"},selectedpoints:{valType:\"any\",editType:\"calc\"},hoverinfo:{valType:\"flaglist\",flags:[\"x\",\"y\",\"z\",\"text\",\"name\"],extras:[\"all\",\"none\",\"skip\"],arrayOk:!0,dflt:\"all\",editType:\"none\"},hoverlabel:i.hoverlabel,stream:{token:{valType:\"string\",noBlank:!0,strict:!0,editType:\"calc\"},maxpoints:{valType:\"number\",min:0,max:1e4,dflt:500,editType:\"calc\"},editType:\"calc\"},transforms:{_isLinkedToArray:\"transform\",editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"}}},{\"../components/fx/attributes\":398,\"./font_attributes\":594}],563:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=i.dateTime2ms,o=i.incrementMonth,s=t(\"../../constants/numerical\").ONEAVGMONTH;e.exports=function(t,e,r,i){if(\"date\"!==e.type)return{vals:i};var l=t[r+\"periodalignment\"];if(!l)return{vals:i};var u,c=t[r+\"period\"];if(n(c)){if((c=+c)<=0)return{vals:i}}else if(\"string\"==typeof c&&\"M\"===c.charAt(0)){var f=+c.substring(1);if(!(f>0&&Math.round(f)===f))return{vals:i};u=f}for(var h=e.calendar,p=\"start\"===l,d=\"end\"===l,g=t[r+\"period0\"],v=a(g,h)||0,m=[],y=[],x=[],b=i.length,_=0;_<b;_++){var w,k,T,M=i[_];if(u){for(w=Math.round((M-v)/(u*s)),T=o(v,u*w,h);T>M;)T=o(T,-u,h);for(;T<=M;)T=o(T,u,h);k=o(T,-u,h)}else{for(T=v+(w=Math.round((M-v)/c))*c;T>M;)T-=c;for(;T<=M;)T+=c;k=T-c}m[_]=p?k:d?T:(k+T)/2,y[_]=k,x[_]=T}return{vals:m,starts:y,ends:x}}},{\"../../constants/numerical\":491,\"../../lib\":515,\"fast-isnumeric\":190}],564:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],565:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../constants/numerical\").FP_SAFE,s=t(\"../../registry\"),l=t(\"../../components/drawing\"),u=t(\"./axis_ids\"),c=u.getFromId,f=u.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),u=g(t,e),c=u.min,f=u.max;if(0===c.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=c[0].val,v=f[0].val;for(r=1;r<c.length&&h===v;r++)h=Math.min(h,c[r].val);for(r=1;r<f.length&&h===v;r++)v=Math.max(v,f[r].val);var m=!1;if(e.range){var y=a.simpleMap(e.range,e.r2l);m=y[1]<y[0]}\"reversed\"===e.autorange&&(m=!0,e.autorange=!0);var x,b,_,w,k,T,M=e.rangemode,A=\"tozero\"===M,S=\"nonnegative\"===M,E=e._length,C=E/10,L=0;for(r=0;r<c.length;r++)for(x=c[r],n=0;n<f.length;n++)(T=(b=f[n]).val-x.val-p(e,x.val,b.val))>0&&((k=E-s(x)-l(b))>C?T/k>L&&(_=x,w=b,L=T/k):T/E>L&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},L=T/E));if(h===v){var P=h-1,O=h+1;if(A)if(0===h)i=[0,1];else{var I=(h>0?f:c).reduce((function(t,e){return Math.max(t,l(e))}),0),D=h/(1-Math.min(.5,I/E));i=h>0?[0,D]:[D,0]}else i=S?[Math.max(0,P),Math.max(1,O)]:[P,O]}else A?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-L*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),L=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-L*s(_),w.val+L*l(w)];return m&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a<i.length;a++){var o=i[a];n+=o.max-o.min}return n}function d(t,e,r){var i=.05*e._length,o=e._anchorAxis||{};if(-1!==(e.ticklabelposition||\"\").indexOf(\"inside\")||-1!==(o.ticklabelposition||\"\").indexOf(\"inside\")){var s=\"reversed\"===e.autorange;if(!s){var u=a.simpleMap(e.range,e.r2l);s=u[1]<u[0]}s&&(r=!r)}var c=0;return f(t,e._id)||(c=function(t,e,r){var i=0,o=\"x\"===e._id.charAt(0);for(var s in t._plots){var u=t._plots[s];if(e._id===u.xaxis._id||e._id===u.yaxis._id){var c=(o?u.yaxis:u.xaxis)||{};if(-1!==(c.ticklabelposition||\"\").indexOf(\"inside\")&&(!r&&(\"left\"===c.side||\"bottom\"===c.side)||r&&(\"top\"===c.side||\"right\"===c.side))){if(c._vals){var f=a.deg2rad(c._tickAngles[c._id+\"tick\"]||0),h=Math.abs(Math.cos(f)),p=Math.abs(Math.sin(f));if(!c._vals[0].bb){var d=c._id+\"tick\";c._selections[d].each((function(t){var e=n.select(this);e.select(\".text-math-group\").empty()&&(t.bb=l.bBox(e.node()))}))}for(var g=0;g<c._vals.length;g++){var v=c._vals[g].bb;if(v){var m=6+v.width,y=6+v.height;i=Math.max(i,o?Math.max(m*h,y*p):Math.max(y*h,m*p))}}}\"inside\"===c.ticks&&\"inside\"===c.ticklabelposition&&(i+=c.ticklen||0)}}}return i}(t,e,r)),i=Math.max(c,i),\"domain\"===e.constrain&&e._inputDomain&&(i*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(t){return t.nopad?0:t.pad+(t.extrapad?i:c)}}function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,u=[],f=[];function h(t,e){for(n=0;n<e.length;n++){var r=t[e[n]],s=(r._extremes||{})[o];if(!0===r.visible&&s){for(i=0;i<s.min.length;i++)a=s.min[i],v(u,a.val,a.pad,{extrapad:a.extrapad});for(i=0;i<s.max.length;i++)a=s.max[i],m(f,a.val,a.pad,{extrapad:a.extrapad})}}}if(h(s,e._traceIndices),h(l.annotations||[],e._annIndices||[]),h(l.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r)for(var p in e._matchGroup)if(p!==e._id){var d=c(t,p),y=g(t,d,!0),x=e._length/d._length;for(i=0;i<y.min.length;i++)a=y.min[i],v(u,a.val,a.pad*x,{extrapad:a.extrapad});for(i=0;i<y.max.length;i++)a=y.max[i],m(f,a.val,a.pad*x,{extrapad:a.extrapad})}return{min:u,max:f}}function v(t,e,r,n){y(t,e,r,n,b)}function m(t,e,r,n){y(t,e,r,n,_)}function y(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var u=t[l];if(i(u.val,e)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}i(e,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(t.splice(l,1),l--)}if(s){var c=a&&0===e;t.push({val:e,pad:c?0:r,extrapad:!c&&o})}}function x(t){return i(t)&&Math.abs(t)<o}function b(t,e){return t<=e}function _(t,e){return t>=e}e.exports={getAutoRange:h,makePadFn:d,doAutoRange:function(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():h(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var n=e._input,i={};i[e._attr+\".range\"]=e.range,i[e._attr+\".autorange\"]=e.autorange,s.call(\"_storeDirectGUIEdit\",t.layout,t._fullLayout._preGUI,i),n.range=e.range.slice(),n.autorange=e.autorange}var o=e._anchorAxis;if(o&&o.rangeslider){var l=o.rangeslider[e._name];l&&\"auto\"===l.rangemode&&(l.range=h(t,e)),o._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t._m||t.setScale();var n,a,s,l,u,c,f,h,p,d=[],g=[],y=e.length,b=r.padded||!1,_=r.tozero&&(\"linear\"===t.type||\"-\"===t.type),w=\"log\"===t.type,k=!1,T=r.vpadLinearized||!1;function M(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=M((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!k){if(h=1/0,p=-1/0,w)for(n=0;n<y;n++)(a=e[n])<h&&a>0&&(h=a),a>p&&a<o&&(p=a);else for(n=0;n<y;n++)(a=e[n])<h&&a>-o&&(h=a),a>p&&a<o&&(p=a);e=[h,p],y=2}var L={tozero:_,extrapad:b};function P(r){s=e[r],i(s)&&(c=A(r),f=S(r),T?(l=t.c2l(s)-C(r),u=t.c2l(s)+E(r)):(h=s-C(r),p=s+E(r),w&&h<p/10&&(h=p/10),l=t.c2l(h),u=t.c2l(p)),_&&(l=Math.min(0,l),u=Math.max(0,u)),x(l)&&v(d,l,f,L),x(u)&&m(g,u,c,L))}var O=Math.min(6,y);for(n=0;n<O;n++)P(n);for(n=y-1;n>=O;n--)P(n);return{min:d,max:g,opts:r}},concatExtremes:g}},{\"../../components/drawing\":389,\"../../constants/numerical\":491,\"../../lib\":515,\"../../registry\":647,\"./axis_ids\":570,\"@plotly/d3\":58,\"fast-isnumeric\":190}],566:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plots/plots\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=s.strTranslate,u=t(\"../../lib/svg_text_utils\"),c=t(\"../../components/titles\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"./layout_attributes\"),d=t(\"./clean_ticks\"),g=t(\"../../constants/numerical\"),v=g.ONEMAXYEAR,m=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,k=g.ONEAVGMONTH,T=g.ONEMINMONTH,M=g.ONEWEEK,A=g.ONEDAY,S=A/2,E=g.ONEHOUR,C=g.ONEMIN,L=g.ONESEC,P=g.MINUS_SIGN,O=g.BADNUM,I={K:\"zeroline\"},D={K:\"gridline\",L:\"path\"},z={K:\"minor-gridline\",L:\"path\"},R={K:\"tick\",L:\"path\"},F={K:\"tick\",L:\"text\"},N={width:[\"x\",\"r\",\"l\",\"xl\",\"xr\"],height:[\"y\",\"t\",\"b\",\"yt\",\"yb\"],right:[\"r\",\"xr\"],left:[\"l\",\"xl\"],top:[\"t\",\"yt\"],bottom:[\"b\",\"yb\"]},B=t(\"../../constants/alignment\"),j=B.MID_SHIFT,U=B.CAP_SHIFT,V=B.LINE_SPACING,H=B.OPPOSITE_SIDE,q=e.exports={};q.setConvert=t(\"./set_convert\");var G=t(\"./axis_autotype\"),Y=t(\"./axis_ids\"),W=Y.idSort,X=Y.isLinked;q.id2name=Y.id2name,q.name2id=Y.name2id,q.cleanId=Y.cleanId,q.list=Y.list,q.listIds=Y.listIds,q.getFromId=Y.getFromId,q.getFromTrace=Y.getFromTrace;var Z=t(\"./autorange\");function K(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}q.getAutoRange=Z.getAutoRange,q.findExtremes=Z.findExtremes,q.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+\"axis\"],u=n+\"ref\",c={};return i||(i=l[0]||(\"string\"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+\" domain\"}))),c[u]={valType:\"enumerated\",values:l.concat(a?\"string\"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,c,u)},q.getRefType=function(t){return void 0===t?t:\"paper\"===t?\"paper\":\"pixel\"===t?\"pixel\":/( domain)$/.test(t)?\"domain\":\"range\"},q.coercePosition=function(t,e,r,n,i,a){var o,l;if(\"range\"!==q.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=q.getFromId(e,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}t[i]=o(l)},q.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?s.ensureNumber:q.getFromId(e,r).cleanPos)(t)},q.redrawComponents=function(t,e){e=e||q.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),u={},c=0;c<e.length;c++)for(var f=r[q.id2name(e[c])][a],h=0;h<f.length;h++){var p=f[h];if(!u[p]&&(l(t,p),u[p]=1,s))return}}n(\"annotations\",\"drawOne\",\"_annIndices\"),n(\"shapes\",\"drawOne\",\"_shapeIndices\"),n(\"images\",\"draw\",\"_imgIndices\",!0),n(\"selections\",\"drawOne\",\"_selectionIndices\")};var J=q.getDataConversions=function(t,e,r,n){var i,a=\"x\"===r||\"y\"===r||\"z\"===r?r:n;if(Array.isArray(a)){if(i={type:G(n,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},q.setConvert(i),\"category\"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=q.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:\"ids\"===a?{d2c:Q,c2d:Q}:{d2c:$,c2d:$}};function $(t){return+t}function Q(t){return String(t)}function tt(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function et(t,e){return Math.abs(t/e-1)<.001}function rt(t){return+t.substring(1)}function nt(t){var e=K(s.simpleMap(t.range,t.r2l)),r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]),i=\"category\"===t.type?t.d2l_noadd:t.d2l;\"log\"===t.type&&\"L\"!==String(t.dtick).charAt(0)&&(t.dtick=\"L\"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var a=[],o=0;o<=1;o++)if(!o||t.minor){var l=o?t.minor.tickvals:t.tickvals,u=o?[]:t.ticktext;if(l){Array.isArray(u)||(u=[]);for(var c=0;c<l.length;c++){var f=i(l[c]);if(f>r&&f<n){var h=void 0===u[c]?q.tickText(t,f):pt(t,f,String(u[c]));o&&(h.minor=!0,h.text=\"\"),a.push(h)}}}}return t.rangebreaks&&(a=a.filter((function(e){return t.maskBreaks(e.x)!==O}))),a}q.getDataToCoordFunc=function(t,e,r,n){return J(t,e,r,n).d2c},q.counterLetter=function(t){var e=t.charAt(0);return\"x\"===e?\"y\":\"y\"===e?\"x\":void 0},q.minDtick=function(t,e,r,n){-1===[\"log\",\"category\",\"multicategory\"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},q.saveRangeInitial=function(t,e){for(var r=q.list(t,\"\",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial,s=o||!(a.range[0]===a._rangeInitial[0]&&a.range[1]===a._rangeInitial[1]);(o&&!1===a.autorange||e&&s)&&(a._rangeInitial=a.range.slice(),n=!0)}return n},q.saveShowSpikeInitial=function(t,e){for(var r=q.list(t,\"\",!0),n=!1,i=\"on\",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),\"on\"!==i||o.showspikes||(i=\"off\")}return t._fullLayout._cartesianSpikesEnabled=i,n},q.autoBin=function(t,e,r,n,a,o){var l,u=s.aggNums(Math.min,null,t),c=s.aggNums(Math.max,null,t);if(\"category\"===e.type||\"multicategory\"===e.type)return{start:u-.5,end:c+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:c-u};if(a||(a=e.calendar),l=\"log\"===e.type?{type:\"linear\",range:[u,c]}:{type:e.type,range:s.simpleMap([u,c],e.c2r,0,a),calendar:a},q.setConvert(l),o=o&&d.dtick(o,l.type))l.dtick=o,l.tick0=d.tick0(void 0,l.type,a);else{var f;if(r)f=(c-u)/r;else{var h=s.distinctVals(t),p=Math.pow(10,Math.floor(Math.log(h.minDiff)/Math.LN10)),g=p*s.roundUp(h.minDiff/p,[.9,1.9,4.9,9.9],!0);f=Math.max(g,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(f)||(f=1)}q.autoTicks(l,f)}var v,m=l.dtick,y=q.tickIncrement(q.tickFirst(l),m,\"reverse\",a);if(\"number\"==typeof m)v=(y=function(t,e,r,n,a){var o=0,s=0,l=0,u=0;function c(e){return(1+100*(e-t)/r.dtick)%100<2}for(var f=0;f<e.length;f++)e[f]%1==0?l++:i(e[f])||u++,c(e[f])&&o++,c(e[f]+r.dtick/2)&&s++;var h=e.length-u;if(l===h&&\"date\"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*h&&(o>.3*h||c(n)||c(a))){var p=r.dtick/2;t+=t+p<n?p:-p}return t}(y,t,l,u,c))+(1+Math.floor((c-y)/m))*m;else for(\"M\"===l.dtick.charAt(0)&&(y=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=q.tickIncrement(t,\"M6\",\"reverse\")+1.5*A:a.exactMonths>.8?t=q.tickIncrement(t,\"M1\",\"reverse\")+15.5*A:t-=S;var l=q.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,m,u,a)),v=y;v<=c;)v=q.tickIncrement(v,m,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(v,0,a),size:m,_dataSpan:c-u}},q.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=q.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*o+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,q.prepTicks(t,r),a){var u=i(e.dtick),c=i(t.dtick),f=u?e.dtick:+e.dtick.substring(1),h=c?t.dtick:+t.dtick.substring(1);u&&c?tt(f,h)?f===2*M&&h===2*A&&(t.dtick=M):f===2*M&&h===3*A?t.dtick=M:f!==M||(e._input.minor||{}).nticks?et(f/h,2.5)?t.dtick=f/2:t.dtick=f:t.dtick=A:\"M\"===String(e.dtick).charAt(0)?c?t.dtick=\"M1\":tt(f,h)?f>=12&&2===h&&(t.dtick=\"M3\"):t.dtick=e.dtick:\"L\"===String(t.dtick).charAt(0)?\"L\"===String(e.dtick).charAt(0)?tt(f,h)||(t.dtick=et(f/h,2.5)?e.dtick/2:e.dtick):t.dtick=\"D1\":\"D2\"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},q.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(\"auto\"===t.tickmode||!t.dtick){var n,a=t.nticks;a||(\"category\"===t.type||\"multicategory\"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n=\"y\"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),\"radialaxis\"===t._name&&(a*=2)),t.minor&&\"array\"!==t.minor.tickmode||\"array\"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,q.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}\"period\"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||\"M\"!==t.dtick.charAt(0))}var n=r(),a=q.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dtick<E&&(t.dtick=E)):/%p/.test(a)?(e=S,o&&!n&&t.dtick<S&&(t.dtick=S)):/%[Aadejuwx]/.test(a)?(e=A,o&&!n&&t.dtick<A&&(t.dtick=A)):/%[UVW]/.test(a)?(e=M,o&&!n&&t.dtick<M&&(t.dtick=M)):/%[Bbm]/.test(a)?(e=k,o&&(n?rt(t.dtick)<1:t.dtick<T)&&(t.dtick=\"M1\")):/%[q]/.test(a)?(e=b,o&&(n?rt(t.dtick)<3:t.dtick<_)&&(t.dtick=\"M3\")):/%[Yy]/.test(a)&&(e=m,o&&(n?rt(t.dtick)<12:t.dtick<y)&&(t.dtick=\"M12\")))}(n=r())&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}(t),t.tick0||(t.tick0=\"date\"===t.type?\"2000-01-01\":0),\"date\"===t.type&&t.dtick<.1&&(t.dtick=.1),ht(t)},q.calcTicks=function(t,e){for(var r,n,a=t.type,o=t.calendar,l=t.ticklabelstep,u=\"period\"===t.ticklabelmode,c=s.simpleMap(t.range,t.r2l,void 0,void 0,e),f=c[1]<c[0],h=Math.min(c[0],c[1]),p=Math.max(c[0],c[1]),d=Math.max(1e3,t._length||0),g=[],C=[],L=[],P=[],I=t.minor&&(t.minor.ticks||t.minor.showgrid),D=1;D>=(I?0:1);D--){var z=!D;D?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var R=D?t:s.extendFlat({},t,t.minor);if(z?q.prepMinorTicks(R,t,e):q.prepTicks(R,e),\"array\"!==R.tickmode){var F=K(c),N=F[0],B=F[1],j=i(R.dtick),U=\"log\"===a&&!(j||\"L\"===R.dtick.charAt(0)),V=q.tickFirst(R,e);if(D){if(t._tmin=V,V<N!==f)break;\"category\"!==a&&\"multicategory\"!==a||(B=f?Math.max(-.5,B):Math.min(t._categories.length-.5,B))}var H,G,Y=null,W=V;D&&(j?G=t.dtick:\"date\"===a?\"string\"==typeof t.dtick&&\"M\"===t.dtick.charAt(0)&&(G=k*t.dtick.substring(1)):G=t._roughDTick,H=Math.round((t.r2l(W)-t.r2l(t.tick0))/G)-1);var X=R.dtick;for(R.rangebreaks&&R._tick0Init!==R.tick0&&(W=It(W,t),f||(W=q.tickIncrement(W,X,!f,o))),D&&u&&(W=q.tickIncrement(W,X,!f,o),H--);f?W>=B:W<=B;W=q.tickIncrement(W,X,f,o)){if(D&&H++,R.rangebreaks&&!f){if(W<N)continue;if(R.maskBreaks(W)===O&&It(W,R)>=p)break}if(L.length>d||W===Y)break;Y=W;var Z={value:W};D?(U&&W!==(0|W)&&(Z.simpleLabel=!0),l>1&&H%l&&(Z.skipLabel=!0),L.push(Z)):(Z.minor=!0,P.push(Z))}}else D?(L=[],g=nt(t)):(P=[],C=nt(t))}if(I&&!(\"inside\"===t.minor.ticks&&\"outside\"===t.ticks||\"outside\"===t.minor.ticks&&\"inside\"===t.ticks)){for(var J=L.map((function(t){return t.value})),$=[],Q=0;Q<P.length;Q++){var tt=P[Q],et=tt.value;if(-1===J.indexOf(et)){for(var rt=!1,it=0;!rt&&it<L.length;it++)1e7+L[it].value===1e7+et&&(rt=!0);rt||$.push(tt)}}P=$}if(u&&function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n].value,a=n,o=n+1;n<t.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,u=t[o].value,c=Math.abs(u-l),f=r||c,h=0;f>=y?h=c>=y&&c<=v?c:m:r===b&&f>=_?h=c>=_&&c<=x?c:b:f>=T?h=c>=T&&c<=w?c:k:r===M&&f>=M?h=M:f>=A?h=A:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=c&&(h=c,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var C=(g+.5)/84;e.maskBreaks(i*(1-C)+C*p)!==O&&d++}(h*=d/84)||(t[n].drop=!0),s&&c>M&&(h=c)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(L,t,t._definedDelta),t.rangebreaks){var at=\"y\"===t._id.charAt(0),ot=1;\"auto\"===t.tickmode&&(ot=t.tickfont?t.tickfont.size:12);var st=NaN;for(r=L.length-1;r>-1;r--)if(L[r].drop)L.splice(r,1);else{L[r].value=It(L[r].value,t);var lt=t.c2p(L[r].value);(at?st>lt-ot:st<lt+ot)?L.splice(f?r+1:r,1):st=lt}}Ot(t)&&360===Math.abs(c[1]-c[0])&&L.pop(),t._tmax=(L[L.length-1]||{}).value,t._prevDateHead=\"\",t._inCalcTicks=!0;var ut,ct,ft=function(e){e.text=\"\",t._prevDateHead=n};for(L=L.concat(P),r=0;r<L.length;r++){var ht=L[r].minor,pt=L[r].value;ht?C.push({x:pt,minor:!0}):(n=t._prevDateHead,ut=q.tickText(t,pt,!1,L[r].simpleLabel),void 0!==(ct=L[r].periodX)&&(ut.periodX=ct,(ct>p||ct<h)&&(ct>p&&(ut.periodX=p),ct<h&&(ut.periodX=h),ft(ut))),L[r].skipLabel&&ft(ut),g.push(ut))}return g=g.concat(C),t._inCalcTicks=!1,u&&g.length&&(g[0].noTick=!0),g};var it=[2,5,10],at=[1,2,3,6,12],ot=[1,2,5,10,15,30],st=[1,2,3,7,14],lt=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],ut=[-.301,0,.301,.699,1],ct=[15,30,45,90,180];function ft(t,e,r){return e*s.roundUp(t/e,r)}function ht(t){var e=t.dtick;if(t._tickexponent=0,i(e)||\"string\"==typeof e||(e=1),\"category\"!==t.type&&\"multicategory\"!==t.type||(t._tickround=null),\"date\"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,\"\"),a=n.length;if(\"M\"===String(e).charAt(0))a>10||\"01-01\"!==n.substr(5)?t._tickround=\"d\":t._tickround=+e.substr(1)%12==0?\"y\":\"m\";else if(e>=A&&a<=10||e>=15*A)t._tickround=\"d\";else if(e>=C&&a<=16||e>=E)t._tickround=\"M\";else if(e>=L&&a<=19||e>=C)t._tickround=\"S\";else{var o=t.l2r(r+e).replace(/^-/,\"\").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||\"L\"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),c=void 0===t.minexponent?3:t.minexponent;Math.abs(u)>c&&(vt(t.exponentformat)&&!mt(u)?t._tickexponent=3*Math.round((u-1)/3):t._tickexponent=u)}else t._tickround=null}function pt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||\"\",fontSize:n.size,font:n.family,fontColor:n.color}}function dt(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=yt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text=\"0\";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}function r(t,n){return e(n,0)?t:r(n,t%n)}function n(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}var i=n(t),a=t*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}(a);if(o[1]>=100)e.text=yt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text=\"π\":e.text=o[0]+\"π\":e.text=[\"<sup>\",o[0],\"</sup>\",\"⁄\",\"<sub>\",o[1],\"</sub>\",\"π\"].join(\"\"),l&&(e.text=P+e.text)}}}}q.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if(\"date\"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>m)e/=m,n=a(10),t.dtick=\"M\"+12*ft(e,n,it);else if(o>k)e/=k,t.dtick=\"M\"+ft(e,1,at);else if(o>A){if(t.dtick=ft(e,A,t._hasDayOfWeekBreaks?[1,2,7,14]:st),!r){var l=q.getTickFormat(t),u=\"period\"===t.ticklabelmode;u&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),u&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=ft(e,E,at):o>C?t.dtick=ft(e,C,ot):o>L?t.dtick=ft(e,L,ot):(n=a(10),t.dtick=ft(e,n,it))}else if(\"log\"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var f=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=a(10),t.dtick=\"L\"+ft(e,n,it)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type||\"multicategory\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Ot(t)?(t.tick0=0,n=1,t.dtick=ft(e,n,ct)):(t.tick0=0,n=a(10),t.dtick=ft(e,n,it));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&\"string\"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(h)}},q.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),u=o*Number(e.substr(1));if(\"M\"===l)return s.incrementMonth(t,u,a);if(\"L\"===l)return Math.log(Math.pow(10,t)+u)/Math.LN10;if(\"D\"===l){var c=\"D2\"===e?ut:lt,f=t+.01*o,h=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw\"unrecognized dtick \"+String(e)},q.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1]<a[0],l=o?Math.floor:Math.ceil,u=K(a)[0],c=t.dtick,f=r(t.tick0);if(i(c)){var h=l((u-f)/c)*c+f;return\"category\"!==t.type&&\"multicategory\"!==t.type||(h=s.constrain(h,0,t._categories.length-1)),h}var p=c.charAt(0),d=Number(c.substr(1));if(\"M\"===p){for(var g,v,m,y=0,x=f;y<10;){if(((g=q.tickIncrement(x,c,o,t.calendar))-u)*(x-u)<=0)return o?Math.min(x,g):Math.max(x,g);v=(u-(x+g)/2)/(g-x),m=p+(Math.abs(Math.round(v))||1)*d,x=q.tickIncrement(x,m,v<0?!o:o,t.calendar),y++}return s.error(\"tickFirst did not converge\",t),x}if(\"L\"===p)return Math.log(l((Math.pow(10,u)-f)/d)*d+f)/Math.LN10;if(\"D\"===p){var b=\"D2\"===c?ut:lt,_=s.roundUp(s.mod(u,1),b,o);return Math.floor(u)+Math.log(n.round(Math.pow(10,_),1))/Math.LN10}throw\"unrecognized dtick \"+String(c)},q.tickText=function(t,e,r,n){var a,o=pt(t,e),l=\"array\"===t.tickmode,u=r||l,c=t.type,f=\"category\"===c?t.d2l_noadd:t.d2l;if(l&&Array.isArray(t.ticktext)){var h=s.simpleMap(t.range,t.r2l),p=(Math.abs(h[1]-h[0])-(t._lBreaks||0))/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-f(t.tickvals[a]))<p);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o}function d(n){if(void 0===n)return!0;if(r)return\"none\"===n;var i={first:t._tmin,last:t._tmax}[n];return\"all\"!==n&&e!==i}var g=r?\"never\":\"none\"!==t.exponentformat&&d(t.showexponent)?\"hide\":\"\";if(\"date\"===c?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||q.getTickFormat(t);n&&(a=i(a)?4:{y:\"m\",m:\"d\",d:\"M\",M:\"S\",S:4}[a]);var l,u=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),c=u.indexOf(\"\\n\");if(-1!==c&&(l=u.substr(c+1),u=u.substr(0,c)),n&&(\"00:00:00\"===u||\"00:00\"===u?(u=l,l=\"\"):8===u.length&&(u=u.replace(/:00$/,\"\"))),l)if(r)\"d\"===a?u+=\", \"+l:u=l+(u?\", \"+u:\"\");else if(t._inCalcTicks&&t._prevDateHead===l){var f=Dt(t),h=t._trueSide||t.side;(!f&&\"top\"===h||f&&\"bottom\"===h)&&(u+=\"<br> \")}else t._prevDateHead=l,u+=\"<br>\"+l;e.text=u}(t,o,r,u):\"log\"===c?function(t,e,r,n,a){var o=t.dtick,l=e.x,u=t.tickformat,c=\"string\"==typeof o&&o.charAt(0);if(\"never\"===a&&(a=\"\"),n&&\"L\"!==c&&(o=\"L3\",c=\"L\"),u||\"L\"===c)e.text=yt(Math.pow(10,l),t,a,n);else if(i(o)||\"D\"===c&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;\"power\"===p||vt(p)&&mt(f)?(e.text=0===f?1:1===f?\"10\":\"10<sup>\"+(f>1?\"\":P)+h+\"</sup>\",e.fontSize*=1.25):(\"e\"===p||\"E\"===p)&&h>2?e.text=\"1\"+p+(f>0?\"+\":P)+h:(e.text=yt(Math.pow(10,l),t,\"\",\"fakehover\"),\"D1\"===o&&\"y\"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if(\"D\"!==c)throw\"unrecognized dtick \"+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if(\"D1\"===t.dtick){var d=String(e.text).charAt(0);\"0\"!==d&&\"1\"!==d||(\"y\"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,u,g):\"category\"===c?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\"),e.text=String(r)}(t,o):\"multicategory\"===c?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?\"\":String(i[1]),o=void 0===i[0]?\"\":String(i[0]);r?e.text=o+\" - \"+a:(e.text=a,e.text2=o)}(t,o,r):Ot(t)?dt(t,o,r,u,g):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\"),e.text=yt(e.x,t,i,n)}(t,o,0,u,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),\"boundaries\"===t.tickson||t.showdividers){var v=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[v(o.x-.5),v(o.x+t.dtick-.5)]}return o},q.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return q.hoverLabelText(t,n,r)+\" - \"+q.hoverLabelText(t,i,r);var a=\"log\"===t.type&&n<=0,o=q.tickText(t,t.c2l(a?-n:n),\"hover\").text;return a?0===n?\"0\":P+o:o};var gt=[\"f\",\"p\",\"n\",\"μ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];function vt(t){return\"SI\"===t||\"B\"===t}function mt(t){return t>14||t<-15}function yt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||\"B\",u=e._tickexponent,c=q.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:\"none\"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};ht(h),o=(Number(h._tickround)||0)+4,u=h._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return e._numFormat(c)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if(\"none\"===l&&(u=0),(t=Math.abs(t))<d)t=\"0\",a=!1;else{if(t+=d,u&&(t*=Math.pow(10,-u),o+=u),0===o)t=String(Math.floor(t));else if(o<0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var g=o;g<0;g++)t+=\"0\"}else{var v=(t=String(t)).indexOf(\".\")+1;v&&(t=t.substr(0,v+o).replace(/\\.?0+$/,\"\"))}t=s.numSeparate(t,e._separators,f)}return u&&\"hide\"!==l&&(vt(l)&&mt(u)&&(l=\"power\"),p=u<0?P+-u:\"power\"!==l?\"+\"+u:String(u),\"e\"===l||\"E\"===l?t+=l+p:\"power\"===l?t+=\"×10<sup>\"+p+\"</sup>\":\"B\"===l&&9===u?t+=\"B\":vt(l)&&(t+=gt[u/3+5])),a?P+t:t}function xt(t,e){if(t){var r=Object.keys(N).reduce((function(t,r){return-1!==e.indexOf(r)&&N[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function bt(t,e){for(var r=[],n={},i=0;i<e.length;i++){var a=e[i];n[a.text2]?n[a.text2].push(a.x):n[a.text2]=[a.x]}for(var o in n)r.push(pt(t,s.interp(n[o],.5),o));return r}function _t(t){return void 0!==t.periodX?t.periodX:t.x}function wt(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join(\"_\")}function kt(t){var e=t.title.font.size,r=(t.title.text.match(u.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty(\"standoff\")?r?e*(U+r*V):e*U:r?e*(r+1)*V:e}function Tt(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function Mt(t){var e=n.select(t),r=e.select(\".text-math-group\");return r.empty()?e.select(\"text\"):r}function At(t){return t._id+\".automargin\"}function St(t){return At(t)+\".mirror\"}function Et(t){return t._id+\".rangeslider\"}function Ct(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function Lt(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(q.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(q.getFromId(t,r[n]));var u=Object.keys(p),c=[\"anchor\",\"domain\",\"overlaying\",\"position\",\"side\",\"tickangle\",\"editType\"],f=[\"linear\",\"log\"];for(n=0;n<u.length;n++){var h=u[n],d=a[0][h],g=o[0][h],v=!0,m=!1,y=!1;if(\"_\"!==h.charAt(0)&&\"function\"!=typeof d&&-1===c.indexOf(h)){for(i=1;i<a.length&&v;i++){var x=a[i][h];\"type\"===h&&-1!==f.indexOf(d)&&-1!==f.indexOf(x)&&d!==x?m=!0:x!==d&&(v=!1)}for(i=1;i<o.length&&v;i++){var b=o[i][h];\"type\"===h&&-1!==f.indexOf(g)&&-1!==f.indexOf(b)&&g!==b?y=!0:o[i][h]!==g&&(v=!1)}v&&(m&&(l[a[0]._name].type=\"linear\"),y&&(l[o[0]._name].type=\"linear\"),Pt(l,h,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var _=t._fullLayout.annotations[n];-1!==e.indexOf(_.xref)&&-1!==r.indexOf(_.yref)&&s.swapAttrs(l.annotations[n],[\"?\"])}}function Pt(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),u=o(t[n[0]._name],e).get();for(\"title\"===e&&(l&&l.text===i.x&&(l.text=i.y),u&&u.text===i.y&&(u.text=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+\".\"+e).set(u);for(a=0;a<n.length;a++)o(t,n[a]._name+\".\"+e).set(l)}function Ot(t){return\"angularaxis\"===t._id}function It(t,e){for(var r=e._rangebreaks.length,n=0;n<r;n++){var i=e._rangebreaks[n];if(t>=i.min&&t<i.max)return i.max}return t}function Dt(t){return-1!==(t.ticklabelposition||\"\").indexOf(\"inside\")}function zt(t,e){Dt(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}q.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function u(t){return\"string\"!=typeof t?t:Number(t.replace(\"M\",\"\"))*k}function c(t,e){var r=[\"L\",\"D\"];if(typeof t==typeof e){if(\"number\"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,\"\"))-Number(e.replace(/(L|D)/g,\"\")):n-i}return\"number\"==typeof t?1:-1}function f(t,e){var r=null===e[0],n=null===e[1],i=c(t,e[0])>=0,a=c(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case\"date\":case\"linear\":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&(i=t.dtick,a=n.dtickrange,o=void 0,s=void 0,l=void 0,o=u||function(t){return t},s=a[0],l=a[1],(!s&&\"number\"!=typeof s||o(s)<=o(i))&&(!l&&\"number\"!=typeof l||o(l)>=o(i)))){r=n;break}break;case\"log\":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&f(t.dtick,n.dtickrange)){r=n;break}}return r?r.value:t.tickformat},q.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?q.findSubplotsWithAxis(n,e):n;return i.sort((function(t,e){var r=t.substr(1).split(\"y\"),n=e.substr(1).split(\"y\");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),i},q.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(\"x\"===e._id.charAt(0)?\"^\"+e._id+\"y\":e._id+\"$\"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},q.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:\"\"},o={_offset:0,_length:e.height,_id:\"\"},s=q.list(t,\"x\",!0),l=q.list(t,\"y\",!0),u=[];for(r=0;r<s.length;r++)for(u.push({x:s[r],y:o}),i=0;i<l.length;i++)0===r&&u.push({x:a,y:l[i]}),u.push({x:s[r],y:l[i]});var c=e._clips.selectAll(\".axesclip\").data(u,(function(t){return t.x._id+t.y._id}));c.enter().append(\"clipPath\").classed(\"axesclip\",!0).attr(\"id\",(function(t){return\"clip\"+e._uid+t.x._id+t.y._id})).append(\"rect\"),c.exit().remove(),c.each((function(t){n.select(this).select(\"rect\").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})}))}},q.draw=function(t,e,r){var n=t._fullLayout;\"redraw\"===e&&n._paper.selectAll(\"g.subplot\").each((function(t){var e=t[0],r=n._plots[e];if(r){var i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll(\".\"+i._id+\"tick\").remove(),r.yaxislayer.selectAll(\".\"+a._id+\"tick\").remove(),r.xaxislayer.selectAll(\".\"+i._id+\"tick2\").remove(),r.yaxislayer.selectAll(\".\"+a._id+\"tick2\").remove(),r.xaxislayer.selectAll(\".\"+i._id+\"divider\").remove(),r.yaxislayer.selectAll(\".\"+a._id+\"divider\").remove(),r.minorGridlayer&&r.minorGridlayer.selectAll(\"path\").remove(),r.gridlayer&&r.gridlayer.selectAll(\"path\").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll(\"path\").remove(),n._infolayer.select(\".g-\"+i._id+\"title\").remove(),n._infolayer.select(\".g-\"+a._id+\"title\").remove()}}));var i=e&&\"redraw\"!==e?e:q.listIds(t);return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=q.getFromId(t,e),i=q.drawOne(t,n,r);return n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},q.drawOne=function(t,e,r){var n,i,l;r=r||{},e.setScale();var u=t._fullLayout,p=e._id,d=p.charAt(0),g=q.counterLetter(p),v=u._plots[e._mainSubplot];if(v){var m=v[d+\"axislayer\"],y=e._mainLinePosition,x=e._mainMirrorPosition,b=e._vals=q.calcTicks(e),_=[e.mirror,y,x].join(\"_\");for(n=0;n<b.length;n++)b[n].axInfo=_;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var w={};if(e.visible){var k,T,M=q.makeTransTickFn(e),A=q.makeTransTickLabelFn(e),S=\"inside\"===e.ticks,E=\"outside\"===e.ticks;if(\"boundaries\"===e.tickson){var C=function(t,e){var r,n=[],i=function(t,e){var r=t.xbnd[e];null!==r&&n.push(s.extendFlat({},t,{x:r}))};if(e.length){for(r=0;r<e.length;r++)i(e[r],0);i(e[r-1],1)}return n}(0,b);T=q.clipEnds(e,C),k=S?T:C}else T=q.clipEnds(e,b),k=S&&\"period\"!==e.ticklabelmode?T:b;var L,P=e._gridVals=T,O=function(t,e){var r,n,i=[],a=e.length&&e[e.length-1].x<e[0].x,o=function(t,e){var r=t.xbnd[e];null!==r&&i.push(s.extendFlat({},t,{x:r}))};if(t.showdividers&&e.length){for(r=0;r<e.length;r++){var l=e[r];l.text2!==n&&o(l,a?1:0),n=l.text2}o(e[r-1],a?0:1)}return i}(e,b);if(!u._hasOnlyLargeSploms){var I=e._subplotsWith,D={};for(n=0;n<I.length;n++){i=I[n];var z=(l=u._plots[i])[g+\"axis\"],R=z._mainAxis._id;if(!D[R]){D[R]=1;var F=\"x\"===d?\"M0,\"+z._offset+\"v\"+z._length:\"M\"+z._offset+\",0h\"+z._length;q.drawGrid(t,e,{vals:P,counterAxis:z,layer:l.gridlayer.select(\".\"+p),minorLayer:l.minorGridlayer.select(\".\"+p),path:F,transFn:M}),q.drawZeroLine(t,e,{counterAxis:z,layer:l.zerolinelayer,path:F,transFn:M})}}}var N=q.getTickSigns(e),B=q.getTickSigns(e,\"minor\");if(e.ticks||e.minor&&e.minor.ticks){var j,U,G,Y,W=q.makeTickPath(e,y,N[2]),X=q.makeTickPath(e,y,B[2],{minor:!0});if(e._anchorAxis&&e.mirror&&!0!==e.mirror?(j=q.makeTickPath(e,x,N[3]),U=q.makeTickPath(e,x,B[3],{minor:!0}),G=W+j,Y=X+U):(j=\"\",U=\"\",G=W,Y=X),e.showdividers&&E&&\"boundaries\"===e.tickson){var Z={};for(n=0;n<O.length;n++)Z[O[n].x]=1;L=function(t){return Z[t.x]?j:G}}else L=function(t){return t.minor?Y:G}}if(q.drawTicks(t,e,{vals:k,layer:m,path:L,transFn:M}),\"allticks\"===e.mirror){var K=Object.keys(e._linepositions||{});for(n=0;n<K.length;n++){i=K[n],l=u._plots[i];var J=e._linepositions[i]||[],$=J[0],Q=J[1],tt=J[2],et=q.makeTickPath(e,$,tt?N[0]:B[0],{minor:tt})+q.makeTickPath(e,Q,tt?N[1]:B[1],{minor:tt});q.drawTicks(t,e,{vals:k,layer:l[d+\"axislayer\"],path:et,transFn:M})}}var rt=[];if(rt.push((function(){return q.drawLabels(t,e,{vals:b,layer:m,plotinfo:l,transFn:A,labelFns:q.makeLabelFns(e,y)})})),\"multicategory\"===e.type){var nt={x:2,y:10}[d];rt.push((function(){var r={x:\"height\",y:\"width\"}[d],n=at()[r]+nt+(e._tickAngles[p+\"tick\"]?e.tickfont.size*V:0);return q.drawLabels(t,e,{vals:bt(e,b),layer:m,cls:p+\"tick2\",repositionOnUpdate:!0,secondary:!0,transFn:M,labelFns:q.makeLabelFns(e,y+n*N[4])})})),rt.push((function(){return e._depth=N[4]*(at(\"tick2\")[e.side]-y),function(t,e,r){var n=e._id+\"divider\",i=r.vals,a=r.layer.selectAll(\"path.\"+n).data(i,wt);a.exit().remove(),a.enter().insert(\"path\",\":first-child\").classed(n,1).classed(\"crisp\",1).call(f.stroke,e.dividercolor).style(\"stroke-width\",h.crispRound(t,e.dividerwidth,1)+\"px\"),a.attr(\"transform\",r.transFn).attr(\"d\",r.path)}(t,e,{vals:O,layer:m,path:q.makeTickPath(e,y,N[4],{len:e._depth}),transFn:M})}))}else e.title.hasOwnProperty(\"standoff\")&&rt.push((function(){e._depth=N[4]*(at()[e.side]-y)}));var it=o.getComponentMethod(\"rangeslider\",\"isVisible\")(e);return rt.push((function(){var r,n,i,s,l=e.side.charAt(0),c=H[e.side].charAt(0),f=q.getPxPosition(t,e),h=E?e.ticklen:0;if((e.automargin||it)&&(\"multicategory\"===e.type?r=at(\"tick2\"):(r=at(),\"x\"===d&&\"b\"===l&&(e._depth=Math.max(r.width>0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if(\"x\"===d){if(\"b\"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var v=r.right-(e._offset+e._length);v>0&&(n.xr=1,n.r=v);var m=e._offset-r.left;m>0&&(n.xl=0,n.l=m)}}else if(\"l\"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]=\"free\"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==u._dfltTitle[d]&&(n[l]+=kt(e)+(e.title.standoff||0)),e.mirror&&\"free\"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=h),!0===e.mirror||\"ticks\"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:\"all\"!==e.mirror&&\"allticks\"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}it&&(s=o.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(t,e)),\"string\"==typeof e.automargin&&(xt(n,e.automargin),xt(i,e.automargin)),a.autoMargin(t,At(e),n),a.autoMargin(t,St(e),i),a.autoMargin(t,Et(e),s)})),r.skipTitle||it&&\"bottom\"===e.side||rt.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty(\"standoff\"))r=e._depth+e.title.standoff+kt(e);else{var s=Dt(e);if(\"multicategory\"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,\"outside\"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+=\"x\"===a?\"top\"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):\"right\"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var u,f,p,d,g=q.getPxPosition(t,e);if(\"x\"===a?(f=e._offset+e._length/2,p=\"top\"===e.side?g-r:g+r):(p=e._offset+e._length/2,f=\"right\"===e.side?g+r:g-r,u={rotate:\"-90\",offset:0}),\"multicategory\"!==e.type){var v=e._selections[e._id+\"tick\"];if(d={selection:v,side:e.side},v&&v.node()&&v.node().parentNode){var m=h.getTranslate(v.node().parentNode);d.offsetLeft=m.x,d.offsetTop=m.y}e.title.hasOwnProperty(\"standoff\")&&(d.pad=0)}return c.draw(t,i+\"title\",{propContainer:e,propName:e._name+\".title.text\",placeholder:n._dfltTitle[a],avoid:d,transform:u,attributes:{x:f,y:p,\"text-anchor\":\"middle\"}})}(t,e)})),s.syncOrAsync(rt)}}function at(t){var r=p+(t||\"tick\");return w[r]||(w[r]=function(t,e){var r,n,i,a;return t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=Mt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0),{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},q.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:\"top\",y:\"right\"}[r],i=t.side===n?1:-1,a=[-1,1,i,-i];return\"inside\"!==(e?(t.minor||{}).ticks:t.ticks)==(\"x\"===r)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},q.makeTransTickFn=function(t){return\"x\"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},q.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||\"\",r=function(t){return-1!==e.indexOf(t)},n=r(\"top\"),i=r(\"left\"),a=r(\"right\"),o=r(\"bottom\"),s=r(\"inside\"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=t.side,c=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;return(o||n)&&(c+=h*U,f+=(t.linewidth||0)/2),(i||a)&&(c+=(t.linewidth||0)/2,f+=3),s&&\"top\"===u&&(f-=h*(1-U)),(i||n)&&(c=-c),\"bottom\"!==u&&\"right\"!==u||(f=-f),[l?c:0,s?f:0]}(t),r=e[0],n=e[1];return\"x\"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(_t(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(_t(e)))}},q.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return\"\";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),s=(t.linewidth||1)/2;return\"x\"===o?\"M0,\"+(e+s*r)+\"v\"+a*r:\"M\"+(e+s*r)+\",0h\"+a*r},q.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||\"\",a=function(t){return-1!==n.indexOf(t)},o=a(\"top\"),l=a(\"left\"),u=a(\"right\"),c=a(\"bottom\")||l||o||u,f=a(\"inside\"),h=\"inside\"===n&&\"inside\"===t.ticks||!f&&\"outside\"===t.ticks&&\"boundaries\"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:c&&(g=0),h&&(p+=g,r)){var v=s.deg2rad(r);p=g*Math.cos(v)+1,d=g*Math.sin(v)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var m,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},k=0,T=t.side,M=t._id.charAt(0),A=t.tickangle;if(\"x\"===M)b=(_=!f&&\"bottom\"===T||f&&\"top\"===T)?1:-1,f&&(b*=-1),m=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(A)&&(f?x+=j:x=-90===A&&\"bottom\"===T?U:90===A&&\"top\"===T?j:.5,k=j/2*(A/90)),w.xFn=function(t){return t.dx+m+k*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(c){if(l)return\"end\";if(u)return\"start\"}return i(e)&&0!==e&&180!==e?e*b<0!==f?\"end\":\"start\":\"middle\"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:\"top\"===t.side!==f?-n:0};else if(\"y\"===M){if(b=(_=!f&&\"left\"===T||f&&\"right\"===T)?1:-1,f&&(b*=-1),m=p,y=d*b,x=0,f||90!==Math.abs(A)||(x=-90===A&&\"left\"===T||90===A&&\"right\"===T?U:.5),f){var S=i(A)?+A:0;if(0!==S){var E=s.deg2rad(S);k=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(t){return t.dx+e-(m+t.fontSize*x)*b+k*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*j},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?\"middle\":_?\"end\":\"start\"},w.heightFn=function(e,r,n){return\"right\"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},q.drawTicks=function(t,e,r){r=r||{};var i=e._id+\"tick\",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll(\"path.\"+i).data(a,wt);o.exit().remove(),o.enter().append(\"path\").classed(i,1).classed(\"ticks\",1).classed(\"crisp\",!1!==r.crisp).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style(\"stroke-width\",(function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+\"px\"})).attr(\"d\",r.path).style(\"display\",null),zt(e,[R]),o.attr(\"transform\",r.transFn)},q.drawGrid=function(t,e,r){r=r||{};var i=e._id+\"grid\",a=e.minor&&e.minor.showgrid,o=a?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&q.shouldShowZeroLine(t,e,l))for(var u=\"array\"===e.tickmode,c=0;c<s.length;c++){var p=s[c].x;if(u?!p:Math.abs(p)<e.dtick/100){if(s=s.slice(0,c).concat(s.slice(c+1)),!u)break;c--}}e._gw=h.crispRound(t,e.gridwidth,1);for(var d=a?h.crispRound(t,e.minor.gridwidth,1):0,g=r.layer,v=r.minorLayer,m=1;m>=0;m--){var y=m?g:v;if(y){var x=y.selectAll(\"path.\"+i).data(m?s:o,wt);x.exit().remove(),x.enter().append(\"path\").classed(i,1).classed(\"crisp\",!1!==r.crisp),x.attr(\"transform\",r.transFn).attr(\"d\",r.path).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||\"#ddd\")})).style(\"stroke-dasharray\",(function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style(\"stroke-width\",(function(t){return(t.minor?d:e._gw)+\"px\"})).style(\"display\",null),\"function\"==typeof r.path&&x.attr(\"d\",r.path)}}zt(e,[D,z])},q.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+\"zl\",i=q.shouldShowZeroLine(t,e,r.counterAxis),a=r.layer.selectAll(\"path.\"+n).data(i?[{x:0,id:e._id}]:[]);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"zl\",1).classed(\"crisp\",!1!==r.crisp).each((function(){r.layer.selectAll(\"path\").sort((function(t,e){return W(t.id,e.id)}))})),a.attr(\"transform\",r.transFn).attr(\"d\",r.path).call(f.stroke,e.zerolinecolor||f.defaultLine).style(\"stroke-width\",h.crispRound(t,e.zerolinewidth,e._gw||1)+\"px\").style(\"display\",null),zt(e,[I])},q.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,c=o.charAt(0),f=r.cls||o+\"tick\",p=r.vals.filter((function(t){return t.text})),d=r.labelFns,g=r.secondary?0:e.tickangle,v=(e._prevTickAngles||{})[f],m=r.layer.selectAll(\"g.\"+f).data(e.showticklabels?p:[],wt),y=[];function x(t,a){t.each((function(t){var o=n.select(this),s=o.select(\".text-math-group\"),c=d.anchorFn(t,a),f=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?\" rotate(\"+a+\",\"+d.xFn(t)+\",\"+(d.yFn(t)-t.fontSize/2)+\")\":\"\"),p=u.lineCount(o),g=V*t.fontSize,v=d.heightFn(t,i(a)?+a:0,(p-1)*g);if(v&&(f+=l(0,v)),s.empty()){var m=o.select(\"text\");m.attr({transform:f,\"text-anchor\":c}),m.style(\"opacity\",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var y=h.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr(\"transform\",f+l(y,0))}}))}m.enter().append(\"g\").classed(f,1).append(\"text\").attr(\"text-anchor\",\"middle\").each((function(e){var r=n.select(this),i=t._promises.length;r.call(u.positionText,d.xFn(e),d.yFn(e)).call(h.font,e.font,e.fontSize,e.fontColor).text(e.text).call(u.convertToTspans,t),t._promises[i]?y.push(t._promises.pop().then((function(){x(r,g)}))):x(r,g)})),zt(e,[F]),m.exit().remove(),r.repositionOnUpdate&&m.each((function(t){n.select(this).select(\"text\").call(u.positionText,d.xFn(t),d.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&\"allow\"!==r){var i=-1!==r.indexOf(\"hide\"),o=\"x\"===e._id.charAt(0),l=0,u=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf(\"domain\")){var c=s.simpleMap(e.range,e.r2l);l=e.l2p(c[0])+e._offset,u=e.l2p(c[1])+e._offset}var f=Math.min(l,u),p=Math.max(l,u),d=e.side,g=1/0,v=-1/0;for(var y in m.each((function(t){var r=n.select(this);if(r.select(\".text-math-group\").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>p||a.left<f)&&(s=1):(a.bottom>p||a.top+(e.tickangle?0:t.fontSize/4)<f)&&(s=1);var l=r.select(\"text\");s?i&&l.style(\"opacity\",0):(l.style(\"opacity\",1),g=\"bottom\"===d||\"right\"===d?Math.min(g,o?a.top:a.left):-1/0,v=\"top\"===d||\"left\"===d?Math.max(v,o?a.bottom:a.right):1/0)}})),a._plots){var x=a._plots[y];if(e._id===x.xaxis._id||e._id===x.yaxis._id){var b=o?x.yaxis:x.xaxis;b&&(b[\"_visibleLabelMin_\"+e._id]=g,b[\"_visibleLabelMax_\"+e._id]=v)}}}},e._hideCounterAxisInsideTickLabels=function(t){var r=\"x\"===e._id.charAt(0),i=[];for(var o in a._plots){var s=a._plots[o];e._id!==s.xaxis._id&&e._id!==s.yaxis._id||i.push(r?s.yaxis:s.xaxis)}i.forEach((function(r,i){r&&Dt(r)&&(t||[I,z,D,R,F]).forEach((function(t){var o=\"tick\"===t.K&&\"text\"===t.L&&\"period\"===e.ticklabelmode,s=a._plots[e._mainSubplot];(t.K===I.K?s.zerolinelayer.selectAll(\".\"+e._id+\"zl\"):t.K===z.K?s.minorGridlayer.selectAll(\".\"+e._id):t.K===D.K?s.gridlayer.selectAll(\".\"+e._id):s[e._id.charAt(0)+\"axislayer\"]).each((function(){var a=n.select(this);t.L&&(a=a.selectAll(t.L)),a.each((function(a){var s=e.l2p(o?_t(a):a.x)+e._offset,l=n.select(this);s<e[\"_visibleLabelMax_\"+r._id]&&s>e[\"_visibleLabelMin_\"+r._id]?l.style(\"display\",\"none\"):\"tick\"!==t.K||i||l.style(\"display\",null)}))}))}))}))},x(m,v+1?v:g);var b=null;e._selections&&(e._selections[f]=m);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===v?(b=90,_.push((function(){x(m,v)}))):_.push((function(){if(x(m,g),p.length&&\"x\"===c&&!i(g)&&(\"log\"!==e.type||\"D\"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(m.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=Mt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),\"boundaries\"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),u=e.ticklabelposition||\"\",f=function(t){return-1!==u.indexOf(t)},d=f(\"top\"),v=f(\"left\"),y=f(\"right\"),_=f(\"bottom\")||v||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||\"multicategory\"===e.type||\"realaxis\"===e._name;for(t=0;t<a.length-1;t++)if(s.bBoxIntersect(a[t],a[t+1],_)){b=w?90:30;break}}else{var k=2;for(e.ticks&&(k+=e.tickwidth/2),t=0;t<a.length;t++){var T=p[t].xbnd,M=a[t];if(null!==T[0]&&M.left-e.l2p(T[0])<k||null!==T[1]&&e.l2p(T[1])-M.right<k){b=90;break}}}b&&x(m,b)}})),e._tickAngles&&_.push((function(){e._tickAngles[f]=null===b?i(g)?g:0:b}));var w=e._anchorAxis;w&&w.autorange&&Dt(e)&&!X(a,e._id)&&(a._insideTickLabelsAutorange||(a._insideTickLabelsAutorange={}),a._insideTickLabelsAutorange[w._name+\".autorange\"]=w.autorange,_.push((function(){m.each((function(t,r){var n=Mt(this);n.select(\".text-math-group\").empty()&&(e._vals[r].bb=h.bBox(n.node()))}))})));var k=s.syncOrAsync(_);return k&&k.then&&t._promises.push(k),k},q.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),a=e.side;return\"free\"!==e.anchor?r=e._anchorAxis:\"x\"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:\"y\"===i&&(r={_offset:n.l+(e.position||0)*n.w,_length:0}),\"top\"===a||\"left\"===a?r._offset:\"bottom\"===a||\"right\"===a?r._offset+r._length:void 0},q.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&(\"linear\"===e.type||\"-\"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===O)&&(Tt(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var a=t._fullLayout,o=e._id.charAt(0),s=q.counterLetter(e._id),l=e._offset+(Math.abs(n[0])<Math.abs(n[1])==(\"x\"===o)?0:e._length),u=a._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return p(r);for(var c=q.list(t,s),f=0;f<c.length;f++){var h=c[f];if(h._mainAxis===i&&p(h))return!0}}function p(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return\"number\"==typeof t&&Math.abs(t-l)<r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a<r.length;a++){var s=r[a];if(!0===s.visible&&s.xaxis+s.yaxis===n){if(o.traceIs(s,\"bar-like\")&&s.orientation==={x:\"h\",y:\"v\"}[i])return!0;if(s.fill&&s.fill.charAt(s.fill.length-1)===i)return!0}}return!1}(t,e))},q.clipEnds=function(t,e){return e.filter((function(e){return Tt(t,e.x)}))},q.allowAutoMargin=function(t){for(var e=q.list(t,\"\",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&(a.allowAutoMargin(t,At(n)),n.mirror&&a.allowAutoMargin(t,St(n))),o.getComponentMethod(\"rangeslider\",\"isVisible\")(n)&&a.allowAutoMargin(t,Et(n))}},q.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,u=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],Ct(u.x,l.x),Ct(u.y,l.y);Ct(u.x,[o]),Ct(u.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)Lt(t,r[n].x,r[n].y)}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../components/titles\":476,\"../../constants/alignment\":483,\"../../constants/numerical\":491,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/plots\":628,\"../../registry\":647,\"./autorange\":565,\"./axis_autotype\":567,\"./axis_ids\":570,\"./clean_ticks\":572,\"./layout_attributes\":579,\"./set_convert\":585,\"@plotly/d3\":58,\"fast-isnumeric\":190}],567:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM,o=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,u=Math.round;function c(t,e){return e?n(t):\"number\"==typeof t}function f(t){return Math.max(1,(t-1)/1e3)}e.exports=function(t,e,r){var i=t,h=r.noMultiCategory;if(o(i)&&!i.length)return\"-\";if(!h&&function(t){return o(t[0])&&o(t[1])}(i))return\"multicategory\";if(h&&Array.isArray(i[0])){for(var p=[],d=0;d<i.length;d++)if(o(i[d]))for(var g=0;g<i[d].length;g++)p.push(i[d][g]);i=p}if(function(t,e){for(var r=t.length,i=f(r),a=0,o=0,l={},c=0;c<r;c+=i){var h=t[u(c)],p=String(h);l[p]||(l[p]=1,s(h,e)&&a++,n(h)&&o++)}return a>2*o}(i,e))return\"date\";var v=\"strict\"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},c=0;c<r;c+=n){var h=t[u(c)],p=String(h);if(!s[p]){s[p]=1;var d=typeof h;\"boolean\"===d?o++:(e?l(h)!==a:\"number\"===d)?i++:\"string\"===d&&o++}}return o>2*i}(i,v)?\"category\":function(t,e){for(var r=t.length,n=0;n<r;n++)if(c(t[n],e))return!0;return!1}(i,v)?\"linear\":\"-\"}},{\"../../constants/numerical\":491,\"../../lib\":515,\"fast-isnumeric\":190}],568:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../../plot_api/plot_template\"),s=t(\"../array_container_defaults\"),l=t(\"./layout_attributes\"),u=t(\"./tick_value_defaults\"),c=t(\"./tick_mark_defaults\"),f=t(\"./tick_label_defaults\"),h=t(\"./prefix_suffix_defaults\"),p=t(\"./category_order_defaults\"),d=t(\"./line_grid_defaults\"),g=t(\"./set_convert\"),v=t(\"./constants\").WEEKDAY_PATTERN,m=t(\"./constants\").HOUR_PATTERN;function y(t,e,r){function i(r,n){return a.coerce(t,e,l.rangebreaks,r,n)}if(i(\"enabled\")){var o=i(\"bounds\");if(o&&o.length>=2){var s,u,c=\"\";if(2===o.length)for(s=0;s<2;s++)if(u=b(o[s])){c=v;break}var f=i(\"pattern\",c);if(f===v)for(s=0;s<2;s++)(u=b(o[s]))&&(e.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case v:if(!n(u))return void(e.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=u;break;case m:if(!n(u))return void(e.enabled=!1);if((u=+u)<0||u>24)return void(e.enabled=!1);e.bounds[s]=o[s]=u}if(!1===r.autorange){var h=r.range;if(h[0]<h[1]){if(o[0]<h[0]&&o[1]>h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]<h[1])return void(e.enabled=!1)}}else{var p=i(\"values\");if(!p||!p.length)return void(e.enabled=!1);i(\"dvalue\")}}}e.exports=function(t,e,r,n,m){var x,b=n.letter,_=n.font||{},w=n.splomStash||{},k=r(\"visible\",!n.visibleDflt),T=e._template||{},M=e.type||T.type||\"-\";\"date\"===M&&(i.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\",n.calendar),n.noTicklabelmode||(x=r(\"ticklabelmode\")));var A=\"\";n.noTicklabelposition&&\"multicategory\"!==M||(A=a.coerce(t,e,{ticklabelposition:{valType:\"enumerated\",dflt:\"outside\",values:\"period\"===x?[\"outside\",\"inside\"]:\"x\"===b?[\"outside\",\"inside\",\"outside left\",\"inside left\",\"outside right\",\"inside right\"]:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside bottom\",\"inside bottom\"]}},\"ticklabelposition\")),n.noTicklabeloverflow||r(\"ticklabeloverflow\",-1!==A.indexOf(\"inside\")?\"hide past domain\":\"category\"===M||\"multicategory\"===M?\"allow\":\"hide past div\"),g(e,m);var S=!e.isValidRange(t.range);S&&n.reverseDflt&&(S=\"reversed\"),!r(\"autorange\",S)||\"linear\"!==M&&\"-\"!==M||r(\"rangemode\"),r(\"range\"),e.cleanRange(),p(t,e,r,n),\"category\"===M||n.noHover||r(\"hoverformat\");var E=r(\"color\"),C=E!==l.color.dflt?E:_.color,L=w.label||m._dfltTitle[b];if(h(t,e,r,M,n),!k)return e;r(\"title.text\",L),a.coerceFont(r,\"title.font\",{family:_.family,size:a.bigFont(_.size),color:C}),u(t,e,r,M);var P=n.hasMinor;if(P&&(o.newContainer(e,\"minor\"),u(t,e,r,M,{isMinor:!0})),f(t,e,r,M,n),c(t,e,r,n),P){var O=n.isMinor;n.isMinor=!0,c(t,e,r,n),n.isMinor=O}d(t,e,r,{dfltColor:E,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:P,attributes:l}),!P||e.minor.ticks||e.minor.showgrid||delete e.minor,(e.showline||e.ticks)&&r(\"mirror\"),n.automargin&&r(\"automargin\");var I,D=\"multicategory\"===M;if(n.noTickson||\"category\"!==M&&!D||!e.ticks&&!e.showgrid||(D&&(I=\"boundaries\"),\"boundaries\"===r(\"tickson\",I)&&delete e.ticklabelposition),D&&r(\"showdividers\")&&(r(\"dividercolor\"),r(\"dividerwidth\")),\"date\"===M)if(s(t,e,{name:\"rangebreaks\",inclusionAttr:\"enabled\",handleItemDefaults:y}),e.rangebreaks.length){for(var z=0;z<e.rangebreaks.length;z++)if(e.rangebreaks[z].pattern===v){e._hasDayOfWeekBreaks=!0;break}if(g(e,m),m._has(\"scattergl\")||m._has(\"splom\"))for(var R=0;R<n.data.length;R++){var F=n.data[R];\"scattergl\"!==F.type&&\"splom\"!==F.type||(F.visible=!1,a.warn(F.type+\" traces do not work on axes with rangebreaks. Setting trace \"+F.index+\" to `visible: false`.\"))}}else delete e.rangebreaks;return e};var x={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function b(t){if(\"string\"==typeof t)return x[t.substr(0,3).toLowerCase()]}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../registry\":647,\"../array_container_defaults\":561,\"./category_order_defaults\":571,\"./constants\":573,\"./layout_attributes\":579,\"./line_grid_defaults\":581,\"./prefix_suffix_defaults\":583,\"./set_convert\":585,\"./tick_label_defaults\":587,\"./tick_mark_defaults\":588,\"./tick_value_defaults\":589,\"fast-isnumeric\":190}],569:[function(t,e,r){\"use strict\";var n=t(\"../../constants/docs\"),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(t,e){return[\"Sets the \"+t+\" formatting rule\"+(e?\"for `\"+e+\"` \":\"\"),\"using d3 formatting mini-languages\",\"which are very similar to those in Python. For numbers, see: \"+i+\".\"].join(\" \")}function s(t,e){return o(t,e)+[\" And for dates see: \"+a+\".\",\"We add two items to d3's date formatter:\",\"*%h* for half of the year as a decimal number as well as\",\"*%{n}f* for fractional seconds\",\"with n digits. For example, *2016-10-13 09:15:23.456* with tickformat\",\"*%H~%M~%S.%2f* would display *09~15~23.46*\"].join(\" \")}e.exports={axisHoverFormat:function(t,e){return{valType:\"string\",dflt:\"\",editType:\"none\",description:(e?o:s)(\"hover text\",t)+[\"By default the values are formatted using \"+(e?\"generic number format\":\"`\"+t+\"axis.hoverformat`\")+\".\"].join(\" \")}},descriptionOnlyNumbers:o,descriptionWithDates:s}},{\"../../constants/docs\":486}],570:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./constants\");function a(t,e){if(e&&e.length)for(var r=0;r<e.length;r++)if(e[r][t])return!0;return!1}r.id2name=function(t){if(\"string\"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.split(\" \")[0].substr(1);return\"1\"===e&&(e=\"\"),t.charAt(0)+\"axis\"+e}},r.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return\"1\"===e&&(e=\"\"),t.charAt(0)+e}},r.cleanId=function(t,e,r){var n=/( domain)$/.test(t);if(\"string\"==typeof t&&t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)&&(!n||r)){var a=t.split(\" \")[0].substr(1).replace(/^0+/,\"\");return\"1\"===a&&(a=\"\"),t.charAt(0)+a+(n&&r?\" domain\":\"\")}},r.list=function(t,e,n){var i=t._fullLayout;if(!i)return[];var a,o=r.listIds(t,e),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+\"axis\"+l.substr(1)]}if(!n){var u=i._subplots.gl3d||[];for(a=0;a<u.length;a++){var c=i[u[a]];e?s.push(c[e+\"axis\"]):s.push(c.xaxis,c.yaxis,c.zaxis)}}return s},r.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+\"axis\"]:n.xaxis.concat(n.yaxis)},r.getFromId=function(t,e,n){var i=t._fullLayout;return e=void 0===e||\"string\"!=typeof e?e:e.replace(\" domain\",\"\"),\"x\"===n?e=e.replace(/y[0-9]*/,\"\"):\"y\"===n&&(e=e.replace(/x[0-9]*/,\"\")),i[r.id2name(e)]},r.getFromTrace=function(t,e,i){var a=t._fullLayout,o=null;if(n.traceIs(e,\"gl3d\")){var s=e.scene;\"scene\"===s.substr(0,5)&&(o=a[s][i+\"axis\"])}else o=r.getFromId(t,e[i+\"axis\"]||i);return o},r.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(\" \")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{\"../../registry\":647,\"./constants\":573}],571:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){if(\"category\"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i=\"array\");var s,l=r(\"categoryorder\",i);\"array\"===l&&(s=r(\"categoryarray\")),o||\"array\"!==l||(l=e.categoryorder=\"trace\"),\"trace\"===l?e._initialCategories=[]:\"array\"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+\"axis\"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var u=l[i];null!=u&&(o[u]=1)}}return Object.keys(o)}(e,n).sort(),\"category ascending\"===l?e._initialCategories=s:\"category descending\"===l&&(e._initialCategories=s.reverse()))}}},{}],572:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\"),o=a.ONEDAY,s=a.ONEWEEK;r.dtick=function(t,e){var r=\"log\"===e,i=\"date\"===e,a=\"category\"===e,s=i?o:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:a?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if(\"string\"!=typeof t||!i&&!r)return s;var l=t.charAt(0),u=t.substr(1);return(u=n(u)?Number(u):0)<=0||!(i&&\"M\"===l&&u===Math.round(u)||r&&\"L\"===l||r&&\"D\"===l&&(1===u||2===u))?s:t},r.tick0=function(t,e,r,a){return\"date\"===e?i.cleanDate(t,i.dateTick0(r,a%s==0?1:0)):\"D1\"!==a&&\"D2\"!==a?n(t)?Number(t):0:void 0}},{\"../../constants/numerical\":491,\"../../lib\":515,\"fast-isnumeric\":190}],573:[function(t,e,r){\"use strict\";var n=t(\"../../lib/regex\").counter;e.exports={idRegex:{x:n(\"x\",\"( domain)?\"),y:n(\"y\",\"( domain)?\")},attrRegex:n(\"[xy]axis\"),xAxisMatch:n(\"xaxis\"),yAxisMatch:n(\"yaxis\"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:\"hour\",WEEKDAY_PATTERN:\"day of week\",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[\"imagelayer\",\"heatmaplayer\",\"contourcarpetlayer\",\"contourlayer\",\"funnellayer\",\"waterfalllayer\",\"barlayer\",\"carpetlayer\",\"violinlayer\",\"boxlayer\",\"ohlclayer\",\"scattercarpetlayer\",\"scatterlayer\"],clipOnAxisFalseQuery:[\".scatterlayer\",\".barlayer\",\".funnellayer\",\".waterfalllayer\"],layerValue2layerClass:{\"above traces\":\"above\",\"below traces\":\"below\"}}},{\"../../lib/regex\":532}],574:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./autorange\"),a=t(\"./axis_ids\").id2name,o=t(\"./layout_attributes\"),s=t(\"./scale_zoom\"),l=t(\"./set_convert\"),u=t(\"../../constants/numerical\").ALMOST_EQUAL,c=t(\"../../constants/alignment\").FROM_BL;function f(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,u=s._axisConstraintGroups,c=s._axisMatchGroups,f=e._id,g=f.charAt(0),v=((s._splomAxes||{})[g]||{})[f]||{},m=e._id,y=\"x\"===m.charAt(0);function x(r,i){return n.coerce(t,e,o,r,i)}e._matchGroup=null,e._constraintGroup=null,x(\"constrain\",l?\"domain\":\"range\"),n.coerce(t,e,{constraintoward:{valType:\"enumerated\",values:y?[\"left\",\"center\",\"right\"]:[\"bottom\",\"middle\",\"top\"],dflt:y?\"center\":\"middle\"}},\"constraintoward\");var b,_,w=e.type,k=[];for(b=0;b<i.length;b++)(_=i[b])!==m&&s[a(_)].type===w&&k.push(_);var T=p(u,m);if(T){var M=[];for(b=0;b<k.length;b++)T[_=k[b]]||M.push(_);k=M}var A,S,E=k.length;E&&(t.matches||v.matches)&&(A=n.coerce(t,e,{matches:{valType:\"enumerated\",values:k,dflt:-1!==k.indexOf(v.matches)?v.matches:void 0}},\"matches\"));var C=l&&!y?e.anchor:void 0;if(E&&!A&&(t.scaleanchor||C)&&(S=n.coerce(t,e,{scaleanchor:{valType:\"enumerated\",values:k}},\"scaleanchor\",C)),A){e._matchGroup=d(c,m,A,1);var L=s[a(A)],P=h(s,e)/h(s,L);y!==(\"x\"===A.charAt(0))&&(P=(y?\"x\":\"y\")+P),d(u,m,A,P)}else t.matches&&-1!==i.indexOf(t.matches)&&n.warn(\"ignored \"+e._name+'.matches: \"'+t.matches+'\" to avoid an infinite loop');if(S){var O=x(\"scaleratio\");O||(O=e.scaleratio=1),d(u,m,S,O)}else t.scaleanchor&&-1!==i.indexOf(t.scaleanchor)&&n.warn(\"ignored \"+e._name+'.scaleanchor: \"'+t.scaleanchor+'\" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function h(t,e){var r=e.domain;return r||(r=t[a(e.overlaying)].domain),r[1]-r[0]}function p(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function d(t,e,r,n){var i,a,o,s,l,u=p(t,e);null===u?((u={})[e]=1,l=t.length,t.push(u)):l=t.indexOf(u);var c=Object.keys(u);for(i=0;i<t.length;i++)if(o=t[i],i!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)o[s=c[a]]=g(f,g(n,u[s]));return void t.splice(l,1)}if(1!==n)for(a=0;a<c.length;a++){var h=c[a];u[h]=g(n,u[h])}u[r]=1}function g(t,e){var r,n,i=\"\",a=\"\";\"string\"==typeof t&&(r=(i=t.match(/^[xy]*/)[0]).length,t=+t.substr(r)),\"string\"==typeof e&&(n=(a=e.match(/^[xy]*/)[0]).length,e=+e.substr(n));var o=t*e;return r||n?r&&n&&i.charAt(0)!==a.charAt(0)?r===n?o:(r>n?i.substr(n):a.substr(r))+o:i+a+t*e:o}function v(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;o<a.length;o++){var s=a[o],l=t[s];if(\"string\"==typeof l){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.substr(c);for(var f=\"y\"===u.charAt(0)?n:1/n,h=0;h<c;h++)l*=f}i[s]=l}return i}function m(t,e){var r=t._inputDomain,n=c[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}r.handleDefaults=function(t,e,r){var i,o,s,u,c,h,p,d,g=r.axIds,v=r.axHasImage,m=e._axisConstraintGroups=[],y=e._axisMatchGroups=[];for(i=0;i<g.length;i++)f(c=t[u=a(g[i])],h=e[u],{axIds:g,layoutOut:e,hasImage:v[u]});function x(t,r){for(i=0;i<t.length;i++)for(s in o=t[i])e[a(s)][r]=o}for(x(y,\"_matchGroup\"),i=0;i<m.length;i++)for(s in o=m[i])if((h=e[a(s)]).fixedrange){for(var b in o){var _=a(b);!1===(t[_]||{}).fixedrange&&n.warn(\"fixedrange was specified as false for axis \"+_+\" but was overridden because another axis in its constraint group has fixedrange true\"),e[_].fixedrange=!0}break}for(i=0;i<m.length;){for(s in o=m[i]){(h=e[a(s)])._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(o).length&&(m.splice(i,1),i--);break}i++}x(m,\"_constraintGroup\");var w=[\"constrain\",\"range\",\"autorange\",\"rangemode\",\"rangebreaks\",\"categoryorder\",\"categoryarray\"],k=!1,T=!1;function M(){d=h[p],\"rangebreaks\"===p&&(T=h._hasDayOfWeekBreaks)}for(i=0;i<y.length;i++){o=y[i];for(var A=0;A<w.length;A++){var S;for(s in p=w[A],d=null,o)if(c=t[u=a(s)],h=e[u],p in h){if(!h.matches&&(S=h,p in c)){M();break}null===d&&p in c&&M()}if(\"range\"===p&&d&&(k=!0),\"autorange\"===p&&null===d&&k&&(d=!1),null===d&&p in S&&(d=S[p]),null!==d)for(s in o)(h=e[a(s)])[p]=\"range\"===p?d.slice():d,\"rangebreaks\"===p&&(h._hasDayOfWeekBreaks=T,l(h,e))}}},r.enforce=function(t){var e,r,n,o,l,c,f,h,p=t._fullLayout,d=p._axisConstraintGroups||[];for(e=0;e<d.length;e++){n=v(d[e],p);var g=Object.keys(n),y=1/0,x=0,b=1/0,_={},w={},k=!1;for(r=0;r<g.length;r++)w[o=g[r]]=l=p[a(o)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),_[o]=c=Math.abs(l._m)/n[o],y=Math.min(y,c),\"domain\"!==l.constrain&&l._constraintShrinkable||(b=Math.min(b,c)),delete l._constraintShrinkable,x=Math.max(x,c),\"domain\"===l.constrain&&(k=!0);if(!(y>u*x)||k)for(r=0;r<g.length;r++)if(c=_[o=g[r]],f=(l=w[o]).constrain,c!==b||\"domain\"===f)if(h=c/b,\"range\"===f)s(l,h);else{var T=l._inputDomain,M=(l.domain[1]-l.domain[0])/(T[1]-T[0]),A=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((h/=M)*A<1){l.domain=l._input.domain=T.slice(),s(l,h);continue}if(A<1&&(l.range=l._input.range=l._inputRange.slice(),h*=A),l.autorange){var S=l.r2l(l.range[0]),E=l.r2l(l.range[1]),C=(S+E)/2,L=C,P=C,O=Math.abs(E-C),I=C-O*h*1.0001,D=C+O*h*1.0001,z=i.makePadFn(p,l,0),R=i.makePadFn(p,l,1);m(l,h);var F,N,B=Math.abs(l._m),j=i.concatExtremes(t,l),U=j.min,V=j.max;for(N=0;N<U.length;N++)(F=U[N].val-z(U[N])/B)>I&&F<L&&(L=F);for(N=0;N<V.length;N++)(F=V[N].val+R(V[N])/B)<D&&F>P&&(P=F);h/=(P-L)/(2*O),L=l.l2r(L),P=l.l2r(P),l.range=l._input.range=S<E?[L,P]:[P,L]}m(l,h)}}},r.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n<r.length;n++)if(r[n][e])return\"g\"+n;return e},r.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&\"domain\"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},{\"../../constants/alignment\":483,\"../../constants/numerical\":491,\"../../lib\":515,\"./autorange\":565,\"./axis_ids\":570,\"./layout_attributes\":579,\"./scale_zoom\":584,\"./set_convert\":585}],575:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"tinycolor2\"),s=t(\"has-passive-events\"),l=t(\"../../registry\"),u=i.strTranslate,c=t(\"../../lib/svg_text_utils\"),f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"../../components/fx\"),d=t(\"./axes\"),g=t(\"../../lib/setcursor\"),v=t(\"../../components/dragelement\"),m=t(\"../../components/dragelement/helpers\"),y=m.selectingOrDrawing,x=m.freeMode,b=t(\"../../constants/alignment\").FROM_TL,_=t(\"../../lib/clear_gl_canvases\"),w=t(\"../../plot_api/subroutines\").redrawReglTraces,k=t(\"../plots\"),T=t(\"./axis_ids\").getFromId,M=t(\"../../components/selections\").prepSelect,A=t(\"../../components/selections\").clearOutline,S=t(\"../../components/selections\").selectOnClick,E=t(\"./scale_zoom\"),C=t(\"./constants\"),L=C.MINDRAG,P=C.MINZOOM,O=!0;function I(t,e,r,n){var a=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed(\"drag\",!0).style({fill:\"transparent\",\"stroke-width\":0}).attr(\"data-subplot\",t.id)}));return a.call(g,n),a.node()}function D(t,e,r,i,a,o,s){var l=I(t,\"rect\",e,r);return n.select(l).call(h.setRect,i,a,o,s),l}function z(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return\"\"}function R(t,e,r,n,i){for(var a=0;a<t.length;a++){var o=t[a];if(!o.fixedrange)if(o.rangebreaks){var s=\"y\"===o._id.charAt(0),l=s?1-e:e,u=s?1-r:r;n[o._name+\".range[0]\"]=o.l2r(o.p2l(l*o._length)),n[o._name+\".range[1]\"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],f=o._rl[1]-c;n[o._name+\".range[0]\"]=o.l2r(c+f*e),n[o._name+\".range[1]\"]=o.l2r(c+f*r)}}if(i&&i.length){var h=(e+(1-r))/2;R(i,h,1-h,n,[])}}function F(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(!n.fixedrange)if(n.rangebreaks){var i=n._length,a=(n.p2l(0+e)-n.p2l(0)+(n.p2l(i+e)-n.p2l(i)))/2;n.range=[n.l2r(n._rl[0]-a),n.l2r(n._rl[1]-a)]}else n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)]}}function N(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function B(t,e,r,n,i){return t.append(\"path\").attr(\"class\",\"zoombox\").style({fill:e>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"transform\",u(r,n)).attr(\"d\",i+\"Z\")}function j(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:f.background,stroke:f.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",u(e,r)).attr(\"d\",\"M0,0Z\")}function U(t,e,r,n,i,a){t.attr(\"d\",n+\"M\"+r.l+\",\"+r.t+\"v\"+r.h+\"h\"+r.w+\"v-\"+r.h+\"h-\"+r.w+\"Z\"),V(t,e,i,a)}function V(t,e,r,n){r||(t.transition().style(\"fill\",n>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),e.transition().style(\"opacity\",1).duration(200))}function H(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function q(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,\"Double-click to zoom back out\"),\"long\"),O=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/2);return\"M\"+(t.l-3.5)+\",\"+(t.t-.5+e)+\"h3v\"+-e+\"h\"+e+\"v-3h-\"+(e+3)+\"ZM\"+(t.r+3.5)+\",\"+(t.t-.5+e)+\"h-3v\"+-e+\"h\"+-e+\"v-3h\"+(e+3)+\"ZM\"+(t.r+3.5)+\",\"+(t.b+.5-e)+\"h-3v\"+e+\"h\"+-e+\"v3h\"+(e+3)+\"ZM\"+(t.l-3.5)+\",\"+(t.b+.5-e)+\"h3v\"+e+\"h\"+e+\"v3h-\"+(e+3)+\"Z\"}function Y(t,e,r,n,a){for(var o,s,l,u,c=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,g=0;g<e.length;g++){var v=e[g];for(o in r)if(v[o]){for(l in v)a&&(p[l]||d[l])||(\"x\"===l.charAt(0)?r:n)[l]||(f[l]=o);for(s in n)a&&(p[s]||d[s])||!v[s]||(c=!0)}for(s in n)if(v[s])for(u in v)a&&(p[u]||d[u])||(\"x\"===u.charAt(0)?r:n)[u]||(h[u]=s)}c&&(i.extendFlat(f,h),h={});var m={},y=[];for(l in f){var x=T(t,l);y.push(x),m[x._id]=x}var b={},_=[];for(u in h){var w=T(t,u);_.push(w),b[w._id]=w}return{xaHash:m,yaHash:b,xaxes:y,yaxes:_,xLinks:f,yLinks:h,isSubplotConstrained:c}}function W(t,e){if(s){var r=void 0!==t.onwheel?\"wheel\":\"mousewheel\";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener(\"wheel\",e,{passive:!1}))}function X(t){var e=[];for(var r in t)e.push(t[r]);return e}e.exports={makeDragBox:function(t,e,r,s,u,f,g,m){var O,I,V,Z,K,J,$,Q,tt,et,rt,nt,it,at,ot,st,lt,ut,ct,ft,ht,pt,dt,gt=t._fullLayout._zoomlayer,vt=g+m===\"nsew\",mt=1===(g+m).length;function yt(){if(O=e.xaxis,I=e.yaxis,tt=O._length,et=I._length,$=O._offset,Q=I._offset,(V={})[O._id]=O,(Z={})[I._id]=I,g&&m)for(var r=e.overlays,n=0;n<r.length;n++){var i=r[n].xaxis;V[i._id]=i;var a=r[n].yaxis;Z[a._id]=a}K=X(V),J=X(Z),it=z(K,m),at=z(J,g),ot=!at&&!it,nt=Y(t,t._fullLayout._axisMatchGroups,V,Z);var o=(rt=Y(t,t._fullLayout._axisConstraintGroups,V,Z,nt)).isSubplotConstrained||nt.isSubplotConstrained;st=m||o,lt=g||o;var s=t._fullLayout;ut=s._has(\"scattergl\"),ct=s._has(\"splom\"),ft=s._has(\"svg\")}yt();var xt=function(t,e,r){return t?\"nsew\"===t?r?\"\":\"pan\"===e?\"move\":\"crosshair\":t.toLowerCase()+\"-resize\":\"pointer\"}(at+it,t._fullLayout.dragmode,vt),bt=D(e,g+m+\"drag\",xt,r,s,u,f);if(ot&&!vt)return bt.onmousedown=null,bt.style.pointerEvents=\"none\",bt;var _t,wt,kt,Tt,Mt,At,St,Et,Ct,Lt,Pt={element:bt,gd:t,plotinfo:e};function Ot(){Pt.plotinfo.selection=!1,A(t)}function It(t,r){var i=Pt.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||mt||qt(),vt)o.indexOf(\"select\")>-1&&S(r,i,K,J,e.id,Pt),o.indexOf(\"event\")>-1&&p.click(i,r,e.id);else if(1===t&&mt){var s=g?I:O,u=\"s\"===g||\"w\"===m?0:1,f=s._name+\".range[\"+u+\"]\",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return\"date\"===t.type?n:\"log\"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a(\".\"+r+\"g\")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a(\".\"+String(r)+\"g\")(n))}(s,u),d=\"left\",v=\"middle\";if(s.fixedrange)return;g?(v=\"n\"===g?\"top\":\"bottom\",\"right\"===s.side&&(d=\"right\")):\"e\"===m&&(d=\"right\"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:\"#444\",horizontalAlign:d,verticalAlign:v}).on(\"edit\",(function(t){var e=s.d2r(t);void 0!==e&&l.call(\"_guiRelayout\",i,f,e)}))}}}function Dt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St=\"\",kt.r=kt.l,kt.t=kt.b,Ct.attr(\"d\",\"M0,0Z\")}if(kt.l=Math.min(_t,n),kt.r=Math.max(_t,n),kt.t=Math.min(wt,i),kt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St=\"xy\",a/tt>o/et?(o=a*et/tt,wt>i?kt.t=wt-o:kt.b=wt+o):(a=o*tt/et,_t>n?kt.l=_t-a:kt.r=_t+a),Ct.attr(\"d\",G(kt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St=\"xy\";var l=Math.min(kt.l/tt,(et-kt.b)/et),u=Math.max(kt.r/tt,(et-kt.t)/et);kt.l=l*tt,kt.r=u*tt,kt.b=(1-l)*et,kt.t=(1-u)*et,Ct.attr(\"d\",G(kt))}else s();else!at||o<Math.min(Math.max(.6*a,L),P)?a<L||!it?s():(kt.t=0,kt.b=et,St=\"x\",Ct.attr(\"d\",function(t,e){return\"M\"+(t.l-.5)+\",\"+(e-P-.5)+\"h-3v\"+(2*P+1)+\"h3ZM\"+(t.r+.5)+\",\"+(e-P-.5)+\"h3v\"+(2*P+1)+\"h-3Z\"}(kt,wt))):!it||a<Math.min(.6*o,P)?(kt.l=0,kt.r=tt,St=\"y\",Ct.attr(\"d\",function(t,e){return\"M\"+(e-P-.5)+\",\"+(t.t-.5)+\"v-3h\"+(2*P+1)+\"v3ZM\"+(e-P-.5)+\",\"+(t.b+.5)+\"v3h\"+(2*P+1)+\"v-3Z\"}(kt,_t))):(St=\"xy\",Ct.attr(\"d\",G(kt)));kt.w=kt.r-kt.l,kt.h=kt.b-kt.t,St&&(Lt=!0),t._dragged=Lt,U(Et,Ct,kt,Mt,At,Tt),zt(),t.emit(\"plotly_relayouting\",ht),At=!0}function zt(){ht={},\"xy\"!==St&&\"x\"!==St||(R(K,kt.l/tt,kt.r/tt,ht,rt.xaxes),Vt(\"x\",ht)),\"xy\"!==St&&\"y\"!==St||(R(J,(et-kt.b)/et,(et-kt.t)/et,ht,rt.yaxes),Vt(\"y\",ht))}function Rt(){zt(),H(t),Gt(),q(t)}Pt.prepFn=function(e,r,n){var a=Pt.dragmode,s=t._fullLayout.dragmode;s!==a&&(Pt.dragmode=s),yt(),pt=t._fullLayout._invScaleX,dt=t._fullLayout._invScaleY,ot||(vt?e.shiftKey?\"pan\"===s?s=\"zoom\":y(s)||(s=\"pan\"):e.ctrlKey&&(s=\"pan\"):s=\"pan\"),x(s)?Pt.minDrag=1:Pt.minDrag=void 0,y(s)?(Pt.xaxes=K,Pt.yaxes=J,M(e,r,n,Pt,s)):(Pt.clickFn=It,y(a)&&Ot(),ot||(\"zoom\"===s?(Pt.moveFn=Dt,Pt.doneFn=Rt,Pt.minDrag=1,function(e,r,n){var a=bt.getBoundingClientRect();_t=r-a.left,wt=n-a.top,t._fullLayout._calcInverseTransform(t);var s=i.apply3DTransform(t._fullLayout._invTransform)(_t,wt);_t=s[0],wt=s[1],kt={l:_t,r:_t,w:0,t:wt,b:wt,h:0},Tt=t._hmpixcount?t._hmlumcount/t._hmpixcount:o(t._fullLayout.plot_bgcolor).getLuminance(),At=!1,St=\"xy\",Lt=!1,Et=B(gt,Tt,$,Q,Mt=\"M0,0H\"+tt+\"V\"+et+\"H0V0\"),Ct=j(gt,$,Q)}(0,r,n)):\"pan\"===s&&(Pt.moveFn=Ut,Pt.doneFn=Gt))),t._fullLayout._redrag=function(){var e=t._dragdata;if(e&&e.element===bt){var r=t._fullLayout.dragmode;y(r)||(yt(),Yt([0,0,tt,et]),Pt.moveFn(e.dx,e.dy))}}},v.init(Pt);var Ft=[0,0,tt,et],Nt=null,Bt=C.REDRAWDELAY,jt=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Ut(e,r){if(e*=pt,r*=dt,!t._transitioningWithDuration){if(t._fullLayout._replotting=!0,\"ew\"===it||\"ns\"===at){var n=it?-e:0,i=at?-r:0;if(nt.isSubplotConstrained){if(it&&at){var a=(e/tt-r/et)/2;n=-(e=a*tt),i=-(r=-a*et)}at?n=-i*tt/et:i=-n*et/tt}return it&&(F(K,e),Vt(\"x\")),at&&(F(J,r),Vt(\"y\")),Yt([n,i,tt,et]),Ht(),void t.emit(\"plotly_relayouting\",ht)}var o,s,l=\"w\"===it==(\"n\"===at)?1:-1;if(it&&at&&(rt.isSubplotConstrained||nt.isSubplotConstrained)){var u=(e/tt+l*r/et)/2;e=u*tt,r=l*u*et}if(\"w\"===it?e=p(K,0,e):\"e\"===it?e=p(K,1,-e):it||(e=0),\"n\"===at?r=p(J,1,r):\"s\"===at?r=p(J,0,-r):at||(r=0),o=\"w\"===it?e:0,s=\"n\"===at?r:0,rt.isSubplotConstrained&&!nt.isSubplotConstrained||nt.isSubplotConstrained&&it&&at&&l>0){var c;if(nt.isSubplotConstrained||!it&&1===at.length){for(c=0;c<K.length;c++)K[c].range=K[c]._r.slice(),E(K[c],1-r/et);o=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!at&&1===it.length){for(c=0;c<J.length;c++)J[c].range=J[c]._r.slice(),E(J[c],1-e/tt);s=(r=e*et/tt)/2}}nt.isSubplotConstrained&&at||Vt(\"x\"),nt.isSubplotConstrained&&it||Vt(\"y\");var f=tt-e,h=et-r;!nt.isSubplotConstrained||it&&at||(it?(s=o?0:e*et/tt,h=f*et/tt):(o=s?0:r*tt/et,f=h*tt/et)),Yt([o,s,f,h]),Ht(),t.emit(\"plotly_relayouting\",ht)}function p(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/N(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function Vt(t,e){for(var r=nt.isSubplotConstrained?{x:J,y:K}[t]:nt[t+\"axes\"],n=nt.isSubplotConstrained?{x:K,y:J}[t]:[],i=0;i<r.length;i++){var a=r[i],o=a._id,s=nt.xLinks[o]||nt.yLinks[o],l=n[0]||V[s]||Z[s];l&&(e?(e[a._name+\".range[0]\"]=e[l._name+\".range[0]\"],e[a._name+\".range[1]\"]=e[l._name+\".range[1]\"]):a.range=l.range.slice())}}function Ht(){var e,r=[];function n(t){for(e=0;e<t.length;e++)t[e].fixedrange||r.push(t[e]._id)}for(st&&(n(K),n(rt.xaxes),n(nt.xaxes)),lt&&(n(J),n(rt.yaxes),n(nt.yaxes)),ht={},e=0;e<r.length;e++){var i=r[e],a=T(t,i);d.drawOne(t,a,{skipTitle:!0}),ht[a._name+\".range[0]\"]=a.range[0],ht[a._name+\".range[1]\"]=a.range[1]}d.redrawComponents(t,r)}function qt(){if(!t._transitioningWithDuration){var e=t._context.doubleClick,r=[];it&&(r=r.concat(K)),at&&(r=r.concat(J)),nt.xaxes&&(r=r.concat(nt.xaxes)),nt.yaxes&&(r=r.concat(nt.yaxes));var n,i,a,o={};if(\"reset+autosize\"===e)for(e=\"autosize\",i=0;i<r.length;i++)if((n=r[i])._rangeInitial&&(n.range[0]!==n._rangeInitial[0]||n.range[1]!==n._rangeInitial[1])||!n._rangeInitial&&!n.autorange){e=\"reset\";break}if(\"autosize\"===e)for(i=0;i<r.length;i++)(n=r[i]).fixedrange||(o[n._name+\".autorange\"]=!0);else if(\"reset\"===e)for((it||rt.isSubplotConstrained)&&(r=r.concat(rt.xaxes)),at&&!rt.isSubplotConstrained&&(r=r.concat(rt.yaxes)),rt.isSubplotConstrained&&(it?at||(r=r.concat(J)):r=r.concat(K)),i=0;i<r.length;i++)(n=r[i]).fixedrange||(n._rangeInitial?(a=n._rangeInitial,o[n._name+\".range[0]\"]=a[0],o[n._name+\".range[1]\"]=a[1]):o[n._name+\".autorange\"]=!0);t.emit(\"plotly_doubleclick\",null),l.call(\"_guiRelayout\",t,o)}}function Gt(){Yt([0,0,tt,et]),i.syncOrAsync([k.previousPromises,function(){t._fullLayout._replotting=!1,l.call(\"_guiRelayout\",t,ht)}],t)}function Yt(e){var r,n,a,o,s=t._fullLayout,u=s._plots,c=s._subplots.cartesian;if(ct&&l.subplotsRegistry.splom.drag(t),ut)for(r=0;r<c.length;r++)if(a=(n=u[c[r]]).xaxis,o=n.yaxis,n._scene){var f=i.simpleMap(a.range,a.r2l),p=i.simpleMap(o.range,o.r2l);n._scene.update({range:[f[0],p[0],f[1],p[1]]})}if((ct||ut)&&(_(t),w(t)),ft){var d=e[2]/O._length,v=e[3]/I._length;for(r=0;r<c.length;r++){a=(n=u[c[r]]).xaxis,o=n.yaxis;var y,x,b,k,T=(st||nt.isSubplotConstrained)&&!a.fixedrange&&V[a._id],M=(lt||nt.isSubplotConstrained)&&!o.fixedrange&&Z[o._id];if(T?(y=d,b=m||nt.isSubplotConstrained?e[0]:Zt(a,y)):nt.xaHash[a._id]?(y=d,b=e[0]*a._length/O._length):nt.yaHash[a._id]?(y=v,b=\"ns\"===at?-e[1]*a._length/I._length:Zt(a,y,{n:\"top\",s:\"bottom\"}[at])):b=Xt(a,y=Wt(a,d,v)),M?(x=v,k=g||nt.isSubplotConstrained?e[1]:Zt(o,x)):nt.yaHash[o._id]?(x=v,k=e[1]*o._length/I._length):nt.xaHash[o._id]?(x=d,k=\"ew\"===it?-e[0]*o._length/O._length:Zt(o,x,{e:\"right\",w:\"left\"}[it])):k=Xt(o,x=Wt(o,d,v)),y||x){y||(y=1),x||(x=1);var A=a._offset-b/y,S=o._offset-k/x;n.clipRect.call(h.setTranslate,b,k).call(h.setScale,y,x),n.plot.call(h.setTranslate,A,S).call(h.setScale,1/y,1/x),y===n.xScaleFactor&&x===n.yScaleFactor||(h.setPointGroupScale(n.zoomScalePts,y,x),h.setTextPointsScale(n.zoomScaleTxt,y,x)),h.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=y,n.yScaleFactor=x}}}}function Wt(t,e,r){return t.fixedrange?0:st&&rt.xaHash[t._id]?e:lt&&(rt.isSubplotConstrained?rt.xaHash:rt.yaHash)[t._id]?r:0}function Xt(t,e){return e?(t.range=t._r.slice(),E(t,e),Zt(t,e)):0}function Zt(t,e,r){return t._length*(1-e)*b[r||t.constraintoward||\"middle\"]}return g.length*m.length!=1&&W(bt,(function(e){if(t._context._scrollZoom.cartesian||t._fullLayout._enablescrollzoom){if(Ot(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();yt(),clearTimeout(Nt);var r=-e.deltaY;if(isFinite(r)||(r=e.wheelDelta/10),isFinite(r)){var n,a=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=jt.draglayer.select(\".nsewdrag\").node().getBoundingClientRect(),s=(e.clientX-o.left)/o.width,l=(o.bottom-e.clientY)/o.height;if(st){for(m||(s=.5),n=0;n<K.length;n++)u(K[n],s,a);Vt(\"x\"),Ft[2]*=a,Ft[0]+=Ft[2]*s*(1/a-1)}if(lt){for(g||(l=.5),n=0;n<J.length;n++)u(J[n],l,a);Vt(\"y\"),Ft[3]*=a,Ft[1]+=Ft[3]*(1-l)*(1/a-1)}Yt(Ft),Ht(),t.emit(\"plotly_relayouting\",ht),Nt=setTimeout((function(){t._fullLayout&&(Ft=[0,0,tt,et],Gt())}),Bt),e.preventDefault()}else i.log(\"Did not find wheel motion attributes: \",e)}function u(t,e,r){if(!t.fixedrange){var n=i.simpleMap(t.range,t.r2l),a=n[0]+(n[1]-n[0])*e;t.range=n.map((function(e){return t.l2r(a+(e-a)*r)}))}}})),bt},makeDragger:I,makeRectDragger:D,makeZoombox:B,makeCorners:j,updateZoombox:U,xyCorners:G,transitionZoombox:V,removeZoombox:H,showDoubleClickNotifier:q,attachWheelEventHandler:W}},{\"../../components/color\":367,\"../../components/dragelement\":386,\"../../components/dragelement/helpers\":385,\"../../components/drawing\":389,\"../../components/fx\":407,\"../../components/selections\":455,\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/clear_gl_canvases\":499,\"../../lib/setcursor\":536,\"../../lib/svg_text_utils\":541,\"../../plot_api/subroutines\":556,\"../../registry\":647,\"../plots\":628,\"./axes\":566,\"./axis_ids\":570,\"./constants\":573,\"./scale_zoom\":584,\"@plotly/d3\":58,\"has-passive-events\":229,tinycolor2:313}],576:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/fx\"),a=t(\"../../components/dragelement\"),o=t(\"../../lib/setcursor\"),s=t(\"./dragbox\").makeDragBox,l=t(\"./constants\").DRAGGERSIZE;r.initInteractions=function(t){var e=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(\".drag\").remove();else if(e._has(\"cartesian\")||e._has(\"splom\")){Object.keys(e._plots||{}).sort((function(t,r){if((e._plots[t].mainplot&&!0)===(e._plots[r].mainplot&&!0)){var n=t.split(\"y\"),i=r.split(\"y\");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return e._plots[t].mainplot?1:-1})).forEach((function(r){var n=e._plots[r],o=n.xaxis,u=n.yaxis;if(!n.mainplot){var c=s(t,n,o._offset,u._offset,o._length,u._length,\"ns\",\"ew\");c.onmousemove=function(e){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===r&&t._fullLayout._plots[r]&&i.hover(t,e,r)},i.hover(t,e,r),t._fullLayout._lasthover=c,t._fullLayout._hoversubplot=r},c.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,u._offset-l,l,l,\"n\",\"w\"),s(t,n,o._offset+o._length,u._offset-l,l,l,\"n\",\"e\"),s(t,n,o._offset-l,u._offset+u._length,l,l,\"s\",\"w\"),s(t,n,o._offset+o._length,u._offset+u._length,l,l,\"s\",\"e\"))}if(t._context.showAxisDragHandles){if(r===o._mainSubplot){var f=o._mainLinePosition;\"top\"===o.side&&(f-=l),s(t,n,o._offset+.1*o._length,f,.8*o._length,l,\"\",\"ew\"),s(t,n,o._offset,f,.1*o._length,l,\"\",\"w\"),s(t,n,o._offset+.9*o._length,f,.1*o._length,l,\"\",\"e\")}if(r===u._mainSubplot){var h=u._mainLinePosition;\"right\"!==u.side&&(h-=l),s(t,n,h,u._offset+.1*u._length,l,.8*u._length,\"ns\",\"\"),s(t,n,h,u._offset+.9*u._length,l,.1*u._length,\"s\",\"\"),s(t,n,h,u._offset,l,.1*u._length,\"n\",\"\")}}}));var o=e._hoverlayer.node();o.onmousemove=function(r){r.target=t._fullLayout._lasthover,i.hover(t,r,e._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},r.updateFx(t)}},r.updateFx=function(t){var e=t._fullLayout,r=\"pan\"===e.dragmode?\"move\":\"crosshair\";o(e._draggers,r)}},{\"../../components/dragelement\":386,\"../../components/fx\":407,\"../../lib/setcursor\":536,\"./constants\":573,\"./dragbox\":575,\"@plotly/d3\":58}],577:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"./axis_ids\");e.exports=function(t){return function(e,r){var o=e[t];if(Array.isArray(o))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,u=r._subplots,c=u.xaxis,f=u.yaxis,h=u.cartesian,p=r._has(\"cartesian\")||r._has(\"gl2d\"),d=0;d<o.length;d++){var g=o[d];if(i.isPlainObject(g)){var v=a.cleanId(g.xref,\"x\",!1),m=a.cleanId(g.yref,\"y\",!1),y=l.x.test(v),x=l.y.test(m);if(y||x){p||i.pushUnique(r._basePlotModules,s);var b=!1;y&&-1===c.indexOf(v)&&(c.push(v),b=!0),x&&-1===f.indexOf(m)&&(f.push(m),b=!0),b&&y&&x&&h.push(v+m)}}}}}},{\"../../lib\":515,\"../../registry\":647,\"./axis_ids\":570}],578:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../plots\"),s=t(\"../../components/drawing\"),l=t(\"../get_data\").getModuleCalcData,u=t(\"./axis_ids\"),c=t(\"./constants\"),f=t(\"../../constants/xmlns_namespaces\"),h=a.ensureSingle;function p(t,e,r){return a.ensureSingle(t,e,r,(function(t){t.datum(r)}))}function d(t,e,r,a,o){for(var u,f,h,p=c.traceLayerClasses,d=t._fullLayout,g=d._modules,v=[],m=[],y=0;y<g.length;y++){var x=(u=g[y]).name,b=i.modules[x].categories;if(b.svg){var _=u.layerName||x+\"layer\",w=u.plot;h=(f=l(r,w))[0],r=f[1],h.length&&v.push({i:p.indexOf(_),className:_,plotMethod:w,cdModule:h}),b.zoomScale&&m.push(\".\"+_)}}v.sort((function(t,e){return t.i-e.i}));var k=e.plot.selectAll(\"g.mlayer\").data(v,(function(t){return t.className}));if(k.enter().append(\"g\").attr(\"class\",(function(t){return t.className})).classed(\"mlayer\",!0).classed(\"rangeplot\",e.isRangePlot),k.exit().remove(),k.order(),k.each((function(r){var i=n.select(this),l=r.className;r.plotMethod(t,e,r.cdModule,i,a,o),-1===c.clipOnAxisFalseQuery.indexOf(\".\"+l)&&s.setClipUrl(i,e.layerClipId,t)})),d._has(\"scattergl\")&&(u=i.getModule(\"scattergl\"),h=l(r,u)[0],u.plot(t,e,h)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(c.clipOnAxisFalseQuery.join(\",\")).selectAll(\".trace\")),m.length)){var T=e.plot.selectAll(m.join(\",\")).selectAll(\".trace\");e.zoomScalePts=T.selectAll(\"path.point\"),e.zoomScaleTxt=T.selectAll(\".textpoint\")}}function g(t,e){var r=e.plotgroup,n=e.id,i=c.layerValue2layerClass[e.xaxis.layer],a=c.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,l=s.plotgroup,f=n+\"-x\",d=n+\"-y\";e.minorGridlayer=s.minorGridlayer,e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,h(s.overlinesBelow,\"path\",f),h(s.overlinesBelow,\"path\",d),h(s.overaxesBelow,\"g\",f),h(s.overaxesBelow,\"g\",d),e.plot=h(s.overplot,\"g\",n),h(s.overlinesAbove,\"path\",f),h(s.overlinesAbove,\"path\",d),h(s.overaxesAbove,\"g\",f),h(s.overaxesAbove,\"g\",d),e.xlines=l.select(\".overlines-\"+i).select(\".\"+f),e.ylines=l.select(\".overlines-\"+a).select(\".\"+d),e.xaxislayer=l.select(\".overaxes-\"+i).select(\".\"+f),e.yaxislayer=l.select(\".overaxes-\"+a).select(\".\"+d)}else if(o)e.xlines=h(r,\"path\",\"xlines-above\"),e.ylines=h(r,\"path\",\"ylines-above\"),e.xaxislayer=h(r,\"g\",\"xaxislayer-above\"),e.yaxislayer=h(r,\"g\",\"yaxislayer-above\");else{var g=h(r,\"g\",\"layer-subplot\");e.shapelayer=h(g,\"g\",\"shapelayer\"),e.imagelayer=h(g,\"g\",\"imagelayer\"),e.minorGridlayer=h(r,\"g\",\"minor-gridlayer\"),e.gridlayer=h(r,\"g\",\"gridlayer\"),e.zerolinelayer=h(r,\"g\",\"zerolinelayer\"),h(r,\"path\",\"xlines-below\"),h(r,\"path\",\"ylines-below\"),e.overlinesBelow=h(r,\"g\",\"overlines-below\"),h(r,\"g\",\"xaxislayer-below\"),h(r,\"g\",\"yaxislayer-below\"),e.overaxesBelow=h(r,\"g\",\"overaxes-below\"),e.plot=h(r,\"g\",\"plot\"),e.overplot=h(r,\"g\",\"overplot\"),e.xlines=h(r,\"path\",\"xlines-above\"),e.ylines=h(r,\"path\",\"ylines-above\"),e.overlinesAbove=h(r,\"g\",\"overlines-above\"),h(r,\"g\",\"xaxislayer-above\"),h(r,\"g\",\"yaxislayer-above\"),e.overaxesAbove=h(r,\"g\",\"overaxes-above\"),e.xlines=r.select(\".xlines-\"+i),e.ylines=r.select(\".ylines-\"+a),e.xaxislayer=r.select(\".xaxislayer-\"+i),e.yaxislayer=r.select(\".yaxislayer-\"+a)}o||(p(e.minorGridlayer,\"g\",e.xaxis._id),p(e.minorGridlayer,\"g\",e.yaxis._id),e.minorGridlayer.selectAll(\"g\").map((function(t){return t[0]})).sort(u.idSort),p(e.gridlayer,\"g\",e.xaxis._id),p(e.gridlayer,\"g\",e.yaxis._id),e.gridlayer.selectAll(\"g\").map((function(t){return t[0]})).sort(u.idSort)),e.xlines.style(\"fill\",\"none\").classed(\"crisp\",!0),e.ylines.style(\"fill\",\"none\").classed(\"crisp\",!0)}function v(t,e){if(t){var r={};for(var i in t.each((function(t){var i=t[0];n.select(this).remove(),m(i,e),r[i]=!0})),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(\".trace\").remove()}}}function m(t,e){e._draggers.selectAll(\"g.\"+t).remove(),e._defs.select(\"#clip\"+e._uid+t+\"plot\").remove()}r.name=\"cartesian\",r.attr=[\"xaxis\",\"yaxis\"],r.idRoot=[\"x\",\"y\"],r.idRegex=c.idRegex,r.attrRegex=c.attrRegex,r.attributes=t(\"./attributes\"),r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.transitionAxes=t(\"./transition_axes\"),r.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,f=o.cartesian,h=f.concat(o.gl2d||[]),p={},d={};for(r=0;r<h.length;r++){var g=h[r].split(\"y\");p[g[0]]=1,d[\"y\"+g[1]]=1}for(r=0;r<s.length;r++)p[n=s[r]]||(i=(t[u.id2name(n)]||{}).anchor,c.idRegex.y.test(i)||(i=\"y\"),f.push(n+i),h.push(n+i),d[i]||(d[i]=1,a.pushUnique(l,i)));for(r=0;r<l.length;r++)d[i=l[r]]||(n=(t[u.id2name(i)]||{}).anchor,c.idRegex.x.test(n)||(n=\"x\"),f.push(n+i),h.push(n+i),p[n]||(p[n]=1,a.pushUnique(s,n)));if(!h.length){for(var v in n=\"\",i=\"\",t)c.attrRegex.test(v)&&(\"x\"===v.charAt(0)?(!n||+v.substr(5)<+n.substr(5))&&(n=v):(!i||+v.substr(5)<+i.substr(5))&&(i=v));n=n?u.name2id(n):\"x\",i=i?u.name2id(i):\"y\",s.push(n),l.push(i),f.push(n+i)}},r.plot=function(t,e,r,n){var i,a=t._fullLayout,o=a._subplots.cartesian,s=t.calcdata;if(!Array.isArray(e))for(e=[],i=0;i<s.length;i++)e.push(i);for(i=0;i<o.length;i++){for(var l,u=o[i],c=a._plots[u],f=[],h=0;h<s.length;h++){var p=s[h],g=p[0].trace;g.xaxis+g.yaxis===u&&((-1!==e.indexOf(g.index)||g.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===u&&-1!==[\"tonextx\",\"tonexty\",\"tonext\"].indexOf(g.fill)&&-1===f.indexOf(l)&&f.push(l),f.push(p)),l=p)}d(t,c,f,r,n)}},r.clean=function(t,e,r,n){var i,a,o,s=n._plots||{},l=e._plots||{},c=n._subplots||{};if(n._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(o in s)(i=s[o]).plotgroup&&i.plotgroup.remove();var f=n._has&&n._has(\"gl\"),h=e._has&&e._has(\"gl\");if(f&&!h)for(o in s)(i=s[o])._scene&&i._scene.destroy();if(c.xaxis&&c.yaxis){var p=u.listIds({_fullLayout:n});for(a=0;a<p.length;a++){var d=p[a];e[u.id2name(d)]||n._infolayer.selectAll(\".g-\"+d+\"title\").remove()}}var g=n._has&&n._has(\"cartesian\"),y=e._has&&e._has(\"cartesian\");if(g&&!y)v(n._cartesianlayer.selectAll(\".subplot\"),n),n._defs.selectAll(\".axesclip\").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(c.cartesian)for(a=0;a<c.cartesian.length;a++){var x=c.cartesian[a];if(!l[x]){var b=\".\"+x+\",.\"+x+\"-x,.\"+x+\"-y\";n._cartesianlayer.selectAll(b).remove(),m(x,n)}}},r.drawFramework=function(t){var e=t._fullLayout,r=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._subplots.cartesian,u=l.length,c=[],f=[];for(e=0;e<u;e++){n=l[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var h=a._mainAxis,p=o._mainAxis,d=h._id+p._id,g=s._plots[d];i.overlays=[],d!==n&&g?(i.mainplot=d,i.mainplotinfo=g,f.push(n)):(i.mainplot=void 0,i.mainplotinfo=void 0,c.push(n))}for(e=0;e<f.length;e++)n=f[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var v=c.concat(f),m=new Array(u);for(e=0;e<u;e++){n=v[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var y=[n,a.layer,o.layer,a.overlaying||\"\",o.overlaying||\"\"];for(r=0;r<i.overlays.length;r++)y.push(i.overlays[r].id);m[e]=y}return m}(t),i=e._cartesianlayer.selectAll(\".subplot\").data(r,String);i.enter().append(\"g\").attr(\"class\",(function(t){return\"subplot \"+t[0]})),i.order(),i.exit().call(v,e),i.each((function(r){var i=r[0],a=e._plots[i];a.plotgroup=n.select(this),g(t,a),a.draglayer=h(e._draggers,\"g\",i)}))},r.rangePlot=function(t,e,r){g(t,e),d(t,e,r),o.style(t)},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\".svg-container\");r.filter((function(t,e){return e===r.size()-1})).selectAll(\".gl-canvas-context, .gl-canvas-focus\").each((function(){var t=this,r=t.toDataURL(\"image/png\");e.append(\"svg:image\").attr({xmlns:f.svg,\"xlink:href\":r,preserveAspectRatio:\"none\",x:0,y:0,width:t.style.width,height:t.style.height})}))},r.updateFx=t(\"./graph_interact\").updateFx},{\"../../components/drawing\":389,\"../../constants/xmlns_namespaces\":492,\"../../lib\":515,\"../../registry\":647,\"../get_data\":602,\"../plots\":628,\"./attributes\":564,\"./axis_ids\":570,\"./constants\":573,\"./graph_interact\":576,\"./layout_attributes\":579,\"./layout_defaults\":580,\"./transition_axes\":590,\"@plotly/d3\":58}],579:[function(t,e,r){\"use strict\";var n=t(\"../font_attributes\"),i=t(\"../../components/color/attributes\"),a=t(\"../../components/drawing/attributes\").dash,o=t(\"../../lib/extend\").extendFlat,s=t(\"../../plot_api/plot_template\").templatedArray,l=t(\"../../plots/cartesian/axis_format_attributes\").descriptionWithDates,u=t(\"../../constants/numerical\").ONEDAY,c=t(\"./constants\"),f=c.HOUR_PATTERN,h=c.WEEKDAY_PATTERN,p={valType:\"enumerated\",values:[\"auto\",\"linear\",\"array\"],editType:\"ticks\",impliedEdits:{tick0:void 0,dtick:void 0}};function d(t){return{valType:\"integer\",min:0,dflt:t?5:0,editType:\"ticks\"}}var g={valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},v={valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},m={valType:\"data_array\",editType:\"ticks\"},y={valType:\"enumerated\",values:[\"outside\",\"inside\",\"\"],editType:\"ticks\"};function x(t){var e={valType:\"number\",min:0,editType:\"ticks\"};return t||(e.dflt=5),e}function b(t){var e={valType:\"number\",min:0,editType:\"ticks\"};return t||(e.dflt=1),e}var _={valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},w={valType:\"color\",dflt:i.lightLine,editType:\"ticks\"};function k(t){var e={valType:\"number\",min:0,editType:\"ticks\"};return t||(e.dflt=1),e}var T=o({},a,{editType:\"ticks\"}),M={valType:\"boolean\",editType:\"ticks\"};e.exports={visible:{valType:\"boolean\",editType:\"plot\"},color:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},title:{text:{valType:\"string\",editType:\"ticks\"},font:n({editType:\"ticks\"}),standoff:{valType:\"number\",min:0,editType:\"ticks\"},editType:\"ticks\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"log\",\"date\",\"category\",\"multicategory\"],dflt:\"-\",editType:\"calc\",_noTemplating:!0},autotypenumbers:{valType:\"enumerated\",values:[\"convert types\",\"strict\"],dflt:\"convert types\",editType:\"calc\"},autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"axrange\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"axrange\",impliedEdits:{\"^autorange\":!1},anim:!0},{valType:\"any\",editType:\"axrange\",impliedEdits:{\"^autorange\":!1},anim:!0}],editType:\"axrange\",impliedEdits:{autorange:!1},anim:!0},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},scaleanchor:{valType:\"enumerated\",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:\"plot\"},scaleratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},constrain:{valType:\"enumerated\",values:[\"range\",\"domain\"],editType:\"plot\"},constraintoward:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\",\"top\",\"middle\",\"bottom\"],editType:\"plot\"},matches:{valType:\"enumerated\",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:\"calc\"},rangebreaks:s(\"rangebreak\",{enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},bounds:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},pattern:{valType:\"enumerated\",values:[h,f,\"\"],editType:\"calc\"},values:{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"any\",editType:\"calc\"}},dvalue:{valType:\"number\",editType:\"calc\",min:0,dflt:u},editType:\"calc\"}),tickmode:p,nticks:d(),tick0:g,dtick:v,ticklabelstep:{valType:\"integer\",min:1,dflt:1,editType:\"ticks\"},tickvals:m,ticktext:{valType:\"data_array\",editType:\"ticks\"},ticks:y,tickson:{valType:\"enumerated\",values:[\"labels\",\"boundaries\"],dflt:\"labels\",editType:\"ticks\"},ticklabelmode:{valType:\"enumerated\",values:[\"instant\",\"period\"],dflt:\"instant\",editType:\"ticks\"},ticklabelposition:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside left\",\"inside left\",\"outside right\",\"inside right\",\"outside bottom\",\"inside bottom\"],dflt:\"outside\",editType:\"calc\"},ticklabeloverflow:{valType:\"enumerated\",values:[\"allow\",\"hide past div\",\"hide past domain\"],editType:\"calc\"},mirror:{valType:\"enumerated\",values:[!0,\"ticks\",!1,\"all\",\"allticks\"],dflt:!1,editType:\"ticks+layoutstyle\"},ticklen:x(),tickwidth:b(),tickcolor:_,showticklabels:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},automargin:{valType:\"flaglist\",flags:[\"height\",\"width\",\"left\",\"right\",\"top\",\"bottom\"],extras:[!0,!1],dflt:!1,editType:\"ticks\"},showspikes:{valType:\"boolean\",dflt:!1,editType:\"modebar\"},spikecolor:{valType:\"color\",dflt:null,editType:\"none\"},spikethickness:{valType:\"number\",dflt:3,editType:\"none\"},spikedash:o({},a,{dflt:\"dash\",editType:\"none\"}),spikemode:{valType:\"flaglist\",flags:[\"toaxis\",\"across\",\"marker\"],dflt:\"toaxis\",editType:\"none\"},spikesnap:{valType:\"enumerated\",values:[\"data\",\"cursor\",\"hovered data\"],dflt:\"hovered data\",editType:\"none\"},tickfont:n({editType:\"ticks\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"ticks\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"ticks\"},minexponent:{valType:\"number\",dflt:3,min:0,editType:\"ticks\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"ticks\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"ticks\",description:l(\"tick label\")},tickformatstops:s(\"tickformatstop\",{enabled:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},dtickrange:{valType:\"info_array\",items:[{valType:\"any\",editType:\"ticks\"},{valType:\"any\",editType:\"ticks\"}],editType:\"ticks\"},value:{valType:\"string\",dflt:\"\",editType:\"ticks\"},editType:\"ticks\"}),hoverformat:{valType:\"string\",dflt:\"\",editType:\"none\",description:l(\"hover text\")},showline:{valType:\"boolean\",dflt:!1,editType:\"ticks+layoutstyle\"},linecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"layoutstyle\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks+layoutstyle\"},showgrid:M,gridcolor:w,gridwidth:k(),griddash:T,zeroline:{valType:\"boolean\",editType:\"ticks\"},zerolinecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},zerolinewidth:{valType:\"number\",dflt:1,editType:\"ticks\"},showdividers:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},dividercolor:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},dividerwidth:{valType:\"number\",dflt:1,editType:\"ticks\"},anchor:{valType:\"enumerated\",values:[\"free\",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],editType:\"plot\"},overlaying:{valType:\"enumerated\",values:[\"free\",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:\"plot\"},minor:{tickmode:p,nticks:d(\"minor\"),tick0:g,dtick:v,tickvals:m,ticks:y,ticklen:x(\"minor\"),tickwidth:b(\"minor\"),tickcolor:_,gridcolor:w,gridwidth:k(\"minor\"),griddash:T,showgrid:M,editType:\"ticks\"},layer:{valType:\"enumerated\",values:[\"above traces\",\"below traces\"],dflt:\"above traces\",editType:\"plot\"},domain:{valType:\"info_array\",items:[{valType:\"number\",min:0,max:1,editType:\"plot\"},{valType:\"number\",min:0,max:1,editType:\"plot\"}],dflt:[0,1],editType:\"plot\"},position:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\",\"total ascending\",\"total descending\",\"min ascending\",\"min descending\",\"max ascending\",\"max descending\",\"sum ascending\",\"sum descending\",\"mean ascending\",\"mean descending\",\"median ascending\",\"median descending\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\",_deprecated:{autotick:{valType:\"boolean\",editType:\"ticks\"},title:{valType:\"string\",editType:\"ticks\"},titlefont:n({editType:\"ticks\"})}}},{\"../../components/color/attributes\":366,\"../../components/drawing/attributes\":388,\"../../constants/numerical\":491,\"../../lib/extend\":505,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/axis_format_attributes\":569,\"../font_attributes\":594,\"./constants\":573}],580:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../components/fx/helpers\").isUnifiedHover,o=t(\"../../components/fx/hovermode_defaults\"),s=t(\"../../plot_api/plot_template\"),l=t(\"../layout_attributes\"),u=t(\"./layout_attributes\"),c=t(\"./type_defaults\"),f=t(\"./axis_defaults\"),h=t(\"./constraints\"),p=t(\"./position_defaults\"),d=t(\"./axis_ids\"),g=d.id2name,v=d.name2id,m=t(\"./constants\").AX_ID_PATTERN,y=t(\"../../registry\"),x=y.traceIs,b=y.getComponentMethod;function _(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}e.exports=function(t,e,r){var y,w,k=e.autotypenumbers,T={},M={},A={},S={},E={},C={},L={},P={},O={},I={};for(y=0;y<r.length;y++){var D=r[y];if(x(D,\"cartesian\")||x(D,\"gl2d\")){var z,R;if(D.xaxis)z=g(D.xaxis),_(T,z,D);else if(D.xaxes)for(w=0;w<D.xaxes.length;w++)_(T,g(D.xaxes[w]),D);if(D.yaxis)R=g(D.yaxis),_(T,R,D);else if(D.yaxes)for(w=0;w<D.yaxes.length;w++)_(T,g(D.yaxes[w]),D);\"funnel\"===D.type?\"h\"===D.orientation?(z&&(M[z]=!0),R&&(L[R]=!0)):R&&(A[R]=!0):\"image\"===D.type?(R&&(P[R]=!0),z&&(P[z]=!0)):(R&&(E[R]=!0,C[R]=!0),x(D,\"carpet\")&&(\"carpet\"!==D.type||D._cheater)||z&&(S[z]=!0)),\"carpet\"===D.type&&D._cheater&&z&&(M[z]=!0),x(D,\"2dMap\")&&(O[z]=!0,O[R]=!0),x(D,\"oriented\")&&(I[\"h\"===D.orientation?R:z]=!0)}}var F=e._subplots,N=F.xaxis,B=F.yaxis,j=n.simpleMap(N,g),U=n.simpleMap(B,g),V=j.concat(U),H=i.background;N.length&&B.length&&(H=n.coerce(t,e,l,\"plot_bgcolor\"));var q,G,Y,W,X,Z=i.combine(H,e.paper_bgcolor);function K(){var t=T[q]||[];X._traceIndices=t.map((function(t){return t._expandedIndex})),X._annIndices=[],X._shapeIndices=[],X._selectionIndices=[],X._imgIndices=[],X._subplotsWith=[],X._counterAxes=[],X._name=X._attr=q,X._id=G}function J(t,e){return n.coerce(W,X,u,t,e)}function $(t,e){return n.coerce2(W,X,u,t,e)}function Q(t){return\"x\"===t?B:N}function tt(e,r){for(var n=\"x\"===e?j:U,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(v(o))}return i}var et={x:Q(\"x\"),y:Q(\"y\")},rt=et.x.concat(et.y),nt={},it=[];function at(){var t=W.matches;m.test(t)&&-1===rt.indexOf(t)&&(nt[t]=W.type,it=Object.keys(nt))}var ot=o(t,e),st=a(ot);for(y=0;y<V.length;y++){q=V[y],G=v(q),Y=q.charAt(0),n.isPlainObject(t[q])||(t[q]={}),W=t[q],X=s.newContainer(e,q,Y+\"axis\"),K();var lt=\"x\"===Y&&!S[q]&&M[q]||\"y\"===Y&&!E[q]&&A[q],ut=\"y\"===Y&&(!C[q]&&L[q]||P[q]),ct={hasMinor:!0,letter:Y,font:e.font,outerTicks:O[q],showGrid:!I[q],data:T[q]||[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:lt,reverseDflt:ut,autotypenumbersDflt:k,splomStash:((e._splomAxes||{})[Y]||{})[G]};J(\"uirevision\",e.uirevision),c(W,X,J,ct),f(W,X,J,ct,e);var ft=st&&Y===ot.charAt(0),ht=$(\"spikecolor\",st?X.color:void 0),pt=$(\"spikethickness\",st?1.5:void 0),dt=$(\"spikedash\",st?\"dot\":void 0),gt=$(\"spikemode\",st?\"across\":void 0),vt=$(\"spikesnap\");J(\"showspikes\",!!(ft||ht||pt||dt||gt||vt))||(delete X.spikecolor,delete X.spikethickness,delete X.spikedash,delete X.spikemode,delete X.spikesnap),p(W,X,J,{letter:Y,counterAxes:et[Y],overlayableAxes:tt(Y,q),grid:e.grid}),J(\"title.standoff\"),at(),X._input=W}for(y=0;y<it.length;){G=it[y++],Y=(q=g(G)).charAt(0),n.isPlainObject(t[q])||(t[q]={}),W=t[q],X=s.newContainer(e,q,Y+\"axis\"),K();var mt={letter:Y,font:e.font,outerTicks:O[q],showGrid:!I[q],data:[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:k,splomStash:((e._splomAxes||{})[Y]||{})[G]};J(\"uirevision\",e.uirevision),X.type=nt[G]||\"linear\",f(W,X,J,mt,e),p(W,X,J,{letter:Y,counterAxes:et[Y],overlayableAxes:tt(Y,q),grid:e.grid}),J(\"fixedrange\"),at(),X._input=W}var yt=b(\"rangeslider\",\"handleDefaults\"),xt=b(\"rangeselector\",\"handleDefaults\");for(y=0;y<j.length;y++)q=j[y],W=t[q],X=e[q],yt(t,e,q),\"date\"===X.type&&xt(W,X,e,U,X.calendar),J(\"fixedrange\");for(y=0;y<U.length;y++){q=U[y],W=t[q],X=e[q];var bt=e[g(X.anchor)];J(\"fixedrange\",b(\"rangeslider\",\"isVisible\")(bt))}h.handleDefaults(t,e,{axIds:rt.concat(it).sort(d.idSort),axHasImage:P})}},{\"../../components/color\":367,\"../../components/fx/helpers\":403,\"../../components/fx/hovermode_defaults\":406,\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../registry\":647,\"../layout_attributes\":619,\"./axis_defaults\":568,\"./axis_ids\":570,\"./constants\":573,\"./constraints\":574,\"./layout_attributes\":579,\"./position_defaults\":582,\"./type_defaults\":591}],581:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\").mix,i=t(\"../../components/color/attributes\"),a=t(\"../../lib\");e.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var u=l(\"linecolor\",s),c=l(\"linewidth\");r(\"showline\",o.showLine||!!u||!!c)||(delete e.linecolor,delete e.linewidth);var f=l(\"gridcolor\",n(s,o.bgColor,o.blend||i.lightFraction).toRgbString()),h=l(\"gridwidth\"),p=l(\"griddash\");if(r(\"showgrid\",o.showGrid||!!f||!!h||!!p)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),o.hasMinor){var d=l(\"minor.gridcolor\",n(e.gridcolor,o.bgColor,67).toRgbString()),g=l(\"minor.gridwidth\",e.gridwidth||1),v=l(\"minor.griddash\",e.griddash||\"solid\");r(\"minor.showgrid\",!!d||!!g||!!v)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!o.noZeroLine){var m=l(\"zerolinecolor\",s),y=l(\"zerolinewidth\");r(\"zeroline\",o.showGrid||!!m||!!y)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{\"../../components/color/attributes\":366,\"../../lib\":515,tinycolor2:313}],582:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o,s,l,u,c=a.counterAxes||[],f=a.overlayableAxes||[],h=a.letter,p=a.grid;p&&(s=p._domains[h][p._axisMap[e._id]],o=p._anchors[e._id],s&&(l=p[h+\"side\"].split(\" \")[0],u=p.domain[h][\"right\"===l||\"top\"===l?1:0])),s=s||[0,1],o=o||(n(t.position)?\"free\":c[0]||\"free\"),l=l||(\"x\"===h?\"bottom\":\"left\"),u=u||0,\"free\"===i.coerce(t,e,{anchor:{valType:\"enumerated\",values:[\"free\"].concat(c),dflt:o}},\"anchor\")&&r(\"position\",u),i.coerce(t,e,{side:{valType:\"enumerated\",values:\"x\"===h?[\"bottom\",\"top\"]:[\"left\",\"right\"],dflt:l}},\"side\");var d=!1;if(f.length&&(d=i.coerce(t,e,{overlaying:{valType:\"enumerated\",values:[!1].concat(f),dflt:!1}},\"overlaying\")),!d){var g=r(\"domain\",s);g[0]>g[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r(\"layer\"),e}},{\"../../lib\":515,\"fast-isnumeric\":190}],583:[function(t,e,r){\"use strict\";var n=t(\"./show_dflt\");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r(\"tickprefix\")&&r(\"showtickprefix\",s),r(\"ticksuffix\",o)&&r(\"showticksuffix\",s)}},{\"./show_dflt\":586}],584:[function(t,e,r){\"use strict\";var n=t(\"../../constants/alignment\").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||\"center\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},{\"../../constants/alignment\":483}],585:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").utcFormat,a=t(\"../../lib\"),o=a.numberFormat,s=t(\"fast-isnumeric\"),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t(\"../../constants/numerical\"),d=p.FP_SAFE,g=p.BADNUM,v=p.LOG_CLIP,m=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t(\"./axis_ids\"),k=t(\"./constants\"),T=k.HOUR_PATTERN,M=k.WEEKDAY_PATTERN;function A(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||\"x\",p=r.charAt(0);function E(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*v*Math.abs(n-i))}return g}function C(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=c(e,n||t.calendar);if(o===g){if(!s(e))return g;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),u=Math.round(e-l/10);o=c(new Date(u))+l/10}return o}function L(e,r,n){return u(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push(\"number\"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return g}function I(e){if(t._categoriesMap)return t._categoriesMap[e]}function D(t){var e=I(t);return void 0!==e?e:s(t)?+t:void 0}function z(t){return s(t)?+t:I(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var N=function(e){return s(e)?R(e,t._m,t._b):g},B=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j=\"y\"===p;N=function(e){if(!s(e))return g;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;l<r;l++){var u=i*t._rangebreaks[l].min,c=i*t._rangebreaks[l].max;if(a<u)break;if(!(a>c)){o=a<(u+c)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},B=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;i<r&&!(e<t._rangebreaks[i].pmin);i++)e>t._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l=\"log\"===t.type?E:f,t.l2c=\"log\"===t.type?A:f,t.l2p=N,t.p2l=B,t.c2p=\"log\"===t.type?function(t,e){return N(E(t,e))}:N,t.p2c=\"log\"===t.type?function(t){return A(B(t))}:B,-1!==[\"linear\",\"-\"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=B,t.cleanPos=f):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return A(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=A,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return A(B(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=B,t.cleanPos=f):\"date\"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=C,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(C(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(B(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,g,t.calendar)}):\"category\"===t.type?(t.d2c=t.d2l=O,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:f(t)}):\"multicategory\"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=I,t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return Array.isArray(t)||\"string\"==typeof t&&\"\"!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var u in l)if(u!==r){var c=e[w.id2name(u)];s=s.concat(c._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;i<s.length;i++){var g=n[s[i]];if(p in g){var v=g[p],m=g._length||a.minRowLength(v);if(h(v[0])&&h(v[1]))for(o=0;o<m;o++){var y=v[0][o],x=v[1][o];S(y)&&S(x)&&(d.push([y,x]),y in f[0][1]||(f[0][1][y]=f[0][0]++),x in f[1][1]||(f[1][1][x]=f[1][0]++))}}}for(d.sort((function(t,e){var r=f[0][1],n=r[t[0]]-r[e[0]];if(n)return n;var i=f[1][1];return i[t[1]]-i[e[1]]})),i=0;i<d.length;i++)O(d[i])}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e,r){r||(r={}),e||(e=\"range\");var n,i,o=a.nestedProperty(t,e).get();if(i=(i=\"date\"===t.type?a.dfltRange(t.calendar):\"y\"===p?k.DFLTRANGEY:\"realaxis\"===t._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),\"tozero\"!==t.rangemode&&\"nonnegative\"!==t.rangemode||(i[0]=0),o&&2===o.length)for(\"date\"!==t.type||t.autorange||(o[0]=a.cleanDate(o[0],g,t.calendar),o[1]=a.cleanDate(o[1],g,t.calendar)),n=0;n<2;n++)if(\"date\"===t.type){if(!a.isDateTime(o[n],t.calendar)){t[e]=i;break}if(t.r2l(o[0])===t.r2l(o[1])){var l=a.constrain(t.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=t.l2r(l-1e3),o[1]=t.l2r(l+1e3);break}}else{if(!s(o[n])){if(!s(o[1-n])){t[e]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-d?o[n]=-d:o[n]>d&&(o[n]=d),o[0]===o[1]){var u=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=u,o[1]+=u}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s,l,u=t.r2l(t[a][0],o),c=t.r2l(t[a][1],o),f=\"y\"===p;if(f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(u,c),Math.max(u,c)),t._rangebreaks.length)){for(s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._lBreaks+=Math.abs(l.max-l.min);var h=f;u>c&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(c-u)-t._lBreaks),t._B.push(-t._m2*(f?c:u)),s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._B.push(t._B[t._B.length-1]-d*t._m2*(l.max-l.min));for(s=0;s<t._rangebreaks.length;s++)(l=t._rangebreaks[s]).pmin=N(l.min),l.pmax=N(l.max)}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error(\"Something went wrong with axis scaling\")},t.maskBreaks=function(e){var r,n,i,o,s,u=t.rangebreaks||[];u._cachedPatterns||(u._cachedPatterns=u.map((function(e){return e.enabled&&e.bounds?a.simpleMap(e.bounds,e.pattern?l:t.d2c):null}))),u._cachedValues||(u._cachedValues=u.map((function(e){return e.enabled&&e.values?a.simpleMap(e.values,t.d2c).sort(a.sorterAsc):null})));for(var c=0;c<u.length;c++){var f=u[c];if(f.enabled)if(f.bounds){var h=f.pattern;switch(n=(r=u._cachedPatterns[c])[0],i=r[1],h){case M:o=(s=new Date(e)).getUTCDay(),n>i&&(i+=7,o<n&&(o+=7));break;case T:o=(s=new Date(e)).getUTCHours()+(s.getUTCMinutes()/60+s.getUTCSeconds()/3600+s.getUTCMilliseconds()/36e5),n>i&&(i+=24,o<n&&(o+=24));break;case\"\":o=e}if(o>=n&&o<i)return g}else for(var p=u._cachedValues[c],d=0;d<p.length;d++)if(i=(n=p[d])+f.dvalue,e>=n&&e<i)return g}return e},t.locateBreaks=function(e,r){var n,i,o,s,u=[];if(!t.rangebreaks)return u;var c=t.rangebreaks.slice().sort((function(t,e){return t.pattern===M&&e.pattern===T?-1:e.pattern===M&&t.pattern===T?1:0})),f=function(t,n){if((t=a.constrain(t,e,r))!==(n=a.constrain(n,e,r))){for(var i=!0,o=0;o<u.length;o++){var s=u[o];t<s.max&&n>=s.min&&(t<s.min&&(s.min=t),n>s.max&&(s.max=n),i=!1)}i&&u.push({min:t,max:n})}};for(n=0;n<c.length;n++){var h=c[n];if(h.enabled)if(h.bounds){var p=e,d=r;h.pattern&&(p=Math.floor(p)),o=(i=a.simpleMap(h.bounds,h.pattern?l:t.r2l))[0],s=i[1];var g,v,w=new Date(p);switch(h.pattern){case M:v=m,g=(s-o+(s<o?7:0))*y,p+=o*y-(w.getUTCDay()*y+w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;case T:v=y,g=(s-o+(s<o?24:0))*x,p+=o*x-(w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;default:p=Math.min(i[0],i[1]),g=v=(d=Math.max(i[0],i[1]))-p}for(var k=p;k<d;k+=v)f(k,k+g)}else for(var A=a.simpleMap(h.values,t.d2c),S=0;S<A.length;S++)f(o=A[S],s=o+h.dvalue)}return u.sort((function(t,e){return t.min-e.min})),u},t.makeCalcdata=function(e,r,n){var i,o,s,l,u=t.type,c=\"date\"===u&&e[r+\"calendar\"];if(r in e){if(i=e[r],l=e._length||a.minRowLength(i),a.isTypedArray(i)&&(\"linear\"===u||\"log\"===u)){if(l===i.length)return i;if(i.subarray)return i.subarray(0,l)}if(\"multicategory\"===u)return function(t,e){for(var r=new Array(e),n=0;n<e;n++){var i=(t[0]||[])[n],a=(t[1]||[])[n];r[n]=I([i,a])}return r}(i,l);for(o=new Array(l),s=0;s<l;s++)o[s]=t.d2c(i[s],0,c,n)}else{var f=r+\"0\"in e?t.d2c(e[r+\"0\"],0,c):0,h=e[\"d\"+r]?Number(e[\"d\"+r]):1;for(i=e[{x:\"y\",y:\"x\"}[r]],l=e._length||i.length,o=new Array(l),s=0;s<l;s++)o[s]=f+s*h}if(t.rangebreaks)for(s=0;s<l;s++)o[s]=t.maskBreaks(o[s]);return o},t.isValidRange=function(e){return Array.isArray(e)&&2===e.length&&s(t.r2l(e[0]))&&s(t.r2l(e[1]))},t.isPtWithinRange=function(e,r){var n=t.c2l(e[p],null,r),i=t.r2l(t.range[0]),a=t.r2l(t.range[1]);return i<a?i<=n&&n<=a:a<=n&&n<=i},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var r=t._matchGroup;if(r){var n=null,i=null;for(var a in r){var o=e[w.id2name(a)];if(o._categories){n=o._categories,i=o._categoriesMap;break}}n&&i?(t._categories=n,t._categoriesMap=i):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var s=0;s<t._initialCategories.length;s++)O(t._initialCategories[s])},t.sortByInitialCategories=function(){var n=[];if(t._emptyCategories(),t._initialCategories)for(var i=0;i<t._initialCategories.length;i++)O(t._initialCategories[i]);n=n.concat(t._traceIndices);var a=t._matchGroup;for(var o in a)if(r!==o){var s=e[w.id2name(o)];s._categories=t._categories,s._categoriesMap=t._categoriesMap,n=n.concat(s._traceIndices)}return n};var U=e._d3locale;\"date\"===t.type&&(t._dateFormat=U?U.timeFormat:i,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=U?U.numberFormat:o,delete t._minDtick,delete t._forceTick0}},{\"../../constants/numerical\":491,\"../../lib\":515,\"./axis_ids\":570,\"./constants\":573,\"@plotly/d3\":58,\"d3-time-format\":120,\"fast-isnumeric\":190}],586:[function(t,e,r){\"use strict\";e.exports=function(t){var e=[\"showexponent\",\"showtickprefix\",\"showticksuffix\"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},{}],587:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\").contrast,a=t(\"./layout_attributes\"),o=t(\"./show_dflt\"),s=t(\"../array_container_defaults\");function l(t,e){function r(r,i){return n.coerce(t,e,a.tickformatstops,r,i)}r(\"enabled\")&&(r(\"dtickrange\"),r(\"value\"))}e.exports=function(t,e,r,u,c){c||(c={});var f=o(t);if(r(\"showticklabels\")){var h=c.font||{},p=e.color,d=-1!==(e.ticklabelposition||\"\").indexOf(\"inside\")?i(c.bgColor):p&&p!==a.color.dflt?p:h.color;if(n.coerceFont(r,\"tickfont\",{family:h.family,size:h.size,color:d}),c.noTicklabelstep||\"multicategory\"===u||\"log\"===u||r(\"ticklabelstep\"),c.noAng||r(\"tickangle\"),\"category\"!==u){var g=r(\"tickformat\");s(t,e,{name:\"tickformatstops\",inclusionAttr:\"enabled\",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,c.noExp||g||\"date\"===u||(r(\"showexponent\",f),r(\"exponentformat\"),r(\"minexponent\"),r(\"separatethousands\"))}}}},{\"../../components/color\":367,\"../../lib\":515,\"../array_container_defaults\":561,\"./layout_attributes\":579,\"./show_dflt\":586}],588:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r,a){var o=a.isMinor,s=o?t.minor||{}:t,l=o?e.minor:e,u=o?i.minor:i,c=o?\"minor.\":\"\",f=n.coerce2(s,l,u,\"ticklen\",o?.6*(e.ticklen||5):void 0),h=n.coerce2(s,l,u,\"tickwidth\",o?e.tickwidth||1:void 0),p=n.coerce2(s,l,u,\"tickcolor\",(o?e.tickcolor:void 0)||l.color);r(c+\"ticks\",!o&&a.outerTicks||f||h||p?\"outside\":\"\")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},{\"../../lib\":515,\"./layout_attributes\":579}],589:[function(t,e,r){\"use strict\";var n=t(\"./clean_ticks\"),i=t(\"../../lib\").isArrayOrTypedArray;e.exports=function(t,e,r,a,o){o||(o={});var s=o.isMinor,l=s?t.minor||{}:t,u=s?e.minor:e,c=s?\"minor.\":\"\";function f(t){var e=l[t];return void 0!==e?e:(u._template||{})[t]}var h=f(\"tick0\"),p=f(\"dtick\"),d=f(\"tickvals\"),g=r(c+\"tickmode\",i(d)?\"array\":p?\"linear\":\"auto\");if(\"auto\"===g)r(c+\"nticks\");else if(\"linear\"===g){var v=u.dtick=n.dtick(p,a);u.tick0=n.tick0(h,a,e.calendar,v)}else\"multicategory\"!==a&&(void 0===r(c+\"tickvals\")?u.tickmode=\"auto\":s||r(\"ticktext\"))}},{\"../../lib\":515,\"./clean_ticks\":572}],590:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../../components/drawing\"),s=t(\"./axes\");e.exports=function(t,e,r,l){var u=t._fullLayout;if(0!==e.length){var c,f,h,p;l&&(c=l());var d=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr0&&(r[o._name+\".range\"]=a.xr0.slice()),a.yr0&&(r[s._name+\".range\"]=a.yr0.slice())}return i.call(\"relayout\",t,r).then((function(){for(var t=0;t<e.length;t++)g(e[t].plotinfo)}))}()})),f=Date.now(),p=window.requestAnimationFrame((function n(){h=Date.now();for(var a=Math.min(1,(h-f)/r.duration),o=d(a),s=0;s<e.length;s++)v(e[s],o);h-f>r.duration?(function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr1&&(r[o._name+\".range\"]=a.xr1.slice()),a.yr1&&(r[s._name+\".range\"]=a.yr1.slice())}c&&c(),i.call(\"relayout\",t,r).then((function(){for(var t=0;t<e.length;t++)g(e[t].plotinfo)}))}(),p=window.cancelAnimationFrame(n)):p=window.requestAnimationFrame(n)})),Promise.resolve()}function g(t){var e=t.xaxis,r=t.yaxis;u._defs.select(\"#\"+t.clipId+\"> rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function v(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,u=i._length,c=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),v=d[1]-d[0],m=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*u,p[2]=u*(1-r+r*m/v),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=u;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*c,p[3]=c*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=c;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?u/p[2]:1,k=h?c/p[3]:1,T=f?p[0]:0,M=h?p[1]:0,A=f?p[0]/p[2]*u:0,S=h?p[1]/p[3]*c:0,E=i._offset-A,C=l._offset-S;n.clipRect.call(o.setTranslate,T,M).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(t)}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../registry\":647,\"./axes\":566,\"@plotly/d3\":58}],591:[function(t,e,r){\"use strict\";var n=t(\"../../registry\").traceIs,i=t(\"./axis_autotype\");function a(t,e){if(\"-\"===t.type){var r,a=t._id,l=a.charAt(0);-1!==a.indexOf(\"scene\")&&(a=l);var u=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(\"splom\"===i.type&&i._length>0&&(i[\"_\"+r+\"axes\"]||{})[e])return i;if((i[r+\"axis\"]||r)===e){if(s(i,r))return i;if((i[r]||[]).length||i[r+\"0\"])return i}}}(e,a,l);if(u)if(\"histogram\"!==u.type||l!=={v:\"y\",h:\"x\"}[u.orientation||\"v\"]){var c=l+\"calendar\",f=u[c],h={noMultiCategory:!n(u,\"cartesian\")||n(u,\"noMultiCategory\")};if(\"box\"===u.type&&u._hasPreCompStats&&l==={h:\"x\",v:\"y\"}[u.orientation||\"v\"]&&(h.noMultiCategory=!0),h.autotypenumbers=t.autotypenumbers,s(u,l)){var p=o(u),d=[];for(r=0;r<e.length;r++){var g=e[r];n(g,\"box-violin\")&&(g[l+\"axis\"]||l)===a&&(void 0!==g[p]?d.push(g[p][0]):void 0!==g.name?d.push(g.name):d.push(\"text\"),g[c]!==f&&(f=void 0))}t.type=i(d,f,h)}else if(\"splom\"===u.type){var v=u.dimensions[u._axesDim[a]];v.visible&&(t.type=i(v.values,f,h))}else t.type=i(u[l]||[u[l+\"0\"]],f,h)}else t.type=\"linear\"}}function o(t){return{v:\"x\",h:\"y\"}[t.orientation||\"v\"]}function s(t,e){var r=o(t),i=n(t,\"box-violin\"),a=n(t._fullInput||{},\"candlestick\");return i&&!a&&e===r&&void 0===t[r]&&void 0===t[r+\"0\"]}e.exports=function(t,e,r,n){r(\"autotypenumbers\",n.autotypenumbersDflt),\"-\"===r(\"type\",(n.splomStash||{}).type)&&(a(e,n.data),\"-\"===e.type?e.type=\"linear\":t.type=e.type)}},{\"../../registry\":647,\"./axis_autotype\":567}],592:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"../lib\");function a(t,e,r){var n,a,o,s=!1;if(\"data\"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if(\"layout\"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if(\"string\"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,(function(t,e,n){r.push({type:\"layout\",prop:t,value:n})}),\"\",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},\"string\"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,(function(e,n,i){var a,o;if(Array.isArray(i)){o=i.slice();var l=Math.min(o.length,t.data.length);r&&(l=Math.min(l,r.length)),a=[];for(var u=0;u<l;u++)a[u]=r?r[u]:u}else o=i,a=r?r.slice():null;if(null===a)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(a)){if(!Array.isArray(o)){var c=o;o=[];for(var f=0;f<a.length;f++)o[f]=c}o.length=Math.min(a.length,o.length)}s.push({type:\"data\",prop:e,traces:a,value:o})}),\"\",0),s}function l(t,e,r,n){Object.keys(t).forEach((function(a){var o=t[a];if(\"_\"!==a[0]){var s=r+(n>0?\".\":\"\")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(u)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(u){a(t,u,s.cache),s.check=function(){if(l){var e=a(t,u,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var c=[\"plotly_relayout\",\"plotly_redraw\",\"plotly_restyle\",\"plotly_update\",\"plotly_animatingframe\",\"plotly_afterplot\"],f=0;f<c.length;f++)t._internalOn(c[f],s.check);s.remove=function(){for(var e=0;e<c.length;e++)t._removeInternalListener(c[e],s.check)}}else i.log(\"Unable to automatically bind plot updates to API command\"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},e&&(e._commandObserver=s),s},r.hasSimpleAPICommandBindings=function(t,e,n){var i,a,o=e.length;for(i=0;i<o;i++){var s,l=e[i],u=l.method,c=l.args;if(Array.isArray(c)||(c=[]),!u)return!1;var f=r.computeAPICommandBindings(t,u,c);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var p=(s=f[0]).value;if(Array.isArray(p)){if(1!==p.length)return!1;p=p[0]}n&&(n[p]=i)}return a},r.executeAPICommand=function(t,e,r){if(\"skip\"===e)return Promise.resolve();var a=n.apiMethodRegistry[e],o=[t];Array.isArray(r)||(r=[]);for(var s=0;s<r.length;s++)o.push(r[s]);return a.apply(null,o).catch((function(t){return i.warn(\"API call to Plotly.\"+e+\" rejected.\",t),Promise.reject(t)}))},r.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case\"restyle\":n=s(t,r);break;case\"relayout\":n=o(0,r);break;case\"update\":n=s(t,[r[0],r[2]]).concat(o(0,[r[1]]));break;case\"animate\":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==[\"string\",\"number\"].indexOf(typeof e[0][0])?[{type:\"layout\",prop:\"_currentFrame\",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},{\"../lib\":515,\"../registry\":647}],593:[function(t,e,r){\"use strict\";var n=t(\"../lib/extend\").extendFlat;r.attributes=function(t,e){e=e||{};var r={valType:\"info_array\",editType:(t=t||{}).editType,items:[{valType:\"number\",min:0,max:1,editType:t.editType},{valType:\"number\",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:\"integer\",min:0,dflt:0,editType:t.editType},i.column={valType:\"integer\",min:0,dflt:0,editType:t.editType}),i},r.defaults=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r(\"domain.column\");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r(\"domain.row\");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}var u=r(\"domain.x\",i),c=r(\"domain.y\",a);u[0]<u[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=a.slice())}},{\"../lib/extend\":505}],594:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&&(r=e);var n={family:{valType:\"string\",noBlank:!0,strict:!0,editType:e},size:{valType:\"number\",min:1,editType:e},color:{valType:\"color\",editType:r},editType:e};return t.autoSize&&(n.size.dflt=\"auto\"),t.autoColor&&(n.color.dflt=\"auto\"),t.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],595:[function(t,e,r){\"use strict\";e.exports={_isLinkedToArray:\"frames_entry\",group:{valType:\"string\"},name:{valType:\"string\"},traces:{valType:\"any\"},baseframe:{valType:\"string\"},data:{valType:\"any\"},layout:{valType:\"any\"}}},{}],596:[function(t,e,r){\"use strict\";r.projNames={airy:\"airy\",aitoff:\"aitoff\",\"albers usa\":\"albersUsa\",albers:\"albers\",august:\"august\",\"azimuthal equal area\":\"azimuthalEqualArea\",\"azimuthal equidistant\":\"azimuthalEquidistant\",baker:\"baker\",bertin1953:\"bertin1953\",boggs:\"boggs\",bonne:\"bonne\",bottomley:\"bottomley\",bromley:\"bromley\",collignon:\"collignon\",\"conic conformal\":\"conicConformal\",\"conic equal area\":\"conicEqualArea\",\"conic equidistant\":\"conicEquidistant\",craig:\"craig\",craster:\"craster\",\"cylindrical equal area\":\"cylindricalEqualArea\",\"cylindrical stereographic\":\"cylindricalStereographic\",eckert1:\"eckert1\",eckert2:\"eckert2\",eckert3:\"eckert3\",eckert4:\"eckert4\",eckert5:\"eckert5\",eckert6:\"eckert6\",eisenlohr:\"eisenlohr\",equirectangular:\"equirectangular\",fahey:\"fahey\",\"foucaut sinusoidal\":\"foucautSinusoidal\",foucaut:\"foucaut\",ginzburg4:\"ginzburg4\",ginzburg5:\"ginzburg5\",ginzburg6:\"ginzburg6\",ginzburg8:\"ginzburg8\",ginzburg9:\"ginzburg9\",gnomonic:\"gnomonic\",\"gringorten quincuncial\":\"gringortenQuincuncial\",gringorten:\"gringorten\",guyou:\"guyou\",hammer:\"hammer\",hill:\"hill\",homolosine:\"homolosine\",hufnagel:\"hufnagel\",hyperelliptical:\"hyperelliptical\",kavrayskiy7:\"kavrayskiy7\",lagrange:\"lagrange\",larrivee:\"larrivee\",laskowski:\"laskowski\",loximuthal:\"loximuthal\",mercator:\"mercator\",miller:\"miller\",mollweide:\"mollweide\",\"mt flat polar parabolic\":\"mtFlatPolarParabolic\",\"mt flat polar quartic\":\"mtFlatPolarQuartic\",\"mt flat polar sinusoidal\":\"mtFlatPolarSinusoidal\",\"natural earth\":\"naturalEarth\",\"natural earth1\":\"naturalEarth1\",\"natural earth2\":\"naturalEarth2\",\"nell hammer\":\"nellHammer\",nicolosi:\"nicolosi\",orthographic:\"orthographic\",patterson:\"patterson\",\"peirce quincuncial\":\"peirceQuincuncial\",polyconic:\"polyconic\",\"rectangular polyconic\":\"rectangularPolyconic\",robinson:\"robinson\",satellite:\"satellite\",\"sinu mollweide\":\"sinuMollweide\",sinusoidal:\"sinusoidal\",stereographic:\"stereographic\",times:\"times\",\"transverse mercator\":\"transverseMercator\",\"van der grinten\":\"vanDerGrinten\",\"van der grinten2\":\"vanDerGrinten2\",\"van der grinten3\":\"vanDerGrinten3\",\"van der grinten4\":\"vanDerGrinten4\",wagner4:\"wagner4\",wagner6:\"wagner6\",wiechel:\"wiechel\",\"winkel tripel\":\"winkel3\",winkel3:\"winkel3\"},r.axesNames=[\"lonaxis\",\"lataxis\"],r.lonaxisSpan={orthographic:180,\"azimuthal equal area\":360,\"azimuthal equidistant\":360,\"conic conformal\":180,gnomonic:160,stereographic:180,\"transverse mercator\":180,\"*\":360},r.lataxisSpan={\"conic conformal\":150,stereographic:179.5,\"*\":180},r.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:\"equirectangular\",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:\"albers usa\"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:\"conic conformal\",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:\"mercator\",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:\"mercator\",projRotate:[0,0,0]},\"north america\":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:\"conic conformal\",projRotate:[-100,0,0],projParallels:[29.5,45.5]},\"south america\":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:\"mercator\",projRotate:[0,0,0]}},r.clipPad=.001,r.precision=.1,r.landColor=\"#F0DC82\",r.waterColor=\"#3399FF\",r.locationmodeToLayer={\"ISO-3\":\"countries\",\"USA-states\":\"subunits\",\"country names\":\"countries\"},r.sphereSVG={type:\"Sphere\"},r.fillLayers={ocean:1,land:1,lakes:1},r.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},r.layers=[\"bg\",\"ocean\",\"land\",\"lakes\",\"subunits\",\"countries\",\"coastlines\",\"rivers\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"frontplot\"],r.layersForChoropleth=[\"bg\",\"ocean\",\"land\",\"subunits\",\"countries\",\"coastlines\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"rivers\",\"lakes\",\"frontplot\"],r.layerNameToAdjective={ocean:\"ocean\",land:\"land\",lakes:\"lake\",subunits:\"subunit\",countries:\"country\",coastlines:\"coastline\",rivers:\"river\",frame:\"frame\"}},{}],597:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-geo\"),a=i.geoPath,o=i.geoDistance,s=t(\"d3-geo-projection\"),l=t(\"../../registry\"),u=t(\"../../lib\"),c=u.strTranslate,f=t(\"../../components/color\"),h=t(\"../../components/drawing\"),p=t(\"../../components/fx\"),d=t(\"../plots\"),g=t(\"../cartesian/axes\"),v=t(\"../cartesian/autorange\").getAutoRange,m=t(\"../../components/dragelement\"),y=t(\"../../components/selections\").prepSelect,x=t(\"../../components/selections\").clearOutline,b=t(\"../../components/selections\").selectOnClick,_=t(\"./zoom\"),w=t(\"./constants\"),k=t(\"../../lib/geo_location_utils\"),T=t(\"../../lib/topojson_utils\"),M=t(\"topojson-client\").feature;function A(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var S=A.prototype;function E(t,e){var r=w.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\"Polygon\",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}e.exports=function(t){return new A(t)},S.plot=function(t,e,r,n){var i=this;if(n)return i.update(t,e,!0);i._geoCalcData=t,i._fullLayout=e;var a=e[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if(\"frame\"!==l&&a[\"show\"+l]){s=!0;break}for(var u=!1,c=0;c<t.length;c++){var f=t[0][0].trace;f._geo=i,f.locationmode&&(s=!0);var h=f.marker;if(h){var p=h.angle,d=h.angleref;(p||\"north\"===d||\"previous\"===d)&&(u=!0)}}if(this._hasMarkerAngles=u,s){var g=T.getTopojsonName(a);null!==i.topojson&&g===i.topojsonName||(i.topojsonName=g,void 0===PlotlyGeoAssets.topojson[i.topojsonName]&&o.push(i.fetchTopojson()))}o=o.concat(k.fetchTraceGeoData(t)),r.push(new Promise((function(r,n){Promise.all(o).then((function(){i.topojson=PlotlyGeoAssets.topojson[i.topojsonName],i.update(t,e),r()})).catch(n)})))},S.fetchTopojson=function(){var t=this,e=T.getTopojsonPath(t.topojsonURL,t.topojsonName);return new Promise((function(r,i){n.json(e,(function(n,a){if(n)return 404===n.status?i(new Error([\"plotly.js could not find topojson file at\",e+\".\",\"Make sure the *topojsonURL* plot config option\",\"is set properly.\"].join(\" \"))):i(new Error([\"unexpected error while fetching topojson file at\",e].join(\" \")));PlotlyGeoAssets.topojson[t.topojsonName]=a,r()}))}))},S.update=function(t,e,r){var n=e[this.id];this.hasChoropleth=!1;for(var i=0;i<t.length;i++){var a=t[i],o=a[0].trace;\"choropleth\"===o.type&&(this.hasChoropleth=!0),!0===o.visible&&o._length>0&&o._module.calcGeoJSON(a,e)}if(!r){if(this.updateProjection(t,e))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(e,n),this.updateDims(e,n),this.updateFx(e,n),d.generalUpdatePerTraceModule(this.graphDiv,this,t,n);var s=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=s.selectAll(\".point\"),this.dataPoints.text=s.selectAll(\"text\"),this.dataPaths.line=s.selectAll(\".js-line\");var l=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=l.selectAll(\"path\"),this._render()},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,c=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,g=p._ax,m=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n=\"geo\"+u.titleCase(n);for(var l=(i[n]||s[n])(),c=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],h=function(t){return t?l:[]},p=0;p<f.length;p++){var d=f[p];\"function\"!=typeof l[d]&&(l[d]=h)}return l.isLonLatOverEdges=function(t){if(null===l(t))return!0;if(c){var e=l.rotate();return o(t,[-e[0],-e[1]])>c*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance),c&&l.clipAngle(c-w.clipPad),l}(n),y=[[l.l+l.w*c.x[0],l.t+l.h*(1-c.y[1])],[l.l+l.w*c.x[1],l.t+l.h*(1-c.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],k=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],d.range=v(r,d),g.range=v(r,g);var T=(d.range[0]+d.range[1])/2,M=(g.range[0]+g.range[1])/2;if(n._isScoped)x={lon:T,lat:M};else if(n._isClipped){x={lon:T,lat:M},b={lon:T,lat:M,roll:b.roll};var A=f.type,S=w.lonaxisSpan[A]/2||180,C=w.lataxisSpan[A]/2||90;_=[T-S,T+S],k=[M-C,M+C]}else x={lon:T,lat:M},b={lon:T,lat:b.lat,roll:b.roll}}m.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var L=E(_,k);m.fitExtent(y,L);var P=this.bounds=m.getBounds(L),O=this.fitScale=m.scale(),I=m.translate();if(n.fitbounds){var D=m.getBounds(E(d.range,g.range)),z=Math.min((P[1][0]-P[0][0])/(D[1][0]-D[0][0]),(P[1][1]-P[0][1])/(D[1][1]-D[0][1]));isFinite(z)?m.scale(z*O):u.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else m.scale(f.scale*O);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(m.translate([I[0]+(R[0]-I[0]),I[1]+(R[1]-I[1])]).clipExtent(P),n._isAlbersUsa){var F=m([x.lon,x.lat]),N=m.translate();m.translate([N[0]-(F[0]-N[0]),N[1]-(F[1]-N[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return\"lonaxis\"===t||\"lataxis\"===t}function l(t){return Boolean(w.lineLayers[t])}function u(t){return Boolean(w.fillLayers[t])}var c=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||u(t)?e[\"show\"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(\".layer\").data(c,String);p.exit().each((function(t){delete a[t],delete o[t],n.select(this).remove()})),p.enter().append(\"g\").attr(\"class\",(function(t){return\"layer \"+t})).each((function(t){var e=a[t]=n.select(this);\"bg\"===t?r.bgRect=e.append(\"rect\").style(\"pointer-events\",\"all\"):s(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):l(t)?o[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):u(t)&&(o[t]=e.append(\"path\").style(\"stroke\",\"none\"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];\"frame\"===r?n.datum(w.sphereSVG):l(r)||u(r)?n.datum(M(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];\"lonaxis\"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):\"lataxis\"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:\"linear\",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};g.setConvert(l,r);var u=g.calcTicks(l);e.isScoped||\"lonaxis\"!==t||u.pop();for(var c=u.length,f=new Array(c),h=0;h<c;h++)for(var p=u[h].x,d=f[h]=[],v=i[0];v<i[1]+2.5;v+=2.5)d.push(a(p,v));return{type:\"MultiLineString\",coordinates:f}}(r,e,t)).call(f.stroke,e[r].gridcolor).call(h.dashLine,e[r].griddash,e[r].gridwidth),l(r)?n.call(f.stroke,e[a+\"color\"]).call(h.dashLine,\"\",e[a+\"width\"]):u(r)&&n.call(f.fill,e[a+\"color\"])}))},S.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;h.setRect(this.clipRect,i,a,o,s),this.bgRect.call(h.setRect,i,a,o,s).call(f.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s},S.updateFx=function(t,e){var r=this,i=r.graphDiv,a=r.bgRect,o=t.dragmode,s=t.clickmode;if(!r.isStatic){var c={element:r.bgRect.node(),gd:i,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:function(t,e){e.isRect?(t.range={})[r.id]=[f([e.xmin,e.ymin]),f([e.xmax,e.ymax])]:(t.lassoPoints={})[r.id]=e.map(f)}},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(t){2===t&&x(i)}};\"pan\"===o?(a.node().onmousedown=null,a.call(_(r,e)),a.on(\"dblclick.zoom\",(function(){var t=r.viewInitial,e={};for(var n in t)e[r.id+\".\"+n]=t[n];l.call(\"_guiRelayout\",i,e),i.emit(\"plotly_doubleclick\",null)})),i._context._scrollZoom.geo||a.on(\"wheel.zoom\",null)):\"select\"!==o&&\"lasso\"!==o||(a.on(\".zoom\",null),c.prepFn=function(t,e,r){y(t,e,r,c,o)},m.init(c)),a.on(\"mousemove\",(function(){var t=r.projection.invert(u.getPositionFromD3Event());if(!t)return m.unhover(i,n.event);r.xaxis.p2c=function(){return t[0]},r.yaxis.p2c=function(){return t[1]},p.hover(i,n.event,r.id)})),a.on(\"mouseout\",(function(){i._dragging||m.unhover(i,n.event)})),a.on(\"click\",(function(){\"select\"!==o&&\"lasso\"!==o&&(s.indexOf(\"select\")>-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,c),s.indexOf(\"event\")>-1&&p.click(i,n.event))}))}function f(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i=\"clip\"+r._uid+t.id;t.clipDef=r._clips.append(\"clipPath\").attr(\"id\",i),t.clipRect=t.clipDef.append(\"rect\"),t.framework=n.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(h.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:\"x\",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:\"y\",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},g.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,\"projection.scale\":n.scale},e=t._isScoped?{\"center.lon\":r.lon,\"center.lat\":r.lat}:t._isClipped?{\"projection.rotation.lon\":i.lon,\"projection.rotation.lat\":i.lat}:{\"center.lon\":r.lon,\"center.lat\":r.lat,\"projection.rotation.lon\":i.lon},u.extendFlat(this.viewInitial,e)},S.render=function(t){this._hasMarkerAngles&&t?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?c(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?\"none\":null}for(t in this.basePaths)this.basePaths[t].attr(\"d\",r);for(t in this.dataPaths)this.dataPaths[t].attr(\"d\",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr(\"display\",i).attr(\"transform\",n)}},{\"../../components/color\":367,\"../../components/dragelement\":386,\"../../components/drawing\":389,\"../../components/fx\":407,\"../../components/selections\":455,\"../../lib\":515,\"../../lib/geo_location_utils\":508,\"../../lib/topojson_utils\":544,\"../../registry\":647,\"../cartesian/autorange\":565,\"../cartesian/axes\":566,\"../plots\":628,\"./constants\":596,\"./zoom\":601,\"@plotly/d3\":58,\"d3-geo\":114,\"d3-geo-projection\":113,\"topojson-client\":316}],598:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./geo\"),o=\"geo\",s=i(o),l={};l.geo={valType:\"subplotid\",dflt:o,editType:\"calc\"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s<i.length;s++){var l=i[s],u=n(r,o,l),c=e[l]._subplot;c||(c=a({id:l,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[l]._subplot=c),c.plot(u,e,t._promises)}},updateFx:function(t){for(var e=t._fullLayout,r=e._subplots.geo,n=0;n<r.length;n++){var i=e[r[n]];i._subplot.updateFx(e,i)}},clean:function(t,e,r,n){for(var i=n._subplots.geo||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.framework.remove(),s.clipDef.remove())}}}},{\"../../lib\":515,\"../../plots/get_data\":602,\"./geo\":597,\"./layout_attributes\":599,\"./layout_defaults\":600}],599:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../domain\").attributes,a=t(\"../../components/drawing/attributes\").dash,o=t(\"./constants\"),s=t(\"../../plot_api/edit_types\").overrideAll,l=t(\"../../lib/sort_object_keys\"),u={range:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},showgrid:{valType:\"boolean\",dflt:!1},tick0:{valType:\"number\",dflt:0},dtick:{valType:\"number\"},gridcolor:{valType:\"color\",dflt:n.lightLine},gridwidth:{valType:\"number\",min:0,dflt:1},griddash:a};(e.exports=s({domain:i({name:\"geo\"},{}),fitbounds:{valType:\"enumerated\",values:[!1,\"locations\",\"geojson\"],dflt:!1,editType:\"plot\"},resolution:{valType:\"enumerated\",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:\"enumerated\",values:l(o.scopeDefaults),dflt:\"world\"},projection:{type:{valType:\"enumerated\",values:l(o.projNames)},rotation:{lon:{valType:\"number\"},lat:{valType:\"number\"},roll:{valType:\"number\"}},tilt:{valType:\"number\",dflt:0},distance:{valType:\"number\",min:1.001,dflt:2},parallels:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},scale:{valType:\"number\",min:0,dflt:1}},center:{lon:{valType:\"number\"},lat:{valType:\"number\"}},visible:{valType:\"boolean\",dflt:!0},showcoastlines:{valType:\"boolean\"},coastlinecolor:{valType:\"color\",dflt:n.defaultLine},coastlinewidth:{valType:\"number\",min:0,dflt:1},showland:{valType:\"boolean\",dflt:!1},landcolor:{valType:\"color\",dflt:o.landColor},showocean:{valType:\"boolean\",dflt:!1},oceancolor:{valType:\"color\",dflt:o.waterColor},showlakes:{valType:\"boolean\",dflt:!1},lakecolor:{valType:\"color\",dflt:o.waterColor},showrivers:{valType:\"boolean\",dflt:!1},rivercolor:{valType:\"color\",dflt:o.waterColor},riverwidth:{valType:\"number\",min:0,dflt:1},showcountries:{valType:\"boolean\"},countrycolor:{valType:\"color\",dflt:n.defaultLine},countrywidth:{valType:\"number\",min:0,dflt:1},showsubunits:{valType:\"boolean\"},subunitcolor:{valType:\"color\",dflt:n.defaultLine},subunitwidth:{valType:\"number\",min:0,dflt:1},showframe:{valType:\"boolean\"},framecolor:{valType:\"color\",dflt:n.defaultLine},framewidth:{valType:\"number\",min:0,dflt:1},bgcolor:{valType:\"color\",dflt:n.background},lonaxis:u,lataxis:u},\"plot\",\"from-root\")).uirevision={valType:\"any\",editType:\"none\"}},{\"../../components/color/attributes\":366,\"../../components/drawing/attributes\":388,\"../../lib/sort_object_keys\":538,\"../../plot_api/edit_types\":548,\"../domain\":593,\"./constants\":596}],600:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../subplot_defaults\"),a=t(\"../get_data\").getSubplotData,o=t(\"./constants\"),s=t(\"./layout_attributes\"),l=o.axesNames;function u(t,e,r,i){var s=a(i.fullData,\"geo\",i.id).map((function(t){return t._expandedIndex})),u=r(\"resolution\"),c=r(\"scope\"),f=o.scopeDefaults[c],h=r(\"projection.type\",f.projType),p=e._isAlbersUsa=\"albers usa\"===h;p&&(c=e.scope=\"usa\");var d=e._isScoped=\"world\"!==c,g=e._isSatellite=\"satellite\"===h,v=e._isConic=-1!==h.indexOf(\"conic\")||\"albers\"===h,m=e._isClipped=!!o.lonaxisSpan[h];if(!1===t.visible){var y=n.extendDeep({},e._template);y.showcoastlines=!1,y.showcountries=!1,y.showframe=!1,y.showlakes=!1,y.showland=!1,y.showocean=!1,y.showrivers=!1,y.showsubunits=!1,y.lonaxis&&(y.lonaxis.showgrid=!1),y.lataxis&&(y.lataxis.showgrid=!1),e._template=y}for(var x=r(\"visible\"),b=0;b<l.length;b++){var _,w=l[b],k=[30,10][b];if(d)_=f[w+\"Range\"];else{var T=o[w+\"Span\"],M=(T[h]||T[\"*\"])/2,A=r(\"projection.rotation.\"+w.substr(0,3),f.projRotate[b]);_=[A-M,A+M]}var S=r(w+\".range\",_);r(w+\".tick0\"),r(w+\".dtick\",k),r(w+\".showgrid\",!!x&&void 0)&&(r(w+\".gridcolor\"),r(w+\".gridwidth\"),r(w+\".griddash\")),e[w]._ax={type:\"linear\",_id:w.slice(0,3),_traceIndices:s,setScale:n.identity,c2l:n.identity,r2l:n.identity,autorange:!0,range:S.slice(),_m:1,_input:{}}}var E=e.lonaxis.range,C=e.lataxis.range,L=E[0],P=E[1];L>0&&P<0&&(P+=360);var O,I,D,z=(L+P)/2;if(!p){var R=d?f.projRotate:[z,0,0];O=r(\"projection.rotation.lon\",R[0]),r(\"projection.rotation.lat\",R[1]),r(\"projection.rotation.roll\",R[2]),r(\"showcoastlines\",!d&&x)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\",!!x&&void 0)&&r(\"oceancolor\")}p?(I=-96.6,D=38.7):(I=d?z:O,D=(C[0]+C[1])/2),r(\"center.lon\",I),r(\"center.lat\",D),g&&(r(\"projection.tilt\"),r(\"projection.distance\")),v&&r(\"projection.parallels\",f.projParallels||[0,60]),r(\"projection.scale\"),r(\"showland\",!!x&&void 0)&&r(\"landcolor\"),r(\"showlakes\",!!x&&void 0)&&r(\"lakecolor\"),r(\"showrivers\",!!x&&void 0)&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",d&&\"usa\"!==c&&x)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===c||\"north america\"===c&&50===u)&&(r(\"showsubunits\",x),r(\"subunitcolor\"),r(\"subunitwidth\")),d||r(\"showframe\",x)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\"),r(\"fitbounds\")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):m?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:s,handleDefaults:u,fullData:r,partition:\"y\"})}},{\"../../lib\":515,\"../get_data\":602,\"../subplot_defaults\":641,\"./constants\":596,\"./layout_attributes\":599}],601:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=Math.PI/180,s=180/Math.PI,l={cursor:\"pointer\"},u={cursor:\"auto\"};function c(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],u=o._fullLayout,c=u[n],f={},h={};function p(t,e){f[n+\".\"+t]=i.nestedProperty(l,t).get(),a.call(\"_storeDirectGUIEdit\",s,u._preGUI,f);var r=i.nestedProperty(c,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+\".\"+t]=e)}r(p),p(\"projection.scale\",e.scale()/t.fitScale),p(\"fitbounds\",!1),o.emit(\"plotly_relayout\",h)}function h(t,e){var r=c(0,e);function i(r){var n=e.invert(t.midPt);r(\"center.lon\",n[0]),r(\"center.lat\",n[1])}return r.on(\"zoomstart\",(function(){n.select(this).style(l)})).on(\"zoom\",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render(!0);var r=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":r[0],\"geo.center.lat\":r[1]})})).on(\"zoomend\",(function(){n.select(this).style(u),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,v=c(0,e);function m(t){return e.invert(t)}function y(r){var n=e.rotate(),i=e.invert(t.midPt);r(\"projection.rotation.lon\",-n[0]),r(\"center.lon\",i[0]),r(\"center.lat\",i[1])}return v.on(\"zoomstart\",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=m(r)})).on(\"zoom\",(function(){if(h=n.mouse(this),function(t){var r=m(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return v.scale(e.scale()),void v.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?m(h)&&(d=m(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=m(r=h),g=!0,t.render(!0);var l=e.rotate(),u=e.invert(t.midPt);t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.center.lon\":u[0],\"geo.center.lat\":u[1],\"geo.projection.rotation.lon\":-l[0]})})).on(\"zoomend\",(function(){n.select(this).style(u),g&&f(t,e,y)})),v}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=c(0,e),o=function(t){for(var e=0,r=arguments.length,i=[];++e<r;)i.push(arguments[e]);var a=n.dispatch.apply(null,i);return a.of=function(e,r){return function(i){var o;try{o=i.sourceEvent=n.event,i.target=t,n.event=i,a[i.type].apply(e,r)}finally{n.event=o}}},a}(a,\"zoomstart\",\"zoom\",\"zoomend\"),s=0,h=a.on;function p(t){s++||t({type:\"zoomstart\"})}function d(t){t({type:\"zoom\"})}function b(t){--s||t({type:\"zoomend\"})}function _(t){var r=e.rotate();t(\"projection.rotation.lon\",-r[0]),t(\"projection.rotation.lat\",-r[1])}return a.on(\"zoomstart\",(function(){n.select(this).style(l);var t=n.mouse(this),s=e.rotate(),u=s,c=e.translate(),f=v(s);r=g(e,t),h.call(a,\"zoom\",(function(){var a=n.mouse(this);if(e.scale(i.k=n.event.scale),r){if(g(e,a)){e.rotate(s).translate(c);var l=g(e,a),h=y(r,l),p=k(m(f,h)),v=i.r=x(p,r,u);isFinite(v[0])&&isFinite(v[1])&&isFinite(v[2])||(v=u),e.rotate(v),u=v}}else r=g(e,t=a);d(o.of(this,arguments))})),p(o.of(this,arguments))})).on(\"zoomend\",(function(){n.select(this).style(u),h.call(a,\"zoom\",null),b(o.of(this,arguments)),f(t,e,_)})).on(\"zoom.redraw\",(function(){t.render(!0);var r=e.rotate();t.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":e.scale()/t.fitScale,\"geo.projection.rotation.lon\":-r[0],\"geo.projection.rotation.lat\":-r[1]})})),n.rebind(a,o,\"on\")}function g(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*o,r=t[1]*o,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function v(t){var e=.5*t[0]*o,r=.5*t[1]*o,n=.5*t[2]*o,i=Math.sin(e),a=Math.cos(e),s=Math.sin(r),l=Math.cos(r),u=Math.sin(n),c=Math.cos(n);return[a*l*c+i*s*u,i*l*c-a*s*u,a*s*c+i*l*u,a*l*u-i*s*c]}function m(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function y(t,e){if(t&&e){var r=function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}(t,e),n=Math.sqrt(T(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,T(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function x(t,e,r){var n=w(e,2,t[0]);n=w(n,1,t[1]),n=w(n,0,t[2]-r[2]);var i,a,o=e[0],l=e[1],u=e[2],c=n[0],f=n[1],h=n[2],p=Math.atan2(l,o)*s,d=Math.sqrt(o*o+l*l);Math.abs(f)>d?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,v=(Math.atan2(h,c)-Math.atan2(u,i))*s,m=(Math.atan2(h,c)-Math.atan2(u,-i))*s;return b(r[0],r[1],a,v)<=b(r[0],r[1],g,m)?[a,v,r[2]]:[g,m,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),u=Math.sin(n);return i[a]=t[a]*l-t[s]*u,i[s]=t[s]*l+t[a]*u,i}function k(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function T(t,e){for(var r=0,n=0,i=t.length;n<i;++n)r+=t[n]*e[n];return r}e.exports=function(t,e){var r=t.projection;return(e._isScoped?h:e._isClipped?d:p)(t,r)}},{\"../../lib\":515,\"../../registry\":647,\"@plotly/d3\":58}],602:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"./cartesian/constants\").SUBPLOT_PATTERN;r.getSubplotCalcData=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},r.getModuleCalcData=function(t,e){var r,i=[],a=[];if(!(r=\"string\"==typeof e?n.getModule(e).plot:\"function\"==typeof e?e:e.plot))return[i,t];for(var o=0;o<t.length;o++){var s=t[o],l=s[0].trace;!0===l.visible&&0!==l._length&&(l._module.plot===r?i.push(s):a.push(s))}return[i,a]},r.getSubplotData=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,u=[];if(\"gl2d\"===e){var c=r.match(i);o=\"x\"+c[1],s=\"y\"+c[2]}for(var f=0;f<t.length;f++)a=t[f],\"gl2d\"===e&&n.traceIs(a,\"gl2d\")?a[l[0]]===o&&a[l[1]]===s&&u.push(a):a[l]===r&&u.push(a);return u}},{\"../registry\":647,\"./cartesian/constants\":573}],603:[function(t,e,r){\"use strict\";var n=t(\"mouse-change\"),i=t(\"mouse-wheel\"),a=t(\"mouse-event-offset\"),o=t(\"../cartesian/constants\"),s=t(\"has-passive-events\");function l(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}e.exports=function(t){var e=t.mouseContainer,r=t.glplot,u=new l(e,r);function c(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function f(e,n,i){var a,s,l=t.calcDataBox(),f=r.viewBox,h=u.lastPos[0],p=u.lastPos[1],d=o.MINDRAG*r.pixelRatio,g=o.MINZOOM*r.pixelRatio;function v(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(l[e]=i,l[e+2]=a,u.dataBox=l,t.setRanges(l)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=f[3]-f[1]-i,t.fullLayout.dragmode){case\"zoom\":if(e){var m=n/(f[2]-f[0])*(l[2]-l[0])+l[0],y=i/(f[3]-f[1])*(l[3]-l[1])+l[1];u.boxInited||(u.boxStart[0]=m,u.boxStart[1]=y,u.dragStart[0]=n,u.dragStart[1]=i),u.boxEnd[0]=m,u.boxEnd[1]=y,u.boxInited=!0,u.boxEnabled||u.boxStart[0]===u.boxEnd[0]&&u.boxStart[1]===u.boxEnd[1]||(u.boxEnabled=!0);var x=Math.abs(u.dragStart[0]-n)<g,b=Math.abs(u.dragStart[1]-i)<g;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&b)x&&(u.boxEnd[0]=u.boxStart[0]),b&&(u.boxEnd[1]=u.boxStart[1]);else{a=u.boxEnd[0]-u.boxStart[0],s=u.boxEnd[1]-u.boxStart[1];var _=(l[3]-l[1])/(l[2]-l[0]);Math.abs(a*_)>Math.abs(s)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),u.boxEnd[1]<l[1]?(u.boxEnd[1]=l[1],u.boxEnd[0]=u.boxStart[0]+(l[1]-u.boxStart[1])/Math.abs(_)):u.boxEnd[1]>l[3]&&(u.boxEnd[1]=l[3],u.boxEnd[0]=u.boxStart[0]+(l[3]-u.boxStart[1])/Math.abs(_))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),u.boxEnd[0]<l[0]?(u.boxEnd[0]=l[0],u.boxEnd[1]=u.boxStart[1]+(l[0]-u.boxStart[0])*Math.abs(_)):u.boxEnd[0]>l[2]&&(u.boxEnd[0]=l[2],u.boxEnd[1]=u.boxStart[1]+(l[2]-u.boxStart[0])*Math.abs(_)))}}else u.boxEnabled?(a=u.boxStart[0]!==u.boxEnd[0],s=u.boxStart[1]!==u.boxEnd[1],a||s?(a&&(v(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),s&&(v(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case\"pan\":u.boxEnabled=!1,u.boxInited=!1,e?(u.panning||(u.dragStart[0]=n,u.dragStart[1]=i),Math.abs(u.dragStart[0]-n)<d&&(n=u.dragStart[0]),Math.abs(u.dragStart[1]-i)<d&&(i=u.dragStart[1]),a=(h-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(p-i)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=a,l[2]+=a,l[1]+=s,l[3]+=s,t.setRanges(l),u.panning=!0,u.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations()):u.panning&&(u.panning=!1,t.relayoutCallback())}u.lastPos[0]=n,u.lastPos[1]=i}return u.mouseListener=n(e,f),e.addEventListener(\"touchstart\",(function(t){var r=a(t.changedTouches[0],e);f(0,r[0],r[1]),f(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener(\"touchmove\",(function(t){t.preventDefault();var r=a(t.changedTouches[0],e);f(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener(\"touchend\",(function(t){f(0,u.lastPos[0],u.lastPos[1]),t.preventDefault()}),!!s&&{passive:!1}),u.wheelListener=i(e,(function(e,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=r.viewBox,o=u.lastPos[0],s=u.lastPos[1],l=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*l+f,i[2]=(i[2]-f)*l+f,i[1]=(i[1]-h)*l+h,i[3]=(i[3]-h)*l+h,t.setRanges(i),u.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0}),!0),u}},{\"../cartesian/constants\":573,\"has-passive-events\":229,\"mouse-change\":241,\"mouse-event-offset\":242,\"mouse-wheel\":244}],604:[function(t,e,r){\"use strict\";var n=t(\"../cartesian/axes\"),i=t(\"../../lib/str2rgbarray\");function a(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=[\"x\",\"y\"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=[\"sans-serif\",\"sans-serif\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title=\"\",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont=\"sans-serif\",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var o=a.prototype,s=[\"xaxis\",\"yaxis\"];o.merge=function(t){var e,r,n,a,o,l,u,c,f,h,p;for(this.titleEnable=!1,this.backgroundColor=i(t.plot_bgcolor),h=0;h<2;++h){var d=(e=s[h]).charAt(0);for(n=(r=t[this.scene[e]._name]).title.text===this.scene.fullLayout._dfltTitle[d]?\"\":r.title.text,p=0;p<=2;p+=2)this.labelEnable[h+p]=!1,this.labels[h+p]=n,this.labelColor[h+p]=i(r.title.font.color),this.labelFont[h+p]=r.title.font.family,this.labelSize[h+p]=r.title.font.size,this.labelPad[h+p]=this.getLabelPad(e,r),this.tickEnable[h+p]=!1,this.tickColor[h+p]=i((r.tickfont||{}).color),this.tickAngle[h+p]=\"auto\"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[h+p]=this.getTickPad(r),this.tickMarkLength[h+p]=0,this.tickMarkWidth[h+p]=r.tickwidth||0,this.tickMarkColor[h+p]=i(r.tickcolor),this.borderLineEnable[h+p]=!1,this.borderLineColor[h+p]=i(r.linecolor),this.borderLineWidth[h+p]=r.linewidth||0;u=this.hasSharedAxis(r),o=this.hasAxisInDfltPos(e,r)&&!u,l=this.hasAxisInAltrPos(e,r)&&!u,a=r.mirror||!1,c=u?-1!==String(a).indexOf(\"all\"):!!a,f=u?\"allticks\"===a:-1!==String(a).indexOf(\"ticks\"),o?this.labelEnable[h]=!0:l&&(this.labelEnable[h+2]=!0),o?this.tickEnable[h]=r.showticklabels:l&&(this.tickEnable[h+2]=r.showticklabels),(o||c)&&(this.borderLineEnable[h]=r.showline),(l||c)&&(this.borderLineEnable[h+2]=r.showline),(o||f)&&(this.tickMarkLength[h]=this.getTickMarkLength(r)),(l||f)&&(this.tickMarkLength[h+2]=this.getTickMarkLength(r)),this.gridLineEnable[h]=r.showgrid,this.gridLineColor[h]=i(r.gridcolor),this.gridLineWidth[h]=r.gridwidth,this.zeroLineEnable[h]=r.zeroline,this.zeroLineColor[h]=i(r.zerolinecolor),this.zeroLineWidth[h]=r.zerolinewidth}},o.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,t).indexOf(e.id)},o.hasAxisInDfltPos=function(t,e){var r=e.side;return\"xaxis\"===t?\"bottom\"===r:\"yaxis\"===t?\"left\"===r:void 0},o.hasAxisInAltrPos=function(t,e){var r=e.side;return\"xaxis\"===t?\"top\"===r:\"yaxis\"===t?\"right\"===r:void 0},o.getLabelPad=function(t,e){var r=1.5,n=e.title.font.size,i=e.showticklabels;return\"xaxis\"===t?\"top\"===e.side?n*(r+(i?1:0))-10:n*(r+(i?.5:0))-10:\"yaxis\"===t?\"right\"===e.side?10+n*(r+(i?1:.5)):10+n*(r+(i?.5:0)):void 0},o.getTickPad=function(t){return\"outside\"===t.ticks?10+t.ticklen:15},o.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return\"inside\"===t.ticks?-e:e},e.exports=function(t){return new a(t)}},{\"../../lib/str2rgbarray\":540,\"../cartesian/axes\":566}],605:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"./scene2d\"),a=t(\"../layout_attributes\"),o=t(\"../../constants/xmlns_namespaces\"),s=t(\"../cartesian/constants\"),l=t(\"../cartesian\"),u=t(\"../../components/fx/layout_attributes\"),c=t(\"../get_data\").getSubplotData;r.name=\"gl2d\",r.attr=[\"xaxis\",\"yaxis\"],r.idRoot=[\"x\",\"y\"],r.idRegex=s.idRegex,r.attrRegex=s.attrRegex,r.attributes=t(\"../cartesian/attributes\"),r.supplyLayoutDefaults=function(t,e,r){e._has(\"cartesian\")||l.supplyLayoutDefaults(t,e,r)},r.layoutAttrOverrides=n(l.layoutAttributes,\"plot\",\"from-root\"),r.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:u.hoverlabel},\"plot\",\"nested\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=c(r,\"gl2d\",o),u=s._scene2d;void 0===u&&(u=new i({id:o,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=u),u.plot(l,t.calcdata,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];s._scene2d&&0===c(t,\"gl2d\",o).length&&(s._scene2d.destroy(),delete n._plots[o])}l.clean.apply(this,arguments)},r.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":a,x:0,y:0,width:\"100%\",height:\"100%\",preserveAspectRatio:\"none\"}),i.destroy()}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++)e._plots[r[n]]._scene2d.updateFx(e.dragmode)}},{\"../../components/fx/layout_attributes\":408,\"../../constants/xmlns_namespaces\":492,\"../../plot_api/edit_types\":548,\"../cartesian\":578,\"../cartesian/attributes\":564,\"../cartesian/constants\":573,\"../get_data\":602,\"../layout_attributes\":619,\"./scene2d\":606}],606:[function(t,e,r){\"use strict\";var n,i,a=t(\"../../registry\"),o=t(\"../../plots/cartesian/axes\"),s=t(\"../../components/fx\"),l=t(\"../../../stackgl_modules\").gl_plot2d,u=t(\"../../../stackgl_modules\").gl_spikes2d,c=t(\"../../../stackgl_modules\").gl_select_box,f=t(\"webgl-context\"),h=t(\"./convert\"),p=t(\"./camera\"),d=t(\"../../lib/show_no_webgl_msg\"),g=t(\"../cartesian/constraints\"),v=g.enforce,m=g.clean,y=t(\"../cartesian/autorange\").doAutoRange,x=t(\"../../components/dragelement/helpers\"),b=x.drawMode,_=x.selectMode,w=[\"xaxis\",\"yaxis\"],k=t(\"../cartesian/constants\").SUBPLOT_PATTERN;function T(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.stopped||(this.glplotOptions=h(this),this.glplotOptions.merge(e),this.glplot=l(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=u(this.glplot),this.selectBox=c(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}e.exports=T;var M=T.prototype;M.makeFramework=function(){if(this.staticPlot){if(!(i||(n=document.createElement(\"canvas\"),i=f({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\"Error creating static canvas/context for image server\");this.canvas=n,this.gl=i}else{var t=this.container.querySelector(\".gl-canvas-focus\"),e=f({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!e)return d(this),void(this.stopped=!0);this.canvas=t,this.gl=e}var r=this.canvas;r.style.width=\"100%\",r.style.height=\"100%\",r.style.position=\"absolute\",r.style.top=\"0px\",r.style.left=\"0px\",r.style[\"pointer-events\"]=\"none\",this.updateSize(r);var a=this.svgContainer=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");a.style.position=\"absolute\",a.style.top=a.style.left=\"0px\",a.style.width=a.style.height=\"100%\",a.style[\"z-index\"]=20,a.style[\"pointer-events\"]=\"none\";var o=this.mouseContainer=document.createElement(\"div\");o.style.position=\"absolute\",o.style[\"pointer-events\"]=\"auto\",this.pickCanvas=this.container.querySelector(\".gl-canvas-pick\");var s=this.container;s.appendChild(a),s.appendChild(o);var l=this;o.addEventListener(\"mouseout\",(function(){l.isMouseOver=!1,l.unhover()})),o.addEventListener(\"mouseover\",(function(){l.isMouseOver=!0}))},M.toImage=function(t){t||(t=\"png\"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var u=0;u<4;++u){var c=a[4*(r*o+l)+u];a[4*(r*o+l)+u]=a[4*(r*s+l)+u],a[4*(r*s+l)+u]=c}var f=document.createElement(\"canvas\");f.width=r,f.height=i;var h,p=f.getContext(\"2d\",{willReadFrequently:!0}),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case\"jpeg\":h=f.toDataURL(\"image/jpeg\");break;case\"webp\":h=f.toDataURL(\"image/webp\");break;default:h=f.toDataURL(\"image/png\")}return this.staticPlot&&this.container.removeChild(n),h},M.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),t},M.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=t[e][r].text+\"\";return t},M.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(k),r=\"xaxis\"+e[1],n=\"yaxis\"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},M.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout,i={},o=i[e._name+\".range\"]=e.range.slice(),s=i[r._name+\".range\"]=r.range.slice();i[e._name+\".autorange\"]=e.autorange,i[r._name+\".autorange\"]=r.autorange,a.call(\"_storeDirectGUIEdit\",t.layout,t._fullLayout._preGUI,i);var l=n[e._name];l.range=o,l.autorange=e.autorange;var u=n[r._name];u.range=s,u.autorange=r.autorange,i.lastInputTime=this.camera.lastInputTime,t.emit(\"plotly_relayout\",i)},M.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},M.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&a.getComponentMethod(\"annotations\",\"drawOne\")(t,r)}},M.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map((function(e){t[e].dispose(),delete t[e]})),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null}},M.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var s={_fullLayout:{_axisConstraintGroups:r._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:r._size}};m(s,this.xaxis),m(s,this.yaxis);var l,u,c=r._size,f=this.xaxis.domain,h=this.yaxis.domain;for(o.viewBox=[c.l+f[0]*c.w,c.b+h[0]*c.h,i-c.r-(1-f[1])*c.w,a-c.t-(1-h[1])*c.h],this.mouseContainer.style.width=c.w*(f[1]-f[0])+\"px\",this.mouseContainer.style.height=c.h*(h[1]-h[0])+\"px\",this.mouseContainer.height=c.h*(h[1]-h[0]),this.mouseContainer.style.left=c.l+f[0]*c.w+\"px\",this.mouseContainer.style.top=c.t+(1-h[1])*c.h+\"px\",u=0;u<2;++u)(l=this[w[u]])._length=o.viewBox[u+2]-o.viewBox[u],y(this.graphDiv,l),l.setScale();v(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},M.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},M.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},M.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],u=this.traces[i.uid];u?u.update(i,l):(u=i._module.plot(this,i,l),this.traces[i.uid]=u)}this.glplot.objects.sort((function(t,e){return t._trace.index-e._trace.index}))},M.updateFx=function(t){_(t)||b(t)?(this.pickCanvas.style[\"pointer-events\"]=\"none\",this.mouseContainer.style[\"pointer-events\"]=\"none\"):(this.pickCanvas.style[\"pointer-events\"]=\"auto\",this.mouseContainer.style[\"pointer-events\"]=\"auto\"),this.mouseContainer.style.cursor=\"pan\"===t?\"move\":\"zoom\"===t?\"crosshair\":null},M.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},M.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,l=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&\"zoom\"===i.dragmode){this.selectBox.enabled=!0;for(var u=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],c=0;c<2;c++)e.boxStart[c]===e.boxEnd[c]&&(u[c]=t.dataBox[c],u[c+2]=t.dataBox[c+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,p=this.yaxis.domain,d=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,l/t.pixelRatio-(f.t+(1-p[1])*f.h)))&&a.object._trace.handlePick(a);if(d&&n&&this.emitPointAction(d,\"plotly_click\"),a&&\"skip\"!==a.object._trace.hoverinfo&&i.hovermode&&d&&(!this.lastPickResult||this.lastPickResult.traceUid!==d.trace.uid||this.lastPickResult.dataCoord[0]!==d.dataCoord[0]||this.lastPickResult.dataCoord[1]!==d.dataCoord[1])){var g=d;this.lastPickResult={traceUid:d.trace?d.trace.uid:null,dataCoord:d.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),g.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(d,\"plotly_hover\");var v=this.fullData[g.trace.index]||{},m=g.pointIndex,y=s.castHoverinfo(v,i,m);if(y&&\"all\"!==y){var x=y.split(\"+\");-1===x.indexOf(\"x\")&&(g.traceCoord[0]=void 0),-1===x.indexOf(\"y\")&&(g.traceCoord[1]=void 0),-1===x.indexOf(\"z\")&&(g.traceCoord[2]=void 0),-1===x.indexOf(\"text\")&&(g.textLabel=void 0),-1===x.indexOf(\"name\")&&(g.name=void 0)}s.loneHover({x:g.screenCoord[0],y:g.screenCoord[1],xLabel:this.hoverFormatter(\"xaxis\",g.traceCoord[0]),yLabel:this.hoverFormatter(\"yaxis\",g.traceCoord[1]),zLabel:g.traceCoord[2],text:g.textLabel,name:g.name,color:s.castHoverOption(v,m,\"bgcolor\")||g.color,borderColor:s.castHoverOption(v,m,\"bordercolor\"),fontFamily:s.castHoverOption(v,m,\"font.family\"),fontSize:s.castHoverOption(v,m,\"font.size\"),fontColor:s.castHoverOption(v,m,\"font.color\"),nameLength:s.castHoverOption(v,m,\"namelength\"),textAlign:s.castHoverOption(v,m,\"align\")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},M.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit(\"plotly_unhover\"),s.loneUnhover(this.svgContainer))},M.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return o.tickText(r,r.c2l(e),\"hover\").text}}},{\"../../../stackgl_modules\":1133,\"../../components/dragelement/helpers\":385,\"../../components/fx\":407,\"../../lib/show_no_webgl_msg\":537,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"../cartesian/autorange\":565,\"../cartesian/constants\":573,\"../cartesian/constraints\":574,\"./camera\":603,\"./convert\":604,\"webgl-context\":332}],607:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"../../components/fx/layout_attributes\"),a=t(\"./scene\"),o=t(\"../get_data\").getSubplotData,s=t(\"../../lib\"),l=t(\"../../constants/xmlns_namespaces\"),u=\"gl3d\",c=\"scene\";r.name=u,r.attr=c,r.idRoot=c,r.idRegex=r.attrRegex=s.counterRegex(\"scene\"),r.attributes=t(\"./layout/attributes\"),r.layoutAttributes=t(\"./layout/layout_attributes\"),r.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},\"plot\",\"nested\"),r.supplyLayoutDefaults=t(\"./layout/defaults\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl3d,i=0;i<n.length;i++){var s=n[i],l=o(r,u,s),c=e[s],f=c.camera,h=c._scene;h||(h=new a({id:s,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:f},e),c._scene=h),h.viewInitial||(h.viewInitial={up:{x:f.up.x,y:f.up.y,z:f.up.z},eye:{x:f.eye.x,y:f.eye.y,z:f.eye.z},center:{x:f.center.x,y:f.center.y,z:f.center.z}}),h.plot(l,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl3d||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(\".annotation-\"+o).remove())}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,u=s.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:l.svg,\"xlink:href\":u,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\"none\"}),s.destroy()}},r.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return\"1\"===e&&(e=\"\"),c+e}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++)e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}},{\"../../components/fx/layout_attributes\":408,\"../../constants/xmlns_namespaces\":492,\"../../lib\":515,\"../../plot_api/edit_types\":548,\"../get_data\":602,\"./layout/attributes\":608,\"./layout/defaults\":612,\"./layout/layout_attributes\":613,\"./scene\":617}],608:[function(t,e,r){\"use strict\";e.exports={scene:{valType:\"subplotid\",dflt:\"scene\",editType:\"calc+clearAxisTypes\"}}},{}],609:[function(t,e,r){\"use strict\";var n=t(\"../../../components/color\"),i=t(\"../../cartesian/layout_attributes\"),a=t(\"../../../lib/extend\").extendFlat,o=t(\"../../../plot_api/edit_types\").overrideAll;e.exports=o({visible:i.visible,showspikes:{valType:\"boolean\",dflt:!0},spikesides:{valType:\"boolean\",dflt:!0},spikethickness:{valType:\"number\",min:0,dflt:2},spikecolor:{valType:\"color\",dflt:n.defaultLine},showbackground:{valType:\"boolean\",dflt:!1},backgroundcolor:{valType:\"color\",dflt:\"rgba(204, 204, 204, 0.5)\"},showaxeslabels:{valType:\"boolean\",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:a({},i.type,{values:[\"-\",\"linear\",\"log\",\"date\",\"category\"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,rangemode:i.rangemode,range:a({},i.range,{items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],anim:!1}),tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:\"rgb(204, 204, 204)\"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},\"plot\",\"from-root\")},{\"../../../components/color\":367,\"../../../lib/extend\":505,\"../../../plot_api/edit_types\":548,\"../../cartesian/layout_attributes\":579}],610:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\").mix,i=t(\"../../../lib\"),a=t(\"../../../plot_api/plot_template\"),o=t(\"./axis_attributes\"),s=t(\"../../cartesian/type_defaults\"),l=t(\"../../cartesian/axis_defaults\"),u=[\"xaxis\",\"yaxis\",\"zaxis\"];e.exports=function(t,e,r){var c,f;function h(t,e){return i.coerce(c,f,o,t,e)}for(var p=0;p<u.length;p++){var d=u[p];c=t[d]||{},(f=a.newContainer(e,d))._id=d[0]+r.scene,f._name=d,s(c,f,h,r),l(c,f,h,{font:r.font,letter:d[0],data:r.data,showGrid:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),h(\"gridcolor\",n(f.color,r.bgColor,72.72727272727273).toRgbString()),h(\"title.text\",d[0]),f.setScale=i.noop,h(\"showspikes\")&&(h(\"spikesides\"),h(\"spikethickness\"),h(\"spikecolor\",f.color)),h(\"showaxeslabels\"),h(\"showbackground\")&&h(\"backgroundcolor\")}}},{\"../../../lib\":515,\"../../../plot_api/plot_template\":555,\"../../cartesian/axis_defaults\":568,\"../../cartesian/type_defaults\":591,\"./axis_attributes\":609,tinycolor2:313}],611:[function(t,e,r){\"use strict\";var n=t(\"../../../lib/str2rgbarray\"),i=t(\"../../../lib\"),a=[\"xaxis\",\"yaxis\",\"zaxis\"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\"Open Sans\",\"Open Sans\",\"Open Sans\"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(t,e){for(var r=this,o=0;o<3;++o){var s=e[a[o]];s.visible?(r.labels[o]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,\"font\"in s.title&&(s.title.font.color&&(r.labelColor[o]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[o]=s.title.font.family),s.title.font.size&&(r.labelSize[o]=s.title.font.size)),\"showline\"in s&&(r.lineEnable[o]=s.showline),\"linecolor\"in s&&(r.lineColor[o]=n(s.linecolor)),\"linewidth\"in s&&(r.lineWidth[o]=s.linewidth),\"showgrid\"in s&&(r.gridEnable[o]=s.showgrid),\"gridcolor\"in s&&(r.gridColor[o]=n(s.gridcolor)),\"gridwidth\"in s&&(r.gridWidth[o]=s.gridwidth),\"log\"===s.type?r.zeroEnable[o]=!1:\"zeroline\"in s&&(r.zeroEnable[o]=s.zeroline),\"zerolinecolor\"in s&&(r.zeroLineColor[o]=n(s.zerolinecolor)),\"zerolinewidth\"in s&&(r.zeroLineWidth[o]=s.zerolinewidth),\"ticks\"in s&&s.ticks?r.lineTickEnable[o]=!0:r.lineTickEnable[o]=!1,\"ticklen\"in s&&(r.lineTickLength[o]=r._defaultLineTickLength[o]=s.ticklen),\"tickcolor\"in s&&(r.lineTickColor[o]=n(s.tickcolor)),\"tickwidth\"in s&&(r.lineTickWidth[o]=s.tickwidth),\"tickangle\"in s&&(r.tickAngle[o]=\"auto\"===s.tickangle?-3600:Math.PI*-s.tickangle/180),\"showticklabels\"in s&&(r.tickEnable[o]=s.showticklabels),\"tickfont\"in s&&(s.tickfont.color&&(r.tickColor[o]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[o]=s.tickfont.family),s.tickfont.size&&(r.tickSize[o]=s.tickfont.size)),\"mirror\"in s?-1!==[\"ticks\",\"all\",\"allticks\"].indexOf(s.mirror)?(r.lineTickMirror[o]=!0,r.lineMirror[o]=!0):!0===s.mirror?(r.lineTickMirror[o]=!1,r.lineMirror[o]=!0):(r.lineTickMirror[o]=!1,r.lineMirror[o]=!1):r.lineMirror[o]=!1,\"showbackground\"in s&&!1!==s.showbackground?(r.backgroundEnable[o]=!0,r.backgroundColor[o]=n(s.backgroundcolor)):r.backgroundEnable[o]=!1):(r.tickEnable[o]=!1,r.labelEnable[o]=!1,r.lineEnable[o]=!1,r.lineTickEnable[o]=!1,r.gridEnable[o]=!1,r.zeroEnable[o]=!1,r.backgroundEnable[o]=!1)}},e.exports=function(t,e){var r=new o;return r.merge(t,e),r}},{\"../../../lib\":515,\"../../../lib/str2rgbarray\":540}],612:[function(t,e,r){\"use strict\";var n=t(\"../../../lib\"),i=t(\"../../../components/color\"),a=t(\"../../../registry\"),o=t(\"../../subplot_defaults\"),s=t(\"./axis_defaults\"),l=t(\"./layout_attributes\"),u=t(\"../../get_data\").getSubplotData,c=\"gl3d\";function f(t,e,r,n){for(var o=r(\"bgcolor\"),l=i.combine(o,n.paper_bgcolor),f=[\"up\",\"center\",\"eye\"],h=0;h<f.length;h++)r(\"camera.\"+f[h]+\".x\"),r(\"camera.\"+f[h]+\".y\"),r(\"camera.\"+f[h]+\".z\");r(\"camera.projection.type\");var p=!!r(\"aspectratio.x\")&&!!r(\"aspectratio.y\")&&!!r(\"aspectratio.z\"),d=r(\"aspectmode\",p?\"manual\":\"auto\");p||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},\"manual\"===d&&(e.aspectmode=\"auto\"),t.aspectmode=e.aspectmode);var g=u(n.fullData,c,n.id);s(t,e,{font:n.font,scene:n.id,data:g,bgColor:l,calendar:n.calendar,autotypenumbersDflt:n.autotypenumbersDflt,fullLayout:n.fullLayout}),a.getComponentMethod(\"annotations3d\",\"handleDefaults\")(t,e,n);var v=n.getDfltFromLayout(\"dragmode\");if(!1!==v&&!v)if(v=\"orbit\",t.camera&&t.camera.up){var m=t.camera.up.x,y=t.camera.up.y,x=t.camera.up.z;0!==x&&(m&&y&&x?x/Math.sqrt(m*m+y*y+x*x)>.999&&(v=\"turntable\"):v=\"turntable\")}else v=\"turntable\";r(\"dragmode\",v),r(\"hovermode\",n.getDfltFromLayout(\"hovermode\"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:c,attributes:l,handleDefaults:f,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":367,\"../../../lib\":515,\"../../../registry\":647,\"../../get_data\":602,\"../../subplot_defaults\":641,\"./axis_defaults\":610,\"./layout_attributes\":613}],613:[function(t,e,r){\"use strict\";var n=t(\"./axis_attributes\"),i=t(\"../../domain\").attributes,a=t(\"../../../lib/extend\").extendFlat,o=t(\"../../../lib\").counterRegex;function s(t,e,r){return{x:{valType:\"number\",dflt:t,editType:\"camera\"},y:{valType:\"number\",dflt:e,editType:\"camera\"},z:{valType:\"number\",dflt:r,editType:\"camera\"},editType:\"camera\"}}e.exports={_arrayAttrRegexps:[o(\"scene\",\".annotations\",!0)],bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"plot\"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},editType:\"camera\"},domain:i({name:\"scene\",editType:\"plot\"}),aspectmode:{valType:\"enumerated\",values:[\"auto\",\"cube\",\"data\",\"manual\"],dflt:\"auto\",editType:\"plot\",impliedEdits:{\"aspectratio.x\":void 0,\"aspectratio.y\":void 0,\"aspectratio.z\":void 0}},aspectratio:{x:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},y:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},z:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},editType:\"plot\",impliedEdits:{aspectmode:\"manual\"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:\"enumerated\",values:[\"orbit\",\"turntable\",\"zoom\",\"pan\",!1],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":515,\"../../../lib/extend\":505,\"../../domain\":593,\"./axis_attributes\":609}],614:[function(t,e,r){\"use strict\";var n=t(\"../../../lib/str2rgbarray\"),i=[\"xaxis\",\"yaxis\",\"zaxis\"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new a;return e.merge(t),e}},{\"../../../lib/str2rgbarray\":540}],615:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],u=0;u<3;++u){var c=s[a[u]];if(c._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(c._length)===1/0||isNaN(c._length))l[u]=[];else{c._input_range=c.range.slice(),c.range[0]=r[u].lo/t.dataScale[u],c.range[1]=r[u].hi/t.dataScale[u],c._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var f=c.tickmode;if(\"auto\"===c.tickmode){c.tickmode=\"linear\";var h=c.nticks||i.constrain(c._length/40,4,9);n.autoTicks(c,Math.abs(c.range[1]-c.range[0])/h)}for(var p=n.calcTicks(c,{msUTC:!0}),d=0;d<p.length;++d)p[d].x=p[d].x*t.dataScale[u],\"date\"===c.type&&(p[d].text=p[d].text.replace(/\\<br\\>/g,\" \"));l[u]=p,c.tickmode=f}}for(e.ticks=l,u=0;u<3;++u)for(o[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]),d=0;d<2;++d)e.bounds[d][u]=t.glplot.bounds[d][u];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;e[r]=i}return e}(l)};var n=t(\"../../cartesian/axes\"),i=t(\"../../../lib\"),a=[\"xaxis\",\"yaxis\",\"zaxis\"],o=[0,0,0]},{\"../../../lib\":515,\"../../cartesian/axes\":566}],616:[function(t,e,r){\"use strict\";function n(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}e.exports=function(t,e){return n(t.projection,n(t.view,n(t.model,[e[0],e[1],e[2],1])))}},{}],617:[function(t,e,r){\"use strict\";var n,i,a=t(\"../../../stackgl_modules\").gl_plot3d,o=a.createCamera,s=a.createScene,l=t(\"webgl-context\"),u=t(\"has-passive-events\"),c=t(\"../../registry\"),f=t(\"../../lib\"),h=f.preserveDrawingBuffer(),p=t(\"../../plots/cartesian/axes\"),d=t(\"../../components/fx\"),g=t(\"../../lib/str2rgbarray\"),v=t(\"../../lib/show_no_webgl_msg\"),m=t(\"./project\"),y=t(\"./layout/convert\"),x=t(\"./layout/spikes\"),b=t(\"./layout/tick_marks\");function _(t,e){var r=document.createElement(\"div\"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");i.style.position=\"absolute\",i.style.top=i.style.left=\"0px\",i.style.width=i.style.height=\"100%\",i.style[\"z-index\"]=20,i.style[\"pointer-events\"]=\"none\",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position=\"absolute\",r.style.top=r.style.left=\"0px\",r.style.width=r.style.height=\"100%\",n.appendChild(r),this.fullLayout=e,this.id=t.id||\"scene\",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=y(e,e[this.id]),this.spikeOptions=x(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod(\"annotations3d\",\"convert\"),this.drawAnnotations=c.getComponentMethod(\"annotations3d\",\"draw\"),this.initializeGLPlot()}var w=_.prototype;w.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:h,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement(\"canvas\"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\"error creating static canvas/context for image server\");e.gl=i,e.canvas=n}return e};var k=!0;w.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!k||h)r=!1;else{f.warn([\"webgl setup failed possibly due to\",\"false preserveDrawingBuffer config.\",\"The mobile/tablet device may not be detected by is-mobile module.\",\"Enabling preserveDrawingBuffer in second attempt to create webgl scene...\"].join(\" \"));try{h=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){h=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return k=!1,r},w.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r=\"orthographic\"===e.projection.type;t.camera=o(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:\"orbit\"})},w.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return v(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+\".camera\"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+\".aspectratio\"]=t.glplot.getAspectratio(),\"manual\"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+\".aspectmode\"]=\"manual\")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit(\"plotly_relayout\",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener(\"mouseup\",(function(){i(t)})),t.glplot.canvas.addEventListener(\"wheel\",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!u&&{passive:!1}),t.glplot.canvas.addEventListener(\"mousemove\",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit(\"plotly_relayouting\",e)}})),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",(function(r){e&&e.emit&&e.emit(\"plotly_webglcontextlost\",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),b(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,h=e.glplot.selection,g=0;g<u.length;++g)\"skip\"!==(t=e.traces[u[g]]).data.hoverinfo&&t.handlePick(h)&&(c=t),t.setContourLevels&&t.setContourLevels();function v(t,r,n){var i=e.fullSceneLayout[t+\"axis\"];return\"log\"!==i.type&&(r=i.d2l(r)),p.hoverLabelText(i,r,n)}if(null!==c){var y=m(e.glplot.cameraParams,h.dataCoordinate);t=c.data;var x,_=r._fullData[t.index],w=h.index,k={xLabel:v(\"x\",h.traceCoordinate[0],t.xhoverformat),yLabel:v(\"y\",h.traceCoordinate[1],t.yhoverformat),zLabel:v(\"z\",h.traceCoordinate[2],t.zhoverformat)},T=d.castHoverinfo(_,e.fullLayout,w),M=(T||\"\").split(\"+\"),A=T&&\"all\"===T;_.hovertemplate||A||(-1===M.indexOf(\"x\")&&(k.xLabel=void 0),-1===M.indexOf(\"y\")&&(k.yLabel=void 0),-1===M.indexOf(\"z\")&&(k.zLabel=void 0),-1===M.indexOf(\"text\")&&(h.textLabel=void 0),-1===M.indexOf(\"name\")&&(c.name=void 0));var S=[];\"cone\"===t.type||\"streamtube\"===t.type?(k.uLabel=v(\"x\",h.traceCoordinate[3],t.uhoverformat),(A||-1!==M.indexOf(\"u\"))&&S.push(\"u: \"+k.uLabel),k.vLabel=v(\"y\",h.traceCoordinate[4],t.vhoverformat),(A||-1!==M.indexOf(\"v\"))&&S.push(\"v: \"+k.vLabel),k.wLabel=v(\"z\",h.traceCoordinate[5],t.whoverformat),(A||-1!==M.indexOf(\"w\"))&&S.push(\"w: \"+k.wLabel),k.normLabel=h.traceCoordinate[6].toPrecision(3),(A||-1!==M.indexOf(\"norm\"))&&S.push(\"norm: \"+k.normLabel),\"streamtube\"===t.type&&(k.divergenceLabel=h.traceCoordinate[7].toPrecision(3),(A||-1!==M.indexOf(\"divergence\"))&&S.push(\"divergence: \"+k.divergenceLabel)),h.textLabel&&S.push(h.textLabel),x=S.join(\"<br>\")):\"isosurface\"===t.type||\"volume\"===t.type?(k.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push(\"value: \"+k.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join(\"<br>\")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var C={points:[E]};if(e.fullSceneLayout.hovermode){var L=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:k.xLabel,yLabel:k.yLabel,zLabel:k.zLabel,text:x,name:c.name,color:d.castHoverOption(_,w,\"bgcolor\")||c.color,borderColor:d.castHoverOption(_,w,\"bordercolor\"),fontFamily:d.castHoverOption(_,w,\"font.family\"),fontSize:d.castHoverOption(_,w,\"font.size\"),fontColor:d.castHoverOption(_,w,\"font.color\"),nameLength:d.castHoverOption(_,w,\"namelength\"),textAlign:d.castHoverOption(_,w,\"align\"),hovertemplate:f.castOption(_,w,\"hovertemplate\"),hovertemplateLabels:f.extendFlat({},E,k),eventData:[E]},{container:n,gd:r,inOut_bbox:L}),E.bbox=L[0]}h.buttons&&h.distance<5?r.emit(\"plotly_click\",C):r.emit(\"plotly_hover\",C),this.oldEventData=C}else d.loneUnhover(n),this.oldEventData&&r.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")};requestAnimationFrame(e)};var T=[\"xaxis\",\"yaxis\",\"zaxis\"];function M(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=T[i],o=a.charAt(0),s=n[a],l=e[o],u=e[o+\"calendar\"],c=e[\"_\"+o+\"length\"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(c||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;d<l[p].length;++d)h=s.d2l(l[p][d],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else h=s.d2l(l[p],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1)}}w.plot=function(t,e,r){var n=this;if(n.plotArgs=[t,e,r],!n.glplot.contextLost){var i,a,o,s,l,u,c=e[n.id],f=r[n.id];n.fullLayout=e,n.fullSceneLayout=c,n.axesOptions.merge(e,c),n.spikeOptions.merge(c),n.setViewport(c),n.updateFx(c.dragmode,c.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(g(c.bgcolor)),n.setConvert(l),t?Array.isArray(t)||(t=[t]):t=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(o=0;o<t.length;++o)!0===(i=t[o]).visible&&0!==i._length&&M(this,i,h);!function(t,e){for(var r=t.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=T[i],o=a.charAt(0),s=r[a],l=0;l<n.length;l++){var u=n[l];if(u.visible){var c=s.r2l(u[o]);!isNaN(c)&&isFinite(c)&&(e[0][i]=Math.min(e[0][i],c),e[1][i]=Math.max(e[1][i],c))}}}(this,h);var p=[1,1,1];for(s=0;s<3;++s)h[1][s]===h[0][s]?p[s]=1:p[s]=1/(h[1][s]-h[0][s]);for(n.dataScale=p,n.convertAnnotations(this),o=0;o<t.length;++o)!0===(i=t[o]).visible&&0!==i._length&&((a=n.traces[i.uid])?a.data.type===i.type?a.update(i):(a.dispose(),a=i._module.plot(this,i),n.traces[i.uid]=a):(a=i._module.plot(this,i),n.traces[i.uid]=a),a.name=i.name);var d=Object.keys(n.traces);t:for(o=0;o<d.length;++o){for(s=0;s<t.length;++s)if(t[s].uid===d[o]&&!0===t[s].visible&&0!==t[s]._length)continue t;(a=n.traces[d[o]]).dispose(),delete n.traces[d[o]]}n.glplot.objects.sort((function(t,e){return t._trace.data.index-e._trace.data.index}));var v,m=[[0,0,0],[0,0,0]],y=[],x={};for(o=0;o<3;++o){if((u=(l=c[T[o]]).type)in x?(x[u].acc*=p[o],x[u].count+=1):x[u]={acc:p[o],count:1},l.autorange){m[0][o]=1/0,m[1][o]=-1/0;var b=n.glplot.objects,_=n.fullSceneLayout.annotations||[],w=l._name.charAt(0);for(s=0;s<b.length;s++){var k=b[s],A=k.bounds,S=k._trace.data._pad||0;\"ErrorBars\"===k.constructor.name&&l._lowerLogErrorBound?m[0][o]=Math.min(m[0][o],l._lowerLogErrorBound):m[0][o]=Math.min(m[0][o],A[0][o]/p[o]-S),m[1][o]=Math.max(m[1][o],A[1][o]/p[o]+S)}for(s=0;s<_.length;s++){var E=_[s];if(E.visible){var C=l.r2l(E[w]);m[0][o]=Math.min(m[0][o],C),m[1][o]=Math.max(m[1][o],C)}}if(\"rangemode\"in l&&\"tozero\"===l.rangemode&&(m[0][o]=Math.min(m[0][o],0),m[1][o]=Math.max(m[1][o],0)),m[0][o]>m[1][o])m[0][o]=-1,m[1][o]=1;else{var L=m[1][o]-m[0][o];m[0][o]-=L/32,m[1][o]+=L/32}if(\"reversed\"===l.autorange){var P=m[0][o];m[0][o]=m[1][o],m[1][o]=P}}else{var O=l.range;m[0][o]=l.r2l(O[0]),m[1][o]=l.r2l(O[1])}m[0][o]===m[1][o]&&(m[0][o]-=1,m[1][o]+=1),y[o]=m[1][o]-m[0][o],n.glplot.setBounds(o,{min:m[0][o]*p[o],max:m[1][o]*p[o]})}var I=c.aspectmode;if(\"cube\"===I)v=[1,1,1];else if(\"manual\"===I){var D=c.aspectratio;v=[D.x,D.y,D.z]}else{if(\"auto\"!==I&&\"data\"!==I)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=[1,1,1];for(o=0;o<3;++o){var R=x[u=(l=c[T[o]]).type];z[o]=Math.pow(R.acc,1/R.count)/p[o]}v=\"data\"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=f.aspectratio.x=v[0],c.aspectratio.y=f.aspectratio.y=v[1],c.aspectratio.z=f.aspectratio.z=v[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var F=c.domain||null,N=e._size||null;if(F&&N){var B=n.container.style;B.position=\"absolute\",B.left=N.l+F.x[0]*N.w+\"px\",B.top=N.t+(1-F.y[1])*N.h+\"px\",B.width=N.w*(F.x[1]-F.x[0])+\"px\",B.height=N.h*(F.y[1]-F.y[0])+\"px\"}n.glplot.redraw()}},w.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener(\"wheel\",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},w.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?\"orthographic\":\"perspective\"}}},w.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),\"orthographic\"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+\".camera\").get();function n(t,e,r,n){var i=[\"up\",\"center\",\"eye\"],a=[\"x\",\"y\",\"z\"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+\".aspectratio\").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this,l=s.fullLayout,u=s.isCameraChanged(t),h=s.isAspectChanged(t),p=u||h;if(p){var d={};u&&(e=s.getCamera(),n=(r=f.nestedProperty(t,s.id+\".camera\")).get(),d[s.id+\".camera\"]=n),h&&(i=s.glplot.getAspectratio(),o=(a=f.nestedProperty(t,s.id+\".aspectratio\")).get(),d[s.id+\".aspectratio\"]=o),c.call(\"_storeDirectGUIEdit\",t,l._preGUI,d),u&&(r.set(e),f.nestedProperty(l,s.id+\".camera\").set(e)),h&&(a.set(i),f.nestedProperty(l,s.id+\".aspectratio\").set(i),s.glplot.redraw())}return p},w.updateFx=function(t,e){var r=this,n=r.camera;if(n)if(\"orbit\"===t)n.mode=\"orbit\",n.keyBindingMode=\"rotate\";else if(\"turntable\"===t){n.up=[0,0,1],n.mode=\"turntable\",n.keyBindingMode=\"rotate\";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var h=r.id+\".camera.up\",p={x:0,y:0,z:1},d={};d[h]=p;var g=i.layout;c.call(\"_storeDirectGUIEdit\",g,a._preGUI,d),o.up=p,f.nestedProperty(g,h).set(p)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},w.toImage=function(t){var e=this;t||(t=\"png\"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(t,e,r){for(var n=0,i=r-1;n<i;++n,--i)for(var a=0;a<e;++a)for(var o=0;o<4;++o){var s=4*(e*n+a)+o,l=4*(e*i+a)+o,u=t[s];t[s]=t[l],t[l]=u}}(o,i,a),function(t,e,r){for(var n=0;n<r;++n)for(var i=0;i<e;++i){var a=4*(e*n+i),o=t[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(o,i,a);var s=document.createElement(\"canvas\");s.width=i,s.height=a;var l,u=s.getContext(\"2d\",{willReadFrequently:!0}),c=u.createImageData(i,a);switch(c.data.set(o),u.putImageData(c,0,0),t){case\"jpeg\":l=s.toDataURL(\"image/jpeg\");break;case\"webp\":l=s.toDataURL(\"image/webp\");break;default:l=s.toDataURL(\"image/png\")}return e.staticMode&&e.container.removeChild(n),l},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[T[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},p.setConvert(t._mockAxis,e)},e.exports=_},{\"../../../stackgl_modules\":1133,\"../../components/fx\":407,\"../../lib\":515,\"../../lib/show_no_webgl_msg\":537,\"../../lib/str2rgbarray\":540,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"./layout/convert\":611,\"./layout/spikes\":614,\"./layout/tick_marks\":615,\"./project\":616,\"has-passive-events\":229,\"webgl-context\":332}],618:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a<n;a++)i[a]=[t[a],e[a],r[a]];return i}},{}],619:[function(t,e,r){\"use strict\";var n=t(\"./font_attributes\"),i=t(\"./animation_attributes\"),a=t(\"../components/color/attributes\"),o=t(\"../components/shapes/draw_newshape/attributes\"),s=t(\"../components/selections/draw_newselection/attributes\"),l=t(\"./pad_attributes\"),u=t(\"../lib/extend\").extendFlat,c=n({editType:\"calc\"});c.family.dflt='\"Open Sans\", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=a.defaultLine,e.exports={font:c,title:{text:{valType:\"string\",editType:\"layoutstyle\"},font:n({editType:\"layoutstyle\"}),xref:{valType:\"enumerated\",dflt:\"container\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},yref:{valType:\"enumerated\",dflt:\"container\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},x:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"layoutstyle\"},y:{valType:\"number\",min:0,max:1,dflt:\"auto\",editType:\"layoutstyle\"},xanchor:{valType:\"enumerated\",dflt:\"auto\",values:[\"auto\",\"left\",\"center\",\"right\"],editType:\"layoutstyle\"},yanchor:{valType:\"enumerated\",dflt:\"auto\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],editType:\"layoutstyle\"},pad:u(l({editType:\"layoutstyle\"}),{}),editType:\"layoutstyle\"},uniformtext:{mode:{valType:\"enumerated\",values:[!1,\"hide\",\"show\"],dflt:!1,editType:\"plot\"},minsize:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"},autosize:{valType:\"boolean\",dflt:!1,editType:\"none\"},width:{valType:\"number\",min:10,dflt:700,editType:\"plot\"},height:{valType:\"number\",min:10,dflt:450,editType:\"plot\"},minreducedwidth:{valType:\"number\",min:2,dflt:64,editType:\"plot\"},minreducedheight:{valType:\"number\",min:2,dflt:64,editType:\"plot\"},margin:{l:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},r:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},t:{valType:\"number\",min:0,dflt:100,editType:\"plot\"},b:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},pad:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},autoexpand:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},computed:{valType:\"any\",editType:\"none\"},paper_bgcolor:{valType:\"color\",dflt:a.background,editType:\"plot\"},plot_bgcolor:{valType:\"color\",dflt:a.background,editType:\"layoutstyle\"},autotypenumbers:{valType:\"enumerated\",values:[\"convert types\",\"strict\"],dflt:\"convert types\",editType:\"calc\"},separators:{valType:\"string\",editType:\"plot\"},hidesources:{valType:\"boolean\",dflt:!1,editType:\"plot\"},showlegend:{valType:\"boolean\",editType:\"legend\"},colorway:{valType:\"colorlist\",dflt:a.defaults,editType:\"calc\"},datarevision:{valType:\"any\",editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"},editrevision:{valType:\"any\",editType:\"none\"},selectionrevision:{valType:\"any\",editType:\"none\"},template:{valType:\"any\",editType:\"calc\"},newshape:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:\"any\",arrayOk:!0,editType:\"plot\"},transition:u({},i.transition,{editType:\"none\"}),_deprecated:{title:{valType:\"string\",editType:\"layoutstyle\"},titlefont:n({editType:\"layoutstyle\"})}}},{\"../components/color/attributes\":366,\"../components/selections/draw_newselection/attributes\":451,\"../components/shapes/draw_newshape/attributes\":463,\"../lib/extend\":505,\"./animation_attributes\":560,\"./font_attributes\":594,\"./pad_attributes\":627}],620:[function(t,e,r){\"use strict\";var n=t(\"../../lib/sort_object_keys\"),i=\"1.10.1\",a='© <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors',o=['© <a target=\"_blank\" href=\"https://carto.com/\">Carto</a>',a].join(\" \"),s=['Map tiles by <a target=\"_blank\" href=\"https://stamen.com\">Stamen Design</a>','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>',\"|\",'Data by <a target=\"_blank\" href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors','under <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">ODbL</a>'].join(\" \"),l={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:a,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}]},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}]},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:o,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}]},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:o,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}]},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:s,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}]},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:s,tiles:[\"https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}]},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:['Map tiles by <a target=\"_blank\" href=\"https://stamen.com\">Stamen Design</a>','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>',\"|\",'Data by <a target=\"_blank\" href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>'].join(\" \"),tiles:[\"https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}]}},u=n(l);e.exports={requiredVersion:i,styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:l,styleValuesNonMapbox:u,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install mapbox-gl@1.10.1.\"].join(\"\\n\"),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\"  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",u.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(\"\\n\"),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":'content: \"\"; cursor: pointer; position: absolute; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E\\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":'display:block; width: 21px; height: 21px; background-image: url(\\'data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E\\')'}}},{\"../../lib/sort_object_keys\":538}],621:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){var r=t.split(\" \"),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,u=[\"\",\"\"],c=[0,0];switch(i){case\"top\":u[0]=\"top\",c[1]=-l;break;case\"bottom\":u[0]=\"bottom\",c[1]=l}switch(a){case\"left\":u[1]=\"right\",c[0]=-s;break;case\"right\":u[1]=\"left\",c[0]=s}return{anchor:u[0]&&u[1]?u.join(\"-\"):u[0]?u[0]:u[1]?u[1]:\"center\",offset:c}}},{\"../../lib\":515}],622:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=i.strTranslate,o=i.strScale,s=t(\"../../plots/get_data\").getSubplotCalcData,l=t(\"../../constants/xmlns_namespaces\"),u=t(\"@plotly/d3\"),c=t(\"../../components/drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"./mapbox\"),p=\"mapbox\",d=r.constants=t(\"./constants\");function g(t){return\"string\"==typeof t&&(-1!==d.styleValuesMapbox.indexOf(t)||0===t.indexOf(\"mapbox://\"))}r.name=p,r.attr=\"subplot\",r.idRoot=p,r.idRegex=r.attrRegex=i.counterRegex(p),r.attributes={subplot:{valType:\"subplotid\",dflt:\"mapbox\",editType:\"calc\"}},r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.mapbox;if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(\"\"===t._context.mapboxAccessToken)return\"\";for(var n=[],a=[],o=!1,s=!1,l=0;l<e.length;l++){var u=r[e[l]],c=u.accesstoken;g(u.style)&&(c?i.pushUnique(n,c):(g(u._input.style)&&(i.error(\"Uses Mapbox map style, but did not set an access token.\"),o=!0),s=!0)),c&&i.pushUnique(a,c)}if(s){var f=o?d.noAccessTokenErrorMsg:d.missingStyleErrorMsg;throw i.error(f),new Error(f)}return n.length?(n.length>1&&i.warn(d.multipleTokensErrorMsg),n[0]):(a.length&&i.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}(t,a);n.accessToken=o;for(var l=0;l<a.length;l++){var u=a[l],c=s(r,p,u),f=e[u],v=f._subplot;v||(v=new h(t,u),e[u]._subplot=v),v.viewInitial||(v.viewInitial={center:i.extendFlat({},f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch}),v.plot(c,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.mapbox||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=e._size,i=0;i<r.length;i++){var s=e[r[i]],h=s.domain,p=s._subplot.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:l.svg,\"xlink:href\":p,x:n.l+n.w*h.x[0],y:n.t+n.h*(1-h.y[1]),width:n.w*(h.x[1]-h.x[0]),height:n.h*(h.y[1]-h.y[0]),preserveAspectRatio:\"none\"});var g=u.select(s._subplot.div);if(null!==g.select(\".mapboxgl-ctrl-logo\").node().offsetParent){var v=e._glimages.append(\"g\");v.attr(\"transform\",a(n.l+n.w*h.x[0]+10,n.t+n.h*(1-h.y[0])-31)),v.append(\"path\").attr(\"d\",d.mapboxLogo.path0).style({opacity:.9,fill:\"#ffffff\",\"enable-background\":\"new\"}),v.append(\"path\").attr(\"d\",d.mapboxLogo.path1).style(\"opacity\",.35).style(\"enable-background\",\"new\"),v.append(\"path\").attr(\"d\",d.mapboxLogo.path2).style(\"opacity\",.35).style(\"enable-background\",\"new\"),v.append(\"polygon\").attr(\"points\",d.mapboxLogo.polygon).style({opacity:.9,fill:\"#ffffff\",\"enable-background\":\"new\"})}var m=g.select(\".mapboxgl-ctrl-attrib\").text().replace(\"Improve this map\",\"\"),y=e._glimages.append(\"g\"),x=y.append(\"text\");x.text(m).classed(\"static-attribution\",!0).attr({\"font-size\":12,\"font-family\":\"Arial\",color:\"rgba(0, 0, 0, 0.75)\",\"text-anchor\":\"end\",\"data-unformatted\":m});var b=c.bBox(x.node()),_=n.w*(h.x[1]-h.x[0]);if(b.width>_/2){var w=m.split(\"|\").join(\"<br>\");x.text(w).attr(\"data-unformatted\",w).call(f.convertToTspans,t),b=c.bBox(x.node())}x.attr(\"transform\",a(-3,8-b.height)),y.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var k=1;b.width+6>_&&(k=_/(b.width+6));var T=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr(\"transform\",a(T[0],T[1])+o(k))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n<r.length;n++)e[r[n]]._subplot.updateFx(e)}},{\"../../components/drawing\":389,\"../../constants/xmlns_namespaces\":492,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/get_data\":602,\"./constants\":620,\"./layout_attributes\":624,\"./layout_defaults\":625,\"./mapbox\":626,\"@plotly/d3\":58,\"mapbox-gl/dist/mapbox-gl-unminified\":239}],623:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../lib/svg_text_utils\").sanitizeHTML,a=t(\"./convert_text_opts\"),o=t(\"./constants\");function s(t,e){this.subplot=t,this.uid=t.uid+\"-\"+e,this.index=e,this.idSource=\"source-\"+this.uid,this.idLayer=o.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function u(t){if(!t.visible)return!1;var e=t.source;if(Array.isArray(e)&&e.length>0){for(var r=0;r<e.length;r++)if(\"string\"!=typeof e[r]||0===e[r].length)return!1;return!0}return n.isPlainObject(e)||\"string\"==typeof e&&e.length>0}function c(t){var e={},r={};switch(t.type){case\"circle\":n.extendFlat(r,{\"circle-radius\":t.circle.radius,\"circle-color\":t.color,\"circle-opacity\":t.opacity});break;case\"line\":n.extendFlat(r,{\"line-width\":t.line.width,\"line-color\":t.color,\"line-opacity\":t.opacity,\"line-dasharray\":t.line.dash});break;case\"fill\":n.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{\"icon-image\":i.icon+\"-15\",\"icon-size\":i.iconsize/10,\"text-field\":i.text,\"text-size\":i.textfont.size,\"text-anchor\":o.anchor,\"text-offset\":o.offset,\"symbol-placement\":i.placement}),n.extendFlat(r,{\"icon-color\":t.color,\"text-color\":i.textfont.color,\"text-opacity\":t.opacity});break;case\"raster\":n.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=u(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&\"image\"===this.sourceType&&\"image\"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,u(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return\"geojson\"===r?e=\"data\":\"vector\"===r?e=\"string\"==typeof n?\"url\":\"tiles\":\"raster\"===r?(e=\"tiles\",a.tileSize=256):\"image\"===r&&(e=\"url\",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution)),a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if(\"traces\"===t)for(var e=this.subplot.getMapLayers(),r=0;r<e.length;r++){var n=e[r].id;if(\"string\"==typeof n&&0===n.indexOf(o.traceLayerPrefix)){t=n;break}}return t},l.updateLayer=function(t){var e=this.subplot,r=c(t),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),u(t)&&e.addLayer({id:this.idLayer,source:this.idSource,\"source-layer\":t.sourcelayer||\"\",type:t.type,minzoom:t.minzoom,maxzoom:t.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=t.type,this.below=n},l.updateStyle=function(t){if(u(t)){var e=c(t);this.subplot.setOptions(this.idLayer,\"setLayoutProperty\",e.layout),this.subplot.setOptions(this.idLayer,\"setPaintProperty\",e.paint)}},l.removeLayer=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer)},l.dispose=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer),t.getSource(this.idSource)&&t.removeSource(this.idSource)},e.exports=function(t,e,r){var n=new s(t,e);return n.update(r),n}},{\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"./constants\":620,\"./convert_text_opts\":621}],624:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\").defaultLine,a=t(\"../domain\").attributes,o=t(\"../font_attributes\"),s=t(\"../../traces/scatter/attributes\").textposition,l=t(\"../../plot_api/edit_types\").overrideAll,u=t(\"../../plot_api/plot_template\").templatedArray,c=t(\"./constants\"),f=o({});f.family.dflt=\"Open Sans Regular, Arial Unicode MS Regular\",(e.exports=l({_arrayAttrRegexps:[n.counterRegex(\"mapbox\",\".layers\",!0)],domain:a({name:\"mapbox\"}),accesstoken:{valType:\"string\",noBlank:!0,strict:!0},style:{valType:\"any\",values:c.styleValuesMapbox.concat(c.styleValuesNonMapbox),dflt:c.styleValueDflt},center:{lon:{valType:\"number\",dflt:0},lat:{valType:\"number\",dflt:0}},zoom:{valType:\"number\",dflt:1},bearing:{valType:\"number\",dflt:0},pitch:{valType:\"number\",dflt:0},bounds:{west:{valType:\"number\"},east:{valType:\"number\"},south:{valType:\"number\"},north:{valType:\"number\"}},layers:u(\"layer\",{visible:{valType:\"boolean\",dflt:!0},sourcetype:{valType:\"enumerated\",values:[\"geojson\",\"vector\",\"raster\",\"image\"],dflt:\"geojson\"},source:{valType:\"any\"},sourcelayer:{valType:\"string\",dflt:\"\"},sourceattribution:{valType:\"string\"},type:{valType:\"enumerated\",values:[\"circle\",\"line\",\"fill\",\"symbol\",\"raster\"],dflt:\"circle\"},coordinates:{valType:\"any\"},below:{valType:\"string\"},color:{valType:\"color\",dflt:i},opacity:{valType:\"number\",min:0,max:1,dflt:1},minzoom:{valType:\"number\",min:0,max:24,dflt:0},maxzoom:{valType:\"number\",min:0,max:24,dflt:24},circle:{radius:{valType:\"number\",dflt:15}},line:{width:{valType:\"number\",dflt:2},dash:{valType:\"data_array\"}},fill:{outlinecolor:{valType:\"color\",dflt:i}},symbol:{icon:{valType:\"string\",dflt:\"marker\"},iconsize:{valType:\"number\",dflt:10},text:{valType:\"string\",dflt:\"\"},placement:{valType:\"enumerated\",values:[\"point\",\"line\",\"line-center\"],dflt:\"point\"},textfont:f,textposition:n.extendFlat({},s,{arrayOk:!1})}})},\"plot\",\"from-root\")).uirevision={valType:\"any\",editType:\"none\"}},{\"../../components/color\":367,\"../../lib\":515,\"../../plot_api/edit_types\":548,\"../../plot_api/plot_template\":555,\"../../traces/scatter/attributes\":936,\"../domain\":593,\"../font_attributes\":594,\"./constants\":620}],625:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../subplot_defaults\"),a=t(\"../array_container_defaults\"),o=t(\"./layout_attributes\");function s(t,e,r,n){r(\"accesstoken\",n.accessToken),r(\"style\"),r(\"center.lon\"),r(\"center.lat\"),r(\"zoom\"),r(\"bearing\"),r(\"pitch\");var i=r(\"bounds.west\"),o=r(\"bounds.east\"),s=r(\"bounds.south\"),u=r(\"bounds.north\");void 0!==i&&void 0!==o&&void 0!==s&&void 0!==u||delete e.bounds,a(t,e,{name:\"layers\",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r(\"visible\")){var i,a=r(\"sourcetype\"),s=\"raster\"===a||\"image\"===a;r(\"source\"),r(\"sourceattribution\"),\"vector\"===a&&r(\"sourcelayer\"),\"image\"===a&&r(\"coordinates\"),s&&(i=\"raster\");var l=r(\"type\",i);s&&\"raster\"!==l&&(l=e.type=\"raster\",n.log(\"Source types *raster* and *image* must drawn *raster* layer type.\")),r(\"below\"),r(\"color\"),r(\"opacity\"),r(\"minzoom\"),r(\"maxzoom\"),\"circle\"===l&&r(\"circle.radius\"),\"line\"===l&&(r(\"line.width\"),r(\"line.dash\")),\"fill\"===l&&r(\"fill.outlinecolor\"),\"symbol\"===l&&(r(\"symbol.icon\"),r(\"symbol.iconsize\"),r(\"symbol.text\"),n.coerceFont(r,\"symbol.textfont\"),r(\"symbol.textposition\"),r(\"symbol.placement\"))}}e.exports=function(t,e,r){i(t,e,r,{type:\"mapbox\",attributes:o,handleDefaults:s,partition:\"y\",accessToken:e._mapboxAccessToken})}},{\"../../lib\":515,\"../array_container_defaults\":561,\"../subplot_defaults\":641,\"./layout_attributes\":624}],626:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl/dist/mapbox-gl-unminified\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../registry\"),s=t(\"../cartesian/axes\"),l=t(\"../../components/dragelement\"),u=t(\"../../components/fx\"),c=t(\"../../components/dragelement/helpers\"),f=c.drawMode,h=c.selectMode,p=t(\"../../components/selections\").prepSelect,d=t(\"../../components/selections\").clearOutline,g=t(\"../../components/selections\").clearSelectionsCache,v=t(\"../../components/selections\").selectOnClick,m=t(\"./constants\"),y=t(\"./layers\");function x(t,e){this.id=e,this.gd=t;var r=t._fullLayout,n=t._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+\"-\"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var b=x.prototype;b.plot=function(t,e,r){var n,i=this,a=e[i.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]),n=i.map?new Promise((function(r,n){i.updateMap(t,e,r,n)})):new Promise((function(r,n){i.createMap(t,e,r,n)})),r.push(n)},b.createMap=function(t,e,r,i){var o=this,s=e[o.id],l=o.styleObj=w(s.style);o.accessToken=s.accesstoken;var u=s.bounds,c=u?[[u.west,u.south],[u.east,u.north]]:null,f=o.map=new n.Map({container:o.div,style:l.style,center:T(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:c,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0}));f._canvas.style.left=\"0px\",f._canvas.style.top=\"0px\",o.rejectOnError(i),o.isStatic||o.initFx(t,e);var h=[];h.push(new Promise((function(t){f.once(\"load\",t)}))),h=h.concat(a.fetchTraceGeoData(t)),Promise.all(h).then((function(){o.fillBelowLookup(t,e),o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)})).catch(i)},b.updateMap=function(t,e,r,n){var i=this,o=i.map,s=e[this.id];i.rejectOnError(n);var l=[],u=w(s.style);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,o.setStyle(u.style),i.traceHash={},l.push(new Promise((function(t){o.once(\"styledata\",t)})))),l=l.concat(a.fetchTraceGeoData(t)),Promise.all(l).then((function(){i.fillBelowLookup(t,e),i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})).catch(n)},b.fillBelowLookup=function(t,e){var r,n,i=e[this.id].layers,a=this.belowLookup={},o=!1;for(r=0;r<t.length;r++){var s=t[r][0].trace,l=s._module;\"string\"==typeof s.below?n=s.below:l.getBelow&&(n=l.getBelow(s,this)),\"\"===n&&(o=!0),a[\"trace-\"+s.uid]=n||\"\"}for(r=0;r<i.length;r++){var u=i[r];n=\"string\"==typeof u.below?u.below:o?\"traces\":\"\",a[\"layout-\"+r]=n}var c,f,h={};for(c in a)h[n=a[c]]?h[n].push(c):h[n]=[c];for(n in h){var p=h[n];if(p.length>1)for(r=0;r<p.length;r++)0===(c=p[r]).indexOf(\"trace-\")?(f=c.split(\"trace-\")[1],this.traceHash[f]&&(this.traceHash[f].below=null)):0===c.indexOf(\"layout-\")&&(f=c.split(\"layout-\")[1],this.layerList[f]&&(this.layerList[f].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function w(t){var e={};return i.isPlainObject(t)?(e.id=t.id,e.style=t):\"string\"==typeof t?(e.id=t,-1!==m.styleValuesMapbox.indexOf(t)?e.style=k(t):m.stylesNonMapbox[t]?e.style=m.stylesNonMapbox[t]:e.style=t):(e.id=m.styleValueDflt,e.style=k(m.styleValueDflt)),e.transition={duration:0,delay:0},e}function k(t){return m.styleUrlPrefix+t+\"-\"+m.styleUrlSuffix}function T(t){return[t.lon,t.lat]}b.updateData=function(t){var e,r,n,i,a=this.traceHash,o=t.slice().sort((function(t,e){return _[t[0].trace.type]-_[e[0].trace.type]}));for(n=0;n<o.length;n++){var s=o[n],l=!1;(e=a[(r=s[0].trace).uid])&&(e.type===r.type?(e.update(s),l=!0):e.dispose()),!l&&r._module&&(a[r.uid]=r._module.plot(this,s))}var u=Object.keys(a);t:for(n=0;n<u.length;n++){var c=u[n];for(i=0;i<t.length;i++)if(c===(r=t[i][0].trace).uid)continue t;(e=a[c]).dispose(),delete a[c]}},b.updateLayout=function(t){var e=this.map,r=t[this.id];this.dragging||this.wheeling||(e.setCenter(T(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch)),this.updateLayers(t),this.updateFramework(t),this.updateFx(t),this.map.resize(),this.gd._context._scrollZoom.mapbox?e.scrollZoom.enable():e.scrollZoom.disable()},b.resolveOnRender=function(t){var e=this.map;e.on(\"render\",(function r(){e.loaded()&&(e.off(\"render\",r),setTimeout(t,10))}))},b.rejectOnError=function(t){var e=this.map;function r(){t(new Error(m.mapOnErrorMsg))}e.once(\"error\",r),e.once(\"style.error\",r),e.once(\"source.error\",r),e.once(\"tile.error\",r),e.once(\"layer.error\",r)},b.createFramework=function(t){var e=this,r=e.div=document.createElement(\"div\");r.id=e.uid,r.style.position=\"absolute\",e.container.appendChild(r),e.xaxis={_id:\"x\",c2p:function(t){return e.project(t).x}},e.yaxis={_id:\"y\",c2p:function(t){return e.project(t).y}},e.updateFramework(t),e.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},s.setConvert(e.mockAxis,t)},b.initFx=function(t,e){var r=this,n=r.gd,i=r.map;function a(){u.loneUnhover(e._hoverlayer)}function s(){var t=r.getView();n.emit(\"plotly_relayouting\",r.getViewEditsWithDerived(t))}i.on(\"moveend\",(function(t){if(r.map){var e=n._fullLayout;if(t.originalEvent||r.wheeling){var i=e[r.id];o.call(\"_storeDirectGUIEdit\",n.layout,e._preGUI,r.getViewEdits(i));var a=r.getView();i._input.center=i.center=a.center,i._input.zoom=i.zoom=a.zoom,i._input.bearing=i.bearing=a.bearing,i._input.pitch=i.pitch=a.pitch,n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(a))}t.originalEvent&&\"mouseup\"===t.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),e._rehover&&e._rehover()}})),i.on(\"wheel\",(function(){r.wheeling=!0})),i.on(\"mousemove\",(function(t){var e=r.div.getBoundingClientRect(),a=[t.originalEvent.offsetX,t.originalEvent.offsetY];t.target.getBoundingClientRect=function(){return e},r.xaxis.p2c=function(){return i.unproject(a).lng},r.yaxis.p2c=function(){return i.unproject(a).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&u.hover(n,t,r.id)},u.hover(n,t,r.id),n._fullLayout._hoversubplot=r.id})),i.on(\"dragstart\",(function(){r.dragging=!0,a()})),i.on(\"zoomstart\",a),i.on(\"mouseout\",(function(){n._fullLayout._hoversubplot=null})),i.on(\"drag\",s),i.on(\"zoom\",s),i.on(\"dblclick\",(function(){var t=n._fullLayout[r.id];o.call(\"_storeDirectGUIEdit\",n.layout,n._fullLayout._preGUI,r.getViewEdits(t));var e=r.viewInitial;i.setCenter(T(e.center)),i.setZoom(e.zoom),i.setBearing(e.bearing),i.setPitch(e.pitch);var a=r.getView();t._input.center=t.center=a.center,t._input.zoom=t.zoom=a.zoom,t._input.bearing=t.bearing=a.bearing,t._input.pitch=t.pitch=a.pitch,n.emit(\"plotly_doubleclick\",null),n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(a))})),r.clearOutline=function(){g(r.dragOptions),d(r.dragOptions.gd)},r.onClickInPanFn=function(t){return function(e){var i=n._fullLayout.clickmode;i.indexOf(\"select\")>-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf(\"event\")>-1&&u.click(n,e.originalEvent)}}},b.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(u)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off(\"click\",e.onClickInPanHandler),h(o)||f(o)?(r.dragPan.disable(),r.on(\"zoomstart\",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){p(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off(\"zoomstart\",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener(\"touchstart\",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on(\"click\",e.onClickInPanHandler))}function u(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},b.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+\"px\",n.height=r.h*(e.y[1]-e.y[0])+\"px\",n.left=r.l+e.x[0]*r.w+\"px\",n.top=r.t+(1-e.y[1])*r.h+\"px\",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},b.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e<n.length;e++)n[e].dispose();for(n=this.layerList=[],e=0;e<r.length;e++)n.push(y(this,e,r[e]))}else for(e=0;e<r.length;e++)n[e].update(r[e])},b.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},b.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},b.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},b.getMapLayers=function(){return this.map.getStyle().layers},b.addLayer=function(t,e){var r=this.map;if(\"string\"==typeof e){if(\"\"===e)return void r.addLayer(t,e);for(var n=this.getMapLayers(),a=0;a<n.length;a++)if(e===n[a].id)return void r.addLayer(t,e);i.warn([\"Trying to add layer with *below* value\",e,\"referencing a layer that does not exist\",\"or that does not yet exist.\"].join(\" \"))}r.addLayer(t)},b.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},b.getView=function(){var t=this.map,e=t.getCenter(),r={lon:e.lng,lat:e.lat},n=t.getCanvas(),i=parseInt(n.style.width),a=parseInt(n.style.height);return{center:r,zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch(),_derived:{coordinates:[t.unproject([0,0]).toArray(),t.unproject([i,0]).toArray(),t.unproject([i,a]).toArray(),t.unproject([0,a]).toArray()]}}},b.getViewEdits=function(t){for(var e=this.id,r=[\"center\",\"zoom\",\"bearing\",\"pitch\"],n={},i=0;i<r.length;i++){var a=r[i];n[e+\".\"+a]=t[a]}return n},b.getViewEditsWithDerived=function(t){var e=this.id,r=this.getViewEdits(t);return r[e+\"._derived\"]=t._derived,r},e.exports=x},{\"../../components/dragelement\":386,\"../../components/dragelement/helpers\":385,\"../../components/fx\":407,\"../../components/selections\":455,\"../../lib\":515,\"../../lib/geo_location_utils\":508,\"../../registry\":647,\"../cartesian/axes\":566,\"./constants\":620,\"./layers\":623,\"mapbox-gl/dist/mapbox-gl-unminified\":239}],627:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.editType;return{t:{valType:\"number\",dflt:0,editType:e},r:{valType:\"number\",dflt:0,editType:e},b:{valType:\"number\",dflt:0,editType:e},l:{valType:\"number\",dflt:0,editType:e},editType:e}}},{}],628:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-time-format\").timeFormatLocale,a=t(\"d3-format\").formatLocale,o=t(\"fast-isnumeric\"),s=t(\"../registry\"),l=t(\"../plot_api/plot_schema\"),u=t(\"../plot_api/plot_template\"),c=t(\"../lib\"),f=t(\"../components/color\"),h=t(\"../constants/numerical\").BADNUM,p=t(\"./cartesian/axis_ids\"),d=t(\"../components/shapes/handle_outline\").clearOutline,g=t(\"./animation_attributes\"),v=t(\"./frame_attributes\"),m=t(\"../plots/get_data\").getModuleCalcData,y=c.relinkPrivateKeys,x=c._,b=e.exports={};c.extendFlat(b,s),b.attributes=t(\"./attributes\"),b.attributes.type.values=b.allTypes,b.fontAttrs=t(\"./font_attributes\"),b.layoutAttributes=t(\"./layout_attributes\"),b.fontWeight=\"normal\";var _=b.transformsRegistry,w=t(\"./command\");b.executeAPICommand=w.executeAPICommand,b.computeAPICommandBindings=w.computeAPICommandBindings,b.manageCommandObserver=w.manageCommandObserver,b.hasSimpleAPICommandBindings=w.hasSimpleAPICommandBindings,b.redrawText=function(t){return t=c.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(s.getComponentMethod(\"annotations\",\"draw\")(t),s.getComponentMethod(\"legend\",\"draw\")(t),s.getComponentMethod(\"colorbar\",\"draw\")(t),e(b.previousPromises(t)))}),300)}))},b.resize=function(t){var e;t=c.getGraphDiv(t);var r=new Promise((function(r,n){t&&!c.isHidden(t)||n(new Error(\"Resize must be passed a displayed plot div element.\")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||c.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,s.call(\"relayout\",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},b.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},b.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=c.ensureSingle(e._paper,\"text\",\"js-plot-link-container\",(function(t){t.style({\"font-family\":'\"Open Sans\", Arial, sans-serif',\"font-size\":\"12px\",fill:f.defaultLine,\"pointer-events\":\"all\"}).each((function(){var t=n.select(this);t.append(\"tspan\").classed(\"js-link-to-tool\",!0),t.append(\"tspan\").classed(\"js-link-spacer\",!0),t.append(\"tspan\").classed(\"js-sourcelinks\",!0)}))})),i=r.node(),a={y:e._paper.attr(\"height\")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a[\"text-anchor\"]=\"start\",a.x=5):(a[\"text-anchor\"]=\"end\",a.x=e._paper.attr(\"width\")-7),r.attr(a);var o=r.select(\".js-link-to-tool\"),s=r.select(\".js-link-spacer\"),l=r.select(\".js-sourcelinks\");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text(\"\");var r=e.append(\"a\").attr({\"xlink:xlink:href\":\"#\",class:\"link--impt link--embedview\",\"font-weight\":\"bold\"}).text(t._context.linkText+\" \"+String.fromCharCode(187));if(t._context.sendData)r.on(\"click\",(function(){b.sendDataToCloud(t)}));else{var n=window.location.pathname.split(\"/\"),i=window.location.search;r.attr({\"xlink:xlink:show\":\"new\",\"xlink:xlink:href\":\"/\"+n[2].split(\".\")[0]+\"/\"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?\" - \":\"\")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit(\"plotly_beforeexport\");var r=n.select(t).append(\"div\").attr(\"id\",\"hiddenform\").style(\"display\",\"none\"),i=r.append(\"form\").attr({action:e+\"/external\",method:\"post\",target:\"_blank\"});return i.append(\"input\").attr({type:\"text\",name:\"data\"}).node().value=b.graphJson(t,!1,\"keepdata\"),i.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1}};var k=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],T=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];function M(t,e){var r=t._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var l=t._context.locales,u=0;u<2;u++){var c=(l[r]||{}).format;if(c&&(a(c),n))break;l=s.localeRegistry}var f=r.split(\"-\")[0];if(n||f===r)break;r=f}return n||a(s.localeRegistry.en.format),i}function A(t,e){var r={_fullLayout:e},n=\"x\"===t._id.charAt(0),i=t._mainAxis._anchorAxis,a=\"\",o=\"\",s=\"\";if(i&&(s=i._mainAxis._id,a=n?t._id+s:s+t._id),!a||!e._plots[a]){a=\"\";for(var l=t._counterAxes,u=0;u<l.length;u++){var c=l[u],f=n?t._id+c:c+t._id;o||(o=f);var h=p.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}function S(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var n=e[r],i=n._module||_[n.type];if(i&&i.makesData)return!0}return!1}function E(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=_[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function C(t){return\"string\"==typeof t&&\"px\"===t.substr(t.length-2)&&parseFloat(t)}function L(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={})}b.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,n=t._fullLayout||{};if(n._skipDefaults)delete n._skipDefaults;else{var o,l=t._fullLayout={},u=t.layout||{},f=t._fullData||[],h=t._fullData=[],p=t.data||[],g=t.calcdata||[],v=t._context||{};t._transitionData||b.createTransitionData(t),l._dfltTitle={plot:x(t,\"Click to enter Plot title\"),x:x(t,\"Click to enter X axis title\"),y:x(t,\"Click to enter Y axis title\"),colorbar:x(t,\"Click to enter Colorscale title\"),annotation:x(t,\"new text\")},l._traceWord=x(t,\"trace\");var m=M(t,k);if(l._mapboxAccessToken=v.mapboxAccessToken,n._initialAutoSizeIsDone){var _=n.width,w=n.height;b.supplyLayoutGlobalDefaults(u,l,m),u.width||(l.width=_),u.height||(l.height=w),b.sanitizeMargins(l)}else{b.supplyLayoutGlobalDefaults(u,l,m);var A=!u.width||!u.height,S=l.autosize,E=v.autosizable;A&&(S||E)?b.plotAutoSize(t,u,l):A&&b.sanitizeMargins(l),!S&&A&&(u.width=l.width,u.height=l.height)}l._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(e){try{e=a(t).format(c.adjustFormat(e))}catch(t){return c.warnBadFormat(e),c.noFormat}return e},timeFormat:i(t).utcFormat}}(m,l.separators),l._extraFormat=M(t,T),l._initialAutoSizeIsDone=!0,l._dataLength=p.length,l._modules=[],l._visibleModules=[],l._basePlotModules=[];var C=l._subplots=function(){var t,e,r=s.collectableSubplotTypes,n={};if(!r){r=[];var i=s.subplotsRegistry;for(var a in i){var o=i[a].attr;if(o&&(r.push(a),Array.isArray(o)))for(e=0;e<o.length;e++)c.pushUnique(r,o[e])}}for(t=0;t<r.length;t++)n[r[t]]=[];return n}(),P=l._splomAxes={x:{},y:{}},O=l._splomSubplots={};l._splomGridDflt={},l._scatterStackOpts={},l._firstScatter={},l._alignmentOpts={},l._colorAxes={},l._requestRangeslider={},l._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r]._fullInput;o!==n&&a.push(o),n=o}var s=a.length,l=new Array(i),u={};function f(t,e){l[e]=t,u[t]=1}function h(t,e){if(t&&\"string\"==typeof t&&!u[t])return f(t,e),!0}for(r=0;r<i;r++){var p=e[r].uid;\"number\"==typeof p&&(p=String(p)),h(p,r)||r<s&&h(a[r].uid,r)||f(c.randstr(u),r)}return l}(f,p),l._globalTransforms=(t._context||{}).globalTransforms,b.supplyDataDefaults(p,h,u,l);var I=Object.keys(P.x),D=Object.keys(P.y);if(I.length>1&&D.length>1){for(s.getComponentMethod(\"grid\",\"sizeDefaults\")(u,l),o=0;o<I.length;o++)c.pushUnique(C.xaxis,I[o]);for(o=0;o<D.length;o++)c.pushUnique(C.yaxis,D[o]);for(var z in O)c.pushUnique(C.cartesian,z)}if(l._has=b._hasPlotType.bind(l),f.length===h.length)for(o=0;o<h.length;o++)y(h[o],f[o]);b.supplyLayoutModuleDefaults(u,l,h,t._transitionData);var R=l._visibleModules,F=[];for(o=0;o<R.length;o++){var N=R[o].crossTraceDefaults;N&&c.pushUnique(F,N)}for(o=0;o<F.length;o++)F[o](h,l);l._hasOnlyLargeSploms=1===l._basePlotModules.length&&\"splom\"===l._basePlotModules[0].name&&I.length>15&&D.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var B=!(!n._has||!n._has(\"gl2d\")),j=!(!l._has||!l._has(\"gl2d\")),U=!(!n._has||!n._has(\"cartesian\"))||B,V=!(!l._has||!l._has(\"cartesian\"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var a=t[i];a.meta?n[a.index]=a._meta={meta:a.meta}:e.meta&&(a._meta={meta:e.meta}),e.meta&&(a._meta.layout={meta:e.meta})}n.length&&(r||(r=e._meta={}),r.data=n)}(h,l),y(l,n),s.getComponentMethod(\"colorscale\",\"crossTraceDefaults\")(h,l),l._preGUI||(l._preGUI={}),l._tracePreGUI||(l._tracePreGUI={});var H,q=l._tracePreGUI,G={};for(H in q)G[H]=\"old\";for(o=0;o<h.length;o++)G[H=h[o]._fullInput.uid]||(q[H]={}),G[H]=\"new\";for(H in G)\"old\"===G[H]&&delete q[H];L(l),s.getComponentMethod(\"rangeslider\",\"makeData\")(l),r||g.length!==h.length||b.supplyDefaultsUpdateCalc(g,h)}},b.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=(t[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,l,u=a._arrayAttrs;for(o=0;o<u.length;o++)s=u[o],l=c.nestedProperty(a,s).get().slice(),c.nestedProperty(n,s).set(l)}i.trace=n}}},b.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},b._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var a=s.modules[i];if(a&&a.categories[t])return!0}return!1},b.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=n._has&&n._has(\"gl\"),u=e._has&&e._has(\"gl\");l&&!u&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(\".gl-canvas\").remove(),n._glcontainer.selectAll(\".no-webgl\").remove(),n._glcanvas=null);var c=!!n._infolayer;t:for(i=0;i<r.length;i++){var f=r[i].uid;for(a=0;a<t.length;a++)if(f===t[a].uid)continue t;c&&n._infolayer.select(\".cb\"+f).remove()}},b.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},l=e._plots={},u=e._subplots,f={_fullData:t,_fullLayout:e},h=u.cartesian.concat(u.gl2d||[]);for(i=0;i<h.length;i++){var d,g=h[i],v=o[g],m=p.getFromId(f,g,\"x\"),y=p.getFromId(f,g,\"y\");for(v?d=l[g]=v:(d=l[g]={}).id=g,m._counterAxes.push(y._id),y._counterAxes.push(m._id),m._subplotsWith.push(g),y._subplotsWith.push(g),d.xaxis=m,d.yaxis=y,d._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var x=t[a];if(x.xaxis===d.xaxis._id&&x.yaxis===d.yaxis._id&&!1===x.cliponaxis){d._hasClipOnAxisFalse=!0;break}}}var b,_=p.list(f,null,!0);for(i=0;i<_.length;i++){var w=null;(b=_[i]).overlaying&&(w=p.getFromId(f,b.overlaying))&&w.overlaying&&(b.overlaying=!1,w=null),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis=\"free\"===b.anchor?null:p.getFromId(f,b.anchor)}for(i=0;i<_.length;i++)if((b=_[i])._counterAxes.sort(p.idSort),b._subplotsWith.sort(c.subplotSort),b._mainSubplot=A(b,e),b._counterAxes.length&&(b.spikemode&&-1!==b.spikemode.indexOf(\"across\")||b.automargin&&b.mirror&&\"free\"!==b.anchor||s.getComponentMethod(\"rangeslider\",\"isVisible\")(b))){var k=1,T=0;for(a=0;a<b._counterAxes.length;a++){var M=p.getFromId(f,b._counterAxes[a]);k=Math.min(k,M.domain[0]),T=Math.max(T,M.domain[1])}k<T&&(b._counterDomainMin=k,b._counterDomainMax=T)}},b.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],l.crawl(t._module.attributes,(function(t,n,i,a){r[a]=n,r.length=a+1,\"color\"===t.valType&&void 0===t.dflt&&e.push(r.join(\".\"))}))),n=0;n<e.length;n++)c.nestedProperty(t,\"_input.\"+e[n]).get()||c.nestedProperty(t,e[n]).set(null)},b.supplyDataDefaults=function(t,e,r,n){var i,a,o,l=n._modules,f=n._visibleModules,h=n._basePlotModules,p=0,d=0;function g(t){e.push(t);var r=t._module;r&&(c.pushUnique(l,r),!0===t.visible&&c.pushUnique(f,r),c.pushUnique(h,t._module.basePlotModule),p++,!1!==t._input.visible&&d++)}n._transformModules=[];var v={},m=[],x=(r.template||{}).data||{},_=u.traceTemplater(x);for(i=0;i<t.length;i++){if(o=t[i],(a=_.newTrace(o)).uid=n._traceUids[i],b.supplyTraceDefaults(o,a,d,n,i),a.index=i,a._input=o,a._expandedIndex=p,a.transforms&&a.transforms.length)for(var w=!1!==o.visible&&!1===a.visible,k=E(a,e,r,n),T=0;T<k.length;T++){var M=k[T],A={_template:a._template,type:a.type,uid:a.uid+T};w&&!1===M.visible&&delete M.visible,b.supplyTraceDefaults(M,A,p,n,i),y(A,M),A.index=i,A._input=o,A._fullInput=a,A._expandedIndex=p,A._expandedInput=M,g(A)}else a._fullInput=a,a._expandedInput=a,g(a);s.traceIs(a,\"carpetAxis\")&&(v[a.carpet]=a),s.traceIs(a,\"carpetDependent\")&&m.push(i)}for(i=0;i<m.length;i++)if((a=e[m[i]]).visible){var S=v[a.carpet];a._carpet=S,S&&S.visible?(a.xaxis=S.xaxis,a.yaxis=S.yaxis):a.visible=!1}},b.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return c.coerce(t||{},r,g,e,n)}if(n(\"mode\"),n(\"direction\"),n(\"fromcurrent\"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=b.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=b.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=b.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=b.supplyAnimationTransitionDefaults(t.transition||{});return r},b.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return c.coerce(t||{},e,g.frame,r,n)}return r(\"duration\"),r(\"redraw\"),e},b.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return c.coerce(t||{},e,g.transition,r,n)}return r(\"duration\"),r(\"easing\"),e},b.supplyFrameDefaults=function(t){var e={};function r(r,n){return c.coerce(t,e,v,r,n)}return r(\"group\"),r(\"name\"),r(\"traces\"),r(\"baseframe\"),r(\"data\"),r(\"layout\"),e},b.supplyTraceDefaults=function(t,e,r,n,i){var a,o=n.colorway||f.defaults,l=o[r%o.length];function u(r,n){return c.coerce(t,e,b.attributes,r,n)}var h=u(\"visible\");u(\"type\"),u(\"name\",n._traceWord+\" \"+i),u(\"uirevision\",n.uirevision);var p=b.getModule(e);if(e._module=p,p){var d=p.basePlotModule,g=d.attr,v=d.attributes;if(g&&v){var m=n._subplots,y=\"\";if(h||\"gl2d\"!==d.name){if(Array.isArray(g))for(a=0;a<g.length;a++){var x=g[a],_=c.coerce(t,e,v,x);m[x]&&c.pushUnique(m[x],_),y+=_}else y=c.coerce(t,e,v,g);m[d.name]&&c.pushUnique(m[d.name],y)}}}return h&&(u(\"customdata\"),u(\"ids\"),u(\"meta\"),s.traceIs(e,\"showLegend\")?(c.coerce(t,e,p.attributes.showlegend?p.attributes:b.attributes,\"showlegend\"),u(\"legendwidth\"),u(\"legendgroup\"),u(\"legendgrouptitle.text\"),u(\"legendrank\"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,p&&p.supplyDefaults(t,e,l,n),s.traceIs(e,\"noOpacity\")||u(\"opacity\"),s.traceIs(e,\"notLegendIsolatable\")&&(e.visible=!!e.visible),s.traceIs(e,\"noHover\")||(e.hovertemplate||c.coerceHoverinfo(t,e,n),\"parcats\"!==e.type&&s.getComponentMethod(\"fx\",\"supplyDefaults\")(t,e,l,n)),p&&p.selectPoints&&u(\"selectedpoints\"),b.supplyTransformDefaults(t,e,n)),e},b.hasMakesDataTransform=S,b.supplyTransformDefaults=function(t,e,r){if(e._length||S(t)){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],l=0;l<o.length;l++){var u,f=o[l],h=f.type,p=_[h],d=!(f._module&&f._module===p),g=p&&\"function\"==typeof p.transform;p||c.warn(\"Unrecognized transform type \"+h+\".\"),p&&p.supplyDefaults&&(d||g)?((u=p.supplyDefaults(f,e,r,t)).type=h,u._module=p,c.pushUnique(i,p)):u=c.extendFlat({},f),s.push(u)}}},b.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return c.coerce(t,e,b.layoutAttributes,r,n)}var i=t.template;c.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),n(\"autotypenumbers\");var a=c.coerceFont(n,\"font\"),o=a.size;c.coerceFont(n,\"title.font\",c.extendFlat({},a,{size:Math.round(1.4*o)})),n(\"title.text\",e._dfltTitle.plot),n(\"title.xref\"),n(\"title.yref\"),n(\"title.x\"),n(\"title.y\"),n(\"title.xanchor\"),n(\"title.yanchor\"),n(\"title.pad.t\"),n(\"title.pad.r\"),n(\"title.pad.b\"),n(\"title.pad.l\"),n(\"uniformtext.mode\")&&n(\"uniformtext.minsize\"),n(\"autosize\",!(t.width&&t.height)),n(\"width\"),n(\"height\"),n(\"minreducedwidth\"),n(\"minreducedheight\"),n(\"margin.l\"),n(\"margin.r\"),n(\"margin.t\"),n(\"margin.b\"),n(\"margin.pad\"),n(\"margin.autoexpand\"),t.width&&t.height&&b.sanitizeMargins(e),s.getComponentMethod(\"grid\",\"sizeDefaults\")(t,e),n(\"paper_bgcolor\"),n(\"separators\",r.decimal+r.thousands),n(\"hidesources\"),n(\"colorway\"),n(\"datarevision\");var l=n(\"uirevision\");n(\"editrevision\",l),n(\"selectionrevision\",l),s.getComponentMethod(\"modebar\",\"supplyLayoutDefaults\")(t,e),s.getComponentMethod(\"shapes\",\"supplyDrawNewShapeDefaults\")(t,e,n),s.getComponentMethod(\"selections\",\"supplyDrawNewSelectionDefaults\")(t,e,n),n(\"meta\"),c.isPlainObject(t.transition)&&(n(\"transition.duration\"),n(\"transition.easing\"),n(\"transition.ordering\")),s.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\"),s.getComponentMethod(\"fx\",\"supplyLayoutGlobalDefaults\")(t,e,n)},b.plotAutoSize=function(t,e,r){var n,i,a=t._context||{},s=a.frameMargins,l=c.isPlotDiv(t);if(l&&t.emit(\"plotly_autosize\"),a.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow=\"hidden\";else{var u=l?window.getComputedStyle(t):{};if(n=C(u.width)||C(u.maxWidth)||r.width,i=C(u.height)||C(u.maxHeight)||r.height,o(s)&&s>0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n<h&&(n=h),i<p&&(i=p);var d=!e.width&&Math.abs(r.width-n)>1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,u=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in u.length||u.push(f),e._has(\"cartesian\")&&(s.getComponentMethod(\"grid\",\"contentDefaults\")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(c.subplotSort);for(a=0;a<u.length;a++)(o=u[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var p=e._modules;for(a=0;a<p.length;a++)(o=p[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var d=e._transformModules;for(a=0;a<d.length;a++)(o=d[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in l)(o=l[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},b.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(\".gl-canvas\").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),c.clearThrottle(),c.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},b.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&c.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},b.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},b.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},b.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},b.autoMargin=function(t,e,r){var n=t._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=c.constrain(i-o.l-o.r,2,s),f=c.constrain(a-o.t-o.b,2,l),h=Math.max(0,i-u),p=Math.max(0,a-f),d=n._pushmargin,g=n._pushmarginIds;if(!1!==o.autoexpand){if(r){var v=r.pad;if(void 0===v&&(v=Math.min(12,o.l,o.r,o.t,o.b)),h){var m=(r.l+r.r)/h;m>1&&(r.l/=m,r.r/=m)}if(p){var y=(r.t+r.b)/p;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,_=void 0!==r.xr?r.xr:r.x,w=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:x,size:r.l+v},r:{val:_,size:r.r+v},b:{val:k,size:r.b+v},t:{val:w,size:r.t+v}},g[e]=1}else delete d[e],delete g[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),L(e);var i=e._size,a=e.margin,l=c.extendFlat({},i),u=a.l,f=a.r,h=a.t,d=a.b,g=e._pushmargin,v=e._pushmarginIds,m=e.minreducedwidth,y=e.minreducedheight;if(!1!==e.margin.autoexpand){for(var x in g)v[x]||delete g[x];for(var _ in g.base={l:{val:0,size:u},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},g){var w=g[_].l||{},k=g[_].b||{},T=w.val,M=w.size,A=k.val,S=k.size;for(var E in g){if(o(M)&&g[E].r){var C=g[E].r.val,P=g[E].r.size;if(C>T){var O=(M*C+(P-r)*T)/(C-T),I=(P*(1-T)+(M-r)*(1-C))/(C-T);O+I>u+f&&(u=O,f=I)}}if(o(S)&&g[E].t){var D=g[E].t.val,z=g[E].t.size;if(D>A){var R=(S*D+(z-n)*A)/(D-A),F=(z*(1-A)+(S-n)*(1-D))/(D-A);R+F>d+h&&(d=R,h=F)}}}}}var N=c.constrain(r-a.l-a.r,2,m),B=c.constrain(n-a.t-a.b,2,y),j=Math.max(0,r-N),U=Math.max(0,n-B);if(j){var V=(u+f)/j;V>1&&(u/=V,f/=V)}if(U){var H=(d+h)/U;H>1&&(d/=H,h/=H)}if(i.l=Math.round(u),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){\"_redrawFromAutoMarginCount\"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var q=3*(1+Object.keys(v).length);if(e._redrawFromAutoMarginCount<q)return s.call(\"_doPlot\",t);e._size=l,c.warn(\"Too many auto-margin redraws.\")}!function(t){var e=p.list(t,\"\",!0);[\"_adjustTickLabelsOverflow\",\"_hideCounterAxisInsideTickLabels\"].forEach((function(t){for(var r=0;r<e.length;r++){var n=e[r][t];n&&n()}}))}(t)};var P=[\"l\",\"r\",\"t\",\"b\",\"p\",\"w\",\"h\"];function O(t,e,r){var n=!1,i=[b.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},r.prepareFn,b.rehover,b.reselect,function(){return t.emit(\"plotly_transitioning\",[]),new Promise((function(i){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call(\"redraw\",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit(\"plotly_transitioninterrupted\",[])}));var a=0,o=0;function l(){return a++,function(){var e;o++,n||o!==a||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call(\"redraw\",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])})).then(e)))}}r.runFn(l),setTimeout(l())}))}],a=c.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r<P.length;r++){var n=P[r],i=t[n],a=e[n];if(!o(i)||Math.abs(a-i)>1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function u(t,e){if(\"function\"==typeof t)return e?\"_function_\":null;if(c.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===[\"_\",\"[\"].indexOf(a.charAt(0)))if(\"function\"!=typeof t[a]){if(\"keepdata\"===r){if(\"src\"===a.substr(a.length-3))return}else if(\"keepstream\"===r){if(\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0&&!c.isPlainObject(t.stream))return}else if(\"keepall\"!==r&&\"string\"==typeof(n=t[a+\"src\"])&&n.indexOf(\":\")>0)return;i[a]=u(t[a],e)}else e&&(i[a]=\"_function\")})),i}return Array.isArray(t)?t.map((function(t){return u(t,e)})):c.isTypedArray(t)?c.simpleMap(t,c.identity):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=u(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=u(l)),a&&(f.config=u(t._context,!0)),\"object\"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case\"replace\":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case\"insert\":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case\"delete\":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},b.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error(\"computeFrame must be given a string frame name\");var s=o[e.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===u.indexOf(s.name);)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=b.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(c.traces||(c.traces=[]),r=0;r<s.data.length;r++)null!=(i=n[r])&&(-1===(a=c.traces.indexOf(i))&&(a=c.data.length,c.traces[a]=i),c.data[a]=b.extendTrace(c.data[a],s.data[r]))}return c},b.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},b.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,u,f=c.extendDeepNoArrays({},e||{}),h=c.expandObjectPaths(f),p={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=c.nestedProperty(h,r[a])).get())?c.nestedProperty(p,r[a]).set(null):(n.set(null),c.nestedProperty(p,r[a]).set(i));if(t=c.extendDeepNoArrays(t||{},h),r&&r.length)for(a=0;a<r.length;a++)if(l=c.nestedProperty(p,r[a]).get()){for(u=(s=c.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<l.length;o++){var d=l[o];u[o]=null===d?null:b.extendObjectWithContainers(u[o],d)}s.set(u)}return t},b.dataArrayContainers=[\"transforms\",\"dimensions\"],b.layoutArrayContainers=s.layoutArrayContainers,b.extendTrace=function(t,e){return b.extendObjectWithContainers(t,e,b.dataArrayContainers)},b.extendLayout=function(t,e){return b.extendObjectWithContainers(t,e,b.layoutArrayContainers)},b.transition=function(t,e,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var i=Array.isArray(e)?e.length:0,a=n.slice(0,i),o=0;o<a.length;o++){var u=a[o],f=t._fullData[u]._module;if(f){if(f.animatable){var h=f.basePlotModule.name;s[h]||(s[h]=[]),s[h].push(u)}t.data[a[o]]=b.extendTrace(t.data[a[o]],e[o])}}var p=c.expandObjectPaths(c.extendDeepNoArrays({},r)),d=/^[xy]axis[0-9]*$/;for(var g in p)d.test(g)&&delete p[g].range;b.extendLayout(t.layout,p),delete t.calcdata,b.supplyDefaults(t),b.doCalcdata(t);var v=c.expandObjectPaths(r);if(v){var m=t._fullLayout._plots;for(var y in m){var x=m[y],_=x.xaxis,w=x.yaxis,k=_.range.slice(),T=w.range.slice(),M=null,A=null,S=null,E=null;Array.isArray(v[_._name+\".range\"])?M=v[_._name+\".range\"].slice():Array.isArray((v[_._name]||{}).range)&&(M=v[_._name].range.slice()),Array.isArray(v[w._name+\".range\"])?A=v[w._name+\".range\"].slice():Array.isArray((v[w._name]||{}).range)&&(A=v[w._name].range.slice()),k&&M&&(_.r2l(k[0])!==_.r2l(M[0])||_.r2l(k[1])!==_.r2l(M[1]))&&(S={xr0:k,xr1:M}),T&&A&&(w.r2l(T[0])!==w.r2l(A[0])||w.r2l(T[1])!==w.r2l(A[1]))&&(E={yr0:T,yr1:A}),(S||E)&&l.push(c.extendFlat({plotinfo:x},S,E))}}return Promise.resolve()},o.runFn=function(e){var n,i,o=t._fullLayout._basePlotModules,u=l.length;if(r)for(i=0;i<o.length;i++)o[i].transitionAxes&&o[i].transitionAxes(t,l,a,e);for(var f in u?((n=c.extendFlat({},a)).duration=0,delete s.cartesian):n=a,s){var h=s[f];t._fullData[h[0]]._module.basePlotModule.plot(t,h,n,e)}},O(t,a,o)},b.transitionFromReact=function(t,e,r,n){var i=t._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var t=i._plots;for(var a in o.redraw=!1,\"some\"===e.anim&&(o.redraw=!0),\"some\"===r.anim&&(o.redraw=!0),t){var l=t[a],u=l.xaxis,f=l.yaxis,h=n[u._name].range.slice(),p=n[f._name].range.slice(),d=u.range.slice(),g=f.range.slice();u.setScale(),f.setScale();var v=null,m=null;u.r2l(h[0])===u.r2l(d[0])&&u.r2l(h[1])===u.r2l(d[1])||(v={xr0:h,xr1:d}),f.r2l(p[0])===f.r2l(g[0])&&f.r2l(p[1])===f.r2l(g[1])||(m={yr0:p,yr1:g}),(v||m)&&s.push(c.extendFlat({plotinfo:l},v,m))}return Promise.resolve()},o.runFn=function(r){for(var n,i,o,l=t._fullData,u=t._fullLayout._basePlotModules,f=[],h=0;h<l.length;h++)f.push(h);function p(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].transitionAxes&&u[e].transitionAxes(t,s,n,r)}function d(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].plot(t,o,i,r)}s.length&&e.anim?\"traces first\"===a.ordering?(n=c.extendFlat({},a,{duration:0}),o=f,i=a,setTimeout(p,a.duration),d()):(n=a,o=null,i=c.extendFlat({},a,{duration:0}),setTimeout(d,n.duration),p()):s.length?(n=a,p()):e.anim&&(o=f,i=a,d())},O(t,a,o)},b.doCalcdata=function(t,e){var r,n,i,a,o=p.list(t),u=t._fullData,f=t._fullLayout,d=new Array(u.length),g=(t.calcdata||[]).slice();for(t.calcdata=d,f._numBoxes=0,f._numViolins=0,f._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,f._piecolormap={},f._sunburstcolormap={},f._treemapcolormap={},f._iciclecolormap={},f._funnelareacolormap={},i=0;i<u.length;i++)Array.isArray(e)&&-1===e.indexOf(i)&&(d[i]=g[i]);for(i=0;i<u.length;i++)(r=u[i])._arrayAttrs=l.findArrayAttributes(r),r._extremes={};var v=f._subplots.polar||[];for(i=0;i<v.length;i++)o.push(f[v[i]].radialaxis,f[v[i]].angularaxis);for(var m in f._colorAxes){var y=f[m];!1!==y.cauto&&(delete y.cmin,delete y.cmax)}var x=!1;function b(e){if(r=u[e],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var i=n.calc(t,r);i[0]&&i[0].t&&i[0].t._scene&&delete i[0].t._scene.dirty}for(a=0;a<r.transforms.length;a++){var o=r.transforms[a];(n=_[o.type])&&n.calcTransform&&(r._hasCalcTransform=!0,x=!0,n.calcTransform(t,r,o))}}}function w(e,i){if(r=u[e],!!(n=r._module).isContainer===i){var o=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var s=r.transforms||[];for(a=s.length-1;a>=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(D(o,u,f),i=0;i<u.length;i++)w(i,!0);for(i=0;i<u.length;i++)b(i);for(x&&D(o,u,f),i=0;i<u.length;i++)w(i,!0);for(i=0;i<u.length;i++)w(i,!1);z(t);var k=function(t,e){var r,n,i,a,o,l=[];function u(t,r,n){var i=r._id.charAt(0);if(\"histogram2dcontour\"===t){var a=r._counterAxes[0],o=p.getFromId(e,a),s=\"x\"===i||\"x\"===a&&\"category\"===o.type,l=\"y\"===i||\"y\"===a&&\"category\"===o.type;return function(t,e){return 0===t||0===e||s&&t===n[e].length-1||l&&e===n.length-1?-1:(\"y\"===i?e:t)-1}}return function(t,e){return\"y\"===i?e:t}}var f={min:function(t){return c.aggNums(Math.min,null,t)},max:function(t){return c.aggNums(Math.max,null,t)},sum:function(t){return c.aggNums((function(t,e){return t+e}),null,t)},total:function(t){return c.aggNums((function(t,e){return t+e}),null,t)},mean:function(t){return c.mean(t)},median:function(t){return c.median(t)}};for(r=0;r<t.length;r++){var h=t[r];if(\"category\"===h.type){var d=h.categoryorder.match(I);if(d){var g=d[1],v=d[2],m=h._id.charAt(0),y=\"x\"===m,x=[];for(n=0;n<h._categories.length;n++)x.push([h._categories[n],[]]);for(n=0;n<h._traceIndices.length;n++){var b=h._traceIndices[n],_=e._fullData[b];if(!0===_.visible){var w=_.type;s.traceIs(_,\"histogram\")&&(delete _._xautoBinFinished,delete _._yautoBinFinished);var k=\"splom\"===w,T=\"scattergl\"===w,M=e.calcdata[b];for(i=0;i<M.length;i++){var A,S,E=M[i];if(k){var C=_._axesDim[h._id];if(!y){var L=_._diag[C][0];L&&(h=e._fullLayout[p.id2name(L)])}var P=E.trace.dimensions[C].values;for(a=0;a<P.length;a++)for(A=h._categoriesMap[P[a]],o=0;o<E.trace.dimensions.length;o++)if(o!==C){var O=E.trace.dimensions[o];x[A][1].push(O.values[a])}}else if(T){for(a=0;a<E.t.x.length;a++)y?(A=E.t.x[a],S=E.t.y[a]):(A=E.t.y[a],S=E.t.x[a]),x[A][1].push(S);E.t&&E.t._scene&&delete E.t._scene.dirty}else if(E.hasOwnProperty(\"z\")){S=E.z;var D=u(_.type,h,S);for(a=0;a<S.length;a++)for(o=0;o<S[a].length;o++)(A=D(o,a))+1&&x[A][1].push(S[a][o])}else for(void 0===(A=E.p)&&(A=E[m]),void 0===(S=E.s)&&(S=E.v),void 0===S&&(S=y?E.y:E.x),Array.isArray(S)||(S=void 0===S?[]:[S]),a=0;a<S.length;a++)x[A][1].push(S[a])}}}h._categoriesValue=x;var z=[];for(n=0;n<x.length;n++)z.push([x[n][0],f[g](x[n][1])]);z.sort((function(t,e){return t[1]-e[1]})),h._categoriesAggregatedValue=z,h._initialCategories=z.map((function(t){return t[0]})),\"descending\"===v&&h._initialCategories.reverse(),l=l.concat(h.sortByInitialCategories())}}}return l}(o,t);if(k.length){for(f._numBoxes=0,f._numViolins=0,i=0;i<k.length;i++)w(k[i],!0);for(i=0;i<k.length;i++)w(k[i],!1);z(t)}s.getComponentMethod(\"fx\",\"calc\")(t),s.getComponentMethod(\"errorbars\",\"calc\")(t)};var I=/(total|sum|min|max|mean|median) (ascending|descending)/;function D(t,e,r){var n={};function i(t){t.clearCalc(),\"multicategory\"===t.type&&t.setupMultiCategory(e),n[t._id]=1}c.simpleMap(t,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[p.id2name(s)])}function z(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r<a.length;r++){var s=a[r],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;o[u]?c.pushUnique(o[u],l):o[u]=[l]}}for(n in o){var f=o[n],h=i._subplots[n];if(Array.isArray(h))for(e=0;e<h.length;e++){var p=h[e],d=\"cartesian\"===n?i._plots[p]:i[p];for(r=0;r<f.length;r++)f[r](t,d,p)}else for(r=0;r<f.length;r++)f[r](t)}}b.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},b.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()},b.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,n=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(n);s.getComponentMethod(\"selections\",\"reselect\")(t,i)},b.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],l=s[0].trace;l.visible&&(o[l.type]=o[l.type]||[],o[l.type].push(s))}for(var u in a)if(!o[u]){var f=a[u][0];f[0].trace.visible=!1,o[u]=[f]}for(var h in o){var p=o[h];p[0][0].trace._module.plot(t,e,c.filterVisible(p),n)}e.traceHash=o},b.plotBasePlot=function(t,e,r,n,i){var a=s.getModule(t),o=m(e.calcdata,a)[0];a.plot(e,o,n,i)},b.cleanBasePlot=function(t,e,r,n,i){var a=i._has&&i._has(t),o=r._has&&r._has(t);a&&!o&&i[\"_\"+t+\"layer\"].selectAll(\"g.trace\").remove()}},{\"../components/color\":367,\"../components/shapes/handle_outline\":468,\"../constants/numerical\":491,\"../lib\":515,\"../plot_api/plot_schema\":554,\"../plot_api/plot_template\":555,\"../plots/get_data\":602,\"../registry\":647,\"./animation_attributes\":560,\"./attributes\":562,\"./cartesian/axis_ids\":570,\"./command\":592,\"./font_attributes\":594,\"./frame_attributes\":595,\"./layout_attributes\":619,\"@plotly/d3\":58,\"d3-format\":112,\"d3-time-format\":120,\"fast-isnumeric\":190}],629:[function(t,e,r){\"use strict\";e.exports={attr:\"subplot\",name:\"polar\",axisNames:[\"angularaxis\",\"radialaxis\"],axisName2dataArray:{angularaxis:\"theta\",radialaxis:\"r\"},layerNames:[\"draglayer\",\"plotbg\",\"backplot\",\"angular-grid\",\"radial-grid\",\"frontplot\",\"angular-line\",\"radial-line\",\"angular-axis\",\"radial-axis\"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],630:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../lib/polygon\").tester,a=n.findIndexOfMin,o=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function u(t,e,r,n){var i,a,o=n[0],s=n[1],l=f(Math.sin(e)-Math.sin(t)),u=f(Math.cos(e)-Math.cos(t)),c=Math.tan(r),h=f(1/c),p=l/u,d=s-p*o;return h?l&&u?a=c*(i=d/(c-p)):u?(i=s*h,a=s):(i=o,a=o*c):l&&u?(i=0,a=d):u?(i=0,a=s):i=a=NaN,[i,a]}function c(t,e,r,i){return n.isFullCircle([e,r])?function(t,e){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;r++){var a=e[r];i[r]=[t*Math.cos(a),t*Math.sin(a)]}return i[r]=i[0].slice(),i}(t,i):function(t,e,r,i){var s,c,f=i.length,h=[];function p(e){return[t*Math.cos(e),t*Math.sin(e)]}function d(t,e,r){return u(t,e,r,p(t))}function g(t){return n.mod(t,f)}function v(t){return o(t,[e,r])}var m=a(i,(function(t){return v(t)?l(t,e):1/0})),y=d(i[m],i[g(m-1)],e);for(h.push(y),s=m,c=0;c<f;s++,c++){var x=i[g(s)];if(!v(x))break;h.push(p(x))}var b=a(i,(function(t){return v(t)?l(t,r):1/0})),_=d(i[b],i[g(b+1)],r);return h.push(_),h.push([0,0]),h.push(h[0].slice()),h}(t,e,r,i)}function f(t){return Math.abs(t)>1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a<n;a++){var o=t[a];i[a]=[e+o[0],r-o[1]]}return i}e.exports={isPtInsidePolygon:function(t,e,r,n,a){if(!o(e,n))return!1;var s,l;r[0]<r[1]?(s=r[0],l=r[1]):(s=r[1],l=r[0]);var u=i(c(s,n[0],n[1],a)),f=i(c(l,n[0],n[1],a)),h=[t*Math.cos(e),t*Math.sin(e)];return f.contains(h)&&!u.contains(h)},findPolygonOffset:function(t,e,r,n){for(var i=1/0,a=1/0,o=c(t,e,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]},findEnclosingVertexAngles:function(t,e){var r=a(e,(function(e){var r=s(e,t);return r>0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:u,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,e*u+i+n],[c,e*c+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return\"M\"+h(c(t,e,r,n),i,a).join(\"L\")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t<e?(s=t,l=e):(s=e,l=t);var u=h(c(s,r,n,i),a,o);return\"M\"+h(c(l,r,n,i),a,o).reverse().join(\"L\")+\"M\"+u.join(\"L\")}}},{\"../../lib\":515,\"../../lib/polygon\":527}],631:[function(t,e,r){\"use strict\";var n=t(\"../get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./polar\"),o=t(\"./constants\"),s=o.attr,l=o.name,u=i(l),c={};c[s]={valType:\"subplotid\",dflt:l,editType:\"calc\"},e.exports={attr:s,name:l,idRoot:l,idRegex:u,attrRegex:u,attributes:c,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],u=n(r,l,s),c=e[s]._subplot;c||(c=a(t,s),e[s]._subplot=c),c.plot(u,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=n._has&&n._has(\"gl\"),o=e._has&&e._has(\"gl\"),s=a&&!o,u=0;u<i.length;u++){var c=i[u],f=n[c]._subplot;if(!e[c]&&f)for(var h in f.framework.remove(),f.layers[\"radial-axis-title\"].remove(),f.clipPaths)f.clipPaths[h].remove();s&&f._scene&&(f._scene.destroy(),f._scene=null)}},toSVG:t(\"../cartesian\").toSVG}},{\"../../lib\":515,\"../cartesian\":578,\"../get_data\":602,\"./constants\":629,\"./layout_attributes\":632,\"./layout_defaults\":633,\"./polar\":634}],632:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../cartesian/layout_attributes\"),a=t(\"../domain\").attributes,o=t(\"../../lib\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},\"plot\",\"from-root\"),u=s({tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},\"plot\",\"from-root\"),c={visible:o({},i.visible,{dflt:!0}),type:o({},i.type,{values:[\"-\",\"linear\",\"log\",\"date\",\"category\"]}),autotypenumbers:i.autotypenumbers,autorange:o({},i.autorange,{editType:\"plot\"}),rangemode:{valType:\"enumerated\",values:[\"tozero\",\"nonnegative\",\"normal\"],dflt:\"tozero\",editType:\"calc\"},range:o({},i.range,{items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],editType:\"plot\"}),categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:\"angle\",editType:\"plot\"},side:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"clockwise\",editType:\"plot\"},title:{text:o({},i.title.text,{editType:\"plot\",dflt:\"\"}),font:o({},i.title.font,{editType:\"plot\"}),editType:\"plot\"},hoverformat:i.hoverformat,uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\",_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}};o(c,l,u);var f={visible:o({},i.visible,{dflt:!0}),type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"category\"],dflt:\"-\",editType:\"calc\",_noTemplating:!0},autotypenumbers:i.autotypenumbers,categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\"],dflt:\"degrees\",editType:\"calc\"},period:{valType:\"number\",editType:\"calc\",min:0},direction:{valType:\"enumerated\",values:[\"counterclockwise\",\"clockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",editType:\"calc\"},hoverformat:i.hoverformat,uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"};o(f,l,u),e.exports={domain:a({name:\"polar\",editType:\"plot\"}),sector:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],dflt:[0,360],editType:\"plot\"},hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},bgcolor:{valType:\"color\",editType:\"plot\",dflt:n.background},radialaxis:c,angularaxis:f,gridshape:{valType:\"enumerated\",values:[\"circular\",\"linear\"],dflt:\"circular\",editType:\"plot\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"}},{\"../../components/color/attributes\":366,\"../../lib\":515,\"../../plot_api/edit_types\":548,\"../cartesian/layout_attributes\":579,\"../domain\":593}],633:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../plot_api/plot_template\"),o=t(\"../subplot_defaults\"),s=t(\"../get_data\").getSubplotData,l=t(\"../cartesian/tick_value_defaults\"),u=t(\"../cartesian/tick_mark_defaults\"),c=t(\"../cartesian/tick_label_defaults\"),f=t(\"../cartesian/prefix_suffix_defaults\"),h=t(\"../cartesian/category_order_defaults\"),p=t(\"../cartesian/line_grid_defaults\"),d=t(\"../cartesian/axis_autotype\"),g=t(\"./layout_attributes\"),v=t(\"./set_convert\"),m=t(\"./constants\"),y=m.axisNames;function x(t,e,r,o){var d=r(\"bgcolor\");o.bgColor=i.combine(d,o.paper_bgcolor);var x=r(\"sector\");r(\"hole\");var _,w=s(o.fullData,m.name,o.id),k=o.layoutOut;function T(t,e){return r(_+\".\"+t,e)}for(var M=0;M<y.length;M++){_=y[M],n.isPlainObject(t[_])||(t[_]={});var A=t[_],S=a.newContainer(e,_);S._id=S._name=_,S._attr=o.id+\".\"+_,S._traceIndices=w.map((function(t){return t._expandedIndex}));var E=m.axisName2dataArray[_],C=b(A,S,T,w,E,o);h(A,S,T,{axData:w,dataAttr:E});var L=T(\"visible\");switch(v(S,e,k),T(\"uirevision\",e.uirevision),S._m=1,_){case\"radialaxis\":var P=T(\"autorange\",!S.isValidRange(A.range));A.autorange=P,!P||\"linear\"!==C&&\"-\"!==C||T(\"rangemode\"),\"reversed\"===P&&(S._m=-1),T(\"range\"),S.cleanRange(\"range\",{dfltRange:[0,1]});break;case\"angularaxis\":if(\"date\"===C){n.log(\"Polar plots do not support date angular axes yet.\");for(var O=0;O<w.length;O++)w[O].visible=!1;C=A.type=S.type=\"linear\"}T(\"linear\"===C?\"thetaunit\":\"period\");var I=T(\"direction\");T(\"rotation\",{counterclockwise:0,clockwise:90}[I])}if(f(A,S,T,S.type,{tickSuffixDflt:\"degrees\"===S.thetaunit?\"°\":void 0}),L){var D,z,R,F,N=o.font||{};z=(D=T(\"color\"))===A.color?D:N.color,R=N.size,F=N.family,l(A,S,T,S.type),c(A,S,T,S.type,{font:{color:z,size:R,family:F}}),u(A,S,T,{outerTicks:!0}),p(A,S,T,{dfltColor:D,bgColor:o.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g[_]}),T(\"layer\"),\"radialaxis\"===_&&(T(\"side\"),T(\"angle\",x[0]),T(\"title.text\"),n.coerceFont(T,\"title.font\",{color:z,size:n.bigFont(R),family:F}))}\"category\"!==C&&T(\"hoverformat\"),S._input=A}\"category\"===e.angularaxis.type&&r(\"gridshape\")}function b(t,e,r,n,i,a){var o=r(\"autotypenumbers\",a.autotypenumbersDflt);if(\"-\"===r(\"type\")){for(var s,l=0;l<n.length;l++)if(n[l].visible){s=n[l];break}s&&s[i]&&(e.type=d(s[i],\"gregorian\",{noMultiCategory:!0,autotypenumbers:o})),\"-\"===e.type?e.type=\"linear\":t.type=e.type}return e.type}e.exports=function(t,e,r){o(t,e,r,{type:m.name,attributes:g,handleDefaults:x,font:e.font,autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},{\"../../components/color\":367,\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../cartesian/axis_autotype\":567,\"../cartesian/category_order_defaults\":571,\"../cartesian/line_grid_defaults\":581,\"../cartesian/prefix_suffix_defaults\":583,\"../cartesian/tick_label_defaults\":587,\"../cartesian/tick_mark_defaults\":588,\"../cartesian/tick_value_defaults\":589,\"../get_data\":602,\"../subplot_defaults\":641,\"./constants\":629,\"./layout_attributes\":632,\"./set_convert\":635}],634:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strRotate,l=o.strTranslate,u=t(\"../../components/color\"),c=t(\"../../components/drawing\"),f=t(\"../plots\"),h=t(\"../../plots/cartesian/axes\"),p=t(\"../cartesian/set_convert\"),d=t(\"./set_convert\"),g=t(\"../cartesian/autorange\").doAutoRange,v=t(\"../cartesian/dragbox\"),m=t(\"../../components/dragelement\"),y=t(\"../../components/fx\"),x=t(\"../../components/titles\"),b=t(\"../../components/selections\").prepSelect,_=t(\"../../components/selections\").selectOnClick,w=t(\"../../components/selections\").clearOutline,k=t(\"../../lib/setcursor\"),T=t(\"../../lib/clear_gl_canvases\"),M=t(\"../../plot_api/subroutines\").redrawReglTraces,A=t(\"../../constants/alignment\").MID_SHIFT,S=t(\"./constants\"),E=t(\"./helpers\"),C=t(\"../smith/helpers\"),L=C.smith,P=C.reactanceArc,O=C.resistanceArc,I=C.smithTransform,D=o._,z=o.mod,R=o.deg2rad,F=o.rad2deg;function N(t,e,r){this.isSmith=r||!1,this.id=e,this.gd=t,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=t._fullLayout,i=\"clip\"+n._uid+e;this.clipIds.forTraces=i+\"-for-traces\",this.clipPaths.forTraces=n._clips.append(\"clipPath\").attr(\"id\",this.clipIds.forTraces),this.clipPaths.forTraces.append(\"path\"),this.framework=n[\"_\"+(r?\"smith\":\"polar\")+\"layer\"].append(\"g\").attr(\"class\",e),this.getHole=function(t){return this.isSmith?0:t.hole},this.getSector=function(t){return this.isSmith?[0,360]:t.sector},this.getRadial=function(t){return this.isSmith?t.realaxis:t.radialaxis},this.getAngular=function(t){return this.isSmith?t.imaginaryaxis:t.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var B=N.prototype;function j(t){var e=t.ticks+String(t.ticklen)+String(t.showticklabels);return\"side\"in t&&(e+=t.side),e}function U(t,e){return e[o.findIndexOfMin(e,(function(e){return o.angleDist(t,e)}))]}function V(t,e,r){return e?(t.attr(\"display\",null),t.attr(r)):t&&t.attr(\"display\",\"none\"),t}e.exports=function(t,e,r){return new N(t,e,r)},B.plot=function(t,e){for(var r=this,n=e[r.id],i=!1,a=0;a<t.length;a++)if(!1===t[a][0].trace.cliponaxis){i=!0;break}r._hasClipOnAxisFalse=i,r.updateLayers(e,n),r.updateLayout(e,n),f.generalUpdatePerTraceModule(r.gd,r,t,n),r.updateFx(e,n),r.isSmith&&(delete n.realaxis.range,delete n.imaginaryaxis.range)},B.updateLayers=function(t,e){var r=this,i=r.isSmith,a=r.layers,o=r.getRadial(e),s=r.getAngular(e),l=S.layerNames,u=l.indexOf(\"frontplot\"),c=l.slice(0,u),f=\"below traces\"===s.layer,h=\"below traces\"===o.layer;f&&c.push(\"angular-line\"),h&&c.push(\"radial-line\"),f&&c.push(\"angular-axis\"),h&&c.push(\"radial-axis\"),c.push(\"frontplot\"),f||c.push(\"angular-line\"),h||c.push(\"radial-line\"),f||c.push(\"angular-axis\"),h||c.push(\"radial-axis\");var p=(i?\"smith\":\"polar\")+\"sublayer\",d=r.framework.selectAll(\".\"+p).data(c,String);d.enter().append(\"g\").attr(\"class\",(function(t){return p+\" \"+t})).each((function(t){var e=a[t]=n.select(this);switch(t){case\"frontplot\":i||e.append(\"g\").classed(\"barlayer\",!0),e.append(\"g\").classed(\"scatterlayer\",!0);break;case\"backplot\":e.append(\"g\").classed(\"maplayer\",!0);break;case\"plotbg\":a.bg=e.append(\"path\");break;case\"radial-grid\":case\"angular-grid\":e.style(\"fill\",\"none\");break;case\"radial-line\":e.append(\"line\").style(\"fill\",\"none\");break;case\"angular-line\":e.append(\"path\").style(\"fill\",\"none\")}})),d.order()},B.updateLayout=function(t,e){var r=this,n=r.layers,i=t._size,a=r.getRadial(e),o=r.getAngular(e),s=e.domain.x,f=e.domain.y;r.xOffset=i.l+i.w*s[0],r.yOffset=i.t+i.h*(1-f[1]);var h=r.xLength=i.w*(s[1]-s[0]),p=r.yLength=i.h*(f[1]-f[0]),d=r.getSector(e);r.sectorInRad=d.map(R);var g,v,m,y,x,b=r.sectorBBox=function(t){var e,r=t[0],n=t[1]-r,i=z(r,360),a=i+n,o=Math.cos(R(i)),s=Math.sin(R(i)),l=Math.cos(R(a)),u=Math.sin(R(a));return e=i<=90&&a>=90||i>90&&a>=450?1:s<=0&&u<=0?0:Math.max(s,u),[i<=180&&a>=180||i>180&&a>=540?-1:o>=0&&l>=0?0:Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?-1:s>=0&&u>=0?0:Math.min(s,u),a>=360?1:o<=0&&l<=0?0:Math.max(o,l),e]}(d),_=b[2]-b[0],w=b[3]-b[1],k=p/h,T=Math.abs(w/_);k>T?(g=h,x=(p-(v=h*T))/i.h/2,m=[s[0],s[1]],y=[f[0]+x,f[1]-x]):(v=p,x=(h-(g=p/T))/i.w/2,m=[s[0]+x,s[1]-x],y=[f[0],f[1]]),r.xLength2=g,r.yLength2=v,r.xDomain2=m,r.yDomain2=y;var M,A=r.xOffset2=i.l+i.w*m[0],S=r.yOffset2=i.t+i.h*(1-y[1]),E=r.radius=g/_,C=r.innerRadius=r.getHole(e)*E,L=r.cx=A-E*b[0],P=r.cy=S+E*b[3],O=r.cxx=L-A,I=r.cyy=P-S,D=a.side;\"counterclockwise\"===D?(M=D,D=\"top\"):\"clockwise\"===D&&(M=D,D=\"bottom\"),r.radialAxis=r.mockAxis(t,e,a,{_id:\"x\",side:D,_trueSide:M,domain:[C/i.w,E/i.w]}),r.angularAxis=r.mockAxis(t,e,o,{side:\"right\",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(t,e),r.updateAngularAxis(t,e),r.updateRadialAxis(t,e),r.updateRadialAxisTitle(t,e),r.xaxis=r.mockCartesianAxis(t,e,{_id:\"x\",domain:m}),r.yaxis=r.mockCartesianAxis(t,e,{_id:\"y\",domain:y});var F=r.pathSubplot();r.clipPaths.forTraces.select(\"path\").attr(\"d\",F).attr(\"transform\",l(O,I)),n.frontplot.attr(\"transform\",l(A,S)).call(c.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr(\"d\",F).attr(\"transform\",l(L,P)).call(u.fill,e.bgcolor)},B.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},B.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:\"linear\"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange=\"x\"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},B.doAutoRange=function(t,e){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(e);g(n,i);var o=i.range;a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,\"gregorian\"),i.r2l(o[1],null,\"gregorian\")]},B.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),g=z(r.getSector(e)[0],360),v=r.radialAxis,m=c<a,y=r.isSmith;y||(r.fillViewInitialKey(\"radialaxis.angle\",d.angle),r.fillViewInitialKey(\"radialaxis.range\",v.range.slice()),v.setGeometry()),\"auto\"===v.tickangle&&g>90&&g<=270&&(v.tickangle=180);var x=y?function(t){var e=I(r,L([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(v.l2p(t.x)+c,0)},b=y?function(t){return O(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(v.r2p(t.x)+c)},_=j(d);if(r.radialTickLayout!==_&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=_),m){v.setScale();var w=0,k=y?(v.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(v,t,!0,!1)})):h.calcTicks(v),T=y?k:h.clipEnds(v,k),M=h.getTickSigns(v)[2];y&&((\"top\"===v.ticks&&\"bottom\"===v.side||\"bottom\"===v.ticks&&\"top\"===v.side)&&(M=-M),\"top\"===v.ticks&&\"top\"===v.side&&(w=-v.ticklen),\"bottom\"===v.ticks&&\"bottom\"===v.side&&(w=v.ticklen)),h.drawTicks(n,v,{vals:k,layer:i[\"radial-axis\"],path:h.makeTickPath(v,0,M),transFn:x,crisp:!1}),h.drawGrid(n,v,{vals:T,layer:i[\"radial-grid\"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,v,{vals:k,layer:i[\"radial-axis\"],transFn:x,labelFns:h.makeLabelFns(v,w)})}var A=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-A);V(i[\"radial-axis\"],m&&(d.showticklabels||d.ticks),{transform:E}),V(i[\"radial-grid\"],m&&d.showgrid,{transform:y?\"\":S}),V(i[\"radial-line\"].select(\"line\"),m&&d.showline,{x1:y?-a:c,y1:0,x2:a,y2:0,transform:E}).attr(\"stroke-width\",d.linewidth).call(u.stroke,d.linecolor)},B.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(e),u=n.id+\"title\",f=0;if(l.title){var h=c.bBox(n.layers[\"radial-axis\"].node()).height,p=l.title.font.size,d=l.side;f=\"top\"===d?p:\"counterclockwise\"===d?-(h+.4*p):h+.8*p}var g=void 0!==r?r:n.radialAxisAngle,v=R(g),m=Math.cos(v),y=Math.sin(v),b=o+a/2*m+f*y,_=s-a/2*y+f*m;n.layers[\"radial-axis-title\"]=x.draw(i,u,{propContainer:l,propName:n.id+\".radialaxis.title\",placeholder:D(i,\"Click to enter radial axis title\"),attributes:{x:b,y:_,\"text-anchor\":\"middle\"},transform:{rotate:-g}})}},B.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),g=r.angularAxis,v=r.isSmith;v||(r.fillViewInitialKey(\"angularaxis.rotation\",d.rotation),g.setGeometry(),g.setScale());var m=v?function(t){var e=I(r,L([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return g.t2g(t.x)};\"linear\"===g.type&&\"radians\"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=v?function(t){var e=I(r,L([0,t.x]));return l(e[0],e[1])}:function(t){return y(m(t))},b=v?function(t){var e=I(r,L([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=m(t);return y(e)+s(-F(e))},_=v?function(t){return P(r,t.x,0,1/0)}:function(t){var e=m(t),r=Math.cos(e),n=Math.sin(e);return\"M\"+[f+c*r,p-c*n]+\"L\"+[f+a*r,p-a*n]},w=h.makeLabelFns(g,0).labelStandoff,k={xFn:function(t){var e=m(t);return Math.cos(e)*w},yFn:function(t){var e=m(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*A)},anchorFn:function(t){var e=m(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},heightFn:function(t,e,r){var n=m(t);return-.5*(1+Math.sin(n))*r}},T=j(d);r.angularTickLayout!==T&&(i[\"angular-axis\"].selectAll(\".\"+g._id+\"tick\").remove(),r.angularTickLayout=T);var M,S=v?[1/0].concat(g.tickvals||[]).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g);if(v&&(S[0].text=\"∞\",S[0].fontSize*=1.75),\"linear\"===e.gridshape?(M=S.map(m),o.angleDelta(M[0],M[1])<0&&(M=M.slice().reverse())):M=null,r.vangles=M,\"category\"===g.type&&(S=S.filter((function(t){return o.isAngleInsideSector(m(t),r.sectorInRad)}))),g.visible){var E=\"inside\"===g.ticks?-1:1,C=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:S,layer:i[\"angular-axis\"],path:\"M\"+E*C+\",0h\"+E*g.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,g,{vals:S,layer:i[\"angular-grid\"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:S,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:x,labelFns:k})}V(i[\"angular-line\"].select(\"path\"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr(\"stroke-width\",d.linewidth).call(u.stroke,d.linecolor)},B.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},B.updateHoverAndMainDrag=function(t){var e,r,s=this,u=s.isSmith,c=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,g=s.radius,x=s.innerRadius,k=s.cx,T=s.cy,M=s.cxx,A=s.cyy,C=s.sectorInRad,L=s.vangles,P=s.radialAxis,O=E.clampTiny,I=E.findXYatLength,D=E.findEnclosingVertexAngles,z=S.cornerHalfWidth,R=S.cornerLen/2,F=v.makeDragger(f,\"path\",\"maindrag\",!1===t.dragmode?\"none\":\"crosshair\");n.select(F).attr(\"d\",s.pathSubplot()).attr(\"transform\",l(k,T)),F.onmousemove=function(t){y.hover(c,t,s.id),c._fullLayout._lasthover=F,c._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){c._dragging||m.unhover(c,t)};var N,B,j,U,V,H,q,G,Y,W={element:F,gd:c,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-M,e-A)}function K(t,e){return Math.atan2(A-e,t-M)}function J(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function $(t,e){if(0===t)return s.pathSector(2*z);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,g)),o=a-z,l=a+z;return\"M\"+J(o,n)+\"A\"+[o,o]+\" 0,0,0 \"+J(o,i)+\"L\"+J(l,i)+\"A\"+[l,l]+\" 0,0,1 \"+J(l,n)+\"Z\"}function Q(t,e,r){if(0===t)return s.pathSector(2*z);var n,i,a=J(t,e),o=J(t,r),l=O((a[0]+o[0])/2),u=O((a[1]+o[1])/2);if(l&&u){var c=u/l,f=-1/c,h=I(z,c,l,u);n=I(R,f,h[0][0],h[0][1]),i=I(R,f,h[1][0],h[1][1])}else{var p,d;u?(p=R,d=z):(p=z,d=R),n=[[l-p,u-d],[l+p,u-d]],i=[[l-p,u+d],[l+p,u+d]]}return\"M\"+n.join(\"L\")+\"L\"+i.reverse().join(\"L\")+\"Z\"}function tt(t,e){return e=Math.max(Math.min(e,g),x),t<d?t=0:g-t<d?t=g:e<d?e=0:g-e<d&&(e=g),Math.abs(e-t)>p?(t<e?(j=t,U=e):(j=e,U=t),!0):(j=null,U=null,!1)}function et(t,e){t=t||V,e=e||\"M0,0Z\",G.attr(\"d\",t),Y.attr(\"d\",e),v.transitionZoombox(G,Y,H,q),H=!0;var r={};ot(r),c.emit(\"plotly_relayouting\",r)}function rt(t,n){var i,a,o=N+(t*=e),l=B+(n*=r),u=Z(N,B),c=Math.min(Z(o,l),g),f=K(N,B);tt(u,c)&&(i=V+s.pathSector(U),j&&(i+=s.pathSector(j)),a=$(j,f)+$(U,f)),et(i,a)}function nt(t,e,r,n){var i=E.findIntersectionXY(r,n,r,[t-M,A-e]);return X(i[0],i[1])}function it(t,e){var r,n,i=N+t,a=B+e,o=K(N,B),l=K(i,a),u=D(o,L),c=D(l,L);tt(nt(N,B,u[0],u[1]),Math.min(nt(i,a,c[0],c[1]),g))&&(r=V+s.pathSector(U),j&&(r+=s.pathSector(j)),n=[Q(j,u[0],u[1]),Q(U,u[0],u[1])].join(\" \")),et(r,n)}function at(){if(v.removeZoombox(c),null!==j&&null!==U){var t={};ot(t),v.showDoubleClickNotifier(c),a.call(\"_guiRelayout\",c,t)}}function ot(t){var e=P._rl,r=(e[1]-e[0])/(1-x/g)/g,n=[e[0]+(j-x)*r,e[0]+(U-x)*r];t[s.id+\".radialaxis.range\"]=n}function st(t,e){var r=c._fullLayout.clickmode;if(v.removeZoombox(c),2===t){var n={};for(var i in s.viewInitial)n[s.id+\".\"+i]=s.viewInitial[i];c.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",c,n)}r.indexOf(\"select\")>-1&&1===t&&_(e,c,[s.xaxis],[s.yaxis],s.id,W),r.indexOf(\"event\")>-1&&y.click(c,e,s.id)}W.prepFn=function(t,n,a){var l=c._fullLayout.dragmode,f=F.getBoundingClientRect();c._fullLayout._calcInverseTransform(c);var p=c._fullLayout._invTransform;e=c._fullLayout._invScaleX,r=c._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(N=d[0],B=d[1],L){var m=E.findPolygonOffset(g,C[0],C[1],L);N+=M+m[0],B+=A+m[1]}switch(l){case\"zoom\":W.clickFn=st,u||(W.moveFn=L?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=c._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=v.makeZoombox(h,q,k,T,V)).attr(\"fill-rule\",\"evenodd\"),Y=v.makeCorners(h,k,T),w(c)}());break;case\"select\":case\"lasso\":b(t,n,a,W,l)}},m.init(W)},B.updateRadialDrag=function(t,e,r){var i=this,u=i.gd,c=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,k,A=R(i.radialAxisAngle),E=g._rl,C=E[0],L=E[1],P=E[r],O=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(A),_=d-(f+x)*Math.sin(A),k=\"radialdrag\"):(b=p+(h-x)*Math.cos(A),_=d-(h-x)*Math.sin(A),k=\"radialdrag-inner\");var I,D,z,N=v.makeRectDragger(c,k,\"crosshair\",-x,-x,y,y),B={element:N,gd:u};!1===t.dragmode&&(B.dragmode=!1),V(n.select(N),g.visible&&h<f,{transform:l(b,_)}),B.prepFn=function(){I=null,D=null,z=null,B.moveFn=j,B.doneFn=H,w(u)},B.clampFn=function(t,e){return Math.sqrt(t*t+e*e)<S.MINDRAG&&(t=0,e=0),[t,e]},m.init(B)}function j(t,e){if(I)I(t,e);else{var n=[t,-e],a=[Math.cos(A),Math.sin(A)],s=Math.abs(o.dot(n,a)/Math.sqrt(o.dot(n,n)));isNaN(s)||(I=s<.5?q:G)}var l={};(function(t){null!==D?t[i.id+\".radialaxis.angle\"]=D:null!==z&&(t[i.id+\".radialaxis.range[\"+r+\"]\"]=z)})(l),u.emit(\"plotly_relayouting\",l)}function H(){null!==D?a.call(\"_guiRelayout\",u,i.id+\".radialaxis.angle\",D):null!==z&&a.call(\"_guiRelayout\",u,i.id+\".radialaxis.range[\"+r+\"]\",z)}function q(t,e){if(0!==r){var n=b+t,a=_+e;D=Math.atan2(d-a,n-p),i.vangles&&(D=U(D,i.vangles)),D=F(D);var o=l(p,d)+s(-D);c[\"radial-axis\"].attr(\"transform\",o),c[\"radial-line\"].select(\"line\").attr(\"transform\",o);var u=i.gd._fullLayout,f=u[i.id];i.updateRadialAxisTitle(u,f,D)}}function G(t,e){var n=o.dot([t,-e],[Math.cos(A),Math.sin(A)]);if(z=P-O*n,O>0==(r?z>C:z<L)){var s=u._fullLayout,l=s[i.id];g.range[r]=z,g._rl[r]=z,i.updateRadialAxis(s,l),i.xaxis.setRange(),i.xaxis.setScale(),i.yaxis.setRange(),i.yaxis.setScale();var c=!1;for(var f in i.traceHash){var h=i.traceHash[f],p=o.filterVisible(h);h[0][0].trace._module.plot(u,i,p,l),a.traceIs(f,\"gl\")&&p.length&&(c=!0)}c&&(T(u),M(u))}else z=null}},B.updateAngularDrag=function(t){var e=this,r=e.gd,i=e.layers,u=e.radius,f=e.angularAxis,h=e.cx,p=e.cy,d=e.cxx,g=e.cyy,y=S.angularDragBoxSize,x=v.makeDragger(i,\"path\",\"angulardrag\",!1===t.dragmode?\"none\":\"move\"),b={element:x,gd:r};function _(t,e){return Math.atan2(g+y-e,t-d-y)}!1===t.dragmode?b.dragmode=!1:n.select(x).attr(\"d\",e.pathAnnulus(u,u+y)).attr(\"transform\",l(h,p)).call(k,\"move\");var A,E,C,L,P,O,I=i.frontplot.select(\".scatterlayer\").selectAll(\".trace\"),D=I.selectAll(\".point\"),z=I.selectAll(\".textpoint\");function R(u,v){var m=e.gd._fullLayout,y=m[e.id],x=_(A+u*t._invScaleX,E+v*t._invScaleY),b=F(x-O);if(L=C+b,i.frontplot.attr(\"transform\",l(e.xOffset2,e.yOffset2)+s([-b,d,g])),e.vangles){P=e.radialAxisAngle+b;var w=l(h,p)+s(-b),k=l(h,p)+s(-P);i.bg.attr(\"transform\",w),i[\"radial-grid\"].attr(\"transform\",w),i[\"radial-axis\"].attr(\"transform\",k),i[\"radial-line\"].select(\"line\").attr(\"transform\",k),e.updateRadialAxisTitle(m,y,P)}else e.clipPaths.forTraces.select(\"path\").attr(\"transform\",l(d,g)+s(b));D.each((function(){var t=n.select(this),e=c.getTranslate(t);t.attr(\"transform\",l(e.x,e.y)+s([b]))})),z.each((function(){var t=n.select(this),e=t.select(\"text\"),r=c.getTranslate(t);t.attr(\"transform\",s([b,e.attr(\"x\"),e.attr(\"y\")])+l(r.x,r.y))})),f.rotation=o.modHalf(L,360),e.updateAngularAxis(m,y),e._hasClipOnAxisFalse&&!o.isFullCircle(e.sectorInRad)&&I.call(c.hideOutsideRangePoints,e);var S=!1;for(var R in e.traceHash)if(a.traceIs(R,\"gl\")){var B=e.traceHash[R],j=o.filterVisible(B);B[0][0].trace._module.plot(r,e,j,y),j.length&&(S=!0)}S&&(T(r),M(r));var U={};N(U),r.emit(\"plotly_relayouting\",U)}function N(t){t[e.id+\".angularaxis.rotation\"]=L,e.vangles&&(t[e.id+\".radialaxis.angle\"]=P)}function B(){z.select(\"text\").attr(\"transform\",null);var t={};N(t),a.call(\"_guiRelayout\",r,t)}b.prepFn=function(n,i,a){var s=t[e.id];C=s.angularaxis.rotation;var l=x.getBoundingClientRect();A=i-l.left,E=a-l.top,r._fullLayout._calcInverseTransform(r);var u=o.apply3DTransform(t._invTransform)(A,E);A=u[0],E=u[1],O=_(A,E),b.moveFn=R,b.doneFn=B,w(r)},e.vangles&&!o.isFullCircle(e.sectorInRad)&&(b.prepFn=o.noop,k(n.select(x),null)),m.init(b)},B.isPtInside=function(t){if(this.isSmith)return!0;var e=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(t.theta),i=this.radialAxis,a=i.c2l(t.r),s=i._rl;return(r?E.isPtInsidePolygon:o.isPtInsideSector)(a,n,s,e,r)},B.pathArc=function(t){var e=this.sectorInRad,r=this.vangles;return(r?E.pathPolygon:o.pathArc)(t,e[0],e[1],r)},B.pathSector=function(t){var e=this.sectorInRad,r=this.vangles;return(r?E.pathPolygon:o.pathSector)(t,e[0],e[1],r)},B.pathAnnulus=function(t,e){var r=this.sectorInRad,n=this.vangles;return(n?E.pathPolygonAnnulus:o.pathAnnulus)(t,e,r[0],r[1],n)},B.pathSubplot=function(){var t=this.innerRadius,e=this.radius;return t?this.pathAnnulus(t,e):this.pathSector(e)},B.fillViewInitialKey=function(t,e){t in this.viewInitial||(this.viewInitial[t]=e)}},{\"../../components/color\":367,\"../../components/dragelement\":386,\"../../components/drawing\":389,\"../../components/fx\":407,\"../../components/selections\":455,\"../../components/titles\":476,\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/clear_gl_canvases\":499,\"../../lib/setcursor\":536,\"../../plot_api/subroutines\":556,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"../cartesian/autorange\":565,\"../cartesian/dragbox\":575,\"../cartesian/set_convert\":585,\"../plots\":628,\"../smith/helpers\":637,\"./constants\":629,\"./helpers\":630,\"./set_convert\":635,\"@plotly/d3\":58,tinycolor2:313}],635:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../cartesian/set_convert\"),a=n.deg2rad,o=n.rad2deg;function s(t,e){var r=t.type;if(\"linear\"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return\"degrees\"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return\"degrees\"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,u=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&\"linear\"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o<l;o++)a[o]=u(s[o])}else{var c=i+\"0\",f=\"d\"+i,h=c in e?u(e[c]):0,p=e[f]?u(e[f]):(t.period||2*Math.PI)/l;for(a=new Array(l),o=0;o<l;o++)a[o]=h+o*p}return a},t.setGeometry=function(){var i,s,l,u,c=e.sector,f=c.map(a),h={clockwise:-1,counterclockwise:1}[t.direction],p=a(t.rotation),d=function(t){return h*t+p},g=function(t){return(t-p)/h};switch(r){case\"linear\":s=i=n.identity,u=a,l=o,t.range=n.isFullCircle(f)?[c[0],c[0]+360]:f.map(g).map(o);break;case\"category\":var v=t._categories.length,m=t.period?Math.max(t.period,v):v;0===m&&(m=1),s=u=function(t){return 2*t*Math.PI/m},i=l=function(t){return t*m/Math.PI/2},t.range=[0,m]}t.c2g=function(t){return d(s(t))},t.g2c=function(t){return i(g(t))},t.t2g=function(t){return d(u(t))},t.g2t=function(t){return l(g(t))}}}e.exports=function(t,e,r){switch(i(t,r),t._id){case\"x\":case\"radialaxis\":!function(t,e){var r=e._subplot;t.setGeometry=function(){var e=t._rl[0],n=t._rl[1],i=r.innerRadius,a=(r.radius-i)/(n-e),o=i/a,s=e>n?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case\"angularaxis\":s(t,e)}}},{\"../../lib\":515,\"../cartesian/set_convert\":585}],636:[function(t,e,r){\"use strict\";e.exports={attr:\"subplot\",name:\"smith\",axisNames:[\"realaxis\",\"imaginaryaxis\"],axisName2dataArray:{imaginaryaxis:\"imag\",realaxis:\"real\"}}},{}],637:[function(t,e,r){\"use strict\";function n(t){return t<0?-1:t>0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],u=s[1],c=a(t,i([n,e])),f=c[0],h=c[1];if(0===e)return[\"M\"+l+\",\"+u,\"L\"+f+\",\"+h].join(\" \");var p=o(t,1/Math.abs(e));return[\"M\"+l+\",\"+u,\"A\"+p+\",\"+p+\" 0 0,\"+(e<0?1:0)+\" \"+f+\",\"+h].join(\" \")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),u=a(t,i([e,r])),c=u[0],f=u[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var g=a(t,i([e,0]));return[\"M\"+c+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(0<r?0:1)+\" \"+g[0]+\",\"+g[1],\"A\"+l+\",\"+l+\" 0 0,\"+(s<0?0:1)+p+\",\"+d].join(\" \")}return[\"M\"+c+\",\"+f,\"A\"+l+\",\"+l+\" 0 0,\"+(s<r?0:1)+\" \"+p+\",\"+d].join(\" \")},smithTransform:a}},{}],638:[function(t,e,r){\"use strict\";var n=t(\"../get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"../polar/polar\"),o=t(\"./constants\"),s=o.attr,l=o.name,u=i(l),c={};c[s]={valType:\"subplotid\",dflt:l,editType:\"calc\"},e.exports={attr:s,name:l,idRoot:l,idRegex:u,attrRegex:u,attributes:c,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],u=n(r,l,s),c=e[s]._subplot;c||(c=a(t,s,!0),e[s]._subplot=c),c.plot(u,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!e[o]&&s)for(var u in s.framework.remove(),s.clipPaths)s.clipPaths[u].remove()}},toSVG:t(\"../cartesian\").toSVG}},{\"../../lib\":515,\"../cartesian\":578,\"../get_data\":602,\"../polar/polar\":634,\"./constants\":636,\"./layout_attributes\":639,\"./layout_defaults\":640}],639:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../cartesian/layout_attributes\"),a=t(\"../domain\").attributes,o=t(\"../../lib\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},\"plot\",\"from-root\"),u=s({ticklen:i.ticklen,tickwidth:o({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,tickfont:i.tickfont,tickformat:i.tickformat,hoverformat:i.hoverformat,layer:i.layer},\"plot\",\"from-root\"),c=o({visible:o({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:\"data_array\",editType:\"plot\"},tickangle:o({},i.tickangle,{dflt:90}),ticks:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"\"],editType:\"ticks\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},editType:\"calc\"},l,u),f=o({visible:o({},i.visible,{dflt:!0}),tickvals:{valType:\"data_array\",editType:\"plot\"},ticks:i.ticks,editType:\"calc\"},l,u);e.exports={domain:a({name:\"smith\",editType:\"plot\"}),bgcolor:{valType:\"color\",editType:\"plot\",dflt:n.background},realaxis:c,imaginaryaxis:f,editType:\"calc\"}},{\"../../components/color/attributes\":366,\"../../lib\":515,\"../../plot_api/edit_types\":548,\"../cartesian/layout_attributes\":579,\"../domain\":593}],640:[function(t,e,r){\"use strict\";var n,i,a,o=t(\"../../lib\"),s=t(\"../../components/color\"),l=t(\"../../plot_api/plot_template\"),u=t(\"../subplot_defaults\"),c=t(\"../get_data\").getSubplotData,f=t(\"../cartesian/prefix_suffix_defaults\"),h=t(\"../cartesian/tick_label_defaults\"),p=t(\"../cartesian/line_grid_defaults\"),d=t(\"../cartesian/set_convert\"),g=t(\"./layout_attributes\"),v=t(\"./constants\"),m=v.axisNames,y=(n=function(t){return t.slice().reverse().map((function(t){return-t})).concat([0]).concat(t)},i=String,a={},function(t){var e=i?i(t):t;if(e in a)return a[e];var r=n(t);return a[e]=r,r});function x(t,e,r,n){var i=r(\"bgcolor\");n.bgColor=s.combine(i,n.paper_bgcolor);var a,u=c(n.fullData,v.name,n.id),x=n.layoutOut;function b(t,e){return r(a+\".\"+t,e)}for(var _=0;_<m.length;_++){a=m[_],o.isPlainObject(t[a])||(t[a]={});var w=t[a],k=l.newContainer(e,a);k._id=k._name=a,k._attr=n.id+\".\"+a,k._traceIndices=u.map((function(t){return t._expandedIndex}));var T=b(\"visible\");if(k.type=\"linear\",d(k,x),f(w,k,b,k.type),T){var M,A,S,E,C=\"realaxis\"===a;C&&b(\"side\"),C?b(\"tickvals\"):b(\"tickvals\",y(e.realaxis.tickvals||g.realaxis.tickvals.dflt));var L=n.font||{};T&&(A=(M=b(\"color\"))===w.color?M:L.color,S=L.size,E=L.family),h(w,k,b,k.type,{noTicklabelstep:!0,noAng:!C,noExp:!0,font:{color:A,size:S,family:E}}),o.coerce2(t,e,g,a+\".ticklen\"),o.coerce2(t,e,g,a+\".tickwidth\"),o.coerce2(t,e,g,a+\".tickcolor\",e.color),b(\"ticks\")||(delete e[a].ticklen,delete e[a].tickwidth,delete e[a].tickcolor),p(w,k,b,{dfltColor:M,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g[a]}),b(\"layer\")}b(\"hoverformat\"),delete k.type,k._input=w}}e.exports=function(t,e,r){u(t,e,r,{noUirevision:!0,type:v.name,attributes:g,handleDefaults:x,font:e.font,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},{\"../../components/color\":367,\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../cartesian/line_grid_defaults\":581,\"../cartesian/prefix_suffix_defaults\":583,\"../cartesian/set_convert\":585,\"../cartesian/tick_label_defaults\":587,\"../get_data\":602,\"../subplot_defaults\":641,\"./constants\":636,\"./layout_attributes\":639}],641:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_template\"),a=t(\"./domain\").defaults;e.exports=function(t,e,r,o){var s,l,u=o.type,c=o.attributes,f=o.handleDefaults,h=o.partition||\"x\",p=e._subplots[u],d=p.length,g=d&&p[0].replace(/\\d+$/,\"\");function v(t,e){return n.coerce(s,l,c,t,e)}for(var m=0;m<d;m++){var y=p[m];s=t[y]?t[y]:t[y]={},l=i.newContainer(e,y,g),o.noUirevision||v(\"uirevision\",e.uirevision);var x={};x[h]=[m/d,(m+1)/d],a(l,e,v,x),o.id=y,f(s,l,v,o)}}},{\"../lib\":515,\"../plot_api/plot_template\":555,\"./domain\":593}],642:[function(t,e,r){\"use strict\";var n=t(\"../constants/docs\");function i(t){var e=t.description?\" \"+t.description:\"\",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i<r.length;i++)n[i]=\"`\"+r[i]+\"`\";e+=\"Finally, the template string has access to \",e=1===r.length?\"variable \"+n[0]:\"variables \"+n.slice(0,-1).join(\", \")+\" and \"+n.slice(-1)+\".\"}return e}n.FORMAT_LINK,n.DATE_FORMAT_LINK,r.hovertemplateAttrs=function(t,e){t=t||{},i(e=e||{});var r={valType:\"string\",dflt:\"\",editType:t.editType||\"none\"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},r.texttemplateAttrs=function(t,e){t=t||{},i(e=e||{});var r={valType:\"string\",dflt:\"\",editType:t.editType||\"calc\"};return!1!==t.arrayOk&&(r.arrayOk=!0),r}},{\"../constants/docs\":486}],643:[function(t,e,r){\"use strict\";var n=t(\"./ternary\"),i=t(\"../../plots/get_data\").getSubplotCalcData,a=t(\"../../lib\").counterRegex,o=\"ternary\";r.name=o;var s=r.attr=\"subplot\";r.idRoot=o,r.idRegex=r.attrRegex=a(o),(r.attributes={})[s]={valType:\"subplotid\",dflt:\"ternary\",editType:\"calc\"},r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.plot=function(t){for(var e=t._fullLayout,r=t.calcdata,a=e._subplots.ternary,s=0;s<a.length;s++){var l=a[s],u=i(r,o,l),c=e[l]._subplot;c||(c=new n({id:l,graphDiv:t,container:e._ternarylayer.node()},e),e[l]._subplot=c),c.plot(u,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.ternary||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[\"a-title\"].remove(),s.layers[\"b-title\"].remove(),s.layers[\"c-title\"].remove())}}},{\"../../lib\":515,\"../../plots/get_data\":602,\"./layout_attributes\":644,\"./layout_defaults\":645,\"./ternary\":646}],644:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../domain\").attributes,a=t(\"../cartesian/layout_attributes\"),o=t(\"../../plot_api/edit_types\").overrideAll,s=t(\"../../lib/extend\").extendFlat,l={title:{text:a.title.text,font:a.title.font},color:a.color,tickmode:a.tickmode,nticks:s({},a.nticks,{dflt:6,min:1}),tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,ticklabelstep:a.ticklabelstep,showticklabels:a.showticklabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,minexponent:a.minexponent,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:s({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:s({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,griddash:a.griddash,layer:a.layer,min:{valType:\"number\",dflt:0,min:0},_deprecated:{title:a._deprecated.title,titlefont:a._deprecated.titlefont}},u=e.exports=o({domain:i({name:\"ternary\"}),bgcolor:{valType:\"color\",dflt:n.background},sum:{valType:\"number\",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},\"plot\",\"from-root\");u.uirevision={valType:\"any\",editType:\"none\"},u.aaxis.uirevision=u.baxis.uirevision=u.caxis.uirevision={valType:\"any\",editType:\"none\"}},{\"../../components/color/attributes\":366,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../cartesian/layout_attributes\":579,\"../domain\":593}],645:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../plot_api/plot_template\"),a=t(\"../../lib\"),o=t(\"../subplot_defaults\"),s=t(\"../cartesian/tick_label_defaults\"),l=t(\"../cartesian/prefix_suffix_defaults\"),u=t(\"../cartesian/tick_mark_defaults\"),c=t(\"../cartesian/tick_value_defaults\"),f=t(\"../cartesian/line_grid_defaults\"),h=t(\"./layout_attributes\"),p=[\"aaxis\",\"baxis\",\"caxis\"];function d(t,e,r,a){var o,s,l,u=r(\"bgcolor\"),c=r(\"sum\");a.bgColor=n.combine(u,a.paper_bgcolor);for(var f=0;f<p.length;f++)s=t[o=p[f]]||{},(l=i.newContainer(e,o))._name=o,g(s,l,a,e);var h=e.aaxis,d=e.baxis,v=e.caxis;h.min+d.min+v.min>=c&&(h.min=0,d.min=0,v.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function g(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o(\"uirevision\",n.uirevision),e.type=\"linear\";var p=o(\"color\"),d=p!==i.color.dflt?p:r.font.color,g=e._name.charAt(0).toUpperCase(),v=\"Component \"+g,m=o(\"title.text\",v);e._hovertitle=m===v?m:g,a.coerceFont(o,\"title.font\",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o(\"min\"),c(t,e,o,\"linear\"),l(t,e,o,\"linear\"),s(t,e,o,\"linear\"),u(t,e,o,{outerTicks:!0}),o(\"showticklabels\")&&(a.coerceFont(o,\"tickfont\",{family:r.font.family,size:r.font.size,color:d}),o(\"tickangle\"),o(\"tickformat\")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o(\"hoverformat\"),o(\"layer\")}e.exports=function(t,e,r){o(t,e,r,{type:\"ternary\",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{\"../../components/color\":367,\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../cartesian/line_grid_defaults\":581,\"../cartesian/prefix_suffix_defaults\":583,\"../cartesian/tick_label_defaults\":587,\"../cartesian/tick_mark_defaults\":588,\"../cartesian/tick_value_defaults\":589,\"../subplot_defaults\":641,\"./layout_attributes\":644}],646:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../lib\"),s=o.strTranslate,l=o._,u=t(\"../../components/color\"),c=t(\"../../components/drawing\"),f=t(\"../cartesian/set_convert\"),h=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),d=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),v=t(\"../../components/fx\"),m=t(\"../../components/dragelement/helpers\"),y=m.freeMode,x=m.rectMode,b=t(\"../../components/titles\"),_=t(\"../../components/selections\").prepSelect,w=t(\"../../components/selections\").selectOnClick,k=t(\"../../components/selections\").clearOutline,T=t(\"../../components/selections\").clearSelectionsCache,M=t(\"../cartesian/constants\");function A(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=A;var S=A.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r._hasClipOnAxisFalse=!1;for(var a=0;a<t.length;a++)if(!1===t[a][0].trace.cliponaxis){r._hasClipOnAxisFalse=!0;break}r.updateLayers(n),r.adjustLayout(n,i),p.generalUpdatePerTraceModule(r.graphDiv,r,t,n),r.layers.plotbg.select(\"path\").call(u.fill,n.bgcolor)},S.makeFramework=function(t){var e=this,r=e.graphDiv,n=t[e.id],i=e.clipId=\"clip\"+e.layoutId+e.id,a=e.clipIdRelative=\"clip-relative\"+e.layoutId+e.id;e.clipDef=o.ensureSingleById(t._clips,\"clipPath\",i,(function(t){t.append(\"path\").attr(\"d\",\"M0,0Z\")})),e.clipDefRelative=o.ensureSingleById(t._clips,\"clipPath\",a,(function(t){t.append(\"path\").attr(\"d\",\"M0,0Z\")})),e.plotContainer=o.ensureSingle(e.container,\"g\",e.id),e.updateLayers(n),c.setClipUrl(e.layers.backplot,i,r),c.setClipUrl(e.layers.grids,i,r)},S.updateLayers=function(t){var e=this.layers,r=[\"draglayer\",\"plotbg\",\"backplot\",\"grids\"];\"below traces\"===t.aaxis.layer&&r.push(\"aaxis\",\"aline\"),\"below traces\"===t.baxis.layer&&r.push(\"baxis\",\"bline\"),\"below traces\"===t.caxis.layer&&r.push(\"caxis\",\"cline\"),r.push(\"frontplot\"),\"above traces\"===t.aaxis.layer&&r.push(\"aaxis\",\"aline\"),\"above traces\"===t.baxis.layer&&r.push(\"baxis\",\"bline\"),\"above traces\"===t.caxis.layer&&r.push(\"caxis\",\"cline\");var i=this.plotContainer.selectAll(\"g.toplevel\").data(r,String),a=[\"agrid\",\"bgrid\",\"cgrid\"];i.enter().append(\"g\").attr(\"class\",(function(t){return\"toplevel \"+t})).each((function(t){var r=n.select(this);e[t]=r,\"frontplot\"===t?r.append(\"g\").classed(\"scatterlayer\",!0):\"backplot\"===t?r.append(\"g\").classed(\"maplayer\",!0):\"plotbg\"===t?r.append(\"path\").attr(\"d\",\"M0,0Z\"):\"aline\"===t||\"bline\"===t||\"cline\"===t?r.append(\"path\"):\"grids\"===t&&a.forEach((function(t){e[t]=r.append(\"g\").classed(\"grid \"+t,!0)}))})),i.order()};var E=Math.sqrt(4/3);S.adjustLayout=function(t,e){var r,n,i,a,o,l,p=this,d=t.domain,g=(d.x[0]+d.x[1])/2,v=(d.y[0]+d.y[1])/2,m=d.x[1]-d.x[0],y=d.y[1]-d.y[0],x=m*e.w,b=y*e.h,_=t.sum,w=t.aaxis.min,k=t.baxis.min,T=t.caxis.min;x>E*b?i=(a=b)*E:a=(i=x)/E,o=m*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-v)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:\"linear\",range:[w+2*T-_,_-w-2*k],domain:[g-o/2,g+o/2],_id:\"x\"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:\"linear\",range:[w,_-k-T],domain:[v-l/2,v+l/2],_id:\"y\"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var M=p.yaxis.domain[0],A=p.aaxis=h({},t.aaxis,{range:[w,_-k-T],side:\"left\",tickangle:(+t.aaxis.tickangle||0)-30,domain:[M,M+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(A,p.graphDiv._fullLayout),A.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-T,k],side:\"bottom\",domain:p.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var C=p.caxis=h({},t.caxis,{range:[_-w-k,T],side:\"right\",tickangle:(+t.caxis.tickangle||0)+30,domain:[M,M+l*E],anchor:\"free\",position:0,_id:\"y\",_length:i});f(C,p.graphDiv._fullLayout),C.setScale();var L=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDef.select(\"path\").attr(\"d\",L),p.layers.plotbg.select(\"path\").attr(\"d\",L);var P=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";p.clipDefRelative.select(\"path\").attr(\"d\",P);var O=s(r,n);p.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",O),p.clipDefRelative.select(\"path\").attr(\"transform\",null);var I=s(r-S._offset,n+a);p.layers.baxis.attr(\"transform\",I),p.layers.bgrid.attr(\"transform\",I);var D=s(r+i/2,n)+\"rotate(30)\"+s(0,-A._offset);p.layers.aaxis.attr(\"transform\",D),p.layers.agrid.attr(\"transform\",D);var z=s(r+i/2,n)+\"rotate(-30)\"+s(0,-C._offset);p.layers.caxis.attr(\"transform\",z),p.layers.cgrid.attr(\"transform\",z),p.drawAxes(!0),p.layers.aline.select(\"path\").attr(\"d\",A.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(u.stroke,A.linecolor||\"#000\").style(\"stroke-width\",(A.linewidth||0)+\"px\"),p.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(u.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),p.layers.cline.select(\"path\").attr(\"d\",C.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(u.stroke,C.linecolor||\"#000\").style(\"stroke-width\",(C.linewidth||0)+\"px\"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+\"title\",i=e.layers,a=e.aaxis,o=e.baxis,s=e.caxis;if(e.drawAx(a),e.drawAx(o),e.drawAx(s),t){var u=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+(\"outside\"===s.ticks?.87*s.ticklen:0)),c=(o.showticklabels?o.tickfont.size:0)+(\"outside\"===o.ticks?o.ticklen:0)+3;i[\"a-title\"]=b.draw(r,\"a\"+n,{propContainer:a,propName:e.id+\".aaxis.title\",placeholder:l(r,\"Click to enter Component A title\"),attributes:{x:e.x0+e.w/2,y:e.y0-a.title.font.size/3-u,\"text-anchor\":\"middle\"}}),i[\"b-title\"]=b.draw(r,\"b\"+n,{propContainer:o,propName:e.id+\".baxis.title\",placeholder:l(r,\"Click to enter Component B title\"),attributes:{x:e.x0-c,y:e.y0+e.h+.83*o.title.font.size+c,\"text-anchor\":\"middle\"}}),i[\"c-title\"]=b.draw(r,\"c\"+n,{propContainer:s,propName:e.id+\".caxis.title\",placeholder:l(r,\"Click to enter Component C title\"),attributes:{x:e.x0+e.w+c,y:e.y0+e.h+.83*s.title.font.size+c,\"text-anchor\":\"middle\"}})}},S.drawAx=function(t){var e,r=this,n=r.graphDiv,i=t._name,a=i.charAt(0),s=t._id,l=r.layers[i],u=a+\"tickLayout\",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);r[u]!==c&&(l.selectAll(\".\"+s+\"tick\").remove(),r[u]=c),t.setScale();var f=d.calcTicks(t),h=d.clipEnds(t,f),p=d.makeTransTickFn(t),g=d.getTickSigns(t)[2],v=o.deg2rad(30),m=g*(t.linewidth||1)/2,y=g*t.ticklen,x=r.w,b=r.h,_=\"b\"===a?\"M0,\"+m+\"l\"+Math.sin(v)*y+\",\"+Math.cos(v)*y:\"M\"+m+\",0l\"+Math.cos(v)*y+\",\"+-Math.sin(v)*y,w={a:\"M0,0l\"+b+\",-\"+x/2,b:\"M0,0l-\"+x/2+\",-\"+b,c:\"M0,0l-\"+b+\",\"+x/2}[a];d.drawTicks(n,t,{vals:\"inside\"===t.ticks?h:f,layer:l,path:_,transFn:p,crisp:!1}),d.drawGrid(n,t,{vals:h,layer:r.layers[a+\"grid\"],path:w,transFn:p,crisp:!1}),d.drawLabels(n,t,{vals:f,layer:l,transFn:p,labelFns:d.makeLabelFns(t,0,30)})};var C=M.MINZOOM/2+.87,L=\"m-0.87,.5h\"+C+\"v3h-\"+(C+5.2)+\"l\"+(C/2+2.6)+\",-\"+(.87*C+4.5)+\"l2.6,1.5l-\"+C/2+\",\"+.87*C+\"Z\",P=\"m0.87,.5h-\"+C+\"v3h\"+(C+5.2)+\"l-\"+(C/2+2.6)+\",-\"+(.87*C+4.5)+\"l-2.6,1.5l\"+C/2+\",\"+.87*C+\"Z\",O=\"m0,1l\"+C/2+\",\"+.87*C+\"l2.6,-1.5l-\"+(C/2+2.6)+\",-\"+(.87*C+4.5)+\"l-\"+(C/2+2.6)+\",\"+(.87*C+4.5)+\"l2.6,1.5l\"+C/2+\",-\"+.87*C+\"Z\",I=!0;function D(t){n.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}S.clearOutline=function(){T(this.dragOptions),k(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,m,b,k,T,A=this,S=A.layers.plotbg.select(\"path\").node(),C=A.graphDiv,z=C._fullLayout._zoomlayer;function R(t){var e={};return e[A.id+\".aaxis.min\"]=t.a,e[A.id+\".baxis.min\"]=t.b,e[A.id+\".caxis.min\"]=t.c,e}function F(t,e){var r=C._fullLayout.clickmode;D(C),2===t&&(C.emit(\"plotly_doubleclick\",null),a.call(\"_guiRelayout\",C,R({a:0,b:0,c:0}))),r.indexOf(\"select\")>-1&&1===t&&w(e,C,[A.xaxis],[A.yaxis],A.id,A.dragOptions),r.indexOf(\"event\")>-1&&v.click(C,e,A.id)}function N(t,e){return 1-e/A.h}function B(t,e){return 1-(t+(A.h-e)/Math.sqrt(3))/A.w}function j(t,e){return(t-(A.h-e)/Math.sqrt(3))/A.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,N(0,n),N(0,s))),u=Math.max(0,Math.min(1,B(r,n),B(o,s))),c=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+c)*A.w,v=(1-l/2-u)*A.w,y=(g+v)/2,x=v-g,_=(1-l)*A.h,w=_-x/E;x<M.MINZOOM?(p=f,k.attr(\"d\",m),T.attr(\"d\",\"M0,0Z\")):(p={a:f.a+l*h,b:f.b+u*h,c:f.c+c*h},k.attr(\"d\",m+\"M\"+g+\",\"+_+\"H\"+v+\"L\"+y+\",\"+w+\"L\"+g+\",\"+_+\"Z\"),T.attr(\"d\",\"M\"+r+\",\"+n+\"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM\"+g+\",\"+_+L+\"M\"+v+\",\"+_+P+\"M\"+y+\",\"+w+O)),b||(k.transition().style(\"fill\",d>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),T.transition().style(\"opacity\",1).duration(200),b=!0),C.emit(\"plotly_relayouting\",R(p))}function V(){D(C),p!==f&&(a.call(\"_guiRelayout\",C,R(p)),I&&C.data&&C._context.showTips&&(o.notifier(l(C,\"Double-click to zoom back out\"),\"long\"),I=!1))}function H(t,e){var r=t/A.xaxis._m,n=e/A.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),u=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[u]},e=(f.a-p.a)*A.yaxis._m,t=(f.c-p.c-f.b+p.b)*A.xaxis._m);var h=s(A.x0+t,A.y0+e);A.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",h);var d=s(-t,-e);A.clipDefRelative.select(\"path\").attr(\"transform\",d),A.aaxis.range=[p.a,A.sum-p.b-p.c],A.baxis.range=[A.sum-p.a-p.c,p.b],A.caxis.range=[A.sum-p.a-p.b,p.c],A.drawAxes(!1),A._hasClipOnAxisFalse&&A.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(c.hideOutsideRangePoints,A),C.emit(\"plotly_relayouting\",R(p))}function q(){a.call(\"_guiRelayout\",C,R(p))}this.dragOptions={element:S,gd:C,plotinfo:{id:A.id,domain:C._fullLayout[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis},subplot:A.id,prepFn:function(a,l,c){A.dragOptions.xaxes=[A.xaxis],A.dragOptions.yaxes=[A.yaxis],t=C._fullLayout._invScaleX,e=C._fullLayout._invScaleY;var g=A.dragOptions.dragmode=C._fullLayout.dragmode;y(g)?A.dragOptions.minDrag=1:A.dragOptions.minDrag=void 0,\"zoom\"===g?(A.dragOptions.moveFn=U,A.dragOptions.clickFn=F,A.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,C._fullLayout._calcInverseTransform(C);var c=C._fullLayout._invTransform,g=o.apply3DTransform(c)(r,n);r=g[0],n=g[1],f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,h=A.aaxis.range[1]-f.a,d=i(A.graphDiv._fullLayout[A.id].bgcolor).getLuminance(),m=\"M0,\"+A.h+\"L\"+A.w/2+\", 0L\"+A.w+\",\"+A.h+\"Z\",b=!1,k=z.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",s(A.x0,A.y0)).style({fill:d>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",m),T=z.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",s(A.x0,A.y0)).style({fill:u.background,stroke:u.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),A.clearOutline(C)}(0,l,c)):\"pan\"===g?(A.dragOptions.moveFn=H,A.dragOptions.clickFn=F,A.dragOptions.doneFn=q,f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,A.clearOutline(C)):(x(g)||y(g))&&_(a,l,c,A.dragOptions,g)}},S.onmousemove=function(t){v.hover(C,t,A.id),C._fullLayout._lasthover=S,C._fullLayout._hoversubplot=A.id},S.onmouseout=function(t){C._dragging||g.unhover(C,t)},g.init(this.dragOptions)}},{\"../../components/color\":367,\"../../components/dragelement\":386,\"../../components/dragelement/helpers\":385,\"../../components/drawing\":389,\"../../components/fx\":407,\"../../components/selections\":455,\"../../components/titles\":476,\"../../lib\":515,\"../../lib/extend\":505,\"../../registry\":647,\"../cartesian/axes\":566,\"../cartesian/constants\":573,\"../cartesian/set_convert\":585,\"../plots\":628,\"@plotly/d3\":58,tinycolor2:313}],647:[function(t,e,r){\"use strict\";var n=t(\"./lib/loggers\"),i=t(\"./lib/noop\"),a=t(\"./lib/push_unique\"),o=t(\"./lib/is_plain_object\"),s=t(\"./lib/dom\").addStyleRule,l=t(\"./lib/extend\"),u=t(\"./plots/attributes\"),c=t(\"./plots/layout_attributes\"),f=l.extendFlat,h=l.extendDeepAll;function p(t){var e=t.name,i=t.categories,a=t.meta;if(r.modules[e])n.log(\"Type \"+e+\" already registered\");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])n.log(\"Plot type \"+e+\" already registered.\");else for(var i in m(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l<i.length;l++)o[i[l]]=!0,r.allCategories[i[l]]=!0;for(var u in r.modules[e]={_module:t,categories:o},a&&Object.keys(a).length&&(r.modules[e].meta=a),r.allTypes.push(e),r.componentsRegistry)y(u,e);t.layoutAttributes&&f(r.traceLayoutAttributes,t.layoutAttributes);var c=t.basePlotModule,h=c.name;if(\"mapbox\"===h){var p=c.constants.styleRules;for(var d in p)s(\".js-plotly-plot .plotly .mapboxgl-\"+d,p[d])}\"geo\"!==h&&\"mapbox\"!==h||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function d(t){if(\"string\"!=typeof t.name)throw new Error(\"Component module *name* must be a string.\");var e=t.name;for(var n in r.componentsRegistry[e]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&a(r.layoutArrayContainers,e),m(t)),r.modules)y(e,n);for(var i in r.subplotsRegistry)b(e,i);for(var o in r.transformsRegistry)x(e,o);t.schema&&t.schema.layout&&h(c,t.schema.layout)}function g(t){if(\"string\"!=typeof t.name)throw new Error(\"Transform module *name* must be a string.\");var e=\"Transform module \"+t.name,i=\"function\"==typeof t.transform,a=\"function\"==typeof t.calcTransform;if(!i&&!a)throw new Error(e+\" is missing a *transform* or *calcTransform* method.\");for(var s in i&&a&&n.log([e+\" has both a *transform* and *calcTransform* methods.\",\"Please note that all *transform* methods are executed\",\"before all *calcTransform* methods.\"].join(\" \")),o(t.attributes)||n.log(e+\" registered without an *attributes* object.\"),\"function\"!=typeof t.supplyDefaults&&n.log(e+\" registered without a *supplyDefaults* method.\"),r.transformsRegistry[t.name]=t,r.componentsRegistry)x(s,t.name)}function v(t){var e=t.name,n=e.split(\"-\")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=r.localeRegistry,u=l[e];if(u||(l[e]=u={}),n!==e){var c=l[n];c||(l[n]=c={}),o&&c.dictionary===u.dictionary&&(c.dictionary=i),s&&c.format===u.format&&(c.format=a)}o&&(u.dictionary=i),s&&(u.format=a)}function m(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n<e.length;n++)a(r.layoutArrayRegexes,e[n])}}function y(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[e];i&&h(r.modules[e]._module.attributes,i)}}function x(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[e];i&&h(r.transformsRegistry[e].attributes,i)}}function b(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.subplots){var i=r.subplotsRegistry[e],a=i.layoutAttributes,o=\"subplot\"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&h(a,s)}}function _(t){return\"object\"==typeof t&&(t=t.type),t}r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.apiMethodRegistry={},r.collectableSubplotTypes=null,r.register=function(t){if(r.collectableSubplotTypes=null,!t)throw new Error(\"No argument passed to Plotly.register.\");t&&!Array.isArray(t)&&(t=[t]);for(var e=0;e<t.length;e++){var n=t[e];if(!n)throw new Error(\"Invalid module was attempted to be registered!\");switch(n.moduleType){case\"trace\":p(n);break;case\"transform\":g(n);break;case\"component\":d(n);break;case\"locale\":v(n);break;case\"apiMethod\":var i=n.name;r.apiMethodRegistry[i]=n.fn;break;default:throw new Error(\"Invalid module was attempted to be registered!\")}}},r.getModule=function(t){var e=r.modules[_(t)];return!!e&&e._module},r.traceIs=function(t,e){if(\"various\"===(t=_(t)))return!1;var i=r.modules[t];return i||(t&&n.log(\"Unrecognized trace type \"+t+\".\"),i=r.modules[u.type.dflt]),!!i.categories[e]},r.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},r.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},r.getComponentMethod=function(t,e){var n=r.componentsRegistry[t];return n&&n[e]||i},r.call=function(){var t=arguments[0],e=[].slice.call(arguments,1);return r.apiMethodRegistry[t].apply(null,e)}},{\"./lib/dom\":503,\"./lib/extend\":505,\"./lib/is_plain_object\":516,\"./lib/loggers\":519,\"./lib/noop\":524,\"./lib/push_unique\":530,\"./plots/attributes\":562,\"./plots/layout_attributes\":619}],648:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"../lib\"),a=i.extendFlat,o=i.extendDeep;function s(t){var e;switch(t){case\"themes__thumb\":e={autosize:!0,width:150,height:150,title:{text:\"\"},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case\"thumbnail\":e={title:{text:\"\"},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:\"\",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}e.exports=function(t,e){var r,i,l=t.data,u=t.layout,c=o([],l),f=o({},u,s(e.tileClass)),h=t._context||{};if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),\"thumbnail\"===e.tileClass||\"themes__thumb\"===e.tileClass){f.annotations=[];var p=Object.keys(f);for(r=0;r<p.length;r++)i=p[r],[\"xaxis\",\"yaxis\",\"zaxis\"].indexOf(i.slice(0,5))>-1&&(f[p[r]].title={text:\"\"});for(r=0;r<c.length;r++){var d=c[r];d.showscale=!1,d.marker&&(d.marker.showscale=!1),n.traceIs(d,\"pie-like\")&&(d.textposition=\"none\")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)f.annotations.push(e.annotations[r]);var g=Object.keys(f).filter((function(t){return t.match(/^scene\\d*$/)}));if(g.length){var v={};for(\"thumbnail\"===e.tileClass&&(v={title:{text:\"\"},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<g.length;r++){var m=f[g[r]];m.xaxis||(m.xaxis={}),m.yaxis||(m.yaxis={}),m.zaxis||(m.zaxis={}),a(m.xaxis,v),a(m.yaxis,v),a(m.zaxis,v),m._scene=null}}var y=document.createElement(\"div\");e.tileClass&&(y.className=e.tileClass);var x={gd:y,td:y,layout:f,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:h.mapboxAccessToken}};return\"transparent\"!==e.setBackground&&(x.config.setBackground=e.setBackground||\"opaque\"),x.gd.defaultLayout=s(e.tileClass),x}},{\"../lib\":515,\"../registry\":647}],649:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/to_image\"),a=t(\"./filesaver\"),o=t(\"./helpers\");e.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||\"png\",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error(\"Snapshotting already in progress.\")),n.isIE()&&\"svg\"!==e.format&&l(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var u=i(t,e),c=e.filename||t.fn||\"newplot\";c+=\".\"+e.format.replace(\"-\",\".\"),u.then((function(t){return r&&(r._snapshotInProgress=!1),a(t,c,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},{\"../lib\":515,\"../plot_api/to_image\":558,\"./filesaver\":650,\"./helpers\":651}],650:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"./helpers\");e.exports=function(t,e,r){var a=document.createElement(\"a\"),o=\"download\"in a;return new Promise((function(s,l){var u,c;if(n.isIE())return u=i.createBlob(t,\"svg\"),window.navigator.msSaveBlob(u,e),u=null,s(e);if(o)return u=i.createBlob(t,r),c=i.createObjectURL(u),a.href=c,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),i.revokeObjectURL(c),u=null,s(e);if(n.isSafari()){var f=\"svg\"===r?\",\":\";base64,\";return i.octetStream(f+encodeURIComponent(t)),s(e)}l(new Error(\"download error\"))}))}},{\"../lib\":515,\"./helpers\":651}],651:[function(t,e,r){\"use strict\";var n=t(\"../registry\");r.getDelay=function(t){return t._has&&(t._has(\"gl3d\")||t._has(\"gl2d\")||t._has(\"mapbox\"))?500:0},r.getRedrawFunc=function(t){return function(){n.getComponentMethod(\"colorbar\",\"draw\")(t)}},r.encodeSVG=function(t){return\"data:image/svg+xml,\"+encodeURIComponent(t)},r.encodeJSON=function(t){return\"data:application/json,\"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;r.createObjectURL=function(t){return i.createObjectURL(t)},r.revokeObjectURL=function(t){return i.revokeObjectURL(t)},r.createBlob=function(t,e){if(\"svg\"===e)return new window.Blob([t],{type:\"image/svg+xml;charset=utf-8\"});if(\"full-json\"===e)return new window.Blob([t],{type:\"application/json;charset=utf-8\"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i<e;i++)n[i]=t.charCodeAt(i);return r}(window.atob(t));return new window.Blob([r],{type:\"image/\"+e})},r.octetStream=function(t){document.location.href=\"data:application/octet-stream\"+t},r.IMAGE_URL_PREFIX=/^data:image\\/\\w+;base64,/,r.MSG_IE_BAD_FORMAT=\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\"},{\"../registry\":647}],652:[function(t,e,r){\"use strict\";var n=t(\"./helpers\"),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:t(\"./cloneplot\"),toSVG:t(\"./tosvg\"),svgToImg:t(\"./svgtoimg\"),toImage:t(\"./toimage\"),downloadImage:t(\"./download\")};e.exports=i},{\"./cloneplot\":648,\"./download\":649,\"./helpers\":651,\"./svgtoimg\":653,\"./toimage\":654,\"./tosvg\":655}],653:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"events\").EventEmitter,a=t(\"./helpers\");e.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,o){var s=window.Image,l=t.svg,u=t.format||\"png\";if(n.isIE()&&\"svg\"!==u){var c=new Error(a.MSG_IE_BAD_FORMAT);return o(c),t.promise?r:e.emit(\"error\",c)}var f,h,p=t.canvas,d=t.scale||1,g=t.width||300,v=t.height||150,m=d*g,y=d*v,x=p.getContext(\"2d\",{willReadFrequently:!0}),b=new s;\"svg\"===u||n.isSafari()?h=a.encodeSVG(l):(f=a.createBlob(l,\"svg\"),h=a.createObjectURL(f)),p.width=m,p.height=y,b.onload=function(){var r;switch(f=null,a.revokeObjectURL(h),\"svg\"!==u&&x.drawImage(b,0,0,m,y),u){case\"jpeg\":r=p.toDataURL(\"image/jpeg\");break;case\"png\":r=p.toDataURL(\"image/png\");break;case\"webp\":r=p.toDataURL(\"image/webp\");break;case\"svg\":r=h;break;default:var n=\"Image format is not jpeg, png, svg or webp.\";if(o(new Error(n)),!t.promise)return e.emit(\"error\",n)}i(r),t.promise||e.emit(\"success\",r)},b.onerror=function(r){if(f=null,a.revokeObjectURL(h),o(r),!t.promise)return e.emit(\"error\",r)},b.src=h}));return t.promise?r:e}},{\"../lib\":515,\"./helpers\":651,events:84}],654:[function(t,e,r){\"use strict\";var n=t(\"events\").EventEmitter,i=t(\"../registry\"),a=t(\"../lib\"),o=t(\"./helpers\"),s=t(\"./cloneplot\"),l=t(\"./tosvg\"),u=t(\"./svgtoimg\");e.exports=function(t,e){var r=new n,c=s(t,{format:\"png\"}),f=c.gd;f.style.position=\"absolute\",f.style.left=\"-5000px\",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.call(\"_doPlot\",f,c.data,c.layout,c.config).then(h).then((function(){var t=o.getDelay(f._fullLayout);setTimeout((function(){var t=l(f),n=document.createElement(\"canvas\");n.id=a.randstr(),(r=u({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}}),t)})).catch((function(t){r.emit(\"error\",t)})),r}},{\"../lib\":515,\"../registry\":647,\"./cloneplot\":648,\"./helpers\":651,\"./svgtoimg\":653,\"./tosvg\":655,events:84}],655:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../lib\"),a=t(\"../components/drawing\"),o=t(\"../components/color\"),s=t(\"../constants/xmlns_namespaces\"),l=/\"/g,u=\"TOBESTRIPPED\",c=new RegExp('(\"TOBESTRIPPED)|(TOBESTRIPPED\")',\"g\");e.exports=function(t,e,r){var f,h=t._fullLayout,p=h._paper,d=h._toppaper,g=h.width,v=h.height;p.insert(\"rect\",\":first-child\").call(a.setRect,0,0,g,v).call(o.fill,h.paper_bgcolor);var m=h._basePlotModules||[];for(f=0;f<m.length;f++){var y=m[f];y.toSVG&&y.toSVG(t)}if(d){var x=d.node().childNodes,b=Array.prototype.slice.call(x);for(f=0;f<b.length;f++){var _=b[f];_.childNodes.length&&p.node().appendChild(_)}}h._draggers&&h._draggers.remove(),p.node().style.background=\"\",p.selectAll(\"text\").attr({\"data-unformatted\":null,\"data-math\":null}).each((function(){var t=n.select(this);if(\"hidden\"!==this.style.visibility&&\"none\"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('\"')&&t.style(\"font-family\",e.replace(l,u))}else t.remove()})),p.selectAll(\".gradient_filled,.pattern_filled\").each((function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf(\"url(\")&&t.style(\"fill\",e.replace(l,u));var r=this.style.stroke;r&&-1!==r.indexOf(\"url(\")&&t.style(\"stroke\",r.replace(l,u))})),\"pdf\"!==e&&\"eps\"!==e||p.selectAll(\"#MathJax_SVG_glyphs path\").attr(\"stroke-width\",0),p.node().setAttributeNS(s.xmlns,\"xmlns\",s.svg),p.node().setAttributeNS(s.xmlns,\"xmlns:xlink\",s.xlink),\"svg\"===e&&r&&(p.attr(\"width\",r*g),p.attr(\"height\",r*v),p.attr(\"viewBox\",\"0 0 \"+g+\" \"+v));var w,k=(new window.XMLSerializer).serializeToString(p.node());return k=(w=k=function(t){var e=n.select(\"body\").append(\"div\").style({display:\"none\"}).html(\"\"),r=t.replace(/(&[^;]*;)/gi,(function(t){return\"&lt;\"===t?\"&#60;\":\"&rt;\"===t?\"&#62;\":-1!==t.indexOf(\"<\")||-1!==t.indexOf(\">\")?\"\":e.html(t).text()}));return e.remove(),r}(k),k=w.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&amp;\")).replace(c,\"'\"),i.isIE()&&(k=(k=(k=k.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),k}},{\"../components/color\":367,\"../components/drawing\":389,\"../constants/xmlns_namespaces\":492,\"../lib\":515,\"@plotly/d3\":58}],656:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,\"tx\"),n.mergeArray(e.hovertext,t,\"htx\");var i=e.marker;if(i){n.mergeArray(i.opacity,t,\"mo\",!0),n.mergeArray(i.color,t,\"mc\");var a=i.line;a&&(n.mergeArray(a.color,t,\"mlc\"),n.mergeArrayCastPositive(a.width,t,\"mlw\"))}}},{\"../../lib\":515}],657:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../plots/font_attributes\"),u=t(\"./constants\"),c=t(\"../../components/drawing/attributes\").pattern,f=t(\"../../lib/extend\").extendFlat,h=l({editType:\"calc\",arrayOk:!0,colorEditType:\"style\"}),p=f({},n.marker.line.width,{dflt:0}),d=f({width:p,editType:\"calc\"},s(\"marker.line\")),g=f({line:d,editType:\"calc\"},s(\"marker\"),{opacity:{valType:\"number\",arrayOk:!0,dflt:1,min:0,max:1,editType:\"style\"},pattern:c});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),text:n.text,texttemplate:o({editType:\"plot\"},{keys:u.eventDataKeys}),hovertext:n.hovertext,hovertemplate:a({},{keys:u.eventDataKeys}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"calc\"},insidetextanchor:{valType:\"enumerated\",values:[\"end\",\"middle\",\"start\"],dflt:\"end\",editType:\"plot\"},textangle:{valType:\"angle\",dflt:\"auto\",editType:\"plot\"},textfont:f({},h,{}),insidetextfont:f({},h,{}),outsidetextfont:f({},h,{}),constraintext:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"both\",\"none\"],dflt:\"both\",editType:\"calc\"},cliponaxis:f({},n.cliponaxis,{}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},base:{valType:\"any\",dflt:null,arrayOk:!0,editType:\"calc\"},offset:{valType:\"number\",dflt:null,arrayOk:!0,editType:\"calc\"},width:{valType:\"number\",dflt:null,min:0,arrayOk:!0,editType:\"calc\"},marker:g,offsetgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},alignmentgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:\"style\"},textfont:n.selected.textfont,editType:\"style\"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:\"style\"},textfont:n.unselected.textfont,editType:\"style\"},_deprecated:{bardir:{valType:\"enumerated\",editType:\"calc\",values:[\"v\",\"h\"]}}}},{\"../../components/colorscale/attributes\":374,\"../../components/drawing/attributes\":388,\"../../lib/extend\":505,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/font_attributes\":594,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936,\"./constants\":659}],658:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../plots/cartesian/align_period\"),a=t(\"../../components/colorscale/helpers\").hasColorscale,o=t(\"../../components/colorscale/calc\"),s=t(\"./arrays_to_calcdata\"),l=t(\"../scatter/calc_selection\");e.exports=function(t,e){var r,u,c,f,h,p,d=n.getFromId(t,e.xaxis||\"x\"),g=n.getFromId(t,e.yaxis||\"y\"),v={msUTC:!(!e.base&&0!==e.base)};\"h\"===e.orientation?(r=d.makeCalcdata(e,\"x\",v),c=g.makeCalcdata(e,\"y\"),f=i(e,g,\"y\",c),h=!!e.yperiodalignment,p=\"y\"):(r=g.makeCalcdata(e,\"y\",v),c=d.makeCalcdata(e,\"x\"),f=i(e,d,\"x\",c),h=!!e.xperiodalignment,p=\"x\"),u=f.vals;for(var m=Math.min(u.length,r.length),y=new Array(m),x=0;x<m;x++)y[x]={p:u[x],s:r[x]},h&&(y[x].orig_p=c[x],y[x][p+\"End\"]=f.ends[x],y[x][p+\"Start\"]=f.starts[x]),e.ids&&(y[x].id=String(e.ids[x]));return a(e,\"marker\")&&o(t,e,{vals:e.marker.color,containerStr:\"marker\",cLetter:\"c\"}),a(e,\"marker.line\")&&o(t,e,{vals:e.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),s(y,e),l(y,e),y}},{\"../../components/colorscale/calc\":375,\"../../components/colorscale/helpers\":378,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566,\"../scatter/calc_selection\":938,\"./arrays_to_calcdata\":656}],659:[function(t,e,r){\"use strict\";e.exports={TEXTPAD:3,eventDataKeys:[\"value\",\"label\"]}},{}],660:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\").isArrayOrTypedArray,a=t(\"../../constants/numerical\").BADNUM,o=t(\"../../registry\"),s=t(\"../../plots/cartesian/axes\"),l=t(\"../../plots/cartesian/constraints\").getAxisGroup,u=t(\"./sieve.js\");function c(t,e,r,o,c){if(o.length){var b,_,w,k;switch(function(t,e){var r,a;for(r=0;r<e.length;r++){var o,s=e[r],l=s[0].trace,u=\"funnel\"===l.type?l._base:l.base,c=\"h\"===l.orientation?l.xcalendar:l.ycalendar,f=\"category\"===t.type||\"multicategory\"===t.type?function(){return null}:t.d2c;if(i(u)){for(a=0;a<Math.min(u.length,s.length);a++)o=f(u[a],0,c),n(o)?(s[a].b=+o,s[a].hasB=1):s[a].b=0;for(;a<s.length;a++)s[a].b=0}else{o=f(u,0,c);var h=n(o);for(o=h?o:0,a=0;a<s.length;a++)s[a].b=o,h&&(s[a].hasB=1)}}}(r,o),c.mode){case\"overlay\":f(e,r,o,c);break;case\"group\":for(b=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.offset?_.push(k):b.push(k);_.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});(function(t,e,r,n){for(var i=t._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,u=r.traces,c=u.length,f=a.length!==o.length,h=s*(1-n.gap),v=l(i,e._id)+u[0][0].trace.orientation,m=i._alignmentOpts[v]||{},y=0;y<c;y++){var x,b,_=u[y],w=_[0].trace,k=m[w.alignmentgroup]||{},T=Object.keys(k.offsetGroups||{}).length,M=(x=T?h/T:f?h/c:h)*(1-(n.groupgap||0));b=T?((2*w._offsetIndex+1-T)*x-M)/2:f?((2*y+1-c)*x-M)/2:-M/2;var A=_[0].t;A.barwidth=M,A.poffset=b,A.bargroupwidth=h,A.bardelta=s}r.binWidth=u[0][0].t.barwidth/100,p(r),d(e,r),g(e,r,f)})(t,e,o,i),function(t,e){for(var r=t.traces,n=0;n<r.length;n++){var i=r[n];if(void 0===i[0].trace.base)for(var o=new u([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<i.length;s++){var l=i[s];if(l.p!==a){var c=o.put(l.p,l.b+l.s);c&&(l.b=c)}}}}(o,e),i.norm?(m(o),y(r,o,i)):v(r,o)}(t,e,r,_,c),b.length&&f(e,r,b,c);break;case\"stack\":case\"relative\":for(b=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.base?_.push(k):b.push(k);_.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:\"relative\"===i.mode,overlapNoMerge:!(i.norm||\"stack\"===i.mode||\"relative\"===i.mode)});h(e,o,i),function(t,e,r){var n,i,o,l,u,c,f=x(t),h=e.traces;for(l=0;l<h.length;l++)if(\"funnel\"===(i=(n=h[l])[0].trace).type)for(u=0;u<n.length;u++)(c=n[u]).s!==a&&e.put(c.p,-.5*c.s);for(l=0;l<h.length;l++){o=\"funnel\"===(i=(n=h[l])[0].trace).type;var p=[];for(u=0;u<n.length;u++)if((c=n[u]).s!==a){var d;d=o?c.s:c.s+c.b;var g=e.put(c.p,d),v=g+d;c.b=g,c[f]=v,r.norm||(p.push(v),c.hasB&&p.push(g))}r.norm||(i._extremes[t._id]=s.findExtremes(t,p,{tozero:!0,padded:!0}))}}(r,o,i);for(var l=0;l<n.length;l++)for(var c=n[l],f=0;f<c.length;f++){var p=c[f];p.s!==a&&p.b+p.s===o.get(p.p,p.s)&&(p._outmost=!0)}i.norm&&y(r,o,i)}(0,e,r,_,c),b.length&&f(e,r,b,c)}!function(t,e){var r,i,a,o=x(e),s={},l=1/0,u=-1/0;for(r=0;r<t.length;r++)for(a=t[r],i=0;i<a.length;i++){var c=a[i].p;n(c)&&(l=Math.min(l,c),u=Math.max(u,c))}var f=1e4/(u-l),h=s.round=function(t){return String(Math.round(f*(t-l)))};for(r=0;r<t.length;r++){(a=t[r])[0].t.extents=s;var p=a[0].t.poffset,d=Array.isArray(p);for(i=0;i<a.length;i++){var g=a[i],v=g[o]-g.w/2;if(n(v)){var m=g[o]+g.w/2,y=h(g.p);s[y]?s[y]=[Math.min(v,s[y][0]),Math.max(m,s[y][1])]:s[y]=[v,m]}g.p0=g.p+(d?p[i]:p),g.p1=g.p0+g.w,g.s0=g.b,g.s1=g.s0+g.s}}}(o,e)}}function f(t,e,r,n){for(var i=0;i<r.length;i++){var a=r[i],o=new u([a],{posAxis:t,sepNegVal:!1,overlapNoMerge:!n.norm});h(t,o,n),n.norm?(m(o),y(e,o,n)):v(e,o)}}function h(t,e,r){for(var n=e.minDiff,i=e.traces,a=n*(1-r.gap),o=a*(1-(r.groupgap||0)),s=-o/2,l=0;l<i.length;l++){var u=i[l][0].t;u.barwidth=o,u.poffset=s,u.bargroupwidth=a,u.bardelta=n}e.binWidth=i[0][0].t.barwidth/100,p(e),d(t,e),g(t,e)}function p(t){var e,r,a=t.traces;for(e=0;e<a.length;e++){var o,s=a[e],l=s[0],u=l.trace,c=l.t,f=u._offset||u.offset,h=c.poffset;if(i(f)){for(o=Array.prototype.slice.call(f,0,s.length),r=0;r<o.length;r++)n(o[r])||(o[r]=h);for(r=o.length;r<s.length;r++)o.push(h);c.poffset=o}else void 0!==f&&(c.poffset=f);var p=u._width||u.width,d=c.barwidth;if(i(p)){var g=Array.prototype.slice.call(p,0,s.length);for(r=0;r<g.length;r++)n(g[r])||(g[r]=d);for(r=g.length;r<s.length;r++)g.push(d);if(c.barwidth=g,void 0===f){for(o=[],r=0;r<s.length;r++)o.push(h+(d-g[r])/2);c.poffset=o}}else void 0!==p&&(c.barwidth=p,void 0===f&&(c.poffset=h+(d-p)/2))}}function d(t,e){for(var r=e.traces,n=x(t),i=0;i<r.length;i++)for(var a=r[i],o=a[0].t,s=o.poffset,l=Array.isArray(s),u=o.barwidth,c=Array.isArray(u),f=0;f<a.length;f++){var h=a[f],p=h.w=c?u[f]:u;h[n]=h.p+(l?s[f]:s)+p/2}}function g(t,e,r){var n=e.traces,i=e.minDiff/2;s.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var a=0;a<n.length;a++){var o,l,u,c,f=n[a],h=f[0],p=h.trace,d=[];for(c=0;c<f.length;c++)l=(o=f[c]).p-i,u=o.p+i,d.push(l,u);if(p.width||p.offset){var g=h.t,v=g.poffset,m=g.barwidth,y=Array.isArray(v),x=Array.isArray(m);for(c=0;c<f.length;c++){o=f[c];var b=y?v[c]:v,_=x?m[c]:m;u=(l=o.p+b)+_,d.push(l,u)}}p._extremes[t._id]=s.findExtremes(t,d,{padded:!1})}}function v(t,e){for(var r=e.traces,n=x(t),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,l=[],u=!1,c=0;c<a.length;c++){var f=a[c],h=f.b,p=h+f.s;f[n]=p,l.push(p),f.hasB&&l.push(h),f.hasB&&f.b||(u=!0)}o._extremes[t._id]=s.findExtremes(t,l,{tozero:u,padded:!0})}}function m(t){for(var e=t.traces,r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var o=n[i];o.s!==a&&t.put(o.p,o.b+o.s)}}function y(t,e,r){var i=e.traces,o=x(t),l=\"fraction\"===r.norm?1:100,u=l/1e9,c=t.l2c(t.c2l(0)),f=\"stack\"===r.mode?l:c;function h(e){return n(t.c2l(e))&&(e<c-u||e>f+u||!n(c))}for(var p=0;p<i.length;p++){for(var d=i[p],g=d[0].trace,v=[],m=!1,y=!1,b=0;b<d.length;b++){var _=d[b];if(_.s!==a){var w=Math.abs(l/e.get(_.p,_.s));_.b*=w,_.s*=w;var k=_.b,T=k+_.s;_[o]=T,v.push(T),y=y||h(T),_.hasB&&(v.push(k),y=y||h(k)),_.hasB&&_.b||(m=!0)}}g._extremes[t._id]=s.findExtremes(t,v,{tozero:m,padded:y})}}function x(t){return t._id.charAt(0)}e.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,i=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],u=[],f=0;f<a.length;f++){var h=a[f];if(!0===h.visible&&o.traceIs(h,\"bar\")&&h.xaxis===r._id&&h.yaxis===n._id&&(\"h\"===h.orientation?l.push(s[f]):u.push(s[f]),h._computePh))for(var p=t.calcdata[f],d=0;d<p.length;d++)\"function\"==typeof p[d].ph0&&(p[d].ph0=p[d].ph0()),\"function\"==typeof p[d].ph1&&(p[d].ph1=p[d].ph1())}var g={xCat:\"category\"===r.type||\"multicategory\"===r.type,yCat:\"category\"===n.type||\"multicategory\"===n.type,mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};c(t,r,n,u,g),c(t,n,r,l,g)},setGroupPositions:c}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../../plots/cartesian/constraints\":574,\"../../registry\":647,\"./sieve.js\":670,\"fast-isnumeric\":190}],661:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../registry\"),o=t(\"../scatter/xy_defaults\"),s=t(\"../scatter/period_defaults\"),l=t(\"./style_defaults\"),u=t(\"../../plots/cartesian/constraints\").getAxisGroup,c=t(\"./attributes\"),f=n.coerceFont;function h(t,e,r,n){var i=e.orientation,a=e[{v:\"x\",h:\"y\"}[i]+\"axis\"],o=u(r,a)+i,s=r._alignmentOpts||{},l=n(\"alignmentgroup\"),c=s[o];c||(c=s[o]={});var f=c[l];f?f.traces.push(e):f=c[l]={traces:[e],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var h=n(\"offsetgroup\"),p=f.offsetGroups,d=p[h];h&&(d||(d=p[h]={offsetIndex:Object.keys(p).length}),e._offsetIndex=d.offsetIndex)}function p(t,e,r,i,a,o){var s=!(!1===(o=o||{}).moduleHasSelected),l=!(!1===o.moduleHasUnselected),u=!(!1===o.moduleHasConstrain),c=!(!1===o.moduleHasCliponaxis),h=!(!1===o.moduleHasTextangle),p=!(!1===o.moduleHasInsideanchor),d=!!o.hasPathbar,g=Array.isArray(a)||\"auto\"===a,v=g||\"inside\"===a,m=g||\"outside\"===a;if(v||m){var y=f(i,\"textfont\",r.font),x=n.extendFlat({},y),b=!(t.textfont&&t.textfont.color);if(b&&delete x.color,f(i,\"insidetextfont\",x),d){var _=n.extendFlat({},y);b&&delete _.color,f(i,\"pathbar.textfont\",_)}m&&f(i,\"outsidetextfont\",y),s&&i(\"selected.textfont.color\"),l&&i(\"unselected.textfont.color\"),u&&i(\"constraintext\"),c&&i(\"cliponaxis\"),h&&i(\"textangle\"),i(\"texttemplate\")}v&&p&&i(\"insidetextanchor\")}e.exports={supplyDefaults:function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}if(o(t,e,u,f)){s(t,e,u,f),f(\"xhoverformat\"),f(\"yhoverformat\"),f(\"orientation\",e.x&&!e.y?\"h\":\"v\"),f(\"base\"),f(\"offset\"),f(\"width\"),f(\"text\"),f(\"hovertext\"),f(\"hovertemplate\");var h=f(\"textposition\");p(t,0,u,f,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(t,e,f,r,u);var d=(e.marker.line||{}).color,g=a.getComponentMethod(\"errorbars\",\"supplyDefaults\");g(t,e,d||i.defaultLine,{axis:\"y\"}),g(t,e,d||i.defaultLine,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1},crossTraceDefaults:function(t,e){var r;function i(t){return n.coerce(r._input,r,c,t)}if(\"group\"===e.barmode)for(var a=0;a<t.length;a++)\"bar\"===(r=t[a]).type&&h(r._input,r,e,i)},handleGroupingDefaults:h,handleText:p}},{\"../../components/color\":367,\"../../lib\":515,\"../../plots/cartesian/constraints\":574,\"../../registry\":647,\"../scatter/period_defaults\":956,\"../scatter/xy_defaults\":963,\"./attributes\":657,\"./style_defaults\":672}],662:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return t.x=\"xVal\"in e?e.xVal:e.x,t.y=\"yVal\"in e?e.yVal:e.y,e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),\"h\"===r.orientation?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}},{}],663:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../lib\").isArrayOrTypedArray;r.coerceString=function(t,e,r){if(\"string\"==typeof e){if(e||!t.noBlank)return e}else if((\"number\"==typeof e||!0===e)&&!t.strict)return String(e);return void 0!==r?r:t.dflt},r.coerceNumber=function(t,e,r){if(n(e)){e=+e;var i=t.min,a=t.max;if(!(void 0!==i&&e<i||void 0!==a&&e>a))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r},r.getLineWidth=function(t,e){return 0<e.mlw?e.mlw:a(t.marker.line.width)?0:t.marker.line.width}},{\"../../lib\":515,\"fast-isnumeric\":190,tinycolor2:313}],664:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../registry\"),a=t(\"../../components/color\"),o=t(\"../../lib\").fillText,s=t(\"./helpers\").getLineWidth,l=t(\"../../plots/cartesian/axes\").hoverLabelText,u=t(\"../../constants/numerical\").BADNUM;function c(t,e,r,i,a){var s,c,f,h,p,d,g,v=t.cd,m=v[0].trace,y=v[0].t,x=\"closest\"===i,b=\"waterfall\"===m.type,_=t.maxHoverDistance,w=t.maxSpikeDistance;\"h\"===m.orientation?(s=r,c=e,f=\"y\",h=\"x\",p=D,d=O):(s=e,c=r,f=\"x\",h=\"y\",d=D,p=O);var k=m[f+\"period\"],T=x||k;function M(t){return S(t,-1)}function A(t){return S(t,1)}function S(t,e){var r=t.w;return t[f]+e*r/2}function E(t){return t[f+\"End\"]-t[f+\"Start\"]}var C=x?M:k?function(t){return t.p-E(t)/2}:function(t){return Math.min(M(t),t.p-y.bardelta/2)},L=x?A:k?function(t){return t.p+E(t)/2}:function(t){return Math.max(A(t),t.p+y.bardelta/2)};function P(t,e,r){return a.finiteRange&&(r=0),n.inbox(t-s,e-s,r+Math.min(1,Math.abs(e-t)/g)-1)}function O(t){return P(C(t),L(t),_)}function I(t){var e=t[h];if(b){var r=Math.abs(t.rawS)||0;c>0?e+=r:c<0&&(e-=r)}return e}function D(t){var e=c,r=t.b,i=I(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var z=t[f+\"a\"],R=t[h+\"a\"];g=Math.abs(z.r2c(z.range[1])-z.r2c(z.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(v,F,t),!1!==t.index&&v[t.index].p!==u){T||(C=function(t){return Math.min(M(t),t.p-y.bargroupwidth/2)},L=function(t){return Math.max(A(t),t.p+y.bargroupwidth/2)});var N=v[t.index],B=m.base?N.b+N.s:N.s;t[h+\"0\"]=t[h+\"1\"]=R.c2p(N[h],!0),t[h+\"LabelVal\"]=B;var j=y.extents[y.extents.round(N.p)];t[f+\"0\"]=z.c2p(x?C(N):j[0],!0),t[f+\"1\"]=z.c2p(x?L(N):j[1],!0);var U=void 0!==N.orig_p;return t[f+\"LabelVal\"]=U?N.orig_p:N.p,t.labelLabel=l(z,t[f+\"LabelVal\"],m[f+\"hoverformat\"]),t.valueLabel=l(R,t[h+\"LabelVal\"],m[h+\"hoverformat\"]),t.baseLabel=l(R,N.b,m[h+\"hoverformat\"]),t.spikeDistance=(function(t){var e=c,r=t.b,i=I(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(N)+function(t){return P(M(t),A(t),w)}(N))/2,t[f+\"Spike\"]=z.c2p(N.p,!0),o(N,m,t),t.hovertemplate=m.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=c(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,u=s[o.index];return o.color=f(l,u),i.getComponentMethod(\"errorbars\",\"hoverInfo\")(u,l,o),[o]}},hoverOnBars:c,getTraceColor:f}},{\"../../components/color\":367,\"../../components/fx\":407,\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"./helpers\":663}],665:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,colorbar:t(\"../scatter/marker_colorbar\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"bar\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}},{\"../../plots/cartesian\":578,\"../scatter/marker_colorbar\":954,\"./arrays_to_calcdata\":656,\"./attributes\":657,\"./calc\":658,\"./cross_trace_calc\":660,\"./defaults\":661,\"./event_data\":662,\"./hover\":664,\"./layout_attributes\":666,\"./layout_defaults\":667,\"./plot\":668,\"./select\":669,\"./style\":671}],666:[function(t,e,r){\"use strict\";e.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\",\"relative\"],dflt:\"group\",editType:\"calc\"},barnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},bargap:{valType:\"number\",min:0,max:1,editType:\"calc\"},bargroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],667:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\"),o=t(\"./layout_attributes\");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,u=!1,c=!1,f={},h=s(\"barmode\"),p=0;p<r.length;p++){var d=r[p];if(n.traceIs(d,\"bar\")&&d.visible){if(l=!0,\"group\"===h){var g=d.xaxis+d.yaxis;f[g]&&(c=!0),f[g]=!0}d.visible&&\"histogram\"===d.type&&\"category\"!==i.getFromId({_fullLayout:e},d[\"v\"===d.orientation?\"xaxis\":\"yaxis\"]).type&&(u=!0)}}l?(\"overlay\"!==h&&s(\"barnorm\"),s(\"bargap\",u&&!c?0:.2),s(\"bargroupgap\")):delete e.barmode}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"./layout_attributes\":666}],668:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"../../components/color\"),l=t(\"../../components/drawing\"),u=t(\"../../registry\"),c=t(\"../../plots/cartesian/axes\").tickText,f=t(\"./uniform_text\"),h=f.recordMinTextSize,p=f.clearMinTextSize,d=t(\"./style\"),g=t(\"./helpers\"),v=t(\"./constants\"),m=t(\"./attributes\"),y=m.text,x=m.textposition,b=t(\"../../components/fx/helpers\").appendArrayPointValue,_=v.TEXTPAD;function w(t){return t.id}function k(t){if(t.ids)return w}function T(t,e){return t<e?1:-1}function M(t,e,r,n){var i;return!e.uniformtext.mode&&A(r)?(n&&(i=n()),t.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){i&&i()})).each(\"interrupt\",(function(){i&&i()}))):t}function A(t){return t&&t.duration>0}function S(t){return\"auto\"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function C(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor||\"end\",c=\"end\"===u,f=\"start\"===u,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,v=Math.abs(e-t),m=Math.abs(n-r),y=v>2*_&&m>2*_?_:0;v-=2*y,m-=2*y;var x=S(l);\"auto\"!==l||d<=v&&g<=m||!(d>v||g>m)||(d>m||g>v)&&d<g==v<m||(x+=90);var b=E(i,x),w=1;s&&(w=Math.min(1,v/b.x,m/b.y));var k=i.left*p+i.right*h,M=(i.top+i.bottom)/2,A=(t+_)*p+(e-_)*h,C=(r+n)/2,L=0,P=0;if(f||c){var O=(o?b.x:b.y)/2,I=o?T(t,e):T(r,n);o?f?(A=t+I*y,L=-I*O):(A=e-I*y,L=I*O):f?(C=r+I*y,P=-I*O):(C=n-I*y,P=I*O)}return{textX:k,textY:M,targetX:A,targetY:C,anchorX:L,anchorY:P,scale:w,rotate:x}}e.exports={plot:function(t,e,r,f,v,m){var w=e.xaxis,L=e.yaxis,P=t._fullLayout;v||(v={mode:P.barmode,norm:P.barmode,gap:P.bargap,groupgap:P.bargroupgap},p(\"bar\",P));var O=a.makeTraceGroups(f,r,\"trace bars\").each((function(r){var u=n.select(this),f=r[0].trace,p=\"waterfall\"===f.type,O=\"funnel\"===f.type,I=\"bar\"===f.type||O,D=0;p&&f.connector.visible&&\"between\"===f.connector.mode&&(D=f.connector.line.width/2);var z=\"h\"===f.orientation,R=A(v),F=a.ensureSingle(u,\"g\",\"points\"),N=k(f),B=F.selectAll(\"g.point\").data(a.identity,N);B.enter().append(\"g\").classed(\"point\",!0),B.exit().remove(),B.each((function(u,p){var k,A,O=n.select(this),F=function(t,e,r,n){var i=[],a=[],o=n?e:r,s=n?r:e;return i[0]=o.c2p(t.s0,!0),a[0]=s.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),a[1]=s.c2p(t.p1,!0),n?[i,a]:[a,i]}(u,w,L,z),N=F[0][0],B=F[0][1],j=F[1][0],U=F[1][1],V=0==(z?B-N:U-j);if(V&&I&&g.getLineWidth(f,u)&&(V=!1),V||(V=!(i(N)&&i(B)&&i(j)&&i(U))),u.isBlank=V,V&&(z?B=N:U=j),D&&!V&&(z?(N-=T(N,B)*D,B+=T(N,B)*D):(j-=T(j,U)*D,U+=T(j,U)*D)),\"waterfall\"===f.type){if(!V){var H=f[u.dir].marker;k=H.line.width,A=H.color}}else k=g.getLineWidth(f,u),A=u.mc||f.marker.color;function q(t){var e=n.round(k/2%1,2);return 0===v.gap&&0===v.groupgap?n.round(Math.round(t)-e,2):t}if(!t._context.staticPlot){var G=s.opacity(A)<1||k>.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};N=G(N,B,z),B=G(B,N,z),j=G(j,U,!z),U=G(U,j,!z)}var Y=M(a.ensureSingle(O,\"path\"),P,v,m);if(Y.style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",isNaN((B-N)*(U-j))||V&&t._context.staticPlot?\"M0,0Z\":\"M\"+N+\",\"+j+\"V\"+U+\"H\"+B+\"V\"+j+\"Z\").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(u,Y,f,W,t)}(function(t,e,r,n,i,s,u,f,p,v,m){var w,k=e.xaxis,A=e.yaxis,L=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,\"text\").text(r).attr({class:\"bartext bartext-\"+w,\"text-anchor\":\"middle\",\"data-notex\":1}).call(l.font,n).call(o.convertToTspans,t)}var O=n[0].trace,I=\"h\"===O.orientation,D=function(t,e,r,n,i){var o,s=e[0].trace;return o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,\"texttemplate\");if(!s)return\"\";var l,u,f,h,p=\"histogram\"===o.type,d=\"waterfall\"===o.type,g=\"funnel\"===o.type,v=\"h\"===o.orientation;function m(t){return c(u,u.c2l(t),!0).text}function y(t){return c(h,h.c2l(t),!0).text}v?(l=\"y\",u=i,f=\"x\",h=n):(l=\"x\",u=n,f=\"y\",h=i);var x=e[r],_={};_.label=x.p,_.labelLabel=_[l+\"Label\"]=m(x.p);var w=a.castOption(o,x.i,\"text\");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+\"Label\"]=y(x.s);var k={};b(k,o,x.i),(p||void 0===k.x)&&(k.x=v?_.value:_.label),(p||void 0===k.y)&&(k.y=v?_.label:_.value),(p||void 0===k.xLabel)&&(k.xLabel=v?_.valueLabel:_.labelLabel),(p||void 0===k.yLabel)&&(k.yLabel=v?_.labelLabel:_.valueLabel),d&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),g&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=a.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=a.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=a.formatPercent(x.sumR));var T=a.castOption(o,x.i,\"customdata\");return T&&(_.customdata=T),a.texttemplateString(s,_,t._d3locale,k,_,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o=\"h\"===i.orientation,s=\"waterfall\"===i.type,l=\"funnel\"===i.type;function u(t){return c(o?n:r,t,!0).text}function f(t){return c(o?r:n,+t,!0).text}var h,p=i.textinfo,d=t[e],g=p.split(\"+\"),v=[],m=function(t){return-1!==g.indexOf(t)};if(m(\"label\")&&v.push(u(t[e].p)),m(\"text\")&&(0===(h=a.castOption(i,d.i,\"text\"))||h)&&v.push(h),s){var y=+d.rawS||d.s,x=d.v,b=x-y;m(\"initial\")&&v.push(f(b)),m(\"delta\")&&v.push(f(y)),m(\"final\")&&v.push(f(x))}if(l){m(\"value\")&&v.push(f(d.s));var _=0;m(\"percent initial\")&&_++,m(\"percent previous\")&&_++,m(\"percent total\")&&_++;var w=_>1;m(\"percent initial\")&&(h=a.formatPercent(d.begR),w&&(h+=\" of initial\"),v.push(h)),m(\"percent previous\")&&(h=a.formatPercent(d.difR),w&&(h+=\" of previous\"),v.push(h)),m(\"percent total\")&&(h=a.formatPercent(d.sumR),w&&(h+=\" of total\"),v.push(h))}return v.join(\"<br>\")}(e,r,n,i):g.getValue(s.text,r),g.coerceString(y,o)}(L,n,i,k,A);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(O,i);var z=\"stack\"===v.mode||\"relative\"===v.mode,R=n[i],F=!z||R._outmost;if(D&&\"none\"!==w&&(!R.isBlank&&s!==u&&f!==p||\"auto\"!==w&&\"inside\"!==w)){var N=L.font,B=d.getBarColor(n[i],O),j=d.getInsideTextFont(O,i,N,B),U=d.getOutsideTextFont(O,i,N),V=r.datum();I?\"log\"===k.type&&V.s0<=0&&(s=k.range[0]<k.range[1]?0:k._length):\"log\"===A.type&&V.s0<=0&&(f=A.range[0]<A.range[1]?A._length:0);var H,q,G,Y,W,X=Math.abs(u-s)-2*_,Z=Math.abs(p-f)-2*_;if(\"outside\"===w&&(F||R.hasB||(w=\"inside\")),\"auto\"===w&&(F?(w=\"inside\",H=P(r,D,W=a.ensureUniformFontSize(t,j)),G=(q=l.bBox(H.node())).width,Y=q.height,G>0&&Y>0&&(G<=X&&Y<=Z||G<=Z&&Y<=X||(I?X>=G*(Z/Y):Z>=Y*(X/G)))?w=\"inside\":(w=\"outside\",H.remove(),H=null)):w=\"inside\"),!H){var K=(H=P(r,D,W=a.ensureUniformFontSize(t,\"outside\"===w?U:j))).attr(\"transform\");if(H.attr(\"transform\",\"\"),G=(q=l.bBox(H.node())).width,Y=q.height,H.attr(\"transform\",K),G<=0||Y<=0)return void H.remove()}var J,$=O.textangle;(J=\"outside\"===w?function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,u=a.angle||0,c=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/c));var g=S(u),v=E(i,g),m=(s?v.x:v.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,k=0,M=0,A=s?T(e,t):T(r,n);return s?(b=e-A*o,k=A*m):(w=n+A*o,M=-A*m),{textX:y,textY:x,targetX:b,targetY:w,anchorX:k,anchorY:M,scale:d,rotate:g}}(s,u,f,p,q,{isHorizontal:I,constrained:\"both\"===O.constraintext||\"outside\"===O.constraintext,angle:$}):C(s,u,f,p,q,{isHorizontal:I,constrained:\"both\"===O.constraintext||\"inside\"===O.constraintext,angle:$,anchor:O.insidetextanchor})).fontSize=W.size,h(\"histogram\"===O.type?\"bar\":O.type,J,L),R.transform=J;var Q=M(H,L,v,m);a.setTransormAndDisplay(Q,J)}else r.select(\"text\").remove()})(t,e,O,r,p,N,B,j,U,v,m),e.layerClipId&&l.hideOutsideRangePoint(u,O.select(\"text\"),w,L,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(u,j?null:e.layerClipId,t)}));u.getComponentMethod(\"errorbars\",\"plot\")(t,O,e,v)},toMoveInsideBar:C}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../components/fx/helpers\":403,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"./attributes\":657,\"./constants\":659,\"./helpers\":663,\"./style\":671,\"./uniform_text\":673,\"@plotly/d3\":58,\"fast-isnumeric\":190}],669:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l=\"funnel\"===s.type,u=\"h\"===s.orientation,c=[];if(!1===e)for(r=0;r<i.length;r++)i[r].selected=0;else for(r=0;r<i.length;r++){var f=i[r],h=\"ct\"in f?f.ct:n(f,a,o,u,l);e.contains(h,!1,r,t)?(c.push({pointNumber:r,x:a.c2d(f.x),y:o.c2d(f.y)}),f.selected=1):f.selected=0}return c}},{}],670:[function(t,e,r){\"use strict\";e.exports=a;var n=t(\"../../lib\").distinctVals,i=t(\"../../constants/numerical\").BADNUM;function a(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,a=[],o=0;o<t.length;o++){for(var s=t[o],l=0;l<s.length;l++){var u=s[l];u.p!==i&&a.push(u.p)}s[0]&&s[0].width1&&(r=Math.min(s[0].width1,r))}this.positions=a;var c=n(a);this.distinctPositions=c.vals,1===c.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var f=(e.posAxis||{}).type;\"category\"!==f&&\"multicategory\"!==f||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}a.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},a.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},a.prototype.getLabel=function(t,e){return(e<0&&this.sepNegVal?\"v\":\"^\")+(this.overlapNoMerge?t:Math.round(t/this.binWidth))}},{\"../../constants/numerical\":491,\"../../lib\":515}],671:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../components/drawing\"),o=t(\"../../lib\"),s=t(\"../../registry\"),l=t(\"./uniform_text\").resizeText,u=t(\"./attributes\"),c=u.textfont,f=u.insidetextfont,h=u.outsidetextfont,p=t(\"./helpers\");function d(t,e,r){a.pointStyle(t.selectAll(\"path\"),e,r),g(t,e,r)}function g(t,e,r){t.selectAll(\"text\").each((function(t){var i=n.select(this),s=o.ensureUniformFontSize(r,v(i,t,e,r));a.font(i,s)}))}function v(t,e,r,n){var i=n._fullLayout.font,a=r.textfont;if(t.classed(\"bartext-inside\")){var o=_(e,r);a=y(r,e.i,i,o)}else t.classed(\"bartext-outside\")&&(a=x(r,e.i,i));return a}function m(t,e,r){return b(c,t.textfont,e,r)}function y(t,e,r,n){var a=m(t,e,r);return(void 0===t._input.textfont||void 0===t._input.textfont.color||Array.isArray(t.textfont.color)&&void 0===t.textfont.color[e])&&(a={color:i.contrast(n),family:a.family,size:a.size}),b(f,t.insidetextfont,e,a)}function x(t,e,r){var n=m(t,e,r);return b(h,t.outsidetextfont,e,n)}function b(t,e,r,n){e=e||{};var i=p.getValue(e.family,r),a=p.getValue(e.size,r),o=p.getValue(e.color,r);return{family:p.coerceString(t.family,i,n.family),size:p.coerceNumber(t.size,a,n.size),color:p.coerceColor(t.color,o,n.color)}}function _(t,e){return\"waterfall\"===e.type?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}e.exports={style:function(t){var e=n.select(t).selectAll(\"g.barlayer\").selectAll(\"g.trace\");l(t,e,\"bar\");var r=e.size(),i=t._fullLayout;e.style(\"opacity\",(function(t){return t[0].trace.opacity})).each((function(t){(\"stack\"===i.barmode&&r>1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")})),e.selectAll(\"g.points\").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod(\"errorbars\",\"style\")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll(\"path\"),e),function(t,e,r){t.each((function(t){var i,s=n.select(this);if(t.selected){i=o.ensureUniformFontSize(r,v(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)}))}(t.selectAll(\"text\"),e,r)}(r,i,t):(d(r,i,t),s.getComponentMethod(\"errorbars\",\"style\")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../lib\":515,\"../../registry\":647,\"./attributes\":657,\"./helpers\":663,\"./uniform_text\":673,\"@plotly/d3\":58}],672:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,s,l){var u=r(\"marker.color\",s),c=i(t,\"marker\");c&&a(t,e,l,r,{prefix:\"marker.\",cLetter:\"c\"}),r(\"marker.line.color\",n.defaultLine),i(t,\"marker.line\")&&a(t,e,l,r,{prefix:\"marker.line.\",cLetter:\"c\"}),r(\"marker.line.width\"),r(\"marker.opacity\"),o(r,\"marker.pattern\",u,c),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":367,\"../../components/colorscale/defaults\":377,\"../../components/colorscale/helpers\":378,\"../../lib\":515}],673:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");function a(t){return\"_\"+t+\"Text_minsize\"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o<i,r[n]=r[n]||1/0,e.hide||(r[n]=Math.min(r[n],Math.max(o,i)))}},clearMinTextSize:function(t,e){e[a(t)]=void 0},resizeText:function(t,e,r){var a=t._fullLayout,o=a[\"_\"+r+\"Text_minsize\"];if(o){var s,l=\"hide\"===a.uniformtext.mode;switch(r){case\"funnelarea\":case\"pie\":case\"sunburst\":s=\"g.slice\";break;case\"treemap\":case\"icicle\":s=\"g.slice, g.pathbar\";break;default:s=\"g.points > g.point\"}e.selectAll(s).each((function(t){var e=t.transform;if(e){e.scale=l&&e.hide?0:o/e.fontSize;var r=n.select(this).select(\"text\");i.setTransormAndDisplay(r,e)}}))}}}},{\"../../lib\":515,\"@plotly/d3\":58}],674:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../lib/extend\").extendFlat,a=t(\"../scatterpolar/attributes\"),o=t(\"../bar/attributes\");e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:o.marker,hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":505,\"../../plots/template_attributes\":642,\"../bar/attributes\":657,\"../scatterpolar/attributes\":1011}],675:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,i=t(\"../../components/colorscale/calc\"),a=t(\"../bar/arrays_to_calcdata\"),o=t(\"../bar/cross_trace_calc\").setGroupPositions,s=t(\"../scatter/calc_selection\"),l=t(\"../../registry\").traceIs,u=t(\"../../lib\").extendFlat;e.exports={calc:function(t,e){for(var r=t._fullLayout,o=e.subplot,l=r[o].radialaxis,u=r[o].angularaxis,c=l.makeCalcdata(e,\"r\"),f=u.makeCalcdata(e,\"theta\"),h=e._length,p=new Array(h),d=c,g=f,v=0;v<h;v++)p[v]={p:g[v],s:d[v]};function m(t){var r=e[t];void 0!==r&&(e[\"_\"+t]=Array.isArray(r)?u.makeCalcdata(e,t):u.d2c(r,e.thetaunit))}return\"linear\"===u.type&&(m(\"width\"),m(\"offset\")),n(e,\"marker\")&&i(t,e,{vals:e.marker.color,containerStr:\"marker\",cLetter:\"c\"}),n(e,\"marker.line\")&&i(t,e,{vals:e.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),a(p,e),s(p,e),p},crossTraceCalc:function(t,e,r){for(var n=t.calcdata,i=[],a=0;a<n.length;a++){var s=n[a],c=s[0].trace;!0===c.visible&&l(c,\"bar\")&&c.subplot===r&&i.push(s)}var f=u({},e.radialaxis,{_id:\"x\"}),h=e.angularaxis;o(t,h,f,i,{mode:e.barmode,norm:e.barnorm,gap:e.bargap,groupgap:e.bargroupgap})}}},{\"../../components/colorscale/calc\":375,\"../../components/colorscale/helpers\":378,\"../../lib\":515,\"../../registry\":647,\"../bar/arrays_to_calcdata\":656,\"../bar/cross_trace_calc\":660,\"../scatter/calc_selection\":938}],676:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatterpolar/defaults\").handleRThetaDefaults,a=t(\"../bar/style_defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}i(t,e,s,l)?(l(\"thetaunit\"),l(\"base\"),l(\"offset\"),l(\"width\"),l(\"text\"),l(\"hovertext\"),l(\"hovertemplate\"),a(t,e,l,r,s),n.coerceSelectionMarkerOpacity(e,l)):e.visible=!1}},{\"../../lib\":515,\"../bar/style_defaults\":672,\"../scatterpolar/defaults\":1013,\"./attributes\":674}],677:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../bar/hover\").getTraceColor,o=i.fillText,s=t(\"../scatterpolar/hover\").makeHoverPointText,l=t(\"../../plots/polar/helpers\").isPtInsidePolygon;e.exports=function(t,e,r){var u=t.cd,c=u[0].trace,f=t.subplot,h=f.radialAxis,p=f.angularAxis,d=f.vangles,g=d?l:i.isPtInsideSector,v=t.maxHoverDistance,m=p._period||2*Math.PI,y=Math.abs(h.g2p(Math.sqrt(e*e+r*r))),x=Math.atan2(r,e);if(h.range[0]>h.range[1]&&(x+=Math.PI),n.getClosest(u,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?v+Math.min(1,Math.abs(t.thetag1-t.thetag0)/m)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=u[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,c,t),s(_,c,f,t),t.hovertemplate=c.hovertemplate,t.color=a(c,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign=\"left\"),[t]}}},{\"../../components/fx\":407,\"../../lib\":515,\"../../plots/polar/helpers\":630,\"../bar/hover\":664,\"../scatterpolar/hover\":1015}],678:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"barpolar\",basePlotModule:t(\"../../plots/polar\"),categories:[\"polar\",\"bar\",\"showLegend\"],attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"../scatterpolar/format_labels\"),style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),meta:{}}},{\"../../plots/polar\":631,\"../bar/select\":669,\"../bar/style\":671,\"../scatter/marker_colorbar\":954,\"../scatterpolar/format_labels\":1014,\"./attributes\":674,\"./calc\":675,\"./defaults\":676,\"./hover\":677,\"./layout_attributes\":679,\"./layout_defaults\":680,\"./plot\":681}],679:[function(t,e,r){\"use strict\";e.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},bargap:{valType:\"number\",dflt:.1,min:0,max:1,editType:\"calc\"}}},{}],680:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l<r.length;l++){var u=r[l];\"barpolar\"===u.type&&!0===u.visible&&(o[a=u.subplot]||(s(\"barmode\"),s(\"bargap\"),o[a]=1))}}},{\"../../lib\":515,\"./layout_attributes\":679}],681:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../components/drawing\"),s=t(\"../../plots/polar/helpers\");e.exports=function(t,e,r){var l=e.xaxis,u=e.yaxis,c=e.radialAxis,f=e.angularAxis,h=function(t){var e=t.cxx,r=t.cyy;return t.vangles?function(n,i,o,l){var u,c;a.angleDelta(o,l)>0?(u=o,c=l):(u=l,c=o);var f=[s.findEnclosingVertexAngles(u,t.vangles)[0],(u+c)/2,s.findEnclosingVertexAngles(c,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,u,c,f,e,r)}:function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select(\"g.barlayer\");a.makeTraceGroups(p,r,\"trace bars\").each((function(){var r=n.select(this),s=a.ensureSingle(r,\"g\",\"points\").selectAll(\"g.point\").data(a.identity);s.enter().append(\"g\").style(\"vector-effect\",\"non-scaling-stroke\").style(\"stroke-miterlimit\",2).classed(\"point\",!0),s.exit().remove(),s.each((function(t){var e,r=n.select(this),o=t.rp0=c.c2p(t.s0),s=t.rp1=c.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var g=c.c2g(t.s1),v=(p+d)/2;t.ct=[l.c2p(g*Math.cos(v)),u.c2p(g*Math.sin(v))],e=h(o,s,p,d)}else e=\"M0,0Z\";a.ensureSingle(r,\"path\").attr(\"d\",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../plots/polar/helpers\":630,\"@plotly/d3\":58,\"fast-isnumeric\":190}],682:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../bar/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../lib/extend\").extendFlat,u=n.marker,c=u.line;e.exports={y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:l({},u.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:l({},u.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),angle:l({},u.angle,{arrayOk:!1,editType:\"calc\"}),size:l({},u.size,{arrayOk:!1,editType:\"calc\"}),color:l({},u.color,{arrayOk:!1,editType:\"style\"}),line:{color:l({},c.color,{arrayOk:!1,dflt:a.defaultLine,editType:\"style\"}),width:l({},c.width,{arrayOk:!1,dflt:0,editType:\"style\"}),outliercolor:{valType:\"color\",editType:\"style\"},outlierwidth:{valType:\"number\",min:0,dflt:1,editType:\"style\"},editType:\"style\"},editType:\"plot\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:n.fillcolor,whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":366,\"../../lib/extend\":505,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../bar/attributes\":657,\"../scatter/attributes\":936}],683:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../../lib\"),s=t(\"../../constants/numerical\").BADNUM,l=o._;e.exports=function(t,e){var r,u,y,x,b,_,w,k=t._fullLayout,T=i.getFromId(t,e.xaxis||\"x\"),M=i.getFromId(t,e.yaxis||\"y\"),A=[],S=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(y=T,x=\"x\",b=M,_=\"y\",w=!!e.yperiodalignment):(y=M,x=\"y\",b=T,_=\"x\",w=!!e.xperiodalignment);var E,C,L,P,O,I,D=function(t,e,r,i){var s,l=e+\"0\"in t;if(e in t||l&&\"d\"+e in t){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||n(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;for(var c=\"multicategory\"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+\"calendar\"]),f=t._length,h=new Array(f),p=0;p<f;p++)h[p]=c;return[h]}(e,_,b,k[S]),z=D[0],R=D[1],F=o.distinctVals(z,b),N=F.vals,B=F.minDiff/2,j=\"all\"===(e.boxpoints||e.points)?o.identity:function(t){return t.v<E.lf||t.v>E.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r<e._length;r++){var G=z[r];if(n(G)){if((E={}).pos=E[_]=G,w&&R&&(E.orig_p=R[r]),E.q1=V(\"q1\"),E.med=V(\"median\"),E.q3=V(\"q3\"),C=[],U&&o.isArrayOrTypedArray(U[r]))for(u=0;u<U[r].length;u++)(I=y.d2c(U[r][u]))!==s&&(c(O={v:I,i:[r,u]},e,[r,u]),C.push(O));if(E.pts=C.sort(f),P=(L=E[x]=C.map(h)).length,E.med!==s&&E.q1!==s&&E.q3!==s&&E.med>=E.q1&&E.q3>=E.med){var Y=V(\"lowerfence\");E.lf=Y!==s&&Y<=E.q1?Y:p(E,L,P);var W=V(\"upperfence\");E.uf=W!==s&&W>=E.q3?W:d(E,L,P);var X=V(\"mean\");E.mean=X!==s?X:P?o.mean(L,P):(E.q1+E.q3)/2;var Z=V(\"sd\");E.sd=X!==s&&Z>=0?Z:P?o.stdev(L,P,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=v(E);var K=V(\"notchspan\");K=K!==s&&K>0?K:m(E,P),E.ln=E.med-K,E.un=E.med+K;var J=E.lf,$=E.uf;e.boxpoints&&L.length&&(J=Math.min(J,L[0]),$=Math.max($,L[P-1])),e.notched&&(J=Math.min(J,E.ln),$=Math.max($,E.un)),E.min=J,E.max=$}else{var Q;o.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+E.q1,\"median = \"+E.med,\"q3 = \"+E.q3].join(\"\\n\")),Q=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=Q,E.q1=E.q3=Q,E.lf=E.uf=Q,E.mean=E.sd=Q,E.ln=E.un=Q,E.min=E.max=Q}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=C.filter(j),A.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i<r;i++)n[i]=t[i]-e;return n[r]=t[r-1]+e,n}(N,B),rt=N.length,nt=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=[];return e}(rt);for(r=0;r<e._length;r++)if(I=tt[r],n(I)){var it=o.findBin(z[r],et);it>=0&&it<rt&&(c(O={v:I,i:r},e,r),nt[it].push(O))}var at=1/0,ot=-1/0,st=e.quartilemethod,lt=\"exclusive\"===st,ut=\"inclusive\"===st;for(r=0;r<rt;r++)if(nt[r].length>0){var ct,ft;(E={}).pos=E[_]=N[r],C=E.pts=nt[r].sort(f),P=(L=E[x]=C.map(h)).length,E.min=L[0],E.max=L[P-1],E.mean=o.mean(L,P),E.sd=o.stdev(L,P,E.mean),E.med=o.interp(L,.5),P%2&&(lt||ut)?(lt?(ct=L.slice(0,P/2),ft=L.slice(P/2+1)):ut&&(ct=L.slice(0,P/2+1),ft=L.slice(P/2)),E.q1=o.interp(ct,.5),E.q3=o.interp(ft,.5)):(E.q1=o.interp(L,.25),E.q3=o.interp(L,.75)),E.lf=p(E,L,P),E.uf=d(E,L,P),E.lo=g(E),E.uo=v(E);var ht=m(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=C.filter(j),A.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r<t.length;r++){for(var n=t[r].pts||[],i={},a=0;a<n.length;a++)i[n[a].i]=a;o.tagSelected(n,e,i)}}(A,e),A.length>0?(A[0].t={num:k[S],dPos:B,posLetter:_,valLetter:x,labels:{med:l(t,\"median:\"),min:l(t,\"min:\"),q1:l(t,\"q1:\"),q3:l(t,\"q3:\"),max:l(t,\"max:\"),mean:\"sd\"===e.boxmean?l(t,\"mean ± σ:\"):l(t,\"mean:\"),lf:l(t,\"lower fence:\"),uf:l(t,\"upper fence:\")}},k[S]++,A):[{t:{empty:!0}}]};var u={text:\"tx\",hovertext:\"htx\"};function c(t,e,r){for(var n in u)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[u[n]]=e[n][r[0]][r[1]]):t[u[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function v(t){return 4*t.q3-3*t.q1}function m(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566,\"fast-isnumeric\":190}],684:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/constraints\").getAxisGroup,o=[\"v\",\"h\"];function s(t,e,r,o){var s,l,u,c=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s<r.length;s++)for(u=c[r[s]],l=0;l<u.length;l++)d.push(o.c2l(u[l].pos,!0)),g+=(u[l].pts2||[]).length;if(d.length){var v=i.distinctVals(d);\"category\"!==o.type&&\"multicategory\"!==o.type||(v.minDiff=1);var m=v.minDiff/2;n.minDtick(o,v.minDiff,v.vals[0],!0);var y=f[\"violin\"===t?\"_numViolins\":\"_numBoxes\"],x=\"group\"===f[t+\"mode\"]&&y>1,b=1-f[t+\"gap\"],_=1-f[t+\"groupgap\"];for(s=0;s<r.length;s++){var w,k,T,M,A,S,E=(u=c[r[s]])[0].trace,C=u[0].t,L=E.width,P=E.side;if(L)w=k=M=L/2,T=0;else if(w=m,x){var O=a(f,o._id)+E.orientation,I=(f._alignmentOpts[O]||{})[E.alignmentgroup]||{},D=Object.keys(I.offsetGroups||{}).length,z=D||y;k=w*b*_/z,T=2*w*(((D?E._offsetIndex:C.num)+.5)/z-.5)*b,M=w*b/z}else k=w*b*_,T=0,M=w;C.dPos=w,C.bPos=T,C.bdPos=k,C.wHover=M;var R,F,N,B,j,U,V=T+k,H=Boolean(L);if(\"positive\"===P?(A=w*(L?1:.5),R=V,S=R=T):\"negative\"===P?(A=R=T,S=w*(L?1:.5),F=V):(A=S=w,R=F=V),(E.boxpoints||E.points)&&g>0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>A?(H=!0,j=Y,N=W):W>R&&(j=Y,N=A)),W<=A&&(N=A);var X=0;q-G<=0&&((X=-V*(q-G))>S?(H=!0,U=Y,B=X):X>F&&(U=Y,B=S)),X<=S&&(B=S)}else N=A,B=S;var Z=new Array(u.length);for(l=0;l<u.length;l++)Z[l]=u[l].pos;E._extremes[h]=n.findExtremes(o,Z,{padded:H,vpadminus:B,vpadplus:N,vpadLinearized:!0,ppadminus:{x:U,y:j}[p],ppadplus:{x:j,y:U}[p]})}}}e.exports={crossTraceCalc:function(t,e){for(var r=t.calcdata,n=e.xaxis,i=e.yaxis,a=0;a<o.length;a++){for(var l=o[a],u=\"h\"===l?i:n,c=[],f=0;f<r.length;f++){var h=r[f],p=h[0].t,d=h[0].trace;!0!==d.visible||\"box\"!==d.type&&\"candlestick\"!==d.type||p.empty||(d.orientation||\"v\")!==l||d.xaxis!==n._id||d.yaxis!==i._id||c.push(f)}s(\"box\",t,c,u)}},setPositionOffset:s}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../../plots/cartesian/constraints\":574}],685:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"../../components/color\"),o=t(\"../scatter/period_defaults\"),s=t(\"../bar/defaults\").handleGroupingDefaults,l=t(\"../../plots/cartesian/axis_autotype\"),u=t(\"./attributes\");function c(t,e,r,a){function o(t){var e=0;return t&&t.length&&(e+=1,n.isArrayOrTypedArray(t[0])&&t[0].length&&(e+=1)),e}function s(e){return n.validate(t[e],u[e])}var c,f=r(\"y\"),h=r(\"x\");if(\"box\"===e.type){var p=r(\"q1\"),d=r(\"median\"),g=r(\"q3\");e._hasPreCompStats=p&&p.length&&d&&d.length&&g&&g.length,c=Math.min(n.minRowLength(p),n.minRowLength(d),n.minRowLength(g))}var v,m,y=o(f),x=o(h),b=y&&n.minRowLength(f),_=x&&n.minRowLength(h),w=a.calendar,k={autotypenumbers:a.autotypenumbers};if(e._hasPreCompStats)switch(String(x)+String(y)){case\"00\":var T=s(\"x0\")||s(\"dx\");v=!s(\"y0\")&&!s(\"dy\")||T?\"v\":\"h\",m=c;break;case\"10\":v=\"v\",m=Math.min(c,_);break;case\"20\":v=\"h\",m=Math.min(c,h.length);break;case\"01\":v=\"h\",m=Math.min(c,b);break;case\"02\":v=\"v\",m=Math.min(c,f.length);break;case\"12\":v=\"v\",m=Math.min(c,_,f.length);break;case\"21\":v=\"h\",m=Math.min(c,h.length,b);break;case\"11\":m=0;break;case\"22\":var M,A=!1;for(M=0;M<h.length;M++)if(\"category\"===l(h[M],w,k)){A=!0;break}if(A)v=\"v\",m=Math.min(c,_,f.length);else{for(M=0;M<f.length;M++)if(\"category\"===l(f[M],w,k)){A=!0;break}A?(v=\"h\",m=Math.min(c,h.length,b)):(v=\"v\",m=Math.min(c,_,f.length))}}else y>0?(v=\"v\",m=x>0?Math.min(_,b):Math.min(b)):x>0?(v=\"h\",m=Math.min(_)):m=0;if(m){e._length=m;var S=r(\"orientation\",v);e._hasPreCompStats?\"v\"===S&&0===x?(r(\"x0\",0),r(\"dx\",1)):\"h\"===S&&0===y&&(r(\"y0\",0),r(\"dy\",1)):\"v\"===S&&0===x?r(\"x0\"):\"h\"===S&&0===y&&r(\"y0\"),i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,u,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),l=\"outliers\";e._hasPreCompStats?l=\"all\":(o||s)&&(l=\"suspectedoutliers\");var c=r(a+\"points\",l);c?(r(\"jitter\",\"all\"===c?.3:0),r(\"pointpos\",\"all\"===c?-1.5:0),r(\"marker.symbol\"),r(\"marker.opacity\"),r(\"marker.size\"),r(\"marker.angle\"),r(\"marker.color\",e.line.color),r(\"marker.line.color\"),r(\"marker.line.width\"),\"suspectedoutliers\"===c&&(r(\"marker.line.outliercolor\",e.marker.color),r(\"marker.line.outlierwidth\")),r(\"selected.marker.color\"),r(\"unselected.marker.color\"),r(\"selected.marker.size\"),r(\"unselected.marker.size\"),r(\"text\"),r(\"hovertext\")):delete e.marker;var f=r(\"hoveron\");\"all\"!==f&&-1===f.indexOf(\"points\")||r(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,u,r,i)}if(c(t,e,s,i),!1!==e.visible){o(t,e,i,s),s(\"xhoverformat\"),s(\"yhoverformat\");var l=e._hasPreCompStats;l&&(s(\"lowerfence\"),s(\"upperfence\")),s(\"line.color\",(t.marker||{}).color||r),s(\"line.width\"),s(\"fillcolor\",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s(\"mean\"),d=s(\"sd\");p&&p.length&&(h=!0,d&&d.length&&(h=\"sd\"))}s(\"boxmean\",h),s(\"whiskerwidth\"),s(\"width\"),s(\"quartilemethod\");var g=!1;if(l){var v=s(\"notchspan\");v&&v.length&&(g=!0)}else n.validate(t.notchwidth,u.notchwidth)&&(g=!0);s(\"notched\",g)&&s(\"notchwidth\"),f(t,e,s,{prefix:\"box\"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,u,t)}for(var o=0;o<t.length;o++){var l=(i=t[o]).type;\"box\"!==l&&\"violin\"!==l||(r=i._input,\"group\"===e[l+\"mode\"]&&s(r,i,e,a))}},handleSampleDefaults:c,handlePointsDefaults:f}},{\"../../components/color\":367,\"../../lib\":515,\"../../plots/cartesian/axis_autotype\":567,\"../../registry\":647,\"../bar/defaults\":661,\"../scatter/period_defaults\":956,\"./attributes\":682}],686:[function(t,e,r){\"use strict\";e.exports=function(t,e){return e.hoverOnBox&&(t.hoverOnBox=e.hoverOnBox),\"xVal\"in e&&(t.x=e.xVal),\"yVal\"in e&&(t.y=e.yVal),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),t}},{}],687:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../components/fx\"),o=t(\"../../components/color\"),s=i.fillText;function l(t,e,r,s){var l,u,c,f,h,p,d,g,v,m,y,x,b,_,w=t.cd,k=t.xa,T=t.ya,M=w[0].trace,A=w[0].t,S=\"violin\"===M.type,E=A.bdPos,C=A.wHover,L=function(t){return c.c2l(t.pos)+A.bPos-c.c2l(p)};S&&\"both\"!==M.side?(\"positive\"===M.side&&(v=function(t){var e=L(t);return a.inbox(e,e+C,m)},x=E,b=0),\"negative\"===M.side&&(v=function(t){var e=L(t);return a.inbox(e-C,e,m)},x=0,b=E)):(v=function(t){var e=L(t);return a.inbox(e-C,e+C,m)},x=b=E),_=S?function(t){return a.inbox(t.span[0]-h,t.span[1]-h,m)}:function(t){return a.inbox(t.min-h,t.max-h,m)},\"h\"===M.orientation?(h=e,p=r,d=_,g=v,l=\"y\",c=T,u=\"x\",f=k):(h=r,p=e,d=v,g=_,l=\"x\",c=k,u=\"y\",f=T);var P=Math.min(1,E/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function O(t){return(d(t)+g(t))/2}m=t.maxHoverDistance-P,y=t.maxSpikeDistance-P;var I=a.getDistanceFunction(s,d,g,O);if(a.getClosest(w,I,t),!1===t.index)return[];var D=w[t.index],z=M.line.color,R=(M.marker||{}).color;o.opacity(z)&&M.line.width?t.color=z:o.opacity(R)&&M.boxpoints?t.color=R:t.color=M.fillcolor,t[l+\"0\"]=c.c2p(D.pos+A.bPos-b,!0),t[l+\"1\"]=c.c2p(D.pos+A.bPos+x,!0),t[l+\"LabelVal\"]=void 0!==D.orig_p?D.orig_p:D.pos;var F=l+\"Spike\";t.spikeDistance=O(D)*y/m,t[F]=c.c2p(D.pos,!0);var N=M.boxmean||(M.meanline||{}).visible,B=M.boxpoints||M.points,j=B&&N?[\"max\",\"uf\",\"q3\",\"med\",\"mean\",\"q1\",\"lf\",\"min\"]:B&&!N?[\"max\",\"uf\",\"q3\",\"med\",\"q1\",\"lf\",\"min\"]:!B&&N?[\"max\",\"q3\",\"med\",\"mean\",\"q1\",\"min\"]:[\"max\",\"q3\",\"med\",\"q1\",\"min\"],U=f.range[1]<f.range[0];M.orientation===(U?\"v\":\"h\")&&j.reverse();for(var V=t.spikeDistance,H=t[F],q=[],G=0;G<j.length;G++){var Y=j[G];if(Y in D){var W=D[Y],X=f.c2p(W,!0),Z=i.extendFlat({},t);Z.attr=Y,Z[u+\"0\"]=Z[u+\"1\"]=X,Z[u+\"LabelVal\"]=W,Z[u+\"Label\"]=(A.labels?A.labels[Y]+\" \":\"\")+n.hoverLabelText(f,W,M[u+\"hoverformat\"]),Z.hoverOnBox=!0,\"mean\"===Y&&\"sd\"in D&&\"sd\"===M.boxmean&&(Z[u+\"err\"]=D.sd),Z.hovertemplate=!1,q.push(Z)}}t.name=\"\",t.spikeDistance=void 0,t[F]=void 0;for(var K=0;K<q.length;K++)\"med\"!==q[K].attr?(q[K].name=\"\",q[K].spikeDistance=void 0,q[K][F]=void 0):(q[K].spikeDistance=V,q[K][F]=H);return q}function u(t,e,r){for(var n,o,l,u=t.cd,c=t.xa,f=t.ya,h=u[0].trace,p=c.c2p(e),d=f.c2p(r),g=a.quadrature((function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(c.c2p(t.x)-p)-e,1-3/e)}),(function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(f.c2p(t.y)-d)-e,1-3/e)})),v=!1,m=0;m<u.length;m++){o=u[m];for(var y=0;y<(o.pts||[]).length;y++){var x=g(l=o.pts[y]);x<=t.distance&&(t.distance=x,v=[m,y])}}if(!v)return!1;l=(o=u[v[0]]).pts[v[1]];var b=c.c2p(l.x,!0),_=f.c2p(l.y,!0),w=l.mrc||1;n=i.extendFlat({},t,{index:l.i,color:(h.marker||{}).color,name:h.name,x0:b-w,x1:b+w,y0:_-w,y1:_+w,spikeDistance:t.distance,hovertemplate:h.hovertemplate});var k,T=o.orig_p,M=void 0!==T?T:o.pos;return\"h\"===h.orientation?(k=f,n.xLabelVal=l.x,n.yLabelVal=M):(k=c,n.xLabelVal=M,n.yLabelVal=l.y),n[k._id.charAt(0)+\"Spike\"]=k.c2p(o.pos,!0),s(l,h,n),n}e.exports={hoverPoints:function(t,e,r,n){var i,a=t.cd[0].trace.hoveron,o=[];return-1!==a.indexOf(\"boxes\")&&(o=o.concat(l(t,e,r,n))),-1!==a.indexOf(\"points\")&&(i=u(t,e,r)),\"closest\"===n?i?[i]:o:i?(o.push(i),o):o},hoverOnBoxes:l,hoverOnPoints:u}},{\"../../components/color\":367,\"../../components/fx\":407,\"../../lib\":515,\"../../plots/cartesian/axes\":566}],688:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\").supplyLayoutDefaults,calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\").crossTraceCalc,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"box\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\",\"boxLayout\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":578,\"./attributes\":682,\"./calc\":683,\"./cross_trace_calc\":684,\"./defaults\":685,\"./event_data\":686,\"./hover\":687,\"./layout_attributes\":689,\"./layout_defaults\":690,\"./plot\":691,\"./select\":692,\"./style\":693}],689:[function(t,e,r){\"use strict\";e.exports={boxmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"overlay\",editType:\"calc\"},boxgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"},boxgroupgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"}}},{}],690:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"./layout_attributes\");function o(t,e,r,i,a){for(var o=a+\"Layout\",s=!1,l=0;l<r.length;l++){var u=r[l];if(n.traceIs(u,o)){s=!0;break}}s&&(i(a+\"mode\"),i(a+\"gap\"),i(a+\"groupgap\"))}e.exports={supplyLayoutDefaults:function(t,e,r){o(0,0,r,(function(r,n){return i.coerce(t,e,a,r,n)}),\"box\")},_supply:o}},{\"../../lib\":515,\"../../registry\":647,\"./layout_attributes\":689}],691:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\");function o(t,e,r,a){var o,s,l=\"h\"===r.orientation,u=e.val,c=e.pos,f=!!c.rangebreaks,h=a.bPos,p=a.wdPos||0,d=a.bPosPxOffset||0,g=r.whiskerwidth||0,v=r.notched||!1,m=v?1-2*r.notchwidth:1;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var y=t.selectAll(\"path.box\").data(\"violin\"!==r.type||r.box.visible?i.identity:[]);y.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"box\"),y.exit().remove(),y.each((function(t){if(t.empty)return\"M0,0Z\";var e=c.c2l(t.pos+h,!0),a=c.l2p(e-o)+d,y=c.l2p(e+s)+d,x=f?(a+y)/2:c.l2p(e)+d,b=r.whiskerwidth,_=f?a*b+(1-b)*x:c.l2p(e-p)+d,w=f?y*b+(1-b)*x:c.l2p(e+p)+d,k=c.l2p(e-o*m)+d,T=c.l2p(e+s*m)+d,M=u.c2p(t.q1,!0),A=u.c2p(t.q3,!0),S=i.constrain(u.c2p(t.med,!0),Math.min(M,A)+1,Math.max(M,A)-1),E=void 0===t.lf||!1===r.boxpoints,C=u.c2p(E?t.min:t.lf,!0),L=u.c2p(E?t.max:t.uf,!0),P=u.c2p(t.ln,!0),O=u.c2p(t.un,!0);l?n.select(this).attr(\"d\",\"M\"+S+\",\"+k+\"V\"+T+\"M\"+M+\",\"+a+\"V\"+y+(v?\"H\"+P+\"L\"+S+\",\"+T+\"L\"+O+\",\"+y:\"\")+\"H\"+A+\"V\"+a+(v?\"H\"+O+\"L\"+S+\",\"+k+\"L\"+P+\",\"+a:\"\")+\"ZM\"+M+\",\"+x+\"H\"+C+\"M\"+A+\",\"+x+\"H\"+L+(0===g?\"\":\"M\"+C+\",\"+_+\"V\"+w+\"M\"+L+\",\"+_+\"V\"+w)):n.select(this).attr(\"d\",\"M\"+k+\",\"+S+\"H\"+T+\"M\"+a+\",\"+M+\"H\"+y+(v?\"V\"+P+\"L\"+T+\",\"+S+\"L\"+y+\",\"+O:\"\")+\"V\"+A+\"H\"+a+(v?\"V\"+O+\"L\"+k+\",\"+S+\"L\"+a+\",\"+P:\"\")+\"ZM\"+x+\",\"+M+\"V\"+C+\"M\"+x+\",\"+A+\"V\"+L+(0===g?\"\":\"M\"+_+\",\"+C+\"H\"+w+\"M\"+_+\",\"+L+\"H\"+w))}))}function s(t,e,r,n){var o=e.x,s=e.y,l=n.bdPos,u=n.bPos,c=r.boxpoints||r.points;i.seedPseudoRandom();var f=t.selectAll(\"g.points\").data(c?function(t){return t.forEach((function(t){t.t=n,t.trace=r})),t}:[]);f.enter().append(\"g\").attr(\"class\",\"points\"),f.exit().remove();var h=f.selectAll(\"path\").data((function(t){var e,n,a=t.pts2,o=Math.max((t.max-t.min)/10,t.q3-t.q1),s=1e-9*o,f=.01*o,h=[],p=0;if(r.jitter){if(0===o)for(p=1,h=new Array(a.length),e=0;e<a.length;e++)h[e]=1;else for(e=0;e<a.length;e++){var d=Math.max(0,e-5),g=a[d].v,v=Math.min(a.length-1,e+5),m=a[v].v;\"all\"!==c&&(a[e].v<t.lf?m=Math.min(m,t.lf):g=Math.max(g,t.uf));var y=Math.sqrt(f*(v-d)/(m-g+s))||0;y=i.constrain(Math.abs(y),0,1),h.push(y),p=Math.max(y,p)}n=2*r.jitter/(p||1)}for(e=0;e<a.length;e++){var x=a[e],b=x.v,_=r.jitter?n*h[e]*(i.pseudoRandom()-.5):0,w=t.pos+u+l*(r.pointpos+_);\"h\"===r.orientation?(x.y=w,x.x=b):(x.x=w,x.y=b),\"suspectedoutliers\"===c&&b<t.uo&&b>t.lo&&(x.so=!0)}return a}));h.enter().append(\"path\").classed(\"point\",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,u=e.pos,c=!!u.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll(\"path.mean\").data(\"box\"===r.type&&r.boxmean||\"violin\"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),d.exit().remove(),d.each((function(t){var e=u.c2l(t.pos+f,!0),i=u.l2p(e-o)+h,a=u.l2p(e+s)+h,d=c?(i+a)/2:u.l2p(e)+h,g=l.c2p(t.mean,!0),v=l.c2p(t.mean-t.sd,!0),m=l.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?n.select(this).attr(\"d\",\"M\"+g+\",\"+i+\"V\"+a+(\"sd\"===p?\"m0,0L\"+v+\",\"+d+\"L\"+g+\",\"+i+\"L\"+m+\",\"+d+\"Z\":\"\")):n.select(this).attr(\"d\",\"M\"+i+\",\"+g+\"H\"+a+(\"sd\"===p?\"m0,0L\"+d+\",\"+v+\"L\"+i+\",\"+g+\"L\"+d+\",\"+m+\"Z\":\"\"))}))}e.exports={plot:function(t,e,r,a){var u=e.xaxis,c=e.yaxis;i.makeTraceGroups(a,r,\"trace boxes\").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty?i.remove():(\"h\"===h.orientation?(e=c,r=u):(e=u,r=c),o(i,{pos:e,val:r},h,f),s(i,{x:u,y:c},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{\"../../components/drawing\":389,\"../../lib\":515,\"@plotly/d3\":58}],692:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++)i[r].pts[n].selected=0;else for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++){var l=i[r].pts[n],u=a.c2p(l.x),c=o.c2p(l.y);e.contains([u,c],null,l.i,t)?(s.push({pointNumber:l.i,x:a.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],693:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../components/drawing\");e.exports={style:function(t,e,r){var o=r||n.select(t).selectAll(\"g.trace.boxes\");o.style(\"opacity\",(function(t){return t[0].trace.opacity})),o.each((function(e){var r=n.select(this),o=e[0].trace,s=o.line.width;function l(t,e,r,n){t.style(\"stroke-width\",e+\"px\").call(i.stroke,r).call(i.fill,n)}var u=r.selectAll(\"path.box\");if(\"candlestick\"===o.type)u.each((function(t){if(!t.empty){var e=n.select(this),r=o[t.dir];l(e,r.line.width,r.line.color,r.fillcolor),e.style(\"opacity\",o.selectedpoints&&!t.selected?.3:1)}}));else{l(u,s,o.line.color,o.fillcolor),r.selectAll(\"path.mean\").style({\"stroke-width\":s,\"stroke-dasharray\":2*s+\"px,\"+s+\"px\"}).call(i.stroke,o.line.color);var c=r.selectAll(\"path.point\");a.pointStyle(c,o,t)}}))},styleOnSelect:function(t,e,r){var n=e[0].trace,i=r.selectAll(\"path.point\");n.selectedpoints?a.selectedPointStyle(i,n):a.pointStyle(i,n,t)}}},{\"../../components/color\":367,\"../../components/drawing\":389,\"@plotly/d3\":58}],694:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").extendFlat,i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../ohlc/attributes\"),o=t(\"../box/attributes\");function s(t){return{line:{color:n({},o.line.color,{dflt:t}),width:o.line.width,editType:\"style\"},fillcolor:o.fillcolor,editType:\"style\"}}e.exports={xperiod:a.xperiod,xperiod0:a.xperiod0,xperiodalignment:a.xperiodalignment,xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),x:a.x,open:a.open,high:a.high,low:a.low,close:a.close,line:{width:n({},o.line.width,{}),editType:\"style\"},increasing:s(a.increasing.line.color.dflt),decreasing:s(a.decreasing.line.color.dflt),text:a.text,hovertext:a.hovertext,whiskerwidth:n({},o.whiskerwidth,{dflt:0}),hoverlabel:a.hoverlabel}},{\"../../lib\":515,\"../../plots/cartesian/axis_format_attributes\":569,\"../box/attributes\":682,\"../ohlc/attributes\":881}],695:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../plots/cartesian/align_period\"),o=t(\"../ohlc/calc\").calcCommon;function s(t,e,r,n){return{min:r,q1:Math.min(t,n),med:n,q3:Math.max(t,n),max:e}}e.exports=function(t,e){var r=t._fullLayout,l=i.getFromId(t,e.xaxis),u=i.getFromId(t,e.yaxis),c=l.makeCalcdata(e,\"x\"),f=a(e,l,\"x\",c).vals,h=o(t,e,c,f,u,s);return h.length?(n.extendFlat(h[0].t,{num:r._numBoxes,dPos:n.distinctVals(f).minDiff/2,posLetter:\"x\",valLetter:\"y\"}),r._numBoxes++,h):[{t:{empty:!0}}]}},{\"../../lib\":515,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566,\"../ohlc/calc\":882}],696:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../ohlc/ohlc_defaults\"),o=t(\"../scatter/period_defaults\"),s=t(\"./attributes\");function l(t,e,r,n){var a=r(n+\".line.color\");r(n+\".line.width\",e.line.width),r(n+\".fillcolor\",i.addOpacity(a,.5))}e.exports=function(t,e,r,i){function u(r,i){return n.coerce(t,e,s,r,i)}a(t,e,u,i)?(o(t,e,i,u,{x:!0}),u(\"xhoverformat\"),u(\"yhoverformat\"),u(\"line.width\"),l(0,e,u,\"increasing\"),l(0,e,u,\"decreasing\"),u(\"text\"),u(\"hovertext\"),u(\"whiskerwidth\"),i._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{\"../../components/color\":367,\"../../lib\":515,\"../ohlc/ohlc_defaults\":886,\"../scatter/period_defaults\":956,\"./attributes\":694}],697:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"candlestick\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"showLegend\",\"candlestick\",\"boxLayout\"],meta:{},attributes:t(\"./attributes\"),layoutAttributes:t(\"../box/layout_attributes\"),supplyLayoutDefaults:t(\"../box/layout_defaults\").supplyLayoutDefaults,crossTraceCalc:t(\"../box/cross_trace_calc\").crossTraceCalc,supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"../box/plot\").plot,layerName:\"boxlayer\",style:t(\"../box/style\").style,hoverPoints:t(\"../ohlc/hover\").hoverPoints,selectPoints:t(\"../ohlc/select\")}},{\"../../plots/cartesian\":578,\"../box/cross_trace_calc\":684,\"../box/layout_attributes\":689,\"../box/layout_defaults\":690,\"../box/plot\":691,\"../box/style\":693,\"../ohlc/hover\":884,\"../ohlc/select\":888,\"./attributes\":694,\"./calc\":695,\"./defaults\":696}],698:[function(t,e,r){\"use strict\";var n=t(\"./axis_defaults\"),i=t(\"../../plot_api/plot_template\");e.exports=function(t,e,r,a,o){a(\"a\")||(a(\"da\"),a(\"a0\")),a(\"b\")||(a(\"db\"),a(\"b0\")),function(t,e,r,a){[\"aaxis\",\"baxis\"].forEach((function(o){var s=o.charAt(0),l=t[o]||{},u=i.newContainer(e,o),c={noTicklabelstep:!0,tickfont:\"x\",id:s+\"axis\",letter:s,font:e.font,name:o,data:t[s],calendar:e.calendar,dfltColor:a,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};n(l,u,c),u._categories=u._categories||[],t[o]||\"-\"===l.type||(t[o]={type:l.type})}))}(t,e,r,o)}},{\"../../plot_api/plot_template\":555,\"./axis_defaults\":703}],699:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray;function i(t,e){if(!n(t)||e>=10)return null;for(var r=1/0,a=-1/0,o=t.length,s=0;s<o;s++){var l=t[s];if(n(l)){var u=i(l,e+1);u&&(r=Math.min(u[0],r),a=Math.max(u[1],a))}else r=Math.min(l,r),a=Math.max(l,a)}return[r,a]}e.exports=function(t){return i(t,0)}},{\"../../lib\":515}],700:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./axis_attributes\"),a=t(\"../../components/color/attributes\"),o=n({editType:\"calc\"});o.family.dflt='\"Open Sans\", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=a.defaultLine,e.exports={carpet:{valType:\"string\",editType:\"calc\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},a:{valType:\"data_array\",editType:\"calc\"},a0:{valType:\"number\",dflt:0,editType:\"calc\"},da:{valType:\"number\",dflt:1,editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},b0:{valType:\"number\",dflt:0,editType:\"calc\"},db:{valType:\"number\",dflt:1,editType:\"calc\"},cheaterslope:{valType:\"number\",dflt:1,editType:\"calc\"},aaxis:i,baxis:i,font:o,color:{valType:\"color\",dflt:a.defaultLine,editType:\"plot\"},transforms:void 0}},{\"../../components/color/attributes\":366,\"../../plots/font_attributes\":594,\"./axis_attributes\":702}],701:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray;e.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,p,d,g,v,m,y=n(r)?\"a\":\"b\",x=(\"a\"===y?t.aaxis:t.baxis).smoothing,b=\"a\"===y?t.a2i:t.b2j,_=\"a\"===y?r:i,w=\"a\"===y?i:r,k=\"a\"===y?e.a.length:e.b.length,T=\"a\"===y?e.b.length:e.a.length,M=Math.floor(\"a\"===y?t.b2j(w):t.a2i(w)),A=\"a\"===y?function(e){return t.evalxy([],e,M)}:function(e){return t.evalxy([],M,e)};x&&(s=Math.max(0,Math.min(T-2,M)),l=M-s,o=\"a\"===y?function(e,r){return t.dxydi([],e,s,r,l)}:function(e,r){return t.dxydj([],s,e,l,r)});var S=b(_[0]),E=b(_[1]),C=S<E?1:-1,L=1e-8*(E-S),P=C>0?Math.floor:Math.ceil,O=C>0?Math.ceil:Math.floor,I=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,z=P(S+L),R=O(E-L),F=[[f=A(S)]];for(a=z;a*C<R*C;a+=C)u=[],g=D(S,a),m=(v=I(E,a+C))-g,c=Math.max(0,Math.min(k-2,Math.floor(.5*(g+v)))),h=A(v),x&&(p=o(c,g-c),d=o(c,v-c),u.push([f[0]+p[0]/3*m,f[1]+p[1]/3*m]),u.push([h[0]-d[0]/3*m,h[1]-d[1]/3*m])),u.push(h),F.push(u),f=h;return F}},{\"../../lib\":515}],702:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../components/color/attributes\"),a=t(\"../../plots/cartesian/layout_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").descriptionWithDates,s=t(\"../../plot_api/edit_types\").overrideAll,l=t(\"../../components/drawing/attributes\").dash,u=t(\"../../lib/extend\").extendFlat;e.exports={color:{valType:\"color\",editType:\"calc\"},smoothing:{valType:\"number\",dflt:1,min:0,max:1.3,editType:\"calc\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"calc\"},font:n({editType:\"calc\"}),offset:{valType:\"number\",dflt:10,editType:\"calc\"},editType:\"calc\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"date\",\"category\"],dflt:\"-\",editType:\"calc\"},autotypenumbers:a.autotypenumbers,autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"calc\"},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"calc\"},range:{valType:\"info_array\",editType:\"calc\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}]},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cheatertype:{valType:\"enumerated\",values:[\"index\",\"value\"],dflt:\"value\",editType:\"calc\"},tickmode:{valType:\"enumerated\",values:[\"linear\",\"array\"],dflt:\"array\",editType:\"calc\"},nticks:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},tickvals:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},showticklabels:{valType:\"enumerated\",values:[\"start\",\"end\",\"both\",\"none\"],dflt:\"start\",editType:\"calc\"},tickfont:n({editType:\"calc\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"calc\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"calc\"},minexponent:{valType:\"number\",dflt:3,min:0,editType:\"calc\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"calc\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"calc\",description:o(\"tick label\")},tickformatstops:s(a.tickformatstops,\"calc\",\"from-root\"),categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},labelpadding:{valType:\"integer\",dflt:10,editType:\"calc\"},labelprefix:{valType:\"string\",editType:\"calc\"},labelsuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showline:{valType:\"boolean\",dflt:!1,editType:\"calc\"},linecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"calc\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},gridcolor:{valType:\"color\",editType:\"calc\"},gridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},griddash:u({},l,{editType:\"calc\"}),showgrid:{valType:\"boolean\",dflt:!0,editType:\"calc\"},minorgridcount:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},minorgridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},minorgriddash:u({},l,{editType:\"calc\"}),minorgridcolor:{valType:\"color\",dflt:i.lightLine,editType:\"calc\"},startline:{valType:\"boolean\",editType:\"calc\"},startlinecolor:{valType:\"color\",editType:\"calc\"},startlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endline:{valType:\"boolean\",editType:\"calc\"},endlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endlinecolor:{valType:\"color\",editType:\"calc\"},tick0:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},dtick:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},arraytick0:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},arraydtick:{valType:\"integer\",min:1,dflt:1,editType:\"calc\"},_deprecated:{title:{valType:\"string\",editType:\"calc\"},titlefont:n({editType:\"calc\"}),titleoffset:{valType:\"number\",dflt:10,editType:\"calc\"}},editType:\"calc\"}},{\"../../components/color/attributes\":366,\"../../components/drawing/attributes\":388,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/cartesian/layout_attributes\":579,\"../../plots/font_attributes\":594}],703:[function(t,e,r){\"use strict\";var n=t(\"./attributes\"),i=t(\"../../components/color\").addOpacity,a=t(\"../../registry\"),o=t(\"../../lib\"),s=t(\"../../plots/cartesian/tick_value_defaults\"),l=t(\"../../plots/cartesian/tick_label_defaults\"),u=t(\"../../plots/cartesian/prefix_suffix_defaults\"),c=t(\"../../plots/cartesian/category_order_defaults\"),f=t(\"../../plots/cartesian/set_convert\"),h=t(\"../../plots/cartesian/axis_autotype\");e.exports=function(t,e,r){var p=r.letter,d=r.font||{},g=n[p+\"axis\"];function v(r,n){return o.coerce(t,e,g,r,n)}function m(r,n){return o.coerce2(t,e,g,r,n)}r.name&&(e._name=r.name,e._id=r.name),v(\"autotypenumbers\",r.autotypenumbersDflt);var y=v(\"type\");\"-\"===y&&(r.data&&function(t,e){if(\"-\"===t.type){var r=t[t._id.charAt(0)+\"calendar\"];t.type=h(e,r,{autotypenumbers:t.autotypenumbers})}}(e,r.data),\"-\"===e.type?e.type=\"linear\":y=t.type=e.type),v(\"smoothing\"),v(\"cheatertype\"),v(\"showticklabels\"),v(\"labelprefix\",p+\" = \"),v(\"labelsuffix\"),v(\"showtickprefix\"),v(\"showticksuffix\"),v(\"separatethousands\"),v(\"tickformat\"),v(\"exponentformat\"),v(\"minexponent\"),v(\"showexponent\"),v(\"categoryorder\"),v(\"tickmode\"),v(\"tickvals\"),v(\"ticktext\"),v(\"tick0\"),v(\"dtick\"),\"array\"===e.tickmode&&(v(\"arraytick0\"),v(\"arraydtick\")),v(\"labelpadding\"),e._hovertitle=p,\"date\"===y&&a.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\",r.calendar),f(e,r.fullLayout),e.c2p=o.identity;var x=v(\"color\",r.dfltColor),b=x===t.color?x:d.color;v(\"title.text\")&&(o.coerceFont(v,\"title.font\",{family:d.family,size:o.bigFont(d.size),color:b}),v(\"title.offset\")),v(\"tickangle\"),v(\"autorange\",!e.isValidRange(t.range))&&v(\"rangemode\"),v(\"range\"),e.cleanRange(),v(\"fixedrange\"),s(t,e,v,y),u(t,e,v,y,r),l(t,e,v,y,r),c(t,e,v,{data:r.data,dataAttr:p});var _=m(\"gridcolor\",i(x,.3)),w=m(\"gridwidth\"),k=m(\"griddash\"),T=v(\"showgrid\");T||(delete e.gridcolor,delete e.gridwidth,delete e.griddash);var M=m(\"startlinecolor\",x),A=m(\"startlinewidth\",w);v(\"startline\",e.showgrid||!!M||!!A)||(delete e.startlinecolor,delete e.startlinewidth);var S=m(\"endlinecolor\",x),E=m(\"endlinewidth\",w);return v(\"endline\",e.showgrid||!!S||!!E)||(delete e.endlinecolor,delete e.endlinewidth),T?(v(\"minorgridcount\"),v(\"minorgridwidth\",w),v(\"minorgriddash\",k),v(\"minorgridcolor\",i(_,.06)),e.minorgridcount||(delete e.minorgridwidth,delete e.minorgriddash,delete e.minorgridcolor)):(delete e.gridcolor,delete e.gridwidth,delete e.griddash),\"none\"===e.showticklabels&&(delete e.tickfont,delete e.tickangle,delete e.showexponent,delete e.exponentformat,delete e.minexponent,delete e.tickformat,delete e.showticksuffix,delete e.showtickprefix),e.showticksuffix||delete e.ticksuffix,e.showtickprefix||delete e.tickprefix,v(\"tickmode\"),e}},{\"../../components/color\":367,\"../../lib\":515,\"../../plots/cartesian/axis_autotype\":567,\"../../plots/cartesian/category_order_defaults\":571,\"../../plots/cartesian/prefix_suffix_defaults\":583,\"../../plots/cartesian/set_convert\":585,\"../../plots/cartesian/tick_label_defaults\":587,\"../../plots/cartesian/tick_value_defaults\":589,\"../../registry\":647,\"./attributes\":700}],704:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\").isArray1D,a=t(\"./cheater_basis\"),o=t(\"./array_minmax\"),s=t(\"./calc_gridlines\"),l=t(\"./calc_labels\"),u=t(\"./calc_clippath\"),c=t(\"../heatmap/clean_2d_array\"),f=t(\"./smooth_fill_2d_array\"),h=t(\"../heatmap/convert_column_xyz\"),p=t(\"./set_convert\");e.exports=function(t,e){var r=n.getFromId(t,e.xaxis),d=n.getFromId(t,e.yaxis),g=e.aaxis,v=e.baxis,m=e.x,y=e.y,x=[];m&&i(m)&&x.push(\"x\"),y&&i(y)&&x.push(\"y\"),x.length&&h(e,g,v,\"a\",\"b\",x);var b=e._a=e._a||e.a,_=e._b=e._b||e.b;m=e._x||e.x,y=e._y||e.y;var w={};if(e._cheater){var k=\"index\"===g.cheatertype?b.length:b,T=\"index\"===v.cheatertype?_.length:_;m=a(k,T,e.cheaterslope)}e._x=m=c(m),e._y=y=c(y),f(m,b,_),f(y,b,_),p(e),e.setScale();var M=o(m),A=o(y),S=.5*(M[1]-M[0]),E=.5*(M[1]+M[0]),C=.5*(A[1]-A[0]),L=.5*(A[1]+A[0]),P=1.3;return M=[E-S*P,E+S*P],A=[L-C*P,L+C*P],e._extremes[r._id]=n.findExtremes(r,M,{padded:!0}),e._extremes[d._id]=n.findExtremes(d,A,{padded:!0}),s(e,\"a\",\"b\"),s(e,\"b\",\"a\"),l(e,g),l(e,v),w.clipsegments=u(e._xctrl,e._yctrl,g,v),w.x=m,w.y=y,w.a=b,w.b=_,[w]}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../heatmap/clean_2d_array\":803,\"../heatmap/convert_column_xyz\":805,\"./array_minmax\":699,\"./calc_clippath\":705,\"./calc_gridlines\":706,\"./calc_labels\":707,\"./cheater_basis\":709,\"./set_convert\":722,\"./smooth_fill_2d_array\":723}],705:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i,a,o,s=[],l=!!r.smoothing,u=!!n.smoothing,c=t[0].length-1,f=t.length-1;for(i=0,a=[],o=[];i<=c;i++)a[i]=t[0][i],o[i]=e[0][i];for(s.push({x:a,y:o,bicubic:l}),i=0,a=[],o=[];i<=f;i++)a[i]=t[i][c],o[i]=e[i][c];for(s.push({x:a,y:o,bicubic:u}),i=c,a=[],o=[];i>=0;i--)a[c-i]=t[f][i],o[c-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:u}),s}},{}],706:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib/extend\").extendFlat;e.exports=function(t,e,r){var a,o,s,l,u,c,f,h,p,d,g,v,m,y,x=t[\"_\"+e],b=t[e+\"axis\"],_=b._gridlines=[],w=b._minorgridlines=[],k=b._boundarylines=[],T=t[\"_\"+r],M=t[r+\"axis\"];\"array\"===b.tickmode&&(b.tickvals=x.slice());var A=t._xctrl,S=t._yctrl,E=A[0].length,C=A.length,L=t._a.length,P=t._b.length;n.prepTicks(b),\"array\"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var i,a,o,s,l,u,c,f,p,d,g,v,m=[],y=[],x={};if(\"b\"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i<L;i++)u=Math.min(L-2,i),c=i-u,f=t.evalxy([],i,a),M.smoothing&&i>0&&(p=t.dxydi([],i-1,o,0,s),m.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),m.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),m.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),u=Math.floor(Math.max(0,Math.min(L-2,i))),c=i-u,x.length=L,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],u,e,c,r)},a=0;a<P;a++)o=Math.min(P-2,a),s=a-o,f=t.evalxy([],i,a),M.smoothing&&a>0&&(g=t.dxydj([],u,a-1,c,0),m.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),v=t.dxydj([],u,a-1,c,1),m.push(f[0]-v[0]/3),y.push(f[1]-v[1]/3)),m.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=M,x.value=n,x.constvar=r,x.index=h,x.x=m,x.y=y,x.smoothing=M.smoothing,x}function D(n){var i,a,o,s,l,u=[],c=[],f={};if(f.length=x.length,f.crossLength=T.length,\"b\"===e)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;i<E;i++)u[i]=A[n*O][i],c[i]=S[n*O][i];else for(a=Math.max(0,Math.min(L-2,n)),s=Math.min(1,Math.max(0,n-a)),f.xy=function(e){return t.evalxy([],n,e)},f.dxy=function(e,r){return t.dxydj([],a,e,s,r)},i=0;i<C;i++)u[i]=A[i][n*O],c[i]=S[i][n*O];return f.axisLetter=e,f.axis=b,f.crossAxis=M,f.value=x[n],f.constvar=r,f.index=n,f.x=u,f.y=c,f.smoothing=M.smoothing,f}if(\"array\"===b.tickmode){for(l=5e-15,c=(u=[Math.floor((x.length-1-b.arraytick0)/b.arraydtick*(1+l)),Math.ceil(-b.arraytick0/b.arraydtick/(1+l))].sort((function(t,e){return t-e})))[0]-1,f=u[1]+1,h=c;h<f;h++)(o=b.arraytick0+b.arraydtick*h)<0||o>x.length-1||_.push(i(D(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c;h<f;h++)if(s=b.arraytick0+b.arraydtick*h,g=Math.min(s+b.arraydtick,x.length-1),!(s<0||s>x.length-1||g<0||g>x.length-1))for(v=x[s],m=x[g],a=0;a<b.minorgridcount;a++)(y=g-s)<=0||(d=v+(m-v)*(a+1)/(b.minorgridcount+1)*(b.arraydtick/y))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(D(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,c=(u=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=u[1],h=c;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(I(p),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c-1;h<f+1;h++)for(p=b.tick0+b.dtick*h,a=0;a<b.minorgridcount;a++)(d=p+b.dtick*(a+1)/(b.minorgridcount+1))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{\"../../lib/extend\":505,\"../../plots/cartesian/axes\":566}],707:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib/extend\").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;r<l.length;r++)o=l[r],-1!==[\"start\",\"both\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a)),-1!==[\"end\",\"both\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a))}},{\"../../lib/extend\":505,\"../../plots/cartesian/axes\":566}],708:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=u*(l+u)*3,p=l*(l+u)*3;return[[e[0]+(h&&c/h),e[1]+(h&&f/h)],[e[0]-(p&&c/p),e[1]-(p&&f/p)]]}},{}],709:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray;e.exports=function(t,e,r){var i,a,o,s,l,u,c=[],f=n(t)?t.length:t,h=n(e)?e.length:e,p=n(t)?t:null,d=n(e)?e:null;p&&(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1)),d&&(s=(d.length-1)/(d[d.length-1]-d[0])/(h-1));var g=1/0,v=-1/0;for(a=0;a<h;a++)for(c[a]=[],l=d?(d[a]-d[0])*s:a/(h-1),i=0;i<f;i++)u=(p?(p[i]-p[0])*o:i/(f-1))-l*r,g=Math.min(u,g),v=Math.max(u,v),c[a][i]=u;var m=1/(v-g),y=-g*m;for(a=0;a<h;a++)for(i=0;i<f;i++)c[a][i]=m*c[a][i]+y;return c}},{\"../../lib\":515}],710:[function(t,e,r){\"use strict\";var n=t(\"./catmull_rom\"),i=t(\"../../lib\").ensureArray;function a(t,e,r){var n=-.5*r[0]+1.5*e[0],i=-.5*r[1]+1.5*e[1];return[(2*n+t[0])/3,(2*i+t[1])/3]}e.exports=function(t,e,r,o,s,l){var u,c,f,h,p,d,g,v,m,y,x=r[0].length,b=r.length,_=s?3*x-2:x,w=l?3*b-2:b;for(t=i(t,w),e=i(e,w),f=0;f<w;f++)t[f]=i(t[f],_),e[f]=i(e[f],_);for(c=0,h=0;c<b;c++,h+=l?3:1)for(p=t[h],d=e[h],g=r[c],v=o[c],u=0,f=0;u<x;u++,f+=s?3:1)p[f]=g[u],d[f]=v[u];if(s)for(c=0,h=0;c<b;c++,h+=l?3:1){for(u=1,f=3;u<x-1;u++,f+=3)m=n([r[c][u-1],o[c][u-1]],[r[c][u],o[c][u]],[r[c][u+1],o[c][u+1]],s),t[h][f-1]=m[0][0],e[h][f-1]=m[0][1],t[h][f+1]=m[1][0],e[h][f+1]=m[1][1];y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=y[0],e[h][1]=y[1],y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=y[0],e[h][_-2]=y[1]}if(l)for(f=0;f<_;f++){for(h=3;h<w-3;h+=3)m=n([t[h-3][f],e[h-3][f]],[t[h][f],e[h][f]],[t[h+3][f],e[h+3][f]],l),t[h-1][f]=m[0][0],e[h-1][f]=m[0][1],t[h+1][f]=m[1][0],e[h+1][f]=m[1][1];y=a([t[0][f],e[0][f]],[t[2][f],e[2][f]],[t[3][f],e[3][f]]),t[1][f]=y[0],e[1][f]=y[1],y=a([t[w-1][f],e[w-1][f]],[t[w-3][f],e[w-3][f]],[t[w-4][f],e[w-4][f]]),t[w-2][f]=y[0],e[w-2][f]=y[1]}if(s&&l)for(h=1;h<w;h+=(h+1)%3==0?2:1){for(f=3;f<_-3;f+=3)m=n([t[h][f-3],e[h][f-3]],[t[h][f],e[h][f]],[t[h][f+3],e[h][f+3]],s),t[h][f-1]=.5*(t[h][f-1]+m[0][0]),e[h][f-1]=.5*(e[h][f-1]+m[0][1]),t[h][f+1]=.5*(t[h][f+1]+m[1][0]),e[h][f+1]=.5*(e[h][f+1]+m[1][1]);y=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=.5*(t[h][1]+y[0]),e[h][1]=.5*(e[h][1]+y[1]),y=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=.5*(t[h][_-2]+y[0]),e[h][_-2]=.5*(e[h][_-2]+y[1])}return[t,e]}},{\"../../lib\":515,\"./catmull_rom\":708}],711:[function(t,e,r){\"use strict\";e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],712:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=1-i,d=p*p,g=p*i*2,v=-3*d,m=3*(d-g),y=3*(g-h),x=3*h,b=a*a,_=b*a,w=1-a,k=w*w,T=k*w;for(f=0;f<t.length;f++)o=v*(c=t[f])[n][r]+m*c[n][r+1]+y*c[n][r+2]+x*c[n][r+3],s=v*c[n+1][r]+m*c[n+1][r+1]+y*c[n+1][r+2]+x*c[n+1][r+3],l=v*c[n+2][r]+m*c[n+2][r+1]+y*c[n+2][r+2]+x*c[n+2][r+3],u=v*c[n+3][r]+m*c[n+3][r+1]+y*c[n+3][r+2]+x*c[n+3][r+3],e[f]=T*o+3*(k*a*s+w*b*l)+_*u;return e}:e?function(e,r,n,i,a){var o,s,l,u;e||(e=[]),r*=3;var c=i*i,f=1-i,h=f*f,p=f*i*2,d=-3*h,g=3*(h-p),v=3*(p-c),m=3*c,y=1-a;for(l=0;l<t.length;l++)o=d*(u=t[l])[n][r]+g*u[n][r+1]+v*u[n][r+2]+m*u[n][r+3],s=d*u[n+1][r]+g*u[n+1][r+1]+v*u[n+1][r+2]+m*u[n+1][r+3],e[l]=y*o+a*s;return e}:r?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),n*=3;var h=a*a,p=h*a,d=1-a,g=d*d,v=g*d;for(c=0;c<t.length;c++)o=(f=t[c])[n][r+1]-f[n][r],s=f[n+1][r+1]-f[n+1][r],l=f[n+2][r+1]-f[n+2][r],u=f[n+3][r+1]-f[n+3][r],e[c]=v*o+3*(g*a*s+d*h*l)+p*u;return e}:function(e,r,n,i,a){var o,s,l,u;e||(e=[]);var c=1-a;for(l=0;l<t.length;l++)o=(u=t[l])[n][r+1]-u[n][r],s=u[n+1][r+1]-u[n+1][r],e[l]=c*o+a*s;return e}}},{}],713:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=h*i,d=1-i,g=d*d,v=g*d,m=a*a,y=1-a,x=y*y,b=y*a*2,_=-3*x,w=3*(x-b),k=3*(b-m),T=3*m;for(f=0;f<t.length;f++)o=_*(c=t[f])[n][r]+w*c[n+1][r]+k*c[n+2][r]+T*c[n+3][r],s=_*c[n][r+1]+w*c[n+1][r+1]+k*c[n+2][r+1]+T*c[n+3][r+1],l=_*c[n][r+2]+w*c[n+1][r+2]+k*c[n+2][r+2]+T*c[n+3][r+2],u=_*c[n][r+3]+w*c[n+1][r+3]+k*c[n+2][r+3]+T*c[n+3][r+3],e[f]=v*o+3*(g*i*s+d*h*l)+p*u;return e}:e?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),r*=3;var h=a*a,p=h*a,d=1-a,g=d*d,v=g*d;for(c=0;c<t.length;c++)o=(f=t[c])[n+1][r]-f[n][r],s=f[n+1][r+1]-f[n][r+1],l=f[n+1][r+2]-f[n][r+2],u=f[n+1][r+3]-f[n][r+3],e[c]=v*o+3*(g*a*s+d*h*l)+p*u;return e}:r?function(e,r,n,i,a){var o,s,l,u;e||(e=[]),n*=3;var c=1-i,f=a*a,h=1-a,p=h*h,d=h*a*2,g=-3*p,v=3*(p-d),m=3*(d-f),y=3*f;for(l=0;l<t.length;l++)o=g*(u=t[l])[n][r]+v*u[n+1][r]+m*u[n+2][r]+y*u[n+3][r],s=g*u[n][r+1]+v*u[n+1][r+1]+m*u[n+2][r+1]+y*u[n+3][r+1],e[l]=c*o+i*s;return e}:function(e,r,n,i,a){var o,s,l,u;e||(e=[]);var c=1-i;for(l=0;l<t.length;l++)o=(u=t[l])[n+1][r]-u[n][r],s=u[n+1][r+1]-u[n][r+1],e[l]=c*o+i*s;return e}}},{}],714:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=e-2,o=r-2;return n&&i?function(e,r,n){var i,s,l,u,c,f;e||(e=[]);var h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3,p*=3;var v=d*d,m=v*d,y=1-d,x=y*y,b=x*y,_=g*g,w=_*g,k=1-g,T=k*k,M=T*k;for(f=0;f<t.length;f++)i=b*(c=t[f])[p][h]+3*(x*d*c[p][h+1]+y*v*c[p][h+2])+m*c[p][h+3],s=b*c[p+1][h]+3*(x*d*c[p+1][h+1]+y*v*c[p+1][h+2])+m*c[p+1][h+3],l=b*c[p+2][h]+3*(x*d*c[p+2][h+1]+y*v*c[p+2][h+2])+m*c[p+2][h+3],u=b*c[p+3][h]+3*(x*d*c[p+3][h+1]+y*v*c[p+3][h+2])+m*c[p+3][h+3],e[f]=M*i+3*(T*g*s+k*_*l)+w*u;return e}:n?function(e,r,n){e||(e=[]);var i,s,l,u,c,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));h*=3;var v=d*d,m=v*d,y=1-d,x=y*y,b=x*y,_=1-g;for(c=0;c<t.length;c++)i=_*(f=t[c])[p][h]+g*f[p+1][h],s=_*f[p][h+1]+g*f[p+1][h+1],l=_*f[p][h+2]+g*f[p+1][h+1],u=_*f[p][h+3]+g*f[p+1][h+1],e[c]=b*i+3*(x*d*s+y*v*l)+m*u;return e}:i?function(e,r,n){e||(e=[]);var i,s,l,u,c,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),g=Math.max(0,Math.min(1,n-p));p*=3;var v=g*g,m=v*g,y=1-g,x=y*y,b=x*y,_=1-d;for(c=0;c<t.length;c++)i=_*(f=t[c])[p][h]+d*f[p][h+1],s=_*f[p+1][h]+d*f[p+1][h+1],l=_*f[p+2][h]+d*f[p+2][h+1],u=_*f[p+3][h]+d*f[p+3][h+1],e[c]=b*i+3*(x*g*s+y*v*l)+m*u;return e}:function(e,r,n){e||(e=[]);var i,s,l,u,c=Math.max(0,Math.min(Math.floor(r),a)),f=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(1,r-c)),p=Math.max(0,Math.min(1,n-f)),d=1-p,g=1-h;for(l=0;l<t.length;l++)i=g*(u=t[l])[f][c]+h*u[f][c+1],s=g*u[f+1][c]+h*u[f+1][c+1],e[l]=d*i+p*s;return e}}},{}],715:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./xy_defaults\"),a=t(\"./ab_defaults\"),o=t(\"./attributes\"),s=t(\"../../components/color/attributes\");e.exports=function(t,e,r,l){function u(r,i){return n.coerce(t,e,o,r,i)}e._clipPathId=\"clip\"+e.uid+\"carpet\";var c=u(\"color\",s.defaultLine);n.coerceFont(u,\"font\"),u(\"carpet\"),a(t,e,l,u,c),e.a&&e.b?(e.a.length<3&&(e.aaxis.smoothing=0),e.b.length<3&&(e.baxis.smoothing=0),i(t,e,u)||(e.visible=!1),e._cheater&&u(\"cheaterslope\")):e.visible=!1}},{\"../../components/color/attributes\":366,\"../../lib\":515,\"./ab_defaults\":698,\"./attributes\":700,\"./xy_defaults\":724}],716:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),plot:t(\"./plot\"),calc:t(\"./calc\"),animatable:!0,isContainer:!0,moduleType:\"trace\",name:\"carpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"carpetAxis\",\"notLegendIsolatable\",\"noMultiCategory\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":578,\"./attributes\":700,\"./calc\":704,\"./defaults\":715,\"./plot\":721}],717:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r,n=t._fullData.length,i=0;i<n;i++){var a=t._fullData[i];if(a.index!==e.index&&\"carpet\"===a.type&&(r||(r=a),a.carpet===e.carpet))return a}return r}},{}],718:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){if(0===t.length)return\"\";var n,i=[],a=r?3:1;for(n=0;n<t.length;n+=a)i.push(t[n]+\",\"+e[n]),r&&n<t.length-a&&(i.push(\"C\"),i.push([t[n+1]+\",\"+e[n+1],t[n+2]+\",\"+e[n+2]+\" \"].join(\" \")));return i.join(r?\"\":\"L\")}},{}],719:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray;e.exports=function(t,e,r){var i;for(n(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],i=0;i<e.length;i++)t[i]=r(e[i]);return t}},{\"../../lib\":515}],720:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){var o=i[0]*t.dpdx(e),s=i[1]*t.dpdy(r),l=1,u=1;if(a){var c=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(i[0]*a[0]+i[1]*a[1])/c/f;u=Math.max(0,h)}var p=180*Math.atan2(s,o)/Math.PI;return p<-90?(p+=180,l=-l):p>90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:u}}},{}],721:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"./map_1d_array\"),o=t(\"./makepath\"),s=t(\"./orient_text\"),l=t(\"../../lib/svg_text_utils\"),u=t(\"../../lib\"),c=u.strRotate,f=u.strTranslate,h=t(\"../../constants/alignment\");function p(t,e,r,s,l,u){var c=\"const-\"+l+\"-lines\",f=r.selectAll(\".\"+c).data(u);f.enter().append(\"path\").classed(c,!0).style(\"vector-effect\",\"non-scaling-stroke\"),f.each((function(r){var s=r,l=s.x,u=s.y,c=a([],l,t.c2p),f=a([],u,e.c2p),h=\"M\"+o(c,f,s.smoothing);n.select(this).attr(\"d\",h).style(\"stroke-width\",s.width).style(\"stroke\",s.color).style(\"stroke-dasharray\",i.dashStyle(s.dash,s.width)).style(\"fill\",\"none\")})),f.exit().remove()}function d(t,e,r,a,o,u,h,p){var d=u.selectAll(\"text.\"+p).data(h);d.enter().append(\"text\").classed(p,!0);var g=0,v={};return d.each((function(o,u){var h;if(\"auto\"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}u||(v={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,m=n.select(this).attr({\"text-anchor\":d>0?\"start\":\"end\",\"data-notex\":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);m.attr(\"transform\",f(h.p[0],h.p[1])+c(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),v.maxExtent=g,v}e.exports=function(t,e,r,i){var l=e.xaxis,c=e.yaxis,f=t._fullLayout._clips;u.makeTraceGroups(i,r,\"trace\").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,v=h.baxis,y=u.ensureSingle(r,\"g\",\"minorlayer\"),x=u.ensureSingle(r,\"g\",\"majorlayer\"),b=u.ensureSingle(r,\"g\",\"boundarylayer\"),_=u.ensureSingle(r,\"g\",\"labellayer\");r.style(\"opacity\",h.opacity),p(l,c,x,0,\"a\",g._gridlines),p(l,c,x,0,\"b\",v._gridlines),p(l,c,y,0,\"a\",g._minorgridlines),p(l,c,y,0,\"b\",v._minorgridlines),p(l,c,b,0,\"a-boundary\",g._boundarylines),p(l,c,b,0,\"b-boundary\",v._boundarylines);var w=d(t,l,c,h,0,_,g._labels,\"a-label\"),k=d(t,l,c,h,0,_,v._labels,\"b-label\");(function(t,e,r,n,i,a,o,l){var c,f,h,p,d=u.aggNums(Math.min,null,r.a),g=u.aggNums(Math.max,null,r.a),v=u.aggNums(Math.min,null,r.b),y=u.aggNums(Math.max,null,r.b);c=.5*(d+g),f=v,h=r.ab2xy(c,f,!0),p=r.dxyda_rough(c,f),void 0===o.angle&&u.extendFlat(o,s(r,i,a,h,r.dxydb_rough(c,f))),m(t,e,r,0,h,p,r.aaxis,i,a,o,\"a-title\"),c=d,f=.5*(v+y),h=r.ab2xy(c,f,!0),p=r.dxydb_rough(c,f),void 0===l.angle&&u.extendFlat(l,s(r,i,a,h,r.dxyda_rough(c,f))),m(t,e,r,0,h,p,r.baxis,i,a,l,\"b-title\")})(t,_,h,0,l,c,w,k),function(t,e,r,n,i){var s,l,c,f,h=r.select(\"#\"+t._clipPathId);h.size()||(h=r.append(\"clipPath\").classed(\"carpetclip\",!0));var p=u.ensureSingle(h,\"path\",\"carpetboundary\"),d=e.clipsegments,g=[];for(f=0;f<d.length;f++)s=d[f],l=a([],s.x,n.c2p),c=a([],s.y,i.c2p),g.push(o(l,c,s.bicubic));var v=\"M\"+g.join(\"L\")+\"Z\";h.attr(\"id\",t._clipPathId),p.attr(\"d\",v)}(h,i,f,l,c)}))};var g=h.LINE_SPACING,v=(1-h.MID_SHIFT)/g+1;function m(t,e,r,a,o,u,h,p,d,m,y){var x=[];h.title.text&&x.push(h.title.text);var b=e.selectAll(\"text.\"+y).data(x),_=m.maxExtent;b.enter().append(\"text\").classed(y,!0),b.each((function(){var e=s(r,p,d,o,u);-1===[\"start\",\"both\"].indexOf(h.showticklabels)&&(_=0);var a=h.title.font.size;_+=a+h.title.offset;var y=(m.angle+(m.flip<0?180:0)-e.angle+450)%360,x=y>90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+v)*g*a-_),b.attr(\"transform\",f(e.p[0],e.p[1])+c(e.angle)+f(0,_)).attr(\"text-anchor\",\"middle\").call(i.font,h.title.font)})),b.exit().remove()}},{\"../../components/drawing\":389,\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"./makepath\":718,\"./map_1d_array\":719,\"./orient_text\":720,\"@plotly/d3\":58}],722:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../lib/search\").findBin,a=t(\"./compute_control_points\"),o=t(\"./create_spline_evaluator\"),s=t(\"./create_i_derivative_evaluator\"),l=t(\"./create_j_derivative_evaluator\");e.exports=function(t){var e=t._a,r=t._b,u=e.length,c=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[u-1],g=r[0],v=r[c-1],m=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=m*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,v+=b,t.isVisible=function(t,e){return t>p&&t<d&&e>g&&e<v},t.isOccluded=function(t,e){return t<p||t>d||e<g||e>v},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],u,c,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),u-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),u-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),u-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(u-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),c-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(c-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(n<e[0]||n>e[u-1]|i<r[0]||i>r[c-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,g=0,v=0,m=[];n<e[0]?(f=0,h=0,g=(n-e[0])/(e[1]-e[0])):n>e[u-1]?(f=u-2,h=1,g=(n-e[u-1])/(e[u-1]-e[u-2])):h=o-(f=Math.max(0,Math.min(u-2,Math.floor(o)))),i<r[0]?(p=0,d=0,v=(i-r[0])/(r[1]-r[0])):i>r[c-1]?(p=c-2,d=1,v=(i-r[c-1])/(r[c-1]-r[c-2])):d=s-(p=Math.max(0,Math.min(c-2,Math.floor(s)))),g&&(t.dxydi(m,f,p,h,d),l[0]+=m[0]*g,l[1]+=m[1]*g),v&&(t.dxydj(m,f,p,h,d),l[0]+=m[0]*v,l[1]+=m[1]*v)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=m*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{\"../../lib/search\":535,\"./compute_control_points\":710,\"./constants\":711,\"./create_i_derivative_evaluator\":712,\"./create_j_derivative_evaluator\":713,\"./create_spline_evaluator\":714}],723:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e<u-1&&void 0!==(n=t[r][e+1])&&(a++,i+=n),r>0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r<c-1&&void 0!==(n=t[r+1][e])&&(a++,i+=n),i/Math.max(1,a)}var h,p,d,g,v,m,y,x,b,_,w,k=0;for(i=0;i<u;i++)for(a=0;a<c;a++)void 0===t[a][i]&&(s.push(i),l.push(a),t[a][i]=f(i,a)),k=Math.max(k,Math.abs(t[a][i]));if(!s.length)return t;var T=0,M=0,A=s.length;do{for(T=0,o=0;o<A;o++){i=s[o],a=l[o];var S,E,C,L,P,O,I=0,D=0;0===i?(C=e[P=Math.min(u-1,2)],L=e[1],S=t[a][P],D+=(E=t[a][1])+(E-S)*(e[0]-L)/(L-C),I++):i===u-1&&(C=e[P=Math.max(0,u-3)],L=e[u-2],S=t[a][P],D+=(E=t[a][u-2])+(E-S)*(e[u-1]-L)/(L-C),I++),(0===i||i===u-1)&&a>0&&a<c-1&&(h=r[a+1]-r[a],D+=((p=r[a]-r[a-1])*t[a+1][i]+h*t[a-1][i])/(p+h),I++),0===a?(C=r[O=Math.min(c-1,2)],L=r[1],S=t[O][i],D+=(E=t[1][i])+(E-S)*(r[0]-L)/(L-C),I++):a===c-1&&(C=r[O=Math.max(0,c-3)],L=r[c-2],S=t[O][i],D+=(E=t[c-2][i])+(E-S)*(r[c-1]-L)/(L-C),I++),(0===a||a===c-1)&&i>0&&i<u-1&&(h=e[i+1]-e[i],D+=((p=e[i]-e[i-1])*t[a][i+1]+h*t[a][i-1])/(p+h),I++),I?D/=I:(d=e[i+1]-e[i],g=e[i]-e[i-1],x=(v=r[a+1]-r[a])*(m=r[a]-r[a-1])*(v+m),D=((y=d*g*(d+g))*(m*t[a+1][i]+v*t[a-1][i])+x*(g*t[a][i+1]+d*t[a][i-1]))/(x*(g+d)+y*(m+v))),T+=(_=(b=D-t[a][i])/k)*_,w=I?0:.85,t[a][i]+=b*(1+w)}T=Math.sqrt(T)}while(M++<100&&T>1e-5);return n.log(\"Smoother converged to\",T,\"after\",M,\"iterations\"),t}},{\"../../lib\":515}],724:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArray1D;e.exports=function(t,e,r){var i=r(\"x\"),a=i&&i.length,o=r(\"y\"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,a&&!n(i)||s&&!n(o))e._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{\"../../lib\":515}],725:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../scattergeo/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/color/attributes\").defaultLine,l=t(\"../../lib/extend\").extendFlat,u=i.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:i.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},u.color,{dflt:s}),width:l({},u.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:i.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/color/attributes\":366,\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../scattergeo/attributes\":978}],726:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../components/colorscale/calc\"),o=t(\"../scatter/arrays_to_calcdata\"),s=t(\"../scatter/calc_selection\");function l(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,u=e._length,c=new Array(u);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f<u;f++){var h=c[f]={},p=e.locations[f],d=e.z[f];r(p)&&n(d)?(h.loc=p,h.z=d):(h.loc=null,h.z=i),h.index=f}return o(c,e),a(t,e,{vals:e.z,containerStr:\"\",cLetter:\"z\"}),s(c,e),c}},{\"../../components/colorscale/calc\":375,\"../../constants/numerical\":491,\"../scatter/arrays_to_calcdata\":935,\"../scatter/calc_selection\":938,\"fast-isnumeric\":190}],727:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/defaults\"),a=t(\"./attributes\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\"locations\"),u=s(\"z\");if(l&&l.length&&n.isArrayOrTypedArray(u)&&u.length){e._length=Math.min(l.length,u.length);var c,f=s(\"geojson\");(\"string\"==typeof f&&\"\"!==f||n.isPlainObject(f))&&(c=\"geojson-id\"),\"geojson-id\"===s(\"locationmode\",c)&&s(\"featureidkey\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),s(\"marker.line.width\")&&s(\"marker.line.color\"),s(\"marker.opacity\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"}),n.coerceSelectionMarkerOpacity(e,s)}else e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"./attributes\":725}],728:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){t.location=e.location,t.z=e.z;var a=n[i];return a.fIn&&a.fIn.properties&&(t.properties=a.fIn.properties),t.ct=a.ct,t}},{}],729:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"./attributes\"),a=t(\"../../lib\").fillText;e.exports=function(t,e,r){var o,s,l,u,c=t.cd,f=c[0].trace,h=t.subplot,p=[e,r],d=[e+360,r];for(s=0;s<c.length;s++)if(u=!1,(o=c[s])._polygons){for(l=0;l<o._polygons.length;l++)o._polygons[l].contains(p)&&(u=!u),o._polygons[l].contains(d)&&(u=!u);if(u)break}if(u&&o)return t.x0=t.x1=t.xa.c2p(o.ct),t.y0=t.y1=t.ya.c2p(o.ct),t.index=o.index,t.location=o.loc,t.z=o.z,t.zLabel=n.tickText(h.mockAxis,h.mockAxis.c2l(o.z),\"hover\").text,t.hovertemplate=o.hovertemplate,function(t,e,r){if(!e.hovertemplate){var n=r.hi||e.hoverinfo,o=String(r.loc),s=\"all\"===n?i.hoverinfo.flags:n.split(\"+\"),l=-1!==s.indexOf(\"name\"),u=-1!==s.indexOf(\"location\"),c=-1!==s.indexOf(\"z\"),f=-1!==s.indexOf(\"text\"),h=[];!l&&u?t.nameOverride=o:(l&&(t.nameOverride=e.name),u&&h.push(o)),c&&h.push(t.zLabel),f&&a(r,e,h),t.extraText=h.join(\"<br>\")}}(t,f,o),[t]}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"./attributes\":725}],730:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"choropleth\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}},{\"../../plots/geo\":598,\"../heatmap/colorbar\":804,\"./attributes\":725,\"./calc\":726,\"./defaults\":727,\"./event_data\":728,\"./hover\":729,\"./plot\":731,\"./select\":732,\"./style\":733}],731:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/geo_location_utils\"),o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../plots/cartesian/autorange\").findExtremes,l=t(\"./style\").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,u=r._length,c=\"geojson-id\"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p<u;p++){var d=t[p],g=\"geojson-id\"===l?d.fOut:a.locationToFeature(l,d.loc,c);if(g){d.geojson=g,d.ct=g.properties.ct,d._polygons=a.feature2polygons(g);var v=a.computeBbox(g);f.push(v[0],v[2]),h.push(v[1],v[3])}else d.geojson=null}if(\"geojson\"===n.fitbounds&&\"geojson-id\"===l){var m=a.computeBbox(a.getTraceGeojson(r));f=[m[0],m[2]],h=[m[1],m[3]]}var y={padded:!0};r._extremes.lon=s(n.lonaxis._ax,f,y),r._extremes.lat=s(n.lataxis._ax,h,y)},plot:function(t,e,r){var a=e.layers.backplot.select(\".choroplethlayer\");i.makeTraceGroups(a,r,\"trace choropleth\").each((function(e){var r=n.select(this).selectAll(\"path.choroplethlocation\").data(i.identity);r.enter().append(\"path\").classed(\"choroplethlocation\",!0),r.exit().remove(),l(t,e)}))}}},{\"../../lib\":515,\"../../lib/geo_location_utils\":508,\"../../lib/topojson_utils\":544,\"../../plots/cartesian/autorange\":565,\"./style\":733,\"@plotly/d3\":58}],732:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)(i=(n=s[r]).ct)&&(a=l.c2p(i),o=u.c2p(i),e.contains([a,o],null,r,t)?(c.push({pointNumber:r,lon:i[0],lat:i[1]}),n.selected=1):n.selected=0);return c}},{}],733:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../components/drawing\"),o=t(\"../../components/colorscale\");function s(t,e){var r=e[0].trace,s=e[0].node3.selectAll(\".choroplethlocation\"),l=r.marker||{},u=l.line||{},c=o.makeColorScaleFuncFromTrace(r);s.each((function(t){n.select(this).attr(\"fill\",c(t.z)).call(i.stroke,t.mlc||u.color).call(a.dashLine,\"\",t.mlw||u.width||0).style(\"opacity\",l.opacity)})),a.selectedPointStyle(s,r)}e.exports={style:function(t,e){e&&s(0,e)},styleOnSelect:function(t,e){var r=e[0].node3,n=e[0].trace;n.selectedpoints?a.selectedPointStyle(r.selectAll(\".choroplethlocation\"),n):s(0,e)}}},{\"../../components/color\":367,\"../../components/colorscale\":379,\"../../components/drawing\":389,\"@plotly/d3\":58}],734:[function(t,e,r){\"use strict\";var n=t(\"../choropleth/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s({locations:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:s({},n.featureidkey,{}),below:{valType:\"string\",editType:\"plot\"},text:n.text,hovertext:n.hovertext,marker:{line:{color:s({},n.marker.line.color,{editType:\"plot\"}),width:s({},n.marker.line.width,{editType:\"plot\"}),editType:\"calc\"},opacity:s({},n.marker.opacity,{editType:\"plot\"}),editType:\"calc\"},selected:{marker:{opacity:s({},n.selected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:s({},n.unselected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},hoverinfo:n.hoverinfo,hovertemplate:a({},{keys:[\"properties\"]}),showlegend:s({},o.showlegend,{dflt:!1})},i(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../choropleth/attributes\":725}],735:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../components/colorscale\"),o=t(\"../../components/drawing\"),s=t(\"../../lib/geojson_utils\").makeBlank,l=t(\"../../lib/geo_location_utils\");function u(t){var e,r=t[0].trace,n=r._opts;if(r.selectedpoints){for(var a=o.makeSelectedPointStyleFns(r),s=0;s<t.length;s++){var l=t[s];l.fOut&&(l.fOut.properties.mo2=a.selectedOpacityFn(l))}e={type:\"identity\",property:\"mo2\"}}else e=i.isArrayOrTypedArray(r.marker.opacity)?{type:\"identity\",property:\"mo\"}:r.marker.opacity;return i.extendFlat(n.fill.paint,{\"fill-opacity\":e}),i.extendFlat(n.line.paint,{\"line-opacity\":e}),n}e.exports={convert:function(t){var e=t[0].trace,r=!0===e.visible&&0!==e._length,o={layout:{visibility:\"none\"},paint:{}},c={layout:{visibility:\"none\"},paint:{}},f=e._opts={fill:o,line:c,geojson:s()};if(!r)return f;var h=l.extractTraceFeature(t);if(!h)return f;var p,d,g,v=a.makeColorScaleFuncFromTrace(e),m=e.marker,y=m.line||{};i.isArrayOrTypedArray(m.opacity)&&(p=function(t){var e=t.mo;return n(e)?+i.constrain(e,0,1):0}),i.isArrayOrTypedArray(y.color)&&(d=function(t){return t.mlc}),i.isArrayOrTypedArray(y.width)&&(g=function(t){return t.mlw});for(var x=0;x<t.length;x++){var b=t[x],_=b.fOut;if(_){var w=_.properties;w.fc=v(b.z),p&&(w.mo=p(b)),d&&(w.mlc=d(b)),g&&(w.mlw=g(b)),b.ct=w.ct,b._polygons=l.feature2polygons(_)}}var k=p?{type:\"identity\",property:\"mo\"}:m.opacity;return i.extendFlat(o.paint,{\"fill-color\":{type:\"identity\",property:\"fc\"},\"fill-opacity\":k}),i.extendFlat(c.paint,{\"line-color\":d?{type:\"identity\",property:\"mlc\"}:y.color,\"line-width\":g?{type:\"identity\",property:\"mlw\"}:y.width,\"line-opacity\":k}),o.layout.visibility=\"visible\",c.layout.visibility=\"visible\",f.geojson={type:\"FeatureCollection\",features:h},u(t),f},convertOnSelect:u}},{\"../../components/colorscale\":379,\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/geo_location_utils\":508,\"../../lib/geojson_utils\":509,\"fast-isnumeric\":190}],736:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/defaults\"),a=t(\"./attributes\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\"locations\"),u=s(\"z\"),c=s(\"geojson\");n.isArrayOrTypedArray(l)&&l.length&&n.isArrayOrTypedArray(u)&&u.length&&(\"string\"==typeof c&&\"\"!==c||n.isPlainObject(c))?(s(\"featureidkey\"),e._length=Math.min(l.length,u.length),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),s(\"marker.line.width\")&&s(\"marker.line.color\"),s(\"marker.opacity\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"}),n.coerceSelectionMarkerOpacity(e,s)):e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"./attributes\":734}],737:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"../choropleth/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"../choropleth/hover\"),eventData:t(\"../choropleth/event_data\"),selectPoints:t(\"../choropleth/select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.updateOnSelect(e)},getBelow:function(t,e){for(var r=e.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(\"string\"==typeof i&&0===i.indexOf(\"water\"))for(var a=n+1;a<r.length;a++)if(\"string\"==typeof(i=r[a].id)&&-1===i.indexOf(\"plotly-\"))return i}},moduleType:\"trace\",name:\"choroplethmapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"noOpacity\",\"showLegend\"],meta:{hr_name:\"choropleth_mapbox\"}}},{\"../../plots/mapbox\":622,\"../choropleth/calc\":726,\"../choropleth/event_data\":728,\"../choropleth/hover\":729,\"../choropleth/select\":732,\"../heatmap/colorbar\":804,\"./attributes\":734,\"./defaults\":736,\"./plot\":738}],738:[function(t,e,r){\"use strict\";var n=t(\"./convert\").convert,i=t(\"./convert\").convertOnSelect,a=t(\"../../plots/mapbox/constants\").traceLayerPrefix;function o(t,e){this.type=\"choroplethmapbox\",this.subplot=t,this.uid=e,this.sourceId=\"source-\"+e,this.layerList=[[\"fill\",a+e+\"-fill\"],[\"line\",a+e+\"-line\"]],this.below=null}var s=o.prototype;s.update=function(t){this._update(n(t)),t[0].trace._glTrace=this},s.updateOnSelect=function(t){this._update(i(t))},s._update=function(t){var e=this.subplot,r=this.layerList,n=e.belowLookup[\"trace-\"+this.uid];e.map.getSource(this.sourceId).setData(t.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(t,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=t[o];e.setOptions(s,\"setLayoutProperty\",l.layout),\"visible\"===l.layout.visibility&&e.setOptions(s,\"setPaintProperty\",l.paint)}},s._addLayers=function(t,e){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=t[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},e)}},s._removeLayers=function(){for(var t=this.subplot.map,e=this.layerList,r=e.length-1;r>=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(a,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{\"../../plots/mapbox/constants\":620,\"./convert\":735}],739:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,u={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},u:{valType:\"data_array\",editType:\"calc\"},v:{valType:\"data_array\",editType:\"calc\"},w:{valType:\"data_array\",editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"scaled\",\"absolute\"],editType:\"calc\",dflt:\"scaled\"},sizeref:{valType:\"number\",editType:\"calc\",min:0},anchor:{valType:\"enumerated\",editType:\"calc\",values:[\"tip\",\"tail\",\"cm\",\"center\"],dflt:\"cm\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"norm\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(u,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"})),[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){u[t]=o[t]})),u.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),u.transforms=void 0,e.exports=u},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../mesh3d/attributes\":876}],740:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,u=0;u<o;u++){var c=r[u],f=i[u],h=a[u],p=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,p),l=Math.min(l,p)}e._len=o,e._normMax=s,n(t,e,{vals:[l,s],containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":375}],741:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_cone3d,i=t(\"../../../stackgl_modules\").gl_cone3d.createConeMesh,a=t(\"../../lib\").simpleMap,o=t(\"../../lib/gl_format_color\").parseColorScale,s=t(\"../../components/colorscale\").extractOpts,l=t(\"../../plots/gl3d/zip3\");function u(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var c=u.prototype;c.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index,r=this.data.x[e],n=this.data.y[e],i=this.data.z[e],a=this.data.u[e],o=this.data.v[e],s=this.data.w[e];t.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return Array.isArray(l)&&void 0!==l[e]?t.textLabel=l[e]:l&&(t.textLabel=l),!0}};var f={xaxis:0,yaxis:1,zaxis:2},h={tip:1,tail:0,cm:.25,center:.5},p={tip:1,tail:1,cm:.75,center:.5};function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,u={};function c(t,e){var n=r[e],o=i[f[e]];return a(t,(function(t){return n.d2l(t)*o}))}u.vectors=l(c(e.u,\"xaxis\"),c(e.v,\"yaxis\"),c(e.w,\"zaxis\"),e._len),u.positions=l(c(e.x,\"xaxis\"),c(e.y,\"yaxis\"),c(e.z,\"zaxis\"),e._len);var d=s(e);u.colormap=o(e),u.vertexIntensityBounds=[d.min/e._normMax,d.max/e._normMax],u.coneOffset=h[e.anchor],\"scaled\"===e.sizemode?u.coneSize=e.sizeref||.5:u.coneSize=e.sizeref&&e._normMax?e.sizeref/e._normMax:.5;var g=n(u),v=e.lightposition;return g.lightPosition=[v.x,v.y,v.z],g.ambient=e.lighting.ambient,g.diffuse=e.lighting.diffuse,g.specular=e.lighting.specular,g.roughness=e.lighting.roughness,g.fresnel=e.lighting.fresnel,g.opacity=e.opacity,e._pad=p[e.anchor]*g.vectorScale*g.coneScale*e._normMax,g}c.update=function(t){this.data=t;var e=d(this.scene,t);this.mesh.update(e)},c.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=d(t,e),a=i(r,n),o=new u(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{\"../../../stackgl_modules\":1133,\"../../components/colorscale\":379,\"../../lib\":515,\"../../lib/gl_format_color\":511,\"../../plots/gl3d/zip3\":618}],742:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/defaults\"),a=t(\"./attributes\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\"u\"),u=s(\"v\"),c=s(\"w\"),f=s(\"x\"),h=s(\"y\"),p=s(\"z\");l&&l.length&&u&&u.length&&c&&c.length&&f&&f.length&&h&&h.length&&p&&p.length?(s(\"sizeref\"),s(\"sizemode\"),s(\"anchor\"),s(\"lighting.ambient\"),s(\"lighting.diffuse\"),s(\"lighting.specular\"),s(\"lighting.roughness\"),s(\"lighting.fresnel\"),s(\"lightposition.x\"),s(\"lightposition.y\"),s(\"lightposition.z\"),i(t,e,o,s,{prefix:\"\",cLetter:\"c\"}),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),s(\"uhoverformat\"),s(\"vhoverformat\"),s(\"whoverformat\"),s(\"xhoverformat\"),s(\"yhoverformat\"),s(\"zhoverformat\"),e._length=null):e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"./attributes\":739}],743:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"cone\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:{min:\"cmin\",max:\"cmax\"},calc:t(\"./calc\"),plot:t(\"./convert\"),eventData:function(t,e){return t.norm=e.traceCoordinate[6],t},meta:{}}},{\"../../plots/gl3d\":607,\"./attributes\":739,\"./calc\":740,\"./convert\":741,\"./defaults\":742}],744:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../scatter/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\"),o=a.axisHoverFormat,s=a.descriptionOnlyNumbers,l=t(\"../../components/colorscale/attributes\"),u=t(\"../../components/drawing/attributes\").dash,c=t(\"../../plots/font_attributes\"),f=t(\"../../lib/extend\").extendFlat,h=t(\"../../constants/filter_ops\"),p=h.COMPARISON_OPS2,d=h.INTERVAL_OPS,g=i.line;e.exports=f({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,text:n.text,hovertext:n.hovertext,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:n.hovertemplate,texttemplate:f({},n.texttemplate,{}),textfont:f({},n.textfont,{}),hoverongaps:n.hoverongaps,connectgaps:f({},n.connectgaps,{}),fillcolor:{valType:\"color\",editType:\"calc\"},autocontour:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"contours.start\":void 0,\"contours.end\":void 0,\"contours.size\":void 0}},ncontours:{valType:\"integer\",dflt:15,min:1,editType:\"calc\"},contours:{type:{valType:\"enumerated\",values:[\"levels\",\"constraint\"],dflt:\"levels\",editType:\"calc\"},start:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},end:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},coloring:{valType:\"enumerated\",values:[\"fill\",\"heatmap\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:{valType:\"boolean\",dflt:!0,editType:\"plot\"},showlabels:{valType:\"boolean\",dflt:!1,editType:\"plot\"},labelfont:c({editType:\"plot\",colorEditType:\"style\"}),labelformat:{valType:\"string\",dflt:\"\",editType:\"plot\",description:s(\"contour label\")},operation:{valType:\"enumerated\",values:[].concat(p).concat(d),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:f({},g.color,{editType:\"style+colorbars\"}),width:{valType:\"number\",min:0,editType:\"style+colorbars\"},dash:u,smoothing:f({},g.smoothing,{}),editType:\"plot\"}},l(\"\",{cLetter:\"z\",autoColorDflt:!1,editTypeOverride:\"calc\"}))},{\"../../components/colorscale/attributes\":374,\"../../components/drawing/attributes\":388,\"../../constants/filter_ops\":487,\"../../lib/extend\":505,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/font_attributes\":594,\"../heatmap/attributes\":801,\"../scatter/attributes\":936}],745:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"../heatmap/calc\"),a=t(\"./set_contours\"),o=t(\"./end_plus\");e.exports=function(t,e){var r=i(t,e),s=r[0].z;a(e,s);var l,u=e.contours,c=n.extractOpts(e);if(\"heatmap\"===u.coloring&&c.auto&&!1===e.autocontour){var f=u.start,h=o(u),p=u.size||1,d=Math.floor((h-f)/p)+1;isFinite(p)||(p=1,d=1);var g=f-p/2;l=[g,g+d*p]}else l=s;return n.calc(t,e,{vals:l,cLetter:\"z\"}),r}},{\"../../components/colorscale\":379,\"../heatmap/calc\":802,\"./end_plus\":755,\"./set_contours\":763}],746:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n=t[0],i=n.z;switch(e.type){case\"levels\":var a=Math.min(i[0][0],i[0][1]);for(r=0;r<t.length;r++){var o=t[r];o.prefixBoundary=!o.edgepaths.length&&(a>o.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,u=-1/0,c=1/0;for(r=0;r<l;r++)c=Math.min(c,i[r][0]),c=Math.min(c,i[r][s-1]),u=Math.max(u,i[r][0]),u=Math.max(u,i[r][s-1]);for(r=1;r<s-1;r++)c=Math.min(c,i[0][r]),c=Math.min(c,i[l-1][r]),u=Math.max(u,i[0][r]),u=Math.max(u,i[l-1][r]);var f,h,p=e.value;switch(e._operation){case\">\":p>u&&(n.prefixBoundary=!0);break;case\"<\":(p<c||n.starts.length&&p===c)&&(n.prefixBoundary=!0);break;case\"[]\":f=Math.min(p[0],p[1]),((h=Math.max(p[0],p[1]))<c||f>u||n.starts.length&&h===c)&&(n.prefixBoundary=!0);break;case\"][\":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),f<c&&h>u&&(n.prefixBoundary=!0)}}}},{}],747:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale\"),i=t(\"./make_color_map\"),a=t(\"./end_plus\");e.exports={min:\"zmin\",max:\"zmax\",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,u=o.coloring,c=i(e,{isColorbar:!0});if(\"heatmap\"===u){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else\"fill\"===u&&(r._fillcolor=c);r._line={color:\"lines\"===u?c:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{\"../../components/colorscale\":379,\"./end_plus\":755,\"./make_color_map\":760}],748:[function(t,e,r){\"use strict\";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],749:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./label_defaults\"),a=t(\"../../components/color\"),o=a.addOpacity,s=a.opacity,l=t(\"../../constants/filter_ops\"),u=l.CONSTRAINT_REDUCTION,c=l.COMPARISON_OPS2;e.exports=function(t,e,r,a,l,f){var h,p,d,g=e.contours,v=r(\"contours.operation\");g._operation=u[v],function(t,e){var r;-1===c.indexOf(e.operation)?(t(\"contours.value\",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t(\"contours.value\",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),\"=\"===v?h=g.showlines=!0:(h=r(\"contours.showlines\"),d=r(\"fillcolor\",o((t.line||{}).color||l,.5))),h&&(p=r(\"line.color\",d&&s(d)?o(e.fillcolor,1):l),r(\"line.width\",2),r(\"line.dash\")),r(\"line.smoothing\"),i(r,a,p,f)}},{\"../../components/color\":367,\"../../constants/filter_ops\":487,\"./label_defaults\":759,\"fast-isnumeric\":190}],750:[function(t,e,r){\"use strict\";var n=t(\"../../constants/filter_ops\"),i=t(\"fast-isnumeric\");function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}e.exports={\"[]\":o(\"[]\"),\"][\":o(\"][\"),\">\":s(\">\"),\"<\":s(\"<\"),\"=\":s(\"=\")}},{\"../../constants/filter_ops\":487,\"fast-isnumeric\":190}],751:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=n(\"contours.start\"),a=n(\"contours.end\"),o=!1===i||!1===a,s=r(\"contours.size\");!(o?e.autocontour=!0:r(\"autocontour\",!1))&&s||r(\"ncontours\")}},{}],752:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case\"=\":case\"<\":return t;case\">\":for(1!==t.length&&n.warn(\"Contour data invalid for the specified inequality operation.\"),a=t[0],r=0;r<a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r<a.paths.length;r++)a.paths[r]=s(a.paths[r]);for(r=0;r<a.starts.length;r++)a.starts[r]=s(a.starts[r]);return t;case\"][\":var u=s;s=l,l=u;case\"[]\":for(2!==t.length&&n.warn(\"Contour data invalid for the specified inequality range operation.\"),a=i(t[0]),o=i(t[1]),r=0;r<a.edgepaths.length;r++)a.edgepaths[r]=s(a.edgepaths[r]);for(r=0;r<a.paths.length;r++)a.paths[r]=s(a.paths[r]);for(r=0;r<a.starts.length;r++)a.starts[r]=s(a.starts[r]);for(;o.edgepaths.length;)a.edgepaths.push(l(o.edgepaths.shift()));for(;o.paths.length;)a.paths.push(l(o.paths.shift()));for(;o.starts.length;)a.starts.push(l(o.starts.shift()));return[a]}}},{\"../../lib\":515}],753:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../heatmap/xyz_defaults\"),a=t(\"../scatter/period_defaults\"),o=t(\"./constraint_defaults\"),s=t(\"./contours_defaults\"),l=t(\"./style_defaults\"),u=t(\"../heatmap/label_defaults\"),c=t(\"./attributes\");e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,c,r,i)}if(i(t,e,h,f)){a(t,e,f,h),h(\"xhoverformat\"),h(\"yhoverformat\"),h(\"text\"),h(\"hovertext\"),h(\"hoverongaps\"),h(\"hovertemplate\");var p=\"constraint\"===h(\"contours.type\");h(\"connectgaps\",n.isArray1D(e.z)),p?o(t,e,h,f,r):(s(t,e,h,(function(r){return n.coerce2(t,e,c,r)})),l(t,e,h,f)),e.contours&&\"heatmap\"===e.contours.coloring&&u(h,f)}else e.visible=!1}},{\"../../lib\":515,\"../heatmap/label_defaults\":811,\"../heatmap/xyz_defaults\":816,\"../scatter/period_defaults\":956,\"./attributes\":744,\"./constraint_defaults\":749,\"./contours_defaults\":751,\"./style_defaults\":765}],754:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./constraint_mapping\"),a=t(\"./end_plus\");e.exports=function(t,e,r){for(var o=\"constraint\"===t.type?i[t._operation](t.value):t,s=o.size,l=[],u=a(o),c=r.trace._carpetTrace,f=c?{xaxis:c.aaxis,yaxis:c.baxis,x:r.a,y:r.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:r.x,y:r.y},h=o.start;h<u;h+=s)if(l.push(n.extendFlat({level:h,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},f)),l.length>1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return l}},{\"../../lib\":515,\"./constraint_mapping\":750,\"./end_plus\":755}],755:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],756:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./constants\");function a(t,e,r,n){return Math.abs(t[0]-e[0])<r&&Math.abs(t[1]-e[1])<n}function o(t,e,r,o,l){var u,c=e.join(\",\"),f=t.crossings[c],h=function(t,e,r){var n=0,a=0;return t>20&&e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1,[n,a]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,v=e.slice(),m=h.slice();for(u=0;u<1e4;u++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[c]=i.SADDLEREMAINDER[f]):delete t.crossings[c],!(h=i.NEWDELTA[f])){n.log(\"Found bad marching index:\",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],c=e.join(\",\"),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===v[0]&&e[1]===v[1]&&h[0]===m[0]&&h[1]===m[1]||r&&y)break;f=t.crossings[c]}1e4===u&&n.log(\"Infinite loop in contour?\");var x,b,_,w,k,T,M,A,S,E,C,L,P,O,I,D=a(p[0],p[p.length-1],o,l),z=0,R=.2*t.smoothing,F=[],N=0;for(u=1;u<p.length;u++)z+=(L=p[u],P=p[u-1],O=void 0,I=void 0,O=L[2]-P[2],I=L[3]-P[3],M=Math.sqrt(O*O+I*I)),F.push(M);var B=z/F.length*R;function j(t){return p[t%p.length]}for(u=p.length-2;u>=N;u--)if((x=F[u])<B){for(_=0,b=u-1;b>=N&&x+F[b]<B;b--)x+=F[b];if(D&&u===p.length-2)for(_=0;_<b&&x+F[_]<B;_++)x+=F[_];k=u-b+_+1,T=Math.floor((u+b+_+2)/2),w=D||u!==p.length-2?D||-1!==b?k%2?j(T):[(j(T)[0]+j(T+1)[0])/2,(j(T)[1]+j(T+1)[1])/2]:p[0]:p[p.length-1],p.splice(b+1,u-b+1,w),u=b+1,_&&(N=_),D&&(u===p.length-2?p[_]=p[p.length-1]:0===u&&(p[p.length-1]=p[0]))}for(p.splice(0,N),u=0;u<p.length;u++)p[u].length=2;if(!(p.length<2))if(D)p.pop(),t.paths.push(p);else{r||n.log(\"Unclosed interior contour?\",t.level,v.join(\",\"),p.join(\"L\"));var U=!1;for(A=0;A<t.edgepaths.length;A++)if(E=t.edgepaths[A],!U&&a(E[0],p[p.length-1],o,l)){p.pop(),U=!0;var V=!1;for(S=0;S<t.edgepaths.length;S++)if(a((C=t.edgepaths[S])[C.length-1],p[0],o,l)){V=!0,p.shift(),t.edgepaths.splice(A,1),S===A?t.paths.push(p.concat(C)):(S>A&&S--,t.edgepaths[S]=C.concat(p,E));break}V||(t.edgepaths[A]=p.concat(E))}for(A=0;A<t.edgepaths.length&&!U;A++)a((E=t.edgepaths[A])[E.length-1],p[0],o,l)&&(p.shift(),t.edgepaths[A]=E.concat(p),U=!0);U||t.edgepaths.push(p)}}function s(t,e,r){var n=e[0]+Math.max(r[0],0),i=e[1]+Math.max(r[1],0),a=t.z[i][n],o=t.xaxis,s=t.yaxis;if(r[1]){var l=(t.level-a)/(t.z[i][n+1]-a),u=(1!==l?(1-l)*o.c2l(t.x[n]):0)+(0!==l?l*o.c2l(t.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(t.y[i],!0),n+l,i]}var c=(t.level-a)/(t.z[i+1][n]-a),f=(1!==c?(1-c)*s.c2l(t.y[i]):0)+(0!==c?c*s.c2l(t.y[i+1]):0);return[o.c2p(t.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}e.exports=function(t,e,r){var i,a,s,l;for(e=e||.01,r=r||.01,a=0;a<t.length;a++){for(s=t[a],l=0;l<s.starts.length;l++)o(s,s.starts[l],\"edge\",e,r);for(i=0;Object.keys(s.crossings).length&&i<1e4;)i++,o(s,Object.keys(s.crossings)[0].split(\",\").map(Number),void 0,e,r);1e4===i&&n.log(\"Infinite loop in contour?\")}}},{\"../../lib\":515,\"./constants\":748}],757:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../heatmap/hover\");e.exports=function(t,e,r,a,o){o||(o={}),o.isContour=!0;var s=i(t,e,r,a,o);return s&&s.forEach((function(t){var e=t.trace;\"constraint\"===e.contours.type&&(e.fillcolor&&n.opacity(e.fillcolor)?t.color=n.addOpacity(e.fillcolor,1):e.contours.showlines&&n.opacity(e.line.color)&&(t.color=n.addOpacity(e.line.color,1)))})),s}},{\"../../components/color\":367,\"../heatmap/hover\":808}],758:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\").plot,style:t(\"./style\"),colorbar:t(\"./colorbar\"),hoverPoints:t(\"./hover\"),moduleType:\"trace\",name:\"contour\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"contour\",\"showLegend\"],meta:{}}},{\"../../plots/cartesian\":578,\"./attributes\":744,\"./calc\":745,\"./colorbar\":747,\"./defaults\":753,\"./hover\":757,\"./plot\":762,\"./style\":764}],759:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r,i){if(i||(i={}),t(\"contours.showlabels\")){var a=e.font;n.coerceFont(t,\"contours.labelfont\",{family:a.family,size:a.size,color:r}),t(\"contours.labelformat\")}!1!==i.hasHover&&t(\"zhoverformat\")}},{\"../../lib\":515}],760:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/colorscale\"),a=t(\"./end_plus\");e.exports=function(t){var e=t.contours,r=e.start,o=a(e),s=e.size||1,l=Math.floor((o-r)/s)+1,u=\"lines\"===e.coloring?0:1,c=i.extractOpts(t);isFinite(s)||(s=1,l=1);var f,h,p=c.reversescale?i.flipScale(c.colorscale):c.colorscale,d=p.length,g=new Array(d),v=new Array(d);if(\"heatmap\"===e.coloring){var m=c.min,y=c.max;for(h=0;h<d;h++)f=p[h],g[h]=f[0]*(y-m)+m,v[h]=f[1];var x=n.extent([m,y,e.start,e.start+s*(l-1)]),b=x[m<y?0:1],_=x[m<y?1:0];b!==m&&(g.splice(0,0,b),v.splice(0,0,v[0])),_!==y&&(g.push(_),v.push(v[v.length-1]))}else for(h=0;h<d;h++)f=p[h],g[h]=(f[0]*(l+u-1)-u/2)*s+r,v[h]=f[1];return i.makeColorScaleFunc({domain:g,range:v},{noNumericCheck:!0})}},{\"../../components/colorscale\":379,\"./end_plus\":755,\"@plotly/d3\":58}],761:[function(t,e,r){\"use strict\";var n=t(\"./constants\");function i(t,e){var r=(e[0][0]>t?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,a,o,s,l,u,c,f,h=t[0].z,p=h.length,d=h[0].length,g=2===p||2===d;for(r=0;r<p-1;r++)for(o=[],0===r&&(o=o.concat(n.BOTTOMSTART)),r===p-2&&(o=o.concat(n.TOPSTART)),e=0;e<d-1;e++)for(a=o.slice(),0===e&&(a=a.concat(n.LEFTSTART)),e===d-2&&(a=a.concat(n.RIGHTSTART)),s=e+\",\"+r,l=[[h[r][e],h[r][e+1]],[h[r+1][e],h[r+1][e+1]]],f=0;f<t.length;f++)(u=i((c=t[f]).level,l))&&(c.crossings[s]=u,-1!==a.indexOf(u)&&(c.starts.push([e,r]),g&&-1!==a.indexOf(u,a.indexOf(u)+1)&&c.starts.push([e,r])))}},{\"./constants\":748}],762:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../components/colorscale\"),s=t(\"../../lib/svg_text_utils\"),l=t(\"../../plots/cartesian/axes\"),u=t(\"../../plots/cartesian/set_convert\"),c=t(\"../heatmap/plot\"),f=t(\"./make_crossings\"),h=t(\"./find_all_paths\"),p=t(\"./empty_pathinfo\"),d=t(\"./convert_to_constraints\"),g=t(\"./close_boundaries\"),v=t(\"./constants\"),m=v.LABELOPTIMIZER;function y(t,e){var r,n,o,s,l,u,c,f=\"\",h=0,p=t.edgepaths.map((function(t,e){return e})),d=!0;function g(t){return Math.abs(t[1]-e[2][1])<.01}function v(t){return Math.abs(t[0]-e[0][0])<.01}function m(t){return Math.abs(t[0]-e[2][0])<.01}for(;p.length;){for(u=a.smoothopen(t.edgepaths[h],t.smoothing),f+=d?u:u.replace(/^M/,\"L\"),p.splice(p.indexOf(h),1),r=t.edgepaths[h][t.edgepaths[h].length-1],s=-1,o=0;o<4;o++){if(!r){i.log(\"Missing end?\",h,t);break}for(c=r,Math.abs(c[1]-e[0][1])<.01&&!m(r)?n=e[1]:v(r)?n=e[0]:g(r)?n=e[3]:m(r)&&(n=e[2]),l=0;l<t.edgepaths.length;l++){var y=t.edgepaths[l][0];Math.abs(r[0]-n[0])<.01?Math.abs(r[0]-y[0])<.01&&(y[1]-r[1])*(n[1]-y[1])>=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):i.log(\"endpt to newendpt is not vert. or horz.\",r,n,y)}if(r=n,s>=0)break;f+=\"L\"+n}if(s===t.edgepaths.length){i.log(\"unclosed perimeter path\");break}h=s,(d=-1===p.indexOf(h))&&(h=p[0],f+=\"Z\")}for(h=0;h<t.paths.length;h++)f+=a.smoothclosed(t.paths[h],t.smoothing);return f}function x(t,e,r,n){var a=e.width/2,o=e.height/2,s=t.x,l=t.y,u=t.theta,c=Math.cos(u)*a,f=Math.sin(u)*a,h=(s>n.center?n.right-s:s-n.left)/(c+Math.abs(Math.sin(u)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(u)*o);if(h<1||p<1)return 1/0;var d=m.EDGECOST*(1/(h-1)+1/(p-1));d+=m.ANGLECOST*u*u;for(var g=s-c,v=l-f,y=s+c,x=l+f,b=0;b<r.length;b++){var _=r[b],w=Math.cos(_.theta)*_.width/2,k=Math.sin(_.theta)*_.width/2,T=2*i.segmentDistance(g,v,y,x,_.x-w,_.y-k,_.x+w,_.y+k)/(e.height+_.height),M=_.level===e.level,A=M?m.SAMELEVELDISTANCE:1;if(T<=A)return 1/0;d+=m.NEIGHBORCOST*(M?m.SAMELEVELFACTOR:1)/(T-A)}return d}function b(t){var e,r,n=t.trace._emptypoints,i=[],a=t.z.length,o=t.z[0].length,s=[];for(e=0;e<o;e++)s.push(1);for(e=0;e<a;e++)i.push(s.slice());for(e=0;e<n.length;e++)i[(r=n[e])[0]][r[1]]=0;return t.zmask=i,i}r.plot=function(t,e,o,s){var l=e.xaxis,u=e.yaxis;i.makeTraceGroups(s,o,\"contour\").each((function(o){var s=n.select(this),m=o[0],x=m.trace,_=m.x,w=m.y,k=x.contours,T=p(k,e,m),M=i.ensureSingle(s,\"g\",\"heatmapcoloring\"),A=[];\"heatmap\"===k.coloring&&(A=[o]),c(t,e,A,M),f(T),h(T);var S=l.c2p(_[0],!0),E=l.c2p(_[_.length-1],!0),C=u.c2p(w[0],!0),L=u.c2p(w[w.length-1],!0),P=[[S,L],[E,L],[E,C],[S,C]],O=T;\"constraint\"===k.type&&(O=d(T,k._operation)),function(t,e,r){var n=i.ensureSingle(t,\"g\",\"contourbg\").selectAll(\"path\").data(\"fill\"===r.coloring?[0]:[]);n.enter().append(\"path\"),n.exit().remove(),n.attr(\"d\",\"M\"+e.join(\"L\")+\"Z\").style(\"stroke\",\"none\")}(s,P,k),function(t,e,r,a){var o=\"fill\"===a.coloring||\"constraint\"===a.type&&\"=\"!==a._operation,s=\"M\"+r.join(\"L\")+\"Z\";o&&g(e,a);var l=i.ensureSingle(t,\"g\",\"contourfill\").selectAll(\"path\").data(o?e:[]);l.enter().append(\"path\"),l.exit().remove(),l.each((function(t){var e=(t.prefixBoundary?s:\"\")+y(t,r);e?n.select(this).attr(\"d\",e).style(\"stroke\",\"none\"):n.select(this).remove()}))}(s,O,P,k),function(t,e,o,s,l){var u=i.ensureSingle(t,\"g\",\"contourlines\"),c=!1!==l.showlines,f=l.showlabels,h=c&&f,p=r.createLines(u,c||f,e),d=r.createLineClip(u,h,o,s.trace.uid),g=t.selectAll(\"g.contourlabels\").data(f?[0]:[]);if(g.exit().remove(),g.enter().append(\"g\").classed(\"contourlabels\",!0),f){var m=[],y=[];i.clearLocationCache();var x=r.labelFormatter(o,s),b=a.tester.append(\"text\").attr(\"data-notex\",1).call(a.font,l.labelfont),_=e[0].xaxis,w=e[0].yaxis,k=_._length,T=w._length,M=_.range,A=w.range,S=i.aggNums(Math.min,null,s.x),E=i.aggNums(Math.max,null,s.x),C=i.aggNums(Math.min,null,s.y),L=i.aggNums(Math.max,null,s.y),P=Math.max(_.c2p(S,!0),0),O=Math.min(_.c2p(E,!0),k),I=Math.max(w.c2p(L,!0),0),D=Math.min(w.c2p(C,!0),T),z={};M[0]<M[1]?(z.left=P,z.right=O):(z.left=O,z.right=P),A[0]<A[1]?(z.top=I,z.bottom=D):(z.top=D,z.bottom=I),z.middle=(z.top+z.bottom)/2,z.center=(z.left+z.right)/2,m.push([[z.left,z.top],[z.right,z.top],[z.right,z.bottom],[z.left,z.bottom]]);var R=Math.sqrt(k*k+T*T),F=v.LABELDISTANCE*R/Math.max(1,e.length/v.LABELINCREASE);p.each((function(t){var e=r.calcTextOpts(t.level,x,b,o);n.select(this).selectAll(\"path\").each((function(){var t=i.getVisibleSegment(this,z,e.height/2);if(t&&!(t.len<(e.width+e.height)*v.LABELMIN))for(var n=Math.min(Math.ceil(t.len/F),v.LABELMAX),a=0;a<n;a++){var o=r.findBestTextLocation(this,t,e,y,z);if(!o)break;r.addLabelData(o,e,y,m)}}))})),b.remove(),r.drawLabels(g,y,o,d,h?m:null)}f&&!c&&p.remove()}(s,T,t,m,k),function(t,e,r,n,o){var s=n.trace,l=r._fullLayout._clips,u=\"clip\"+s.uid,c=l.selectAll(\"#\"+u).data(s.connectgaps?[]:[0]);if(c.enter().append(\"clipPath\").classed(\"contourclip\",!0).attr(\"id\",u),c.exit().remove(),!1===s.connectgaps){var p={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:n.x,y:n.y,z:b(n),smoothing:0};f([p]),h([p]),g([p],{type:\"levels\"}),i.ensureSingle(c,\"path\",\"\").attr(\"d\",(p.prefixBoundary?\"M\"+o.join(\"L\")+\"Z\":\"\")+y(p,o))}else u=null;a.setClipUrl(t,u,r)}(s,e,t,m,P)}))},r.createLines=function(t,e,r){var n=r[0].smoothing,i=t.selectAll(\"g.contourlevel\").data(e?r:[]);if(i.exit().remove(),i.enter().append(\"g\").classed(\"contourlevel\",!0),e){var o=i.selectAll(\"path.openline\").data((function(t){return t.pedgepaths||t.edgepaths}));o.exit().remove(),o.enter().append(\"path\").classed(\"openline\",!0),o.attr(\"d\",(function(t){return a.smoothopen(t,n)})).style(\"stroke-miterlimit\",1).style(\"vector-effect\",\"non-scaling-stroke\");var s=i.selectAll(\"path.closedline\").data((function(t){return t.ppaths||t.paths}));s.exit().remove(),s.enter().append(\"path\").classed(\"closedline\",!0),s.attr(\"d\",(function(t){return a.smoothclosed(t,n)})).style(\"stroke-miterlimit\",1).style(\"vector-effect\",\"non-scaling-stroke\")}return i},r.createLineClip=function(t,e,r,n){var i=e?\"clipline\"+n:null,o=r._fullLayout._clips.selectAll(\"#\"+i).data(e?[0]:[]);return o.exit().remove(),o.enter().append(\"clipPath\").classed(\"contourlineclip\",!0).attr(\"id\",i),a.setClipUrl(t,i,r),o},r.labelFormatter=function(t,e){var r=t._fullLayout,n=e.trace,i=n.contours,a={type:\"linear\",_id:\"ycontour\",showexponent:\"all\",exponentformat:\"B\"};if(i.labelformat)a.tickformat=i.labelformat,u(a,r);else{var s=o.extractOpts(n);if(s&&s.colorbar&&s.colorbar._axis)a=s.colorbar._axis;else{if(\"constraint\"===i.type){var c=i.value;Array.isArray(c)?a.range=[c[0],c[c.length-1]]:a.range=[c,c]}else a.range=[i.start,i.end],a.nticks=(i.end-i.start)/i.size;a.range[0]===a.range[1]&&(a.range[1]+=a.range[0]||1),a.nticks||(a.nticks=1e3),u(a,r),l.prepTicks(a),a._tmin=null,a._tmax=null}}return function(t){return l.tickText(a,t).text}},r.calcTextOpts=function(t,e,r,n){var i=e(t);r.text(i).call(s.convertToTspans,n);var o=r.node(),l=a.bBox(o,!0);return{text:i,width:l.width,height:l.height,fontSize:+o.style[\"font-size\"].replace(\"px\",\"\"),level:t,dy:(l.top+l.bottom)/2}},r.findBestTextLocation=function(t,e,r,n,a){var o,s,l,u,c,f=r.width;e.isClosed?(s=e.len/m.INITIALSEARCHPOINTS,o=e.min+s/2,l=e.max):(s=(e.len-f)/(m.INITIALSEARCHPOINTS+1),o=e.min+s+f/2,l=e.max-(s+f)/2);for(var h=1/0,p=0;p<m.ITERATIONS;p++){for(var d=o;d<l;d+=s){var g=i.getTextLocation(t,e.total,d,f),v=x(g,r,n,a);v<h&&(h=v,c=g,u=d)}if(h>2*m.MAXCOST)break;p&&(s/=2),l=(o=u-s/2)+1.5*s}if(h<=m.MAXCOST)return c},r.addLabelData=function(t,e,r,n){var i=e.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,u=t.theta,c=Math.sin(u),f=Math.cos(u),h=function(t,e){return[s+t*f-e*c,l+t*c+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:u,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){var l=t.selectAll(\"text\").data(e,(function(t){return t.text+\",\"+t.x+\",\"+t.y+\",\"+t.theta}));if(l.exit().remove(),l.enter().append(\"text\").attr({\"data-notex\":1,\"text-anchor\":\"middle\"}).each((function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:\"rotate(\"+180*t.theta/Math.PI+\" \"+e+\" \"+i+\")\"}).call(s.convertToTspans,r)})),o){for(var u=\"\",c=0;c<o.length;c++)u+=\"M\"+o[c].join(\"L\")+\"Z\";i.ensureSingle(a,\"path\",\"\").attr(\"d\",u)}}},{\"../../components/colorscale\":379,\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axes\":566,\"../../plots/cartesian/set_convert\":585,\"../heatmap/plot\":813,\"./close_boundaries\":746,\"./constants\":748,\"./convert_to_constraints\":752,\"./empty_pathinfo\":754,\"./find_all_paths\":756,\"./make_crossings\":761,\"@plotly/d3\":58}],763:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\");function a(t,e,r){var i={type:\"linear\",range:[t,e]};return n.autoTicks(i,(e-t)/(r||15)),i}e.exports=function(t,e){var r=t.contours;if(t.autocontour){var o=t.zmin,s=t.zmax;(t.zauto||void 0===o)&&(o=i.aggNums(Math.min,null,e)),(t.zauto||void 0===s)&&(s=i.aggNums(Math.max,null,e));var l=a(o,s,t.ncontours);r.size=l.dtick,r.start=n.tickFirst(l),l.range.reverse(),r.end=n.tickFirst(l),r.start===o&&(r.start+=r.size),r.end===s&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if(\"constraint\"!==r.type){var u,c=r.start,f=r.end,h=t._input.contours;c>f&&(r.start=h.start=f,f=r.end=h.end=c,c=r.start),r.size>0||(u=c===f?1:a(c,f,t.ncontours).dtick,h.size=r.size=u)}}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566}],764:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../heatmap/style\"),o=t(\"./make_color_map\");e.exports=function(t){var e=n.select(t).selectAll(\"g.contour\");e.style(\"opacity\",(function(t){return t[0].trace.opacity})),e.each((function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,u=a.start,c=\"constraint\"===a.type,f=!c&&\"lines\"===a.coloring,h=!c&&\"fill\"===a.coloring,p=f||h?o(r):null;e.selectAll(\"g.contourlevel\").each((function(t){n.select(this).selectAll(\"path\").call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)}));var d=a.labelfont;if(e.selectAll(\"g.contourlabels text\").each((function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})})),c)e.selectAll(\"g.contourfill path\").style(\"fill\",r.fillcolor);else if(h){var g;e.selectAll(\"g.contourfill path\").style(\"fill\",(function(t){return void 0===g&&(g=t.level),p(t.level+.5*l)})),void 0===g&&(g=u),e.selectAll(\"g.contourbg path\").style(\"fill\",p(g-.5*l))}})),a(t)}},{\"../../components/drawing\":389,\"../heatmap/style\":814,\"./make_color_map\":760,\"@plotly/d3\":58}],765:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/defaults\"),i=t(\"./label_defaults\");e.exports=function(t,e,r,a,o){var s,l=r(\"contours.coloring\"),u=\"\";\"fill\"===l&&(s=r(\"contours.showlines\")),!1!==s&&(\"lines\"!==l&&(u=r(\"line.color\",\"#000\")),r(\"line.width\",.5),r(\"line.dash\")),\"none\"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:\"\",cLetter:\"z\"})),r(\"line.smoothing\"),i(r,a,u,o)}},{\"../../components/colorscale/defaults\":377,\"./label_defaults\":759}],766:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=i.contours;e.exports=o({carpet:{valType:\"string\",editType:\"calc\"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},transforms:void 0},a(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../contour/attributes\":744,\"../heatmap/attributes\":801}],767:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../../lib\"),a=t(\"../heatmap/convert_column_xyz\"),o=t(\"../heatmap/clean_2d_array\"),s=t(\"../heatmap/interp2d\"),l=t(\"../heatmap/find_empties\"),u=t(\"../heatmap/make_bound_array\"),c=t(\"./defaults\"),f=t(\"../carpet/lookup_carpetid\"),h=t(\"../contour/set_contours\");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),c(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,c,f,h,p,d,g,v=e._carpetTrace,m=v.aaxis,y=v.baxis;m._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,m,y,\"a\",\"b\",[\"z\"]),r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?m.makeCalcdata(e,\"_a\"):[],h=h?y.makeCalcdata(e,\"_b\"):[],c=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b=\"scaled\"===e.xtype?\"\":r,_=u(e,b,c,f,x,m),w=\"scaled\"===e.ytype?\"\":h,k={a:_,b:u(e,w,p,d,g.length,y),z:g};return\"levels\"===e.contours.type&&\"none\"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:\"\",cLetter:\"z\"}),[k]}(t,e);return h(e,e._z),g}}},{\"../../components/colorscale/calc\":375,\"../../lib\":515,\"../carpet/lookup_carpetid\":717,\"../contour/set_contours\":763,\"../heatmap/clean_2d_array\":803,\"../heatmap/convert_column_xyz\":805,\"../heatmap/find_empties\":807,\"../heatmap/interp2d\":810,\"../heatmap/make_bound_array\":812,\"./defaults\":768}],768:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../heatmap/xyz_defaults\"),a=t(\"./attributes\"),o=t(\"../contour/constraint_defaults\"),s=t(\"../contour/contours_defaults\"),l=t(\"../contour/style_defaults\");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,a,r,i)}if(c(\"carpet\"),t.a&&t.b){if(!i(t,e,c,u,\"a\",\"b\"))return void(e.visible=!1);c(\"text\"),\"constraint\"===c(\"contours.type\")?o(t,e,c,u,r,{hasHover:!1}):(s(t,e,c,(function(r){return n.coerce2(t,e,a,r)})),l(t,e,c,u,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{\"../../lib\":515,\"../contour/constraint_defaults\":749,\"../contour/contours_defaults\":751,\"../contour/style_defaults\":765,\"../heatmap/xyz_defaults\":816,\"./attributes\":766}],769:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../contour/colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../contour/style\"),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}},{\"../../plots/cartesian\":578,\"../contour/colorbar\":747,\"../contour/style\":764,\"./attributes\":766,\"./calc\":767,\"./defaults\":768,\"./plot\":770}],770:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../carpet/map_1d_array\"),a=t(\"../carpet/makepath\"),o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../contour/make_crossings\"),u=t(\"../contour/find_all_paths\"),c=t(\"../contour/plot\"),f=t(\"../contour/constants\"),h=t(\"../contour/convert_to_constraints\"),p=t(\"../contour/empty_pathinfo\"),d=t(\"../contour/close_boundaries\"),g=t(\"../carpet/lookup_carpetid\"),v=t(\"../carpet/axis_aligned_line\");function m(t,e,r,i,a,l,u){var h=s.ensureSingle(t,\"g\",\"contourlines\"),p=!1!==a.showlines,d=a.showlabels,g=p&&d,v=c.createLines(h,p||d,e),m=c.createLineClip(h,g,r,i.trace.uid),_=t.selectAll(\"g.contourlabels\").data(d?[0]:[]);if(_.exit().remove(),_.enter().append(\"g\").classed(\"contourlabels\",!0),d){var w=l.xaxis,k=l.yaxis,T=w._length,M=k._length,A=[[[0,0],[T,0],[T,M],[0,M]]],S=[];s.clearLocationCache();var E=c.labelFormatter(r,i),C=o.tester.append(\"text\").attr(\"data-notex\",1).call(o.font,a.labelfont),L={left:0,right:T,center:T/2,top:0,bottom:M,middle:M/2},P=Math.sqrt(T*T+M*M),O=f.LABELDISTANCE*P/Math.max(1,e.length/f.LABELINCREASE);v.each((function(t){var e=c.calcTextOpts(t.level,E,C,r);n.select(this).selectAll(\"path\").each((function(r){var n=this,i=s.getVisibleSegment(n,L,e.height/2);if(i&&(function(t,e,r,n,i,a){for(var o,s=0;s<r.pedgepaths.length;s++)e===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(o){var l=i.a[0],u=i.a[i.a.length-1],c=i.b[0],f=i.b[i.b.length-1],h=y(t,0,1),p=y(t,n.total,n.total-1),d=v(o[0],h),g=n.total-v(o[o.length-1],p);n.min<d&&(n.min=d),n.max>g&&(n.max=g),n.len=n.max-n.min}function v(t,e){var r,n=0,o=.1;return(Math.abs(t[0]-l)<o||Math.abs(t[0]-u)<o)&&(r=x(i.dxydb_rough(t[0],t[1],o)),n=Math.max(n,a*b(e,r)/2)),(Math.abs(t[1]-c)<o||Math.abs(t[1]-f)<o)&&(r=x(i.dxyda_rough(t[0],t[1],o)),n=Math.max(n,a*b(e,r)/2)),n}}(n,r,t,i,u,e.height),!(i.len<(e.width+e.height)*f.LABELMIN)))for(var a=Math.min(Math.ceil(i.len/O),f.LABELMAX),o=0;o<a;o++){var l=c.findBestTextLocation(n,i,e,S,L);if(!l)break;c.addLabelData(l,e,S,A)}}))})),C.remove(),c.drawLabels(_,S,r,m,g?A:null)}d&&!p&&v.remove()}function y(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function x(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function b(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}function _(t,e,r,i,a,l,u,c,f,h,p){var g=\"fill\"===h;g&&d(a,t.contours);var m=s.ensureSingle(e,\"g\",\"contourfill\").selectAll(\"path\").data(g?a:[]);m.enter().append(\"path\"),m.exit().remove(),m.each((function(t){var e=(t.prefixBoundary?p:\"\")+function(t,e,r,n,i,a,l,u){var c,f,h,p,d,g,m,y=\"\",x=e.edgepaths.map((function(t,e){return e})),b=!0,_=1e-4*Math.abs(r[0][0]-r[2][0]),w=1e-4*Math.abs(r[0][1]-r[2][1]);function k(t){return Math.abs(t[1]-r[0][1])<w}function T(t){return Math.abs(t[1]-r[2][1])<w}function M(t){return Math.abs(t[0]-r[0][0])<_}function A(t){return Math.abs(t[0]-r[2][0])<_}function S(t,e){var r,n,o,s,c=\"\";for(k(t)&&!A(t)||T(t)&&!M(t)?(s=i.aaxis,o=v(i,a,[t[0],e[0]],.5*(t[1]+e[1]))):(s=i.baxis,o=v(i,a,.5*(t[0]+e[0]),[t[1],e[1]])),r=1;r<o.length;r++)for(c+=s.smoothing?\"C\":\"L\",n=0;n<o[r].length;n++){var f=o[r][n];c+=[l.c2p(f[0]),u.c2p(f[1])]+\" \"}return c}for(c=0,f=null;x.length;){var E=e.edgepaths[c][0];for(f&&(y+=S(f,E)),m=o.smoothopen(e.edgepaths[c].map(n),e.smoothing),y+=b?m:m.replace(/^M/,\"L\"),x.splice(x.indexOf(c),1),f=e.edgepaths[c][e.edgepaths[c].length-1],d=-1,p=0;p<4;p++){if(!f){s.log(\"Missing end?\",c,e);break}for(k(f)&&!A(f)?h=r[1]:M(f)?h=r[0]:T(f)?h=r[3]:A(f)&&(h=r[2]),g=0;g<e.edgepaths.length;g++){var C=e.edgepaths[g][0];Math.abs(f[0]-h[0])<_?Math.abs(f[0]-C[0])<_&&(C[1]-f[1])*(h[1]-C[1])>=0&&(h=C,d=g):Math.abs(f[1]-h[1])<w?Math.abs(f[1]-C[1])<w&&(C[0]-f[0])*(h[0]-C[0])>=0&&(h=C,d=g):s.log(\"endpt to newendpt is not vert. or horz.\",f,h,C)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log(\"unclosed perimeter path\");break}c=d,(b=-1===x.indexOf(c))&&(c=x[0],y+=S(f,h)+\"Z\",f=null)}for(c=0;c<e.paths.length;c++)y+=o.smoothclosed(e.paths[c].map(n),e.smoothing);return y}(0,t,l,u,c,f,r,i);e?n.select(this).attr(\"d\",e).style(\"stroke\",\"none\"):n.select(this).remove()}))}e.exports=function(t,e,r,c){var f=e.xaxis,d=e.yaxis;s.makeTraceGroups(c,r,\"contour\").each((function(r){var c=n.select(this),v=r[0],y=v.trace,x=y._carpetTrace=g(t,y),b=t.calcdata[x.index][0];if(x.visible&&\"legendonly\"!==x.visible){var w=v.a,k=v.b,T=y.contours,M=p(T,e,v),A=\"constraint\"===T.type,S=T._operation,E=A?\"=\"===S?\"lines\":\"fill\":T.coloring,C=[[w[0],k[k.length-1]],[w[w.length-1],k[k.length-1]],[w[w.length-1],k[0]],[w[0],k[0]]];l(M);var L=1e-8*(w[w.length-1]-w[0]),P=1e-8*(k[k.length-1]-k[0]);u(M,L,P);var O,I,D,z,R=M;\"constraint\"===T.type&&(R=h(M,S)),function(t,e){var r,n,i,a,o,s,l,u,c;for(r=0;r<t.length;r++){for(o=(a=t[r]).pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(c=a.edgepaths[n],l=[],i=0;i<c.length;i++)l[i]=e(c[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(c=a.paths[n],u=[],i=0;i<c.length;i++)u[i]=e(c[i]);s.push(u)}}}(M,B);var F=[];for(z=b.clipsegments.length-1;z>=0;z--)O=b.clipsegments[z],I=i([],O.x,f.c2p),D=i([],O.y,d.c2p),I.reverse(),D.reverse(),F.push(a(I,D,O.bicubic));var N=\"M\"+F.join(\"L\")+\"Z\";(function(t,e,r,n,o,l){var u,c,f,h,p=s.ensureSingle(t,\"g\",\"contourbg\").selectAll(\"path\").data(\"fill\"!==l||o?[]:[0]);p.enter().append(\"path\"),p.exit().remove();var d=[];for(h=0;h<e.length;h++)u=e[h],c=i([],u.x,r.c2p),f=i([],u.y,n.c2p),d.push(a(c,f,u.bicubic));p.attr(\"d\",\"M\"+d.join(\"L\")+\"Z\").style(\"stroke\",\"none\")})(c,b.clipsegments,f,d,A,E),_(y,c,f,d,R,C,B,x,b,E,N),m(c,M,t,v,T,e,x),o.setClipUrl(c,x._clipPathId,t)}function B(t){var e=x.ab2xy(t[0],t[1],!0);return[f.c2p(e[0]),d.c2p(e[1])]}}))}},{\"../../components/drawing\":389,\"../../lib\":515,\"../carpet/axis_aligned_line\":701,\"../carpet/lookup_carpetid\":717,\"../carpet/makepath\":718,\"../carpet/map_1d_array\":719,\"../contour/close_boundaries\":746,\"../contour/constants\":748,\"../contour/convert_to_constraints\":752,\"../contour/empty_pathinfo\":754,\"../contour/find_all_paths\":756,\"../contour/make_crossings\":761,\"../contour/plot\":762,\"@plotly/d3\":58}],771:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../plots/attributes\"),o=t(\"../scattermapbox/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s({lon:o.lon,lat:o.lat,z:{valType:\"data_array\",editType:\"calc\"},radius:{valType:\"number\",editType:\"plot\",arrayOk:!0,min:1,dflt:30},below:{valType:\"string\",editType:\"plot\"},text:o.text,hovertext:o.hovertext,hoverinfo:s({},a.hoverinfo,{flags:[\"lon\",\"lat\",\"z\",\"text\",\"name\"]}),hovertemplate:i(),showlegend:s({},a.showlegend,{dflt:!1})},n(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../scattermapbox/attributes\":1002}],772:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\").isArrayOrTypedArray,a=t(\"../../constants/numerical\").BADNUM,o=t(\"../../components/colorscale/calc\"),s=t(\"../../lib\")._;e.exports=function(t,e){for(var r=e._length,l=new Array(r),u=e.z,c=i(u)&&u.length,f=0;f<r;f++){var h=l[f]={},p=e.lon[f],d=e.lat[f];if(h.lonlat=n(p)&&n(d)?[+p,+d]:[a,a],c){var g=u[f];h.z=n(g)?g:a}}return o(t,e,{vals:c?u:[0,1],containerStr:\"\",cLetter:\"z\"}),r&&(l[0].t={labels:{lat:s(t,\"lat:\")+\" \",lon:s(t,\"lon:\")+\" \"}}),l}},{\"../../components/colorscale/calc\":375,\"../../constants/numerical\":491,\"../../lib\":515,\"fast-isnumeric\":190}],773:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../components/color\"),o=t(\"../../components/colorscale\"),s=t(\"../../constants/numerical\").BADNUM,l=t(\"../../lib/geojson_utils\").makeBlank;e.exports=function(t){var e=t[0].trace,r=!0===e.visible&&0!==e._length,u=e._opts={heatmap:{layout:{visibility:\"none\"},paint:{}},geojson:l()};if(!r)return u;var c,f=[],h=e.z,p=e.radius,d=i.isArrayOrTypedArray(h)&&h.length,g=i.isArrayOrTypedArray(p);for(c=0;c<t.length;c++){var v=t[c],m=v.lonlat;if(m[0]!==s){var y={};if(d){var x=v.z;y.z=x!==s?x:0}g&&(y.r=n(p[c])&&p[c]>0?+p[c]:0),f.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:m},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(c=1;c<_.length;c++)k.push(_[c][0],_[c][1]);var T=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return i.extendFlat(u.heatmap.paint,{\"heatmap-weight\":d?T:1/(b.max-b.min),\"heatmap-color\":k,\"heatmap-radius\":g?{type:\"identity\",property:\"r\"}:e.radius,\"heatmap-opacity\":e.opacity}),u.geojson={type:\"FeatureCollection\",features:f},u.heatmap.layout.visibility=\"visible\",u}},{\"../../components/color\":367,\"../../components/colorscale\":379,\"../../constants/numerical\":491,\"../../lib\":515,\"../../lib/geojson_utils\":509,\"fast-isnumeric\":190}],774:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/defaults\"),a=t(\"./attributes\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\"lon\")||[],u=s(\"lat\")||[],c=Math.min(l.length,u.length);c?(e._length=c,s(\"z\"),s(\"radius\"),s(\"below\"),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"./attributes\":771}],775:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],776:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../scattermapbox/hover\").hoverPoints,a=t(\"../scattermapbox/hover\").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,u=l[0].trace,c=l[s.index];if(delete s.color,\"z\"in c){var f=s.subplot.mockAxis;s.z=c.z,s.zLabel=n.tickText(f,f.c2l(c.z),\"hover\").text}return s.extraText=a(u,c,l[0].t.labels),[s]}}},{\"../../plots/cartesian/axes\":566,\"../scattermapbox/hover\":1007}],777:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),formatLabels:t(\"../scattermapbox/format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(\"symbol\"===i.type&&\"string\"==typeof a&&-1===a.indexOf(\"plotly-\"))return a}},moduleType:\"trace\",name:\"densitymapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"showLegend\"],meta:{hr_name:\"density_mapbox\"}}},{\"../../plots/mapbox\":622,\"../heatmap/colorbar\":804,\"../scattermapbox/format_labels\":1006,\"./attributes\":771,\"./calc\":772,\"./defaults\":774,\"./event_data\":775,\"./hover\":776,\"./plot\":778}],778:[function(t,e,r){\"use strict\";var n=t(\"./convert\"),i=t(\"../../plots/mapbox/constants\").traceLayerPrefix;function a(t,e){this.type=\"densitymapbox\",this.subplot=t,this.uid=e,this.sourceId=\"source-\"+e,this.layerList=[[\"heatmap\",i+e+\"-heatmap\"]],this.below=null}var o=a.prototype;o.update=function(t){var e=this.subplot,r=this.layerList,i=n(t),a=e.belowLookup[\"trace-\"+this.uid];e.map.getSource(this.sourceId).setData(i.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(i,a),this.below=a);for(var o=0;o<r.length;o++){var s=r[o],l=s[0],u=s[1],c=i[l];e.setOptions(u,\"setLayoutProperty\",c.layout),\"visible\"===c.layout.visibility&&e.setOptions(u,\"setPaintProperty\",c.paint)}},o._addLayers=function(t,e){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=t[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},e)}},o._removeLayers=function(){for(var t=this.subplot.map,e=this.layerList,r=e.length-1;r>=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup[\"trace-\"+r.uid];return t.map.addSource(o,{type:\"geojson\",data:s.geojson}),i._addLayers(s,l),i}},{\"../../plots/mapbox/constants\":620,\"./convert\":773}],779:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,\"tx\"),n.mergeArray(e.hovertext,t,\"htx\");var i=e.marker;if(i){n.mergeArray(i.opacity,t,\"mo\"),n.mergeArray(i.color,t,\"mc\");var a=i.line;a&&(n.mergeArray(a.color,t,\"mlc\"),n.mergeArrayCastPositive(a.width,t,\"mlw\"))}}},{\"../../lib\":515}],780:[function(t,e,r){\"use strict\";var n,i=t(\"../bar/attributes\"),a=t(\"../scatter/attributes\").line,o=t(\"../../plots/attributes\"),s=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,l=t(\"../../plots/template_attributes\").hovertemplateAttrs,u=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"./constants\"),f=t(\"../../lib/extend\").extendFlat,h=t(\"../../components/color\");e.exports={x:i.x,x0:i.x0,dx:i.dx,y:i.y,y0:i.y0,dy:i.dy,xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:s(\"x\"),yhoverformat:s(\"y\"),hovertext:i.hovertext,hovertemplate:l({},{keys:c.eventDataKeys}),hoverinfo:f({},o.hoverinfo,{flags:[\"name\",\"x\",\"y\",\"text\",\"percent initial\",\"percent previous\",\"percent total\"]}),textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"percent initial\",\"percent previous\",\"percent total\",\"value\"],extras:[\"none\"],editType:\"plot\",arrayOk:!1},texttemplate:u({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),text:i.text,textposition:i.textposition,insidetextanchor:f({},i.insidetextanchor,{dflt:\"middle\"}),textangle:f({},i.textangle,{dflt:0}),textfont:i.textfont,insidetextfont:i.insidetextfont,outsidetextfont:i.outsidetextfont,constraintext:i.constraintext,cliponaxis:i.cliponaxis,orientation:f({},i.orientation,{}),offset:f({},i.offset,{arrayOk:!1}),width:f({},i.width,{arrayOk:!1}),marker:(n=f({},i.marker),delete n.pattern,n),connector:{fillcolor:{valType:\"color\",editType:\"style\"},line:{color:f({},a.color,{dflt:h.defaultLine}),width:f({},a.width,{dflt:0,editType:\"plot\"}),dash:a.dash,editType:\"style\"},visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup}},{\"../../components/color\":367,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../bar/attributes\":657,\"../scatter/attributes\":936,\"./constants\":782}],781:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../plots/cartesian/align_period\"),a=t(\"./arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../../constants/numerical\").BADNUM;function l(t){return t===s?0:t}e.exports=function(t,e){var r,u,c,f,h,p,d,g,v=n.getFromId(t,e.xaxis||\"x\"),m=n.getFromId(t,e.yaxis||\"y\");\"h\"===e.orientation?(r=v.makeCalcdata(e,\"x\"),c=m.makeCalcdata(e,\"y\"),f=i(e,m,\"y\",c),h=!!e.yperiodalignment,p=\"y\"):(r=m.makeCalcdata(e,\"y\"),c=v.makeCalcdata(e,\"x\"),f=i(e,v,\"x\",c),h=!!e.xperiodalignment,p=\"x\"),u=f.vals;var y,x=Math.min(u.length,r.length),b=new Array(x);for(e._base=[],d=0;d<x;d++){r[d]<0&&(r[d]=s);var _=!1;r[d]!==s&&d+1<x&&r[d+1]!==s&&(_=!0),g=b[d]={p:u[d],s:r[d],cNext:_},e._base[d]=-.5*g.s,h&&(b[d].orig_p=c[d],b[d][p+\"End\"]=f.ends[d],b[d][p+\"Start\"]=f.starts[d]),e.ids&&(g.id=String(e.ids[d])),0===d&&(b[0].vTotal=0),b[0].vTotal+=l(g.s),g.begR=l(g.s)/l(b[0].s)}for(d=0;d<x;d++)(g=b[d]).s!==s&&(g.sumR=g.s/b[0].vTotal,g.difR=void 0!==y?g.s/y:1,y=g.s);return a(b,e),o(b,e),b}},{\"../../constants/numerical\":491,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566,\"../scatter/calc_selection\":938,\"./arrays_to_calcdata\":779}],782:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"percentInitial\",\"percentPrevious\",\"percentTotal\"]}},{}],783:[function(t,e,r){\"use strict\";var n=t(\"../bar/cross_trace_calc\").setGroupPositions;e.exports=function(t,e){var r,i,a=t._fullLayout,o=t._fullData,s=t.calcdata,l=e.xaxis,u=e.yaxis,c=[],f=[],h=[];for(i=0;i<o.length;i++){var p=o[i],d=\"h\"===p.orientation;!0===p.visible&&p.xaxis===l._id&&p.yaxis===u._id&&\"funnel\"===p.type&&(r=s[i],d?h.push(r):f.push(r),c.push(r))}var g={mode:a.funnelmode,norm:a.funnelnorm,gap:a.funnelgap,groupgap:a.funnelgroupgap};for(n(t,l,u,f,g),n(t,u,l,h,g),i=0;i<c.length;i++){r=c[i];for(var v=0;v<r.length;v++)v+1<r.length&&(r[v].nextP0=r[v+1].p0,r[v].nextS0=r[v+1].s0,r[v].nextP1=r[v+1].p1,r[v].nextS1=r[v+1].s1)}}},{\"../bar/cross_trace_calc\":660}],784:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../bar/defaults\").handleGroupingDefaults,a=t(\"../bar/defaults\").handleText,o=t(\"../scatter/xy_defaults\"),s=t(\"../scatter/period_defaults\"),l=t(\"./attributes\"),u=t(\"../../components/color\");e.exports={supplyDefaults:function(t,e,r,i){function c(r,i){return n.coerce(t,e,l,r,i)}if(o(t,e,i,c)){s(t,e,i,c),c(\"xhoverformat\"),c(\"yhoverformat\"),c(\"orientation\",e.y&&!e.x?\"v\":\"h\"),c(\"offset\"),c(\"width\");var f=c(\"text\");c(\"hovertext\"),c(\"hovertemplate\");var h=c(\"textposition\");a(t,e,i,c,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),\"none\"===e.textposition||e.texttemplate||c(\"textinfo\",Array.isArray(f)?\"text+value\":\"value\");var p=c(\"marker.color\",r);c(\"marker.line.color\",u.defaultLine),c(\"marker.line.width\"),c(\"connector.visible\")&&(c(\"connector.fillcolor\",function(t){var e=n.isArrayOrTypedArray(t)?\"#000\":t;return u.addOpacity(e,.5*u.opacity(e))}(p)),c(\"connector.line.width\")&&(c(\"connector.line.color\"),c(\"connector.line.dash\")))}else e.visible=!1},crossTraceDefaults:function(t,e){var r,a;function o(t){return n.coerce(a._input,a,l,t)}if(\"group\"===e.funnelmode)for(var s=0;s<t.length;s++)r=(a=t[s])._input,i(r,a,e,o)}}},{\"../../components/color\":367,\"../../lib\":515,\"../bar/defaults\":661,\"../scatter/period_defaults\":956,\"../scatter/xy_defaults\":963,\"./attributes\":780}],785:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.x=\"xVal\"in e?e.xVal:e.x,t.y=\"yVal\"in e?e.yVal:e.y,\"percentInitial\"in e&&(t.percentInitial=e.percentInitial),\"percentPrevious\"in e&&(t.percentPrevious=e.percentPrevious),\"percentTotal\"in e&&(t.percentTotal=e.percentTotal),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),t}},{}],786:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\").opacity,i=t(\"../bar/hover\").hoverOnBars,a=t(\"../../lib\").formatPercent;e.exports=function(t,e,r,o,s){var l=i(t,e,r,o,s);if(l){var u=l.cd,c=u[0].trace,f=\"h\"===c.orientation,h=u[l.index];l[(f?\"x\":\"y\")+\"LabelVal\"]=h.s,l.percentInitial=h.begR,l.percentInitialLabel=a(h.begR,1),l.percentPrevious=h.difR,l.percentPreviousLabel=a(h.difR,1),l.percentTotal=h.sumR,l.percentTotalLabel=a(h.sumR,1);var p=h.hi||c.hoverinfo,d=[];if(p&&\"none\"!==p&&\"skip\"!==p){var g=\"all\"===p,v=p.split(\"+\"),m=function(t){return g||-1!==v.indexOf(t)};m(\"percent initial\")&&d.push(l.percentInitialLabel+\" of initial\"),m(\"percent previous\")&&d.push(l.percentPreviousLabel+\" of previous\"),m(\"percent total\")&&d.push(l.percentTotalLabel+\" of total\")}return l.extraText=d.join(\"<br>\"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;return n(i)?i:n(a)&&o?a:void 0}(c,h),[l]}}},{\"../../components/color\":367,\"../../lib\":515,\"../bar/hover\":664}],787:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"funnel\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":578,\"../bar/select\":669,\"./attributes\":780,\"./calc\":781,\"./cross_trace_calc\":783,\"./defaults\":784,\"./event_data\":785,\"./hover\":786,\"./layout_attributes\":788,\"./layout_defaults\":789,\"./plot\":790,\"./style\":791}],788:[function(t,e,r){\"use strict\";e.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],789:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s<r.length;s++){var l=r[s];if(l.visible&&\"funnel\"===l.type){a=!0;break}}a&&(o(\"funnelmode\"),o(\"funnelgap\",.2),o(\"funnelgroupgap\"))}},{\"../../lib\":515,\"./layout_attributes\":788}],790:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../constants/numerical\").BADNUM,s=t(\"../bar/plot\"),l=t(\"../bar/uniform_text\").clearMinTextSize;function u(t,e,r,n){var i=[],a=[],o=n?e:r,s=n?r:e;return i[0]=o.c2p(t.s0,!0),a[0]=s.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),a[1]=s.c2p(t.p1,!0),i[2]=o.c2p(t.nextS0,!0),a[2]=s.c2p(t.nextP0,!0),i[3]=o.c2p(t.nextS1,!0),a[3]=s.c2p(t.nextP1,!0),n?[i,a]:[a,i]}e.exports=function(t,e,r,c){var f=t._fullLayout;l(\"funnel\",f),function(t,e,r,s){var l=e.xaxis,c=e.yaxis;i.makeTraceGroups(s,r,\"trace bars\").each((function(r){var s=n.select(this),f=r[0].trace,h=i.ensureSingle(s,\"g\",\"regions\");if(f.connector&&f.connector.visible){var p=\"h\"===f.orientation,d=h.selectAll(\"g.region\").data(i.identity);d.enter().append(\"g\").classed(\"region\",!0),d.exit().remove();var g=d.size();d.each((function(r,s){if(s===g-1||r.cNext){var f=u(r,l,c,p),h=f[0],d=f[1],v=\"\";h[0]!==o&&d[0]!==o&&h[1]!==o&&d[1]!==o&&h[2]!==o&&d[2]!==o&&h[3]!==o&&d[3]!==o&&(v+=p?\"M\"+h[0]+\",\"+d[1]+\"L\"+h[2]+\",\"+d[2]+\"H\"+h[3]+\"L\"+h[1]+\",\"+d[1]+\"Z\":\"M\"+h[1]+\",\"+d[1]+\"L\"+h[2]+\",\"+d[3]+\"V\"+d[2]+\"L\"+h[1]+\",\"+d[0]+\"Z\"),\"\"===v&&(v=\"M0,0Z\"),i.ensureSingle(n.select(this),\"path\").attr(\"d\",v).call(a.setClipUrl,e.layerClipId,t)}}))}else h.remove()}))}(t,e,r,c),function(t,e,r,o){var s=e.xaxis,l=e.yaxis;i.makeTraceGroups(o,r,\"trace bars\").each((function(r){var o=n.select(this),c=r[0].trace,f=i.ensureSingle(o,\"g\",\"lines\");if(c.connector&&c.connector.visible&&c.connector.line.width){var h=\"h\"===c.orientation,p=f.selectAll(\"g.line\").data(i.identity);p.enter().append(\"g\").classed(\"line\",!0),p.exit().remove();var d=p.size();p.each((function(r,o){if(o===d-1||r.cNext){var c=u(r,s,l,h),f=c[0],p=c[1],g=\"\";void 0!==f[3]&&void 0!==p[3]&&(h?(g+=\"M\"+f[0]+\",\"+p[1]+\"L\"+f[2]+\",\"+p[2],g+=\"M\"+f[1]+\",\"+p[1]+\"L\"+f[3]+\",\"+p[2]):(g+=\"M\"+f[1]+\",\"+p[1]+\"L\"+f[2]+\",\"+p[3],g+=\"M\"+f[1]+\",\"+p[0]+\"L\"+f[2]+\",\"+p[2])),\"\"===g&&(g=\"M0,0Z\"),i.ensureSingle(n.select(this),\"path\").attr(\"d\",g).call(a.setClipUrl,e.layerClipId,t)}}))}else f.remove()}))}(t,e,r,c),s.plot(t,e,r,c,{mode:f.funnelmode,norm:f.funnelmode,gap:f.funnelgap,groupgap:f.funnelgroupgap})}},{\"../../components/drawing\":389,\"../../constants/numerical\":491,\"../../lib\":515,\"../bar/plot\":668,\"../bar/uniform_text\":673,\"@plotly/d3\":58}],791:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/color\"),o=t(\"../../constants/interactions\").DESELECTDIM,s=t(\"../bar/style\"),l=t(\"../bar/uniform_text\").resizeText,u=s.styleTextPoints;e.exports={style:function(t,e,r){var s=r||n.select(t).selectAll(\"g.funnellayer\").selectAll(\"g.trace\");l(t,s,\"funnel\"),s.style(\"opacity\",(function(t){return t[0].trace.opacity})),s.each((function(e){var r=n.select(this),s=e[0].trace;r.selectAll(\".point > path\").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),u(r,s,t),r.selectAll(\".regions\").each((function(){n.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../constants/interactions\":490,\"../bar/style\":671,\"../bar/uniform_text\":673,\"@plotly/d3\":58}],792:[function(t,e,r){\"use strict\";var n=t(\"../pie/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/domain\").attributes,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../lib/extend\").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:s({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:o({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),textposition:l({},n.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:a({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}},{\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/domain\":593,\"../../plots/template_attributes\":642,\"../pie/attributes\":910}],793:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"funnelarea\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":628}],794:[function(t,e,r){\"use strict\";var n=t(\"../pie/calc\");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:\"funnelarea\"})}}},{\"../pie/calc\":912}],795:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../pie/defaults\").handleLabelsAndValues;e.exports=function(t,e,r,l){function u(r,a){return n.coerce(t,e,i,r,a)}var c=u(\"labels\"),f=u(\"values\"),h=s(c,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(u(\"label0\"),u(\"dlabel\")),p){e._length=p,u(\"marker.line.width\")&&u(\"marker.line.color\",l.paper_bgcolor),u(\"marker.colors\"),u(\"scalegroup\");var d,g=u(\"text\"),v=u(\"texttemplate\");if(v||(d=u(\"textinfo\",Array.isArray(g)?\"text+percent\":\"percent\")),u(\"hovertext\"),u(\"hovertemplate\"),v||d&&\"none\"!==d){var m=u(\"textposition\");o(t,e,l,u,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,u),u(\"title.text\")&&(u(\"title.position\"),n.coerceFont(u,\"title.font\",l.font)),u(\"aspectratio\"),u(\"baseratio\")}else e.visible=!1}},{\"../../lib\":515,\"../../plots/domain\":593,\"../bar/defaults\":661,\"../pie/defaults\":913,\"./attributes\":792}],796:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"funnelarea\",\"showLegend\"],attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\"),style:t(\"./style\"),styleOne:t(\"../pie/style_one\"),meta:{}}},{\"../pie/style_one\":921,\"./attributes\":792,\"./base_plot\":793,\"./calc\":794,\"./defaults\":795,\"./layout_attributes\":797,\"./layout_defaults\":798,\"./plot\":799,\"./style\":800}],797:[function(t,e,r){\"use strict\";var n=t(\"../pie/layout_attributes\").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{\"../pie/layout_attributes\":917}],798:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"hiddenlabels\"),r(\"funnelareacolorway\",e.colorway),r(\"extendfunnelareacolors\")}},{\"../../lib\":515,\"./layout_attributes\":797}],799:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../lib\"),o=a.strScale,s=a.strTranslate,l=t(\"../../lib/svg_text_utils\"),u=t(\"../bar/plot\").toMoveInsideBar,c=t(\"../bar/uniform_text\"),f=c.recordMinTextSize,h=c.clearMinTextSize,p=t(\"../pie/helpers\"),d=t(\"../pie/plot\"),g=d.attachFxHandlers,v=d.determineInsideTextFont,m=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return\"l\"+(e[0]-t[0])+\",\"+(e[1]-t[1])}function w(t){if(t.length){var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o,s,l=Math.pow(i,2),u=e.vTotal,c=u,f=u*l/(1-l)/u,h=[];for(h.push(E()),o=t.length-1;o>-1;o--)if(!(s=t[o]).hidden){var p=s.v/c;f+=p,h.push(E())}var d=1/0,g=-1/0;for(o=0;o<h.length;o++)a=h[o],d=Math.min(d,a[1]),g=Math.max(g,a[1]);for(o=0;o<h.length;o++)h[o][1]-=(g+d)/2;var v=h[h.length-1][0],m=e.r,y=(g-d)/2,x=m/v,b=m/y*n;for(e.r=b*y,o=0;o<h.length;o++)h[o][0]*=x,h[o][1]*=b;var _=[-(a=h[0])[0],a[1]],w=[a[0],a[1]],k=0;for(o=t.length-1;o>-1;o--)if(!(s=t[o]).hidden){var T=h[k+=1][0],M=h[k][1];s.TL=[-T,M],s.TR=[T,M],s.BL=_,s.BR=w,s.pxmid=(A=s.TR,S=s.BR,[.5*(A[0]+S[0]),.5*(A[1]+S[1])]),_=s.TL,w=s.TR}}var A,S;function E(){var t,e={x:t=Math.sqrt(f),y:-t};return[e.x,e.y]}}e.exports=function(t,e){var r=t._context.staticPlot,c=t._fullLayout;h(\"funnelarea\",c),y(e,t),m(e,c._size),a.makeTraceGroups(c._funnelarealayer,e,\"trace\").each((function(e){var h=n.select(this),d=e[0],m=d.trace;w(e),h.each((function(){var h=n.select(this).selectAll(\"g.slice\").data(e);h.enter().append(\"g\").classed(\"slice\",!0),h.exit().remove(),h.each((function(o,s){if(o.hidden)n.select(this).selectAll(\"path,g\").remove();else{o.pointNumber=o.i,o.curveNumber=m.index;var h=d.cx,y=d.cy,x=n.select(this),w=x.selectAll(\"path.surface\").data([o]);w.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":r?\"none\":\"all\"}),x.call(g,t,e);var k=\"M\"+(h+o.TR[0])+\",\"+(y+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+\"Z\";w.attr(\"d\",k),b(t,o,d);var T=p.castOption(m.textposition,o.pts),M=x.selectAll(\"g.slicetext\").data(o.text&&\"none\"!==T?[0]:[]);M.enter().append(\"g\").classed(\"slicetext\",!0),M.exit().remove(),M.each((function(){var r=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),p=a.ensureUniformFontSize(t,v(m,o,c.font));r.text(o.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,p).call(l.convertToTspans,t);var d,g,x,b=i.bBox(r.node()),_=Math.min(o.BL[1],o.BR[1])+y,w=Math.max(o.TL[1],o.TR[1])+y;g=Math.max(o.TL[0],o.BL[0])+h,x=Math.min(o.TR[0],o.BR[0])+h,(d=u(g,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"})).fontSize=p.size,f(m.type,d,c),e[s].transform=d,a.setTransormAndDisplay(r,d)}))}}));var y=n.select(this).selectAll(\"g.titletext\").data(m.title.text?[0]:[]);y.enter().append(\"g\").classed(\"titletext\",!0),y.exit().remove(),y.each((function(){var e=a.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),r=m.title.text;m._meta&&(r=a.templateString(r,m._meta)),e.text(r).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(i.font,m.title.font).call(l.convertToTspans,t);var u=x(d,c._size);e.attr(\"transform\",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../bar/plot\":668,\"../bar/uniform_text\":673,\"../pie/helpers\":915,\"../pie/plot\":919,\"@plotly/d3\":58}],800:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../pie/style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(\".trace\");a(t,e,\"funnelarea\"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\"path.surface\").each((function(t){n.select(this).call(i,t,e)}))}))}},{\"../bar/uniform_text\":673,\"../pie/style_one\":921,\"@plotly/d3\":58}],801:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,u=t(\"../../components/colorscale/attributes\"),c=t(\"../../lib/extend\").extendFlat;e.exports=c({z:{valType:\"data_array\",editType:\"calc\"},x:c({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:c({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:c({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:c({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:c({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:c({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:c({},n.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:c({},n.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:c({},n.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:c({},n.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:c({},n.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:c({},n.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{valType:\"data_array\",editType:\"calc\"},transpose:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xtype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},ytype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",\"best\",!1],dflt:!1,editType:\"calc\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),textfont:a({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:c({},i.showlegend,{dflt:!1})},{transforms:void 0},u(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/font_attributes\":594,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936}],802:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../histogram2d/calc\"),l=t(\"../../components/colorscale/calc\"),u=t(\"./convert_column_xyz\"),c=t(\"./clean_2d_array\"),f=t(\"./interp2d\"),h=t(\"./find_empties\"),p=t(\"./make_bound_array\"),d=t(\"../../constants/numerical\").BADNUM;function g(t){for(var e=[],r=t.length,n=0;n<r;n++){var i=t[n];i!==d&&e.push(i)}return e}e.exports=function(t,e){var r,v,m,y,x,b,_,w,k,T,M,A=a.getFromId(t,e.xaxis||\"x\"),S=a.getFromId(t,e.yaxis||\"y\"),E=n.traceIs(e,\"contour\"),C=n.traceIs(e,\"histogram\"),L=n.traceIs(e,\"gl2d\"),P=E?\"best\":e.zsmooth;if(A._minDtick=0,S._minDtick=0,C)y=(M=s(t,e)).orig_x,r=M.x,v=M.x0,m=M.dx,w=M.orig_y,x=M.y,b=M.y0,_=M.dy,k=M.z;else{var O=e.z;i.isArray1D(O)?(u(e,A,S,\"x\",\"y\",[\"z\"]),r=e._x,x=e._y,O=e._z):(y=e.x?A.makeCalcdata(e,\"x\"):[],w=e.y?S.makeCalcdata(e,\"y\"):[],r=o(e,A,\"x\",y).vals,x=o(e,S,\"y\",w).vals,e._x=r,e._y=x),v=e.x0,m=e.dx,b=e.y0,_=e.dy,k=c(O,e,A,S)}function I(t){P=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: \"fast\": '+t)}if((A.rangebreaks||S.rangebreaks)&&(k=function(t,e,r){for(var n=[],i=-1,a=0;a<r.length;a++)if(e[a]!==d){n[++i]=[];for(var o=0;o<r[a].length;o++)t[o]!==d&&n[i].push(r[a][o])}return n}(r,x,k),C||(r=g(r),x=g(x),e._x=r,e._y=x)),C||!E&&!e.connectgaps||(e._emptypoints=h(k),f(k,e._emptypoints)),\"fast\"===P)if(\"log\"===A.type||\"log\"===S.type)I(\"log axis found\");else if(!C){if(r.length){var D=(r[r.length-1]-r[0])/(r.length-1),z=Math.abs(D/100);for(T=0;T<r.length-1;T++)if(Math.abs(r[T+1]-r[T]-D)>z){I(\"x scale is not linear\");break}}if(x.length&&\"fast\"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(T=0;T<x.length-1;T++)if(Math.abs(x[T+1]-x[T]-R)>F){I(\"y scale is not linear\");break}}}var N=i.maxRowLength(k),B=\"scaled\"===e.xtype?\"\":r,j=p(e,B,v,m,N,A),U=\"scaled\"===e.ytype?\"\":x,V=p(e,U,b,_,k.length,S);L||(e._extremes[A._id]=a.findExtremes(A,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:k,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),B&&B.length===j.length-1&&(H.xCenter=B),U&&U.length===V.length-1&&(H.yCenter=U),C&&(H.xRanges=M.xRanges,H.yRanges=M.yRanges,H.pts=M.pts),E||l(t,e,{vals:k,cLetter:\"z\"}),E&&e.contours&&\"heatmap\"===e.contours.coloring){var q={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,B,v,m,N,A),H.yfill=p(q,U,b,_,k.length,S)}return[H]}},{\"../../components/colorscale/calc\":375,\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"../histogram2d/calc\":835,\"./clean_2d_array\":803,\"./convert_column_xyz\":805,\"./find_empties\":807,\"./interp2d\":810,\"./make_bound_array\":812}],803:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,o){var s,l,u,c,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f<t.length;f++)s=Math.max(s,t[f].length);if(0===s)return!1;u=function(t){return t.length},c=function(t,e,r){return(t[r]||[])[e]}}else s=t.length,u=function(t,e){return t[e].length},c=function(t,e,r){return(t[e]||[])[r]};var d=function(t,e,r){return e===a||r===a?a:c(t,e,r)};function g(t){if(e&&\"carpet\"!==e.type&&\"contourcarpet\"!==e.type&&t&&\"category\"===t.type&&e[\"_\"+t._id.charAt(0)].length){var r=t._id.charAt(0),n={},o=e[\"_\"+r+\"CategoryMap\"]||e[r];for(f=0;f<o.length;f++)n[o[f]]=f;return function(e){var r=n[t._categories[e]];return r+1?r:a}}return i.identity}var v=g(r),m=g(o);o&&\"category\"===o.type&&(s=o._categories.length);var y=new Array(s);for(f=0;f<s;f++)for(l=r&&\"category\"===r.type?r._categories.length:u(t,f),y[f]=new Array(l),h=0;h<l;h++)y[f][h]=p(d(t,m(f),v(h)));return y}},{\"../../constants/numerical\":491,\"../../lib\":515,\"fast-isnumeric\":190}],804:[function(t,e,r){\"use strict\";e.exports={min:\"zmin\",max:\"zmax\"}},{}],805:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/cartesian/align_period\");e.exports=function(t,e,r,o,s,l){var u=t._length,c=e.makeCalcdata(t,o),f=r.makeCalcdata(t,s);c=a(t,e,o,c).vals,f=a(t,r,s,f).vals;var h,p,d,g,v=t.text,m=void 0!==v&&n.isArray1D(v),y=t.hovertext,x=void 0!==y&&n.isArray1D(y),b=n.distinctVals(c),_=b.vals,w=n.distinctVals(f),k=w.vals,T=[],M=k.length,A=_.length;for(h=0;h<l.length;h++)T[h]=n.init2dArray(M,A);m&&(d=n.init2dArray(M,A)),x&&(g=n.init2dArray(M,A));var S=n.init2dArray(M,A);for(h=0;h<u;h++)if(c[h]!==i&&f[h]!==i){var E=n.findBin(c[h]+b.minDiff/2,_),C=n.findBin(f[h]+w.minDiff/2,k);for(p=0;p<l.length;p++){var L=t[l[p]];T[p][C][E]=L[h],S[C][E]=h}m&&(d[C][E]=v[h]),x&&(g[C][E]=y[h])}for(t[\"_\"+o]=_,t[\"_\"+s]=k,p=0;p<l.length;p++)t[\"_\"+l[p]]=T[p];m&&(t._text=d),x&&(t._hovertext=g),e&&\"category\"===e.type&&(t[\"_\"+o+\"CategoryMap\"]=_.map((function(t){return e._categories[t]}))),r&&\"category\"===r.type&&(t[\"_\"+s+\"CategoryMap\"]=k.map((function(t){return r._categories[t]}))),t._after2before=S}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/align_period\":563}],806:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./xyz_defaults\"),a=t(\"./label_defaults\"),o=t(\"../scatter/period_defaults\"),s=t(\"./style_defaults\"),l=t(\"../../components/colorscale/defaults\"),u=t(\"./attributes\");e.exports=function(t,e,r,c){function f(r,i){return n.coerce(t,e,u,r,i)}i(t,e,f,c)?(o(t,e,c,f),f(\"xhoverformat\"),f(\"yhoverformat\"),f(\"text\"),f(\"hovertext\"),f(\"hovertemplate\"),a(f,c),s(t,e,f,c),f(\"hoverongaps\"),f(\"connectgaps\",n.isArray1D(e.z)&&!1!==e.zsmooth),l(t,e,c,f,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"../scatter/period_defaults\":956,\"./attributes\":801,\"./label_defaults\":811,\"./style_defaults\":815,\"./xyz_defaults\":816}],807:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").maxRowLength;e.exports=function(t){var e,r,i,a,o,s,l,u,c=[],f={},h=[],p=t[0],d=[],g=[0,0,0],v=n(t);for(r=0;r<t.length;r++)for(e=d,d=p,p=t[r+1]||[],i=0;i<v;i++)void 0===d[i]&&((s=(void 0!==d[i-1]?1:0)+(void 0!==d[i+1]?1:0)+(void 0!==e[i]?1:0)+(void 0!==p[i]?1:0))?(0===r&&s++,0===i&&s++,r===t.length-1&&s++,i===d.length-1&&s++,s<4&&(f[[r,i]]=[r,i,s]),c.push([r,i,s])):h.push([r,i]));for(;h.length;){for(l={},u=!1,o=h.length-1;o>=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||g)[2]+(f[[r+1,i]]||g)[2]+(f[[r,i-1]]||g)[2]+(f[[r,i+1]]||g)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),u=!0);if(!u)throw\"findEmpties iterated with no new neighbors\";for(a in l)f[a]=l[a],c.push(l[a])}return c.sort((function(t,e){return e[2]-t[2]}))}},{\"../../lib\":515}],808:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../components/colorscale\").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var u,c,f,h,p=l.isContour,d=t.cd[0],g=d.trace,v=t.xa,m=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,k=d.zmask,T=g.zhoverformat,M=y,A=x;if(!1!==t.index){try{f=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void i.error(\"Error hovering on heatmap, pointNumber must be [row,col], found:\",t.index)}if(f<0||f>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(M=[2*y[0]-y[1]],S=1;S<y.length;S++)M.push((y[S]+y[S-1])/2);for(M.push([2*y[y.length-1]-y[y.length-2]]),A=[2*x[0]-x[1]],S=1;S<x.length;S++)A.push((x[S]+x[S-1])/2);A.push([2*x[x.length-1]-x[x.length-2]])}f=Math.max(0,Math.min(M.length-2,i.findBin(e,M))),h=Math.max(0,Math.min(A.length-2,i.findBin(r,A)))}var E,C,L=v.c2p(y[f]),P=v.c2p(y[f+1]),O=m.c2p(x[h]),I=m.c2p(x[h+1]);p?(E=d.orig_x||y,C=d.orig_y||x,P=L,u=E[f],I=O,c=C[h]):(E=d.orig_x||_||y,C=d.orig_y||w||x,u=_?E[f]:(E[f]+E[f+1])/2,c=w?C[h]:(C[h]+C[h+1])/2,v&&\"category\"===v.type&&(u=y[f]),m&&\"category\"===m.type&&(c=x[h]),g.zsmooth&&(L=P=v.c2p(u),O=I=m.c2p(c)));var D=b[h][f];if(k&&!k[h][f]&&(D=void 0),void 0!==D||g.hoverongaps){var z;Array.isArray(d.hovertext)&&Array.isArray(d.hovertext[h])?z=d.hovertext[h][f]:Array.isArray(d.text)&&Array.isArray(d.text[h])&&(z=d.text[h][f]);var R=o(g),F={type:\"linear\",range:[R.min,R.max],hoverformat:T,_separators:v._separators,_numFormat:v._numFormat},N=a.tickText(F,D,\"hover\").text;return[i.extendFlat(t,{index:g._after2before?g._after2before[h][f]:[h,f],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:L,x1:P,y0:O,y1:I,xLabelVal:u,yLabelVal:c,zLabelVal:D,zLabel:N,text:z})]}}},{\"../../components/colorscale\":379,\"../../components/fx\":407,\"../../lib\":515,\"../../plots/cartesian/axes\":566}],809:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:t(\"./colorbar\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),moduleType:\"trace\",name:\"heatmap\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"showLegend\"],meta:{}}},{\"../../plots/cartesian\":578,\"./attributes\":801,\"./calc\":802,\"./colorbar\":804,\"./defaults\":806,\"./hover\":808,\"./plot\":813,\"./style\":814}],810:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=[[-1,0],[1,0],[0,-1],[0,1]];function a(t){return.5-.25*Math.min(1,.5*t)}function o(t,e,r){var n,a,o,s,l,u,c,f,h,p,d,g,v,m=0;for(s=0;s<e.length;s++){for(a=(n=e[s])[0],o=n[1],d=t[a][o],p=0,h=0,l=0;l<4;l++)(c=t[a+(u=i[l])[0]])&&void 0!==(f=c[o+u[1]])&&(0===p?g=v=f:(g=Math.min(g,f),v=Math.max(v,f)),h++,p+=f);if(0===h)throw\"iterateInterp2d order is wrong: no defined neighbors\";t[a][o]=p/h,void 0===d?h<4&&(m=1):(t[a][o]=(1+r)*t[a][o]-r*d,v>g&&(m=Math.max(m,Math.abs(t[a][o]-d)/(v-g))))}return m}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r<e.length&&!(e[r][2]<4);r++);for(e=e.slice(r),r=0;r<100&&i>.01;r++)i=o(t,e,a(i));return i>.01&&n.log(\"interp2d didn't converge quickly\",i),t}},{\"../../lib\":515}],811:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){t(\"texttemplate\");var r=n.extendFlat({},e.font,{color:\"auto\",size:\"auto\"});n.coerceFont(t,\"textfont\",r)}},{\"../../lib\":515}],812:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\").isArrayOrTypedArray;e.exports=function(t,e,r,a,o,s){var l,u,c,f=[],h=n.traceIs(t,\"contour\"),p=n.traceIs(t,\"histogram\"),d=n.traceIs(t,\"gl2d\");if(i(e)&&e.length>1&&!p&&\"category\"!==s.type){var g=e.length;if(!(g<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],c=1;c<g;c++)f.push(.5*(e[c-1]+e[c]));f.push(1.5*e[g-1]-.5*e[g-2])}if(g<o){var v=f[f.length-1],m=v-f[f.length-2];for(c=g;c<o;c++)v+=m,f.push(v)}}else{var y=t[s._id.charAt(0)+\"calendar\"];for(l=p?s.r2c(r,0,y):i(e)&&1===e.length?e[0]:void 0===r?0:(\"log\"===s.type?s.d2c:s.r2c)(r,0,y),u=a||1,c=h||d?0:-.5;c<o;c++)f.push(l+u*c)}return f}},{\"../../lib\":515,\"../../registry\":647}],813:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"tinycolor2\"),a=t(\"../../registry\"),o=t(\"../../components/drawing\"),s=t(\"../../plots/cartesian/axes\"),l=t(\"../../lib\"),u=t(\"../../lib/svg_text_utils\"),c=t(\"../scatter/format_labels\"),f=t(\"../../components/color\"),h=t(\"../../components/colorscale\").extractOpts,p=t(\"../../components/colorscale\").makeColorScaleFuncFromTrace,d=t(\"../../constants/xmlns_namespaces\"),g=t(\"../../constants/alignment\").LINE_SPACING,v=\"heatmap-label\";function m(t){return t.selectAll(\"g.\"+v)}function y(t){m(t).remove()}function x(t,e){var r=e.length-2,n=l.constrain(l.findBin(t,e),0,r),i=e[n],a=e[n+1],o=l.constrain(n+(t-i)/(a-i)-.5,0,r),s=Math.round(o),u=Math.abs(o-s);return o&&o!==r&&u?{bin0:s,frac:u,bin1:Math.round(s+u/(o-s))}:{bin0:s,bin1:s,frac:0}}function b(t,e){var r=e.length-1,n=l.constrain(l.findBin(t,e),0,r),i=e[n],a=(t-i)/(e[n+1]-i)||0;return a<=0?{bin0:n,bin1:n,frac:0}:a<.5?{bin0:n,bin1:n+1,frac:a}:{bin0:n+1,bin1:n,frac:1-a}}function _(t,e,r){t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=Math.round(255*r[3])}e.exports=function(t,e,r,w){var k=e.xaxis,T=e.yaxis;l.makeTraceGroups(w,r,\"hm\").each((function(e){var r,w,M,A,S,E,C,L,P=n.select(this),O=e[0],I=O.trace,D=I.xgap||0,z=I.ygap||0,R=O.z,F=O.x,N=O.y,B=O.xCenter,j=O.yCenter,U=a.traceIs(I,\"contour\"),V=U?\"best\":I.zsmooth,H=R.length,q=l.maxRowLength(R),G=!1,Y=!1;for(E=0;void 0===r&&E<F.length-1;)r=k.c2p(F[E]),E++;for(E=F.length-1;void 0===w&&E>0;)w=k.c2p(F[E]),E--;for(w<r&&(M=w,w=r,r=M,G=!0),E=0;void 0===A&&E<N.length-1;)A=T.c2p(N[E]),E++;for(E=N.length-1;void 0===S&&E>0;)S=T.c2p(N[E]),E--;if(S<A&&(M=A,A=S,S=M,Y=!0),U&&(B=F,j=N,F=O.xfill,N=O.yfill),\"fast\"!==V){var W=\"best\"===V?0:.5;r=Math.max(-W*k._length,r),w=Math.min((1+W)*k._length,w),A=Math.max(-W*T._length,A),S=Math.min((1+W)*T._length,S)}var X,Z,K=Math.round(w-r),J=Math.round(S-A);if(K<=0||J<=0)return P.selectAll(\"image\").data([]).exit().remove(),void y(P);\"fast\"===V?(X=q,Z=H):(X=K,Z=J);var $=document.createElement(\"canvas\");$.width=X,$.height=Z;var Q,tt,et=$.getContext(\"2d\"),rt=p(I,{noNumericCheck:!0,returnArray:!0});\"fast\"===V?(Q=G?function(t){return q-1-t}:l.identity,tt=Y?function(t){return H-1-t}:l.identity):(Q=function(t){return l.constrain(Math.round(k.c2p(F[t])-r),0,K)},tt=function(t){return l.constrain(Math.round(T.c2p(N[t])-A),0,J)});var nt,it,at,ot,st=tt(0),lt=[st,st],ut=G?0:1,ct=Y?0:1,ft=0,ht=0,pt=0,dt=0;function gt(t,e){if(void 0!==t){var r=rt(t);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),ft+=e,ht+=r[0]*e,pt+=r[1]*e,dt+=r[2]*e,r}return[0,0,0,0]}function vt(t,e,r,n){var i=t[r.bin0];if(void 0===i)return gt(void 0,1);var a,o=t[r.bin1],s=e[r.bin0],l=e[r.bin1],u=o-i||0,c=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,gt(i+r.frac*u+n.frac*(c+r.frac*a))}if(V){var mt,yt=0;try{mt=new Uint8Array(K*J*4)}catch(t){mt=new Array(K*J*4)}if(\"best\"===V){var xt,bt,_t,wt=B||F,kt=j||N,Tt=new Array(wt.length),Mt=new Array(kt.length),At=new Array(K),St=B?b:x,Et=j?b:x;for(E=0;E<wt.length;E++)Tt[E]=Math.round(k.c2p(wt[E])-r);for(E=0;E<kt.length;E++)Mt[E]=Math.round(T.c2p(kt[E])-A);for(E=0;E<K;E++)At[E]=St(E,Tt);for(C=0;C<J;C++)for(bt=R[(xt=Et(C,Mt)).bin0],_t=R[xt.bin1],E=0;E<K;E++,yt+=4)_(mt,yt,ot=vt(bt,_t,At[E],xt))}else for(C=0;C<H;C++)for(at=R[C],lt=tt(C),E=0;E<K;E++)ot=gt(at[E],1),_(mt,yt=4*(lt*K+Q(E)),ot);var Ct=et.createImageData(K,J);try{Ct.data.set(mt)}catch(t){var Lt=Ct.data,Pt=Lt.length;for(C=0;C<Pt;C++)Lt[C]=mt[C]}et.putImageData(Ct,0,0)}else{var Ot=Math.floor(D/2),It=Math.floor(z/2);for(C=0;C<H;C++)if(at=R[C],lt.reverse(),lt[ct]=tt(C+1),lt[0]!==lt[1]&&void 0!==lt[0]&&void 0!==lt[1])for(nt=[it=Q(0),it],E=0;E<q;E++)nt.reverse(),nt[ut]=Q(E+1),nt[0]!==nt[1]&&void 0!==nt[0]&&void 0!==nt[1]&&(ot=gt(at[E],(nt[1]-nt[0])*(lt[1]-lt[0])),et.fillStyle=\"rgba(\"+ot.join(\",\")+\")\",et.fillRect(nt[0]+Ot,lt[0]+It,nt[1]-nt[0]-D,lt[1]-lt[0]-z))}ht=Math.round(ht/ft),pt=Math.round(pt/ft),dt=Math.round(dt/ft);var Dt=i(\"rgb(\"+ht+\",\"+pt+\",\"+dt+\")\");t._hmpixcount=(t._hmpixcount||0)+ft,t._hmlumcount=(t._hmlumcount||0)+ft*Dt.getLuminance();var zt=P.selectAll(\"image\").data(e);zt.enter().append(\"svg:image\").attr({xmlns:d.svg,preserveAspectRatio:\"none\"}),zt.attr({height:J,width:K,x:r,y:A,\"xlink:href\":$.toDataURL(\"image/png\")}),y(P);var Rt=I.texttemplate;if(Rt){var Ft=h(I),Nt={type:\"linear\",range:[Ft.min,Ft.max],_separators:k._separators,_numFormat:k._numFormat},Bt=\"histogram2dcontour\"===I.type,jt=\"contour\"===I.type,Ut=jt?H-1:H,Vt=jt?1:0,Ht=jt?q-1:q,qt=[];for(E=jt?1:0;E<Ut;E++){var Gt;if(jt)Gt=O.y[E];else if(Bt){if(0===E||E===H-1)continue;Gt=O.y[E]}else if(O.yCenter)Gt=O.yCenter[E];else{if(E+1===H&&void 0===O.y[E+1])continue;Gt=(O.y[E]+O.y[E+1])/2}var Yt=Math.round(T.c2p(Gt));if(!(0>Yt||Yt>T._length))for(C=Vt;C<Ht;C++){var Wt;if(jt)Wt=O.x[C];else if(Bt){if(0===C||C===q-1)continue;Wt=O.x[C]}else if(O.xCenter)Wt=O.xCenter[C];else{if(C+1===q&&void 0===O.x[C+1])continue;Wt=(O.x[C]+O.x[C+1])/2}var Xt=Math.round(k.c2p(Wt));if(!(0>Xt||Xt>k._length)){var Zt=c({x:Wt,y:Gt},I,t._fullLayout);Zt.x=Wt,Zt.y=Gt;var Kt=O.z[E][C];void 0===Kt?(Zt.z=\"\",Zt.zLabel=\"\"):(Zt.z=Kt,Zt.zLabel=s.tickText(Nt,Kt,\"hover\").text);var Jt=O.text&&O.text[E]&&O.text[E][C];void 0!==Jt&&!1!==Jt||(Jt=\"\"),Zt.text=Jt;var $t=l.texttemplateString(Rt,Zt,t._fullLayout._d3locale,Zt,I._meta||{});if($t){var Qt=$t.split(\"<br>\"),te=Qt.length,ee=0;for(L=0;L<te;L++)ee=Math.max(ee,Qt[L].length);qt.push({l:te,c:ee,t:$t,x:Xt,y:Yt,z:Kt})}}}}var re=I.textfont,ne=re.family,ie=re.size,ae=t._fullLayout.font.size;if(!ie||\"auto\"===ie){var oe=1/0,se=1/0,le=0,ue=0;for(L=0;L<qt.length;L++){var ce=qt[L];if(le=Math.max(le,ce.l),ue=Math.max(ue,ce.c),L<qt.length-1){var fe=qt[L+1],he=Math.abs(fe.x-ce.x),pe=Math.abs(fe.y-ce.y);he&&(oe=Math.min(oe,he)),pe&&(se=Math.min(se,pe))}}isFinite(oe)&&isFinite(se)?(oe-=D,se-=z,oe/=ue,se/=le,oe/=g/2,se/=g,ie=Math.min(Math.floor(oe),Math.floor(se),ae)):ie=ae}if(ie<=0||!isFinite(ie))return;m(P).data(qt).enter().append(\"g\").classed(v,1).append(\"text\").attr(\"text-anchor\",\"middle\").each((function(e){var r=n.select(this),i=re.color;i&&\"auto\"!==i||(i=f.contrast(\"rgba(\"+rt(e.z).join()+\")\")),r.attr(\"data-notex\",1).call(u.positionText,function(t){return t.x}(e),function(t){return t.y-ie*(t.l*g/2-1)}(e)).call(o.font,ne,ie,i).text(e.t).call(u.convertToTspans,t)}))}}))}},{\"../../components/color\":367,\"../../components/colorscale\":379,\"../../components/drawing\":389,\"../../constants/alignment\":483,\"../../constants/xmlns_namespaces\":492,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"../scatter/format_labels\":945,\"@plotly/d3\":58,tinycolor2:313}],814:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t){n.select(t).selectAll(\".hm image\").style(\"opacity\",(function(t){return t.trace.opacity}))}},{\"@plotly/d3\":58}],815:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){!1===r(\"zsmooth\")&&(r(\"xgap\"),r(\"ygap\")),r(\"zhoverformat\")}},{}],816:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../registry\");function o(t,e){var r=e(t);return\"scaled\"===(r?e(t+\"type\",\"array\"):\"scaled\")&&(e(t+\"0\"),e(\"d\"+t)),r}e.exports=function(t,e,r,s,l,u){var c,f,h=r(\"z\");if(l=l||\"x\",u=u||\"y\",void 0===h||!h.length)return 0;if(i.isArray1D(t.z)){c=r(l),f=r(u);var p=i.minRowLength(c),d=i.minRowLength(f);if(0===p||0===d)return 0;e._length=Math.min(p,d,h.length)}else{if(c=o(l,r),f=o(u,r),!function(t){for(var e,r=!0,a=!1,o=!1,s=0;s<t.length;s++){if(e=t[s],!i.isArrayOrTypedArray(e)){r=!1;break}e.length>0&&(a=!0);for(var l=0;l<e.length;l++)if(n(e[l])){o=!0;break}}return r&&a&&o}(h))return 0;r(\"transpose\"),e._length=null}return\"heatmapgl\"===t.type||a.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[l,u],s),!0}},{\"../../lib\":515,\"../../registry\":647,\"fast-isnumeric\":190}],817:[function(t,e,r){\"use strict\";for(var n=t(\"../heatmap/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"../../plot_api/edit_types\").overrideAll,s=[\"z\",\"x\",\"x0\",\"dx\",\"y\",\"y0\",\"dy\",\"text\",\"transpose\",\"xtype\",\"ytype\"],l={},u=0;u<s.length;u++){var c=s[u];l[c]=n[c]}l.zsmooth={valType:\"enumerated\",values:[\"fast\",!1],dflt:\"fast\",editType:\"calc\"},a(l,i(\"\",{cLetter:\"z\",autoColorDflt:!1})),e.exports=o(l,\"calc\",\"nested\")},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../heatmap/attributes\":801}],818:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_heatmap2d,i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib/str2rgbarray\");function o(t,e){this.scene=t,this.uid=e,this.type=\"heatmapgl\",this.name=\"\",this.hoverinfo=\"all\",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={zsmooth:\"fast\",z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=n(t.glplot,this.options),this.heatmap._trace=this}var s=o.prototype;s.handlePick=function(t){var e=this.options,r=e.shape,n=t.pointId,i=n%r[0],a=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[e.x[i],e.y[a],e.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[a,i],hoverinfo:this.hoverinfo}},s.update=function(t,e){var r=e[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var o=n[0].length,s=n.length;this.options.shape=[o,s],this.options.x=r.x,this.options.y=r.y,this.options.zsmooth=t.zsmooth;var l=function(t){for(var e=t.colorscale,r=t.zmin,n=t.zmax,i=e.length,o=new Array(i),s=new Array(4*i),l=0;l<i;l++){var u=e[l],c=a(u[1]);o[l]=r+u[0]*(n-r);for(var f=0;f<4;f++)s[4*l+f]=c[f]}return{colorLevels:o,colorValues:s}}(t);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options);var u,c,f=this.scene.xaxis,h=this.scene.yaxis;!1===t.zsmooth&&(u={ppad:r.x[1]-r.x[0]},c={ppad:r.y[1]-r.y[0]}),t._extremes[f._id]=i.findExtremes(f,r.x,u),t._extremes[h._id]=i.findExtremes(h,r.y,c)},s.dispose=function(){this.heatmap.dispose()},e.exports=function(t,e,r){var n=new o(t,e.uid);return n.update(e,r),n}},{\"../../../stackgl_modules\":1133,\"../../lib/str2rgbarray\":540,\"../../plots/cartesian/axes\":566}],819:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../heatmap/xyz_defaults\"),a=t(\"../../components/colorscale/defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}i(t,e,l,s)?(l(\"text\"),l(\"zsmooth\"),a(t,e,s,l,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"../heatmap/xyz_defaults\":816,\"./attributes\":817}],820:[function(t,e,r){\"use strict\";[\"*heatmapgl* trace is deprecated!\",\"Please consider switching to the *heatmap* or *image* trace types.\",\"Alternatively you could contribute/sponsor rewriting this trace type\",\"based on cartesian features and using regl framework.\"].join(\" \"),e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../heatmap/colorbar\"),calc:t(\"../heatmap/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"heatmapgl\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"2dMap\"],meta:{}}},{\"../../plots/gl2d\":605,\"../heatmap/calc\":802,\"../heatmap/colorbar\":804,\"./attributes\":817,\"./convert\":818,\"./defaults\":819}],821:[function(t,e,r){\"use strict\";var n=t(\"../bar/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../plots/font_attributes\"),l=t(\"./bin_attributes\"),u=t(\"./constants\"),c=t(\"../../lib/extend\").extendFlat;e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),text:c({},n.text,{}),hovertext:c({},n.hovertext,{}),orientation:n.orientation,histfunc:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"min\",\"max\"],dflt:\"count\",editType:\"calc\"},histnorm:{valType:\"enumerated\",values:[\"\",\"percent\",\"probability\",\"density\",\"probability density\"],dflt:\"\",editType:\"calc\"},cumulative:{enabled:{valType:\"boolean\",dflt:!1,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"increasing\",\"decreasing\"],dflt:\"increasing\",editType:\"calc\"},currentbin:{valType:\"enumerated\",values:[\"include\",\"exclude\",\"half\"],dflt:\"include\",editType:\"calc\"},editType:\"calc\"},nbinsx:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},xbins:l(\"x\",!0),nbinsy:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},ybins:l(\"y\",!0),autobinx:{valType:\"boolean\",dflt:null,editType:\"calc\"},autobiny:{valType:\"boolean\",dflt:null,editType:\"calc\"},bingroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertemplate:a({},{keys:u.eventDataKeys}),texttemplate:o({arrayOk:!1,editType:\"plot\"},{keys:[\"label\",\"value\"]}),textposition:c({},n.textposition,{arrayOk:!1}),textfont:s({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),outsidetextfont:s({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),insidetextfont:s({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),insidetextanchor:n.insidetextanchor,textangle:n.textangle,cliponaxis:n.cliponaxis,constraintext:n.constraintext,marker:n.marker,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,_deprecated:{bardir:n._deprecated.bardir}}},{\"../../lib/extend\":505,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/font_attributes\":594,\"../../plots/template_attributes\":642,\"../bar/attributes\":657,\"./bin_attributes\":823,\"./constants\":827}],822:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=t.length,n=0,i=0;i<r;i++)e[i]?(t[i]/=e[i],n+=t[i]):t[i]=null;return n}},{}],823:[function(t,e,r){\"use strict\";e.exports=function(t,e){return{start:{valType:\"any\",editType:\"calc\"},end:{valType:\"any\",editType:\"calc\"},size:{valType:\"any\",editType:\"calc\"},editType:\"calc\"}}},{}],824:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,i){var a=i[e];return n(a)?(a=Number(a),r[t]+=a,a):0},avg:function(t,e,r,i,a){var o=i[e];return n(o)&&(o=Number(o),r[t]+=o,a[t]++),0},min:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]>a){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]<a){var o=a-r[t];return r[t]=a,o}}return 0}}},{\"fast-isnumeric\":190}],825:[function(t,e,r){\"use strict\";var n=t(\"../../constants/numerical\"),i=n.ONEAVGYEAR,a=n.ONEAVGMONTH,o=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,u=n.ONESEC,c=t(\"../../plots/cartesian/axes\").tickIncrement;function f(t,e,r,n){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),a=\"date\"===r.type,o=h(i,a),s=0;s<10;s++){var l=h(80*o,a);if(o===l)break;if(!p(l,t,e,a,r,n))break;o=l}return o}function h(t,e){return e&&t>u?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:u:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&&t>o){var l=d(e,a,s),u=d(r,a,s),c=t===i?0:1;return l[c]!==u[c]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,i,r).split(\"-\");return\"\"===n[0]&&(n.unshift(),n[0]=\"-\"+n[0]),n}e.exports=function(t,e,r,n,a){var s,l,u=-1.1*e,h=-.1*e,p=t-h,d=r[0],g=r[1],v=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),m=Math.min(f(d+u,d+h,n,a),f(g+u,g+h,n,a));if(v>m&&m<Math.abs(g-d)/4e3?(s=v,l=!1):(s=Math.min(v,m),l=!0),\"date\"===n.type&&s>o){var y=s===i?1:6,x=s===i?\"M12\":\"M1\";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf(\"-\",y);s>0&&(o=o.substr(0,s));var u=n.d2c(o,0,a);if(u<e){var f=c(u,x,!1,a);(u+f)/2<e+t&&(u=f)}return r&&l?c(u,x,!0,a):u}}return function(e,r){var n=s*Math.round(e/s);return n+s/10<e&&n+.9*s<e+t&&(n+=s),r&&l&&(n-=s),n}}},{\"../../constants/numerical\":491,\"../../plots/cartesian/axes\":566}],826:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=t(\"../../plots/cartesian/axes\"),s=t(\"../bar/arrays_to_calcdata\"),l=t(\"./bin_functions\"),u=t(\"./norm_functions\"),c=t(\"./average\"),f=t(\"./bin_label_vals\");function h(t,e,r,s,l){var u,c,f,p,d,g,v,m=s+\"bins\",y=t._fullLayout,x=e[\"_\"+s+\"bingroup\"],b=y._histogramBinOpts[x],_=\"overlay\"===y.barmode,w=function(t){return r.r2c(t,0,p)},k=function(t){return r.c2r(t,0,p)},T=\"date\"===r.type?function(t){return t||0===t?i.cleanDate(t,null,p):null}:function(t){return n(t)?Number(t):null};function M(t,e,r){e[t+\"Found\"]?(e[t]=T(e[t]),null===e[t]&&(e[t]=r[t])):(g[t]=e[t]=r[t],i.nestedProperty(c[0],m+\".\"+t).set(r[t]))}if(e[\"_\"+s+\"autoBinFinished\"])delete e[\"_\"+s+\"autoBinFinished\"];else{c=b.traces;var A=[],S=!0,E=!1,C=!1;for(u=0;u<c.length;u++)if((f=c[u]).visible){var L=b.dirs[u];d=f[\"_\"+L+\"pos0\"]=r.makeCalcdata(f,L),A=i.concat(A,d),delete f[\"_\"+s+\"autoBinFinished\"],!0===e.visible&&(S?S=!1:(delete f._autoBin,f[\"_\"+s+\"autoBinFinished\"]=1),a.traceIs(f,\"2dMap\")&&(E=!0),\"histogram2dcontour\"===f.type&&(C=!0))}p=c[0][s+\"calendar\"];var P=o.autoBin(A,r,b.nbins,E,p,b.sizeFound&&b.size),O=c[0]._autoBin={};if(g=O[b.dirs[0]]={},C&&(b.size||(P.start=k(o.tickIncrement(w(P.start),P.size,!0,p))),void 0===b.end&&(P.end=k(o.tickIncrement(w(P.end),P.size,!1,p)))),_&&!a.traceIs(e,\"2dMap\")&&0===P._dataSpan&&\"category\"!==r.type&&\"multicategory\"!==r.type){if(l)return[P,d,!0];P=function(t,e,r,n,a){var o,s,l,u=t._fullLayout,c=function(t,e){for(var r=e.xaxis,n=e.yaxis,i=e.orientation,a=[],o=t._fullData,s=0;s<o.length;s++){var l=o[s];\"histogram\"===l.type&&!0===l.visible&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}(t,e),f=!1,p=1/0,d=[e];for(o=0;o<c.length;o++)if((s=c[o])===e)f=!0;else if(f){var g=h(t,s,r,n,!0),v=g[0],m=g[2];s[\"_\"+n+\"autoBinFinished\"]=1,s[\"_\"+n+\"pos0\"]=g[1],m?d.push(s):p=Math.min(p,v.size)}else l=u._histogramBinOpts[s[\"_\"+n+\"bingroup\"]],p=Math.min(p,l.size||s[a].size);var y=new Array(d.length);for(o=0;o<d.length;o++)for(var x=d[o][\"_\"+n+\"pos0\"],b=0;b<x.length;b++)if(void 0!==x[b]){y[o]=x[b];break}for(isFinite(p)||(p=i.distinctVals(y).minDiff),o=0;o<d.length;o++){var _=(s=d[o])[n+\"calendar\"],w={start:r.c2r(y[o]-p/2,0,_),end:r.c2r(y[o]+p/2,0,_),size:p};s._input[a]=s[a]=w,(l=u._histogramBinOpts[s[\"_\"+n+\"bingroup\"]])&&i.extendFlat(l,w)}return e[a]}(t,e,r,s,m)}(v=f.cumulative||{}).enabled&&\"include\"!==v.currentbin&&(\"decreasing\"===v.direction?P.start=k(o.tickIncrement(w(P.start),P.size,!0,p)):P.end=k(o.tickIncrement(w(P.end),P.size,!1,p))),b.size=P.size,b.sizeFound||(g.size=P.size,i.nestedProperty(c[0],m+\".size\").set(P.size)),M(\"start\",b,P),M(\"end\",b,P)}d=e[\"_\"+s+\"pos0\"],delete e[\"_\"+s+\"pos0\"];var I=e._input[m]||{},D=i.extendFlat({},b),z=b.start,R=r.r2l(I.start),F=void 0!==R;if((b.startFound||F)&&R!==r.r2l(z)){var N=F?R:i.aggNums(Math.min,null,d),B={type:\"category\"===r.type||\"multicategory\"===r.type?\"linear\":r.type,r2l:r.r2l,dtick:b.size,tick0:z,calendar:p,range:[N,o.tickIncrement(N,b.size,!1,p)].map(r.l2r)},j=o.tickFirst(B);j>r.r2l(N)&&(j=o.tickIncrement(j,b.size,!0,p)),D.start=r.l2r(j),F||i.nestedProperty(e,m+\".start\").set(D.start)}var U=b.end,V=r.r2l(I.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);D.end=r.l2r(q),H||i.nestedProperty(e,m+\".start\").set(D.end)}var G=\"autobin\"+s;return!1===e._input[G]&&(e._input[m]=i.extendFlat({},e[m]||{}),delete e._input[G],delete e[G]),[D,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],v=[],m=\"h\"===e.orientation,y=o.getFromId(t,m?e.yaxis:e.xaxis),x=m?\"y\":\"x\",b={x:\"y\",y:\"x\"}[x],_=e[x+\"calendar\"],w=e.cumulative,k=h(t,e,y,x),T=k[0],M=k[1],A=\"string\"==typeof T.size,S=[],E=A?S:T,C=[],L=[],P=[],O=0,I=e.histnorm,D=e.histfunc,z=-1!==I.indexOf(\"density\");w.enabled&&z&&(I=I.replace(/ ?density$/,\"\"),z=!1);var R,F=\"max\"===D||\"min\"===D?null:0,N=l.count,B=u[I],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&\"count\"!==D&&(R=e[b],j=\"avg\"===D,N=l[D]),r=U(T.start),p=U(T.end)+(r-o.tickIncrement(r,T.size,!1,_))/1e6;r<p&&g.length<1e6&&(a=o.tickIncrement(r,T.size,!1,_),g.push((r+a)/2),v.push(F),P.push([]),S.push(r),z&&C.push(1/(a-r)),j&&L.push(0),!(a<=r));)r=a;S.push(r),A||\"date\"!==y.type||(E={start:U(E.start),end:U(E.end),size:E.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var V=e[\"_\"+x+\"bingroup\"],H={leftGap:1/0,rightGap:1/0};V&&(t._fullLayout._roundFnOpts[V]||(t._fullLayout._roundFnOpts[V]=H),H=t._fullLayout._roundFnOpts[V]);var q,G=v.length,Y=!0,W=H.leftGap,X=H.rightGap,Z={};for(r=0;r<M.length;r++){var K=M[r];(d=i.findBin(K,E))>=0&&d<G&&(O+=N(d,r,v,R,L),Y&&P[d].length&&K!==M[P[d][0]]&&(Y=!1),P[d].push(r),Z[r]=d,W=Math.min(W,K-S[d]),X=Math.min(X,S[d+1]-K))}H.leftGap=W,H.rightGap=X,Y||(q=function(e,r){return function(){var n=t._fullLayout._roundFnOpts[V];return f(n.leftGap,n.rightGap,S,y,_)(e,r)}}),j&&(O=c(v,L)),B&&B(v,O,C),w.enabled&&function(t,e,r){var n,i,a;function o(e){a=t[e],t[e]/=2}function s(e){i=t[e],t[e]=a+i/2,a+=i}if(\"half\"===r)if(\"increasing\"===e)for(o(0),n=1;n<t.length;n++)s(n);else for(o(t.length-1),n=t.length-2;n>=0;n--)s(n);else if(\"increasing\"===e){for(n=1;n<t.length;n++)t[n]+=t[n-1];\"exclude\"===r&&(t.unshift(0),t.pop())}else{for(n=t.length-2;n>=0;n--)t[n]+=t[n+1];\"exclude\"===r&&(t.push(0),t.shift())}}(v,w.direction,w.currentbin);var J=Math.min(g.length,v.length),$=[],Q=0,tt=J-1;for(r=0;r<J;r++)if(v[r]){Q=r;break}for(r=J-1;r>=Q;r--)if(v[r]){tt=r;break}for(r=Q;r<=tt;r++)if(n(g[r])&&n(v[r])){var et={p:g[r],s:v[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?M[P[r][0]]:g[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),$.push(et)}return 1===$.length&&($[0].width1=o.tickIncrement($[0].p,T.size,!1,_)-$[0].p),s($,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected($,e,Z),$},calcAllAutoBins:h}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../../registry\":647,\"../bar/arrays_to_calcdata\":656,\"./average\":822,\"./bin_functions\":824,\"./bin_label_vals\":825,\"./norm_functions\":833,\"fast-isnumeric\":190}],827:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"binNumber\"]}},{}],828:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../../registry\").traceIs,o=t(\"../bar/defaults\").handleGroupingDefaults,s=n.nestedProperty,l=t(\"../../plots/cartesian/constraints\").getAxisGroup,u=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],c=[\"x\",\"y\"];e.exports=function(t,e){var r,f,h,p,d,g,v,m=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return\"v\"===t.orientation?\"x\":\"y\"}function k(t,r,a){var o=t.uid+\"__\"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+\"calendar\"]||\"\",u=m[r],c=!0;u&&(s===u.axType&&l===u.calendar?(c=!1,u.traces.push(t),u.dirs.push(a)):(r=o,s!==u.axType&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set on a\",\"type:\"+s,\"axis\",\"with bins on\",\"type:\"+u.axType,\"axis.\"].join(\" \")),l!==u.calendar&&n.warn([\"Attempted to group the bins of trace\",t.index,\"set with a\",l,\"calendar\",\"with bins\",u.calendar?\"on a \"+u.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),c&&(m[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+\"calendar\"]||\"\"}),t[\"_\"+a+\"bingroup\"]=r}for(d=0;d<t.length;d++)r=t[d],a(r,\"histogram\")&&(y.push(r),delete r._xautoBinFinished,delete r._yautoBinFinished,a(r,\"2dMap\")||o(r._input,r,e,_));var T=e._alignmentOpts||{};for(d=0;d<y.length;d++){if(r=y[d],h=\"\",!a(r,\"2dMap\")){if(p=w(r),\"group\"===e.barmode&&r.alignmentgroup){var M=r[p+\"axis\"],A=l(e,M)+r.orientation;(T[A]||{})[r.alignmentgroup]&&(h=A)}h||\"overlay\"===e.barmode||(h=l(e,r.xaxis)+l(e,r.yaxis)+w(r))}h?(x[h]||(x[h]=[]),x[h].push(r)):b.push(r)}for(h in x)if(1!==(f=x[h]).length){var S=!1;for(f.length&&(r=f[0],S=_(\"bingroup\")),h=S||h,d=0;d<f.length;d++){var E=(r=f[d])._input.bingroup;E&&E!==h&&n.warn([\"Trace\",r.index,\"must match\",\"within bingroup\",h+\".\",\"Ignoring its bingroup:\",E,\"setting.\"].join(\" \")),r.bingroup=h,k(r,h,w(r))}}else b.push(f[0]);for(d=0;d<b.length;d++){r=b[d];var C=_(\"bingroup\");if(a(r,\"2dMap\"))for(v=0;v<2;v++){var L=_((p=c[v])+\"bingroup\",C?C+\"__\"+p:null);k(r,L,p)}else k(r,C,w(r))}for(h in m){var P=m[h];for(f=P.traces,g=0;g<u.length;g++){var O,I,D=u[g],z=D.name;if(\"nbins\"!==z||!P.sizeFound){for(d=0;d<f.length;d++){if(r=f[d],p=P.dirs[d],O=D.aStr[p],void 0!==s(r._input,O).get()){P[z]=_(O),P[z+\"Found\"]=!0;break}(I=(r._autoBin||{})[p]||{})[z]&&s(r,O).set(I[z])}if(\"start\"===z||\"end\"===z)for(;d<f.length;d++)(r=f[d])[\"_\"+p+\"bingroup\"]&&_(O,(I=(r._autoBin||{})[p]||{})[z]);\"nbins\"!==z||P.sizeFound||P.nbinsFound||(r=f[0],P[z]=_(O))}}}}},{\"../../lib\":515,\"../../plots/cartesian/axis_ids\":570,\"../../plots/cartesian/constraints\":574,\"../../registry\":647,\"../bar/defaults\":661}],829:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../components/color\"),o=t(\"../bar/defaults\").handleText,s=t(\"../bar/style_defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r,u){function c(r,n){return i.coerce(t,e,l,r,n)}var f=c(\"x\"),h=c(\"y\");c(\"cumulative.enabled\")&&(c(\"cumulative.direction\"),c(\"cumulative.currentbin\")),c(\"text\");var p=c(\"textposition\");o(t,e,u,c,p,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c(\"hovertext\"),c(\"hovertemplate\"),c(\"xhoverformat\"),c(\"yhoverformat\");var d=c(\"orientation\",h&&!f?\"h\":\"v\"),g=\"v\"===d?\"x\":\"y\",v=\"v\"===d?\"y\":\"x\",m=f&&h?Math.min(i.minRowLength(f)&&i.minRowLength(h)):i.minRowLength(e[g]||[]);if(m){e._length=m,n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],u),e[v]&&c(\"histfunc\"),c(\"histnorm\"),c(\"autobin\"+g),s(t,e,c,r,u),i.coerceSelectionMarkerOpacity(e,c);var y=(e.marker.line||{}).color,x=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");x(t,e,y||a.defaultLine,{axis:\"y\"}),x(t,e,y||a.defaultLine,{axis:\"x\",inherit:\"y\"})}else e.visible=!1}},{\"../../components/color\":367,\"../../lib\":515,\"../../registry\":647,\"../bar/defaults\":661,\"../bar/style_defaults\":672,\"./attributes\":821}],830:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(t.x=\"xVal\"in e?e.xVal:e.x,t.y=\"yVal\"in e?e.yVal:e.y,\"zLabelVal\"in e&&(t.z=e.zLabelVal),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),!(r.cumulative||{}).enabled){var a,o=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;if(t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,r._indexToPoints){a=[];for(var s=0;s<o.length;s++)a=a.concat(r._indexToPoints[o[s]])}else a=o;t.pointIndices=a}return t}},{}],831:[function(t,e,r){\"use strict\";var n=t(\"../bar/hover\").hoverPoints,i=t(\"../../plots/cartesian/axes\").hoverLabelText;e.exports=function(t,e,r,a,o){var s=n(t,e,r,a,o);if(s){var l=(t=s[0]).cd[t.index],u=t.cd[0].trace;if(!u.cumulative.enabled){var c=\"h\"===u.orientation?\"y\":\"x\";t[c+\"Label\"]=i(t[c+\"a\"],[l.ph0,l.ph1],u[c+\"hoverformat\"])}return s}}},{\"../../plots/cartesian/axes\":566,\"../bar/hover\":664}],832:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"../bar/layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),supplyLayoutDefaults:t(\"../bar/layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"../bar/cross_trace_calc\").crossTraceCalc,plot:t(\"../bar/plot\").plot,layerName:\"barlayer\",style:t(\"../bar/style\").style,styleOnSelect:t(\"../bar/style\").styleOnSelect,colorbar:t(\"../scatter/marker_colorbar\"),hoverPoints:t(\"./hover\"),selectPoints:t(\"../bar/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"histogram\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"histogram\",\"oriented\",\"errorBarsOK\",\"showLegend\"],meta:{}}},{\"../../plots/cartesian\":578,\"../bar/cross_trace_calc\":660,\"../bar/layout_attributes\":666,\"../bar/layout_defaults\":667,\"../bar/plot\":668,\"../bar/select\":669,\"../bar/style\":671,\"../scatter/marker_colorbar\":954,\"./attributes\":821,\"./calc\":826,\"./cross_trace_defaults\":828,\"./defaults\":829,\"./event_data\":830,\"./hover\":831}],833:[function(t,e,r){\"use strict\";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;i<r;i++)t[i]*=n},probability:function(t,e){for(var r=t.length,n=0;n<r;n++)t[n]/=e},density:function(t,e,r,n){var i=t.length;n=n||1;for(var a=0;a<i;a++)t[a]*=r[a]*n},\"probability density\":function(t,e,r,n){var i=t.length;n&&(e/=n);for(var a=0;a<i;a++)t[a]*=r[a]/e}}},{}],834:[function(t,e,r){\"use strict\";var n=t(\"../histogram/attributes\"),i=t(\"../histogram/bin_attributes\"),a=t(\"../heatmap/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,l=t(\"../../plots/template_attributes\").hovertemplateAttrs,u=t(\"../../plots/template_attributes\").texttemplateAttrs,c=t(\"../../components/colorscale/attributes\"),f=t(\"../../lib/extend\").extendFlat;e.exports=f({x:n.x,y:n.y,z:{valType:\"data_array\",editType:\"calc\"},marker:{color:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:i(\"x\"),nbinsy:n.nbinsy,ybins:i(\"y\"),autobinx:n.autobinx,autobiny:n.autobiny,bingroup:f({},n.bingroup,{}),xbingroup:f({},n.bingroup,{}),ybingroup:f({},n.bingroup,{}),xgap:a.xgap,ygap:a.ygap,zsmooth:a.zsmooth,xhoverformat:s(\"x\"),yhoverformat:s(\"y\"),zhoverformat:s(\"z\",1),hovertemplate:l({},{keys:\"z\"}),texttemplate:u({arrayOk:!1,editType:\"plot\"},{keys:\"z\"}),textfont:a.textfont,showlegend:f({},o.showlegend,{dflt:!1})},c(\"\",{cLetter:\"z\",autoColorDflt:!1}))},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../heatmap/attributes\":801,\"../histogram/attributes\":821,\"../histogram/bin_attributes\":823}],835:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../histogram/bin_functions\"),o=t(\"../histogram/norm_functions\"),s=t(\"../histogram/average\"),l=t(\"../histogram/bin_label_vals\"),u=t(\"../histogram/calc\").calcAllAutoBins;function c(t,e,r,n){var i,a=new Array(t);if(n)for(i=0;i<t;i++)a[i]=1/(e[i+1]-e[i]);else{var o=1/r;for(i=0;i<t;i++)a[i]=o}return a}function f(t,e){return{start:t(e.start),end:t(e.end),size:e.size}}function h(t,e,r,n,i,a){var o,s=t.length-1,u=new Array(s),c=l(r,n,t,i,a);for(o=0;o<s;o++){var f=(e||[])[o];u[o]=void 0===f?[c(t[o]),c(t[o+1],!0)]:[f,f]}return u}e.exports=function(t,e){var r,l,p,d,g=i.getFromId(t,e.xaxis),v=i.getFromId(t,e.yaxis),m=e.xcalendar,y=e.ycalendar,x=function(t){return g.r2c(t,0,m)},b=function(t){return v.r2c(t,0,y)},_=u(t,e,g,\"x\"),w=_[0],k=_[1],T=u(t,e,v,\"y\"),M=T[0],A=T[1],S=e._length;k.length>S&&k.splice(S,k.length-S),A.length>S&&A.splice(S,A.length-S);var E=[],C=[],L=[],P=\"string\"==typeof w.size,O=\"string\"==typeof M.size,I=[],D=[],z=P?I:w,R=O?D:M,F=0,N=[],B=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf(\"density\"),H=\"max\"===U||\"min\"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],X=[],Z=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";Z&&\"count\"!==U&&(Y=\"avg\"===U,q=a[U]);var K=w.size,J=x(w.start),$=x(w.end)+(J-i.tickIncrement(J,K,!1,m))/1e6;for(r=J;r<$;r=i.tickIncrement(r,K,!1,m))C.push(H),I.push(r),Y&&L.push(0);I.push(r);var Q,tt=C.length,et=(r-J)/tt,rt=(Q=J+et/2,g.c2r(Q,0,m)),nt=M.size,it=b(M.start),at=b(M.end)+(it-i.tickIncrement(it,nt,!1,y))/1e6;for(r=it;r<at;r=i.tickIncrement(r,nt,!1,y)){E.push(C.slice()),D.push(r);var ot=new Array(tt);for(l=0;l<tt;l++)ot[l]=[];B.push(ot),Y&&N.push(L.slice())}D.push(r);var st=E.length,lt=(r-it)/st,ut=function(t){return v.c2r(t,0,y)}(it+lt/2);V&&(W=c(C.length,z,et,P),X=c(E.length,R,lt,O)),P||\"date\"!==g.type||(z=f(x,z)),O||\"date\"!==v.type||(R=f(b,R));var ct=!0,ft=!0,ht=new Array(tt),pt=new Array(st),dt=1/0,gt=1/0,vt=1/0,mt=1/0;for(r=0;r<S;r++){var yt=k[r],xt=A[r];p=n.findBin(yt,z),d=n.findBin(xt,R),p>=0&&p<tt&&d>=0&&d<st&&(F+=q(p,r,E[d],Z,N[d]),B[d][p].push(r),ct&&(void 0===ht[p]?ht[p]=yt:ht[p]!==yt&&(ct=!1)),ft&&(void 0===pt[d]?pt[d]=xt:pt[d]!==xt&&(ft=!1)),dt=Math.min(dt,yt-I[p]),gt=Math.min(gt,I[p+1]-yt),vt=Math.min(vt,xt-D[d]),mt=Math.min(mt,D[d+1]-xt))}if(Y)for(d=0;d<st;d++)F+=s(E[d],N[d]);if(G)for(d=0;d<st;d++)G(E[d],F,W,X[d]);return{x:k,xRanges:h(I,ct&&ht,dt,gt,g,m),x0:rt,dx:et,y:A,yRanges:h(D,ft&&pt,vt,mt,v,y),y0:ut,dy:lt,z:E,pts:B}}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../histogram/average\":822,\"../histogram/bin_functions\":824,\"../histogram/bin_label_vals\":825,\"../histogram/calc\":826,\"../histogram/norm_functions\":833}],836:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./sample_defaults\"),a=t(\"../heatmap/style_defaults\"),o=t(\"../../components/colorscale/defaults\"),s=t(\"../heatmap/label_defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}i(t,e,c,u),!1!==e.visible&&(a(t,e,c,u),o(t,e,u,c,{prefix:\"\",cLetter:\"z\"}),c(\"hovertemplate\"),s(c,u),c(\"xhoverformat\"),c(\"yhoverformat\"))}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"../heatmap/label_defaults\":811,\"../heatmap/style_defaults\":815,\"./attributes\":834,\"./sample_defaults\":839}],837:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/hover\"),i=t(\"../../plots/cartesian/axes\").hoverLabelText;e.exports=function(t,e,r,a,o){var s=n(t,e,r,a,o);if(s){var l=(t=s[0]).index,u=l[0],c=l[1],f=t.cd[0],h=f.trace,p=f.xRanges[c],d=f.yRanges[u];return t.xLabel=i(t.xa,[p[0],p[1]],h.xhoverformat),t.yLabel=i(t.ya,[d[0],d[1]],h.yhoverformat),s}}},{\"../../plots/cartesian/axes\":566,\"../heatmap/hover\":808}],838:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../histogram/cross_trace_defaults\"),calc:t(\"../heatmap/calc\"),plot:t(\"../heatmap/plot\"),layerName:\"heatmaplayer\",colorbar:t(\"../heatmap/colorbar\"),style:t(\"../heatmap/style\"),hoverPoints:t(\"./hover\"),eventData:t(\"../histogram/event_data\"),moduleType:\"trace\",name:\"histogram2d\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"histogram\",\"showLegend\"],meta:{}}},{\"../../plots/cartesian\":578,\"../heatmap/calc\":802,\"../heatmap/colorbar\":804,\"../heatmap/plot\":813,\"../heatmap/style\":814,\"../histogram/cross_trace_defaults\":828,\"../histogram/event_data\":830,\"./attributes\":834,\"./defaults\":836,\"./hover\":837}],839:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"y\"),l=i.minRowLength(o),u=i.minRowLength(s);l&&u?(e._length=Math.min(l,u),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a),(r(\"z\")||r(\"marker.color\"))&&r(\"histfunc\"),r(\"histnorm\"),r(\"autobinx\"),r(\"autobiny\")):e.visible=!1}},{\"../../lib\":515,\"../../registry\":647}],840:[function(t,e,r){\"use strict\";var n=t(\"../histogram2d/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../lib/extend\").extendFlat;e.exports=s({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:n.xbins,nbinsy:n.nbinsy,ybins:n.ybins,autobinx:n.autobinx,autobiny:n.autobiny,bingroup:n.bingroup,xbingroup:n.xbingroup,ybingroup:n.ybingroup,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:{color:i.line.color,width:s({},i.line.width,{dflt:.5}),dash:i.line.dash,smoothing:i.line.smoothing,editType:\"plot\"},xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),zhoverformat:o(\"z\",1),hovertemplate:n.hovertemplate,texttemplate:i.texttemplate,textfont:i.textfont},a(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/cartesian/axis_format_attributes\":569,\"../contour/attributes\":744,\"../histogram2d/attributes\":834}],841:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../histogram2d/sample_defaults\"),a=t(\"../contour/contours_defaults\"),o=t(\"../contour/style_defaults\"),s=t(\"../heatmap/label_defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,l,r,i)}i(t,e,c,u),!1!==e.visible&&(a(t,e,c,(function(r){return n.coerce2(t,e,l,r)})),o(t,e,c,u),c(\"xhoverformat\"),c(\"yhoverformat\"),c(\"hovertemplate\"),e.contours&&\"heatmap\"===e.contours.coloring&&s(c,u))}},{\"../../lib\":515,\"../contour/contours_defaults\":751,\"../contour/style_defaults\":765,\"../heatmap/label_defaults\":811,\"../histogram2d/sample_defaults\":839,\"./attributes\":840}],842:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../histogram/cross_trace_defaults\"),calc:t(\"../contour/calc\"),plot:t(\"../contour/plot\").plot,layerName:\"contourlayer\",style:t(\"../contour/style\"),colorbar:t(\"../contour/colorbar\"),hoverPoints:t(\"../contour/hover\"),moduleType:\"trace\",name:\"histogram2dcontour\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"contour\",\"histogram\",\"showLegend\"],meta:{}}},{\"../../plots/cartesian\":578,\"../contour/calc\":745,\"../contour/colorbar\":747,\"../contour/hover\":757,\"../contour/plot\":762,\"../contour/style\":764,\"../histogram/cross_trace_defaults\":828,\"./attributes\":840,\"./defaults\":841}],843:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../pie/attributes\"),l=t(\"../sunburst/attributes\"),u=t(\"../treemap/attributes\"),c=t(\"../treemap/constants\"),f=t(\"../../lib/extend\").extendFlat;e.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\",editType:\"plot\"},flip:u.tiling.flip,pad:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},marker:f({colors:l.marker.colors,line:l.marker.line,editType:\"calc\"},a(\"marker\",{colorAttr:\"colors\",anim:!1})),leaf:l.leaf,pathbar:u.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:c.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u.outsidetextfont,textposition:u.textposition,sort:s.sort,root:l.root,domain:o({name:\"icicle\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/domain\":593,\"../../plots/template_attributes\":642,\"../pie/attributes\":910,\"../sunburst/attributes\":1058,\"../treemap/attributes\":1084,\"../treemap/constants\":1087}],844:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"icicle\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":628}],845:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"icicle\",t)}},{\"../sunburst/calc\":1060}],846:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,u=t(\"../../components/colorscale\"),c=u.hasColorscale,f=u.handleDefaults;e.exports=function(t,e,r,u){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),h(\"tiling.orientation\"),h(\"tiling.flip\"),h(\"tiling.pad\");var v=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(v)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var m=h(\"pathbar.visible\");s(t,e,u,h,\"auto\",{hasPathbar:m,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\"),h(\"marker.line.width\")&&h(\"marker.line.color\",u.paper_bgcolor),h(\"marker.colors\");var y=e._hasColorscale=c(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;y&&f(t,e,u,h,{prefix:\"marker.\",cLetter:\"c\"}),h(\"leaf.opacity\",y?1:.7),e._hovered={marker:{line:{width:2,color:a.contrast(u.paper_bgcolor)}}},m&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,u,h),e._length=null}else e.visible=!1}},{\"../../components/color\":367,\"../../components/colorscale\":379,\"../../lib\":515,\"../../plots/domain\":593,\"../bar/constants\":659,\"../bar/defaults\":661,\"./attributes\":843}],847:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,u=t(\"../treemap/constants\"),c=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel,p=!1;e.exports=function(t,e,r,d,g){var v=g.width,m=g.height,y=g.viewX,x=g.viewY,b=g.pathSlice,_=g.toMoveInsideSlice,w=g.strTransform,k=g.hasTransition,T=g.handleSlicesExit,M=g.makeUpdateSliceInterpolator,A=g.makeUpdateTextInterpolator,S=g.prevEntry,E=t._context.staticPlot,C=t._fullLayout,L=e[0].trace,P=-1!==L.textposition.indexOf(\"left\"),O=-1!==L.textposition.indexOf(\"right\"),I=-1!==L.textposition.indexOf(\"bottom\"),D=s(r,[v,m],{flipX:L.tiling.flip.indexOf(\"x\")>-1,flipY:L.tiling.flip.indexOf(\"y\")>-1,orientation:L.tiling.orientation,pad:{inner:L.tiling.pad},maxDepth:L._maxDepth}).descendants(),z=1/0,R=-1/0;D.forEach((function(t){var e=t.depth;e>=L._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),R=Math.max(R,e))})),d=d.data(D,c.getPtId),L._maxVisibleLayers=isFinite(R)?R-z+1:0,d.enter().append(\"g\").classed(\"slice\",!0),T(d,p,{},[v,m],b),d.order();var F=null;if(k&&S){var N=c.getPtId(S);d.each((function(t){null===F&&c.getPtId(t)===N&&(F={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return F||{x0:0,x1:v,y0:0,y1:m}},j=d;return k&&(j=j.transition().each(\"end\",(function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),j.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-L.tiling.pad),s._hoverY=x(I?s.y1-L.tiling.pad/2:s.y0+L.tiling.pad/2);var d=n.select(this),g=i.ensureSingle(d,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",E?\"none\":\"all\")}));k?g.transition().attrTween(\"d\",(function(t){var e=M(t,p,B(),[v,m],{orientation:L.tiling.orientation,flipX:L.tiling.flip.indexOf(\"x\")>-1,flipY:L.tiling.flip.indexOf(\"y\")>-1});return function(t){return b(e(t))}})):g.attr(\"d\",b),d.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{isTransitioning:t._transitioning}),g.call(l,s,L,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=h(s,r,L,e,C)||\"\";var T=i.ensureSingle(d,\"g\",\"slicetext\"),S=i.ensureSingle(T,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),D=i.ensureUniformFontSize(t,c.determineTextFont(L,s,C.font));S.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",O?\"end\":P?\"start\":\"middle\").call(a.font,D).call(o.convertToTspans,t),s.textBB=a.bBox(S.node()),s.transform=_(s,{fontSize:D.size}),s.transform.fontSize=D.size,k?S.transition().attrTween(\"transform\",(function(t){var e=A(t,p,B(),[v,m]);return function(t){return w(e(t))}})):S.attr(\"transform\",w(s))})),F}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../sunburst/fx\":1063,\"../sunburst/helpers\":1064,\"../sunburst/plot\":1068,\"../treemap/constants\":1087,\"./partition\":851,\"./style\":853,\"@plotly/d3\":58}],848:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":954,\"./attributes\":843,\"./base_plot\":844,\"./calc\":845,\"./defaults\":846,\"./layout_attributes\":849,\"./layout_defaults\":850,\"./plot\":852,\"./style\":853}],849:[function(t,e,r){\"use strict\";e.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],850:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"iciclecolorway\",e.colorway),r(\"extendiciclecolors\")}},{\"../../lib\":515,\"./layout_attributes\":849}],851:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"../treemap/flip_tree\");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s=\"h\"===r.orientation,l=r.maxDepth,u=e[0],c=e[1];l&&(u=(t.height+1)*e[0]/Math.min(t.height+1,l),c=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],u]:[e[0],c])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{\"../treemap/flip_tree\":1092,\"d3-hierarchy\":115}],852:[function(t,e,r){\"use strict\";var n=t(\"../treemap/draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"icicle\",drawDescendants:i})}},{\"../treemap/draw\":1089,\"./draw_descendants\":847}],853:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,u=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",u).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(\".trace\");o(t,e,\"icicle\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":367,\"../../lib\":515,\"../bar/uniform_text\":673,\"@plotly/d3\":58}],854:[function(t,e,r){\"use strict\";for(var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"./constants\").colormodel,s=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],l=[],u=[],c=0;c<s.length;c++){var f=o[s[c]];l.push(\"For the `\"+s[c]+\"` colormodel, it is [\"+(f.zminDflt||f.min).join(\", \")+\"].\"),u.push(\"For the `\"+s[c]+\"` colormodel, it is [\"+(f.zmaxDflt||f.max).join(\", \")+\"].\")}e.exports=a({source:{valType:\"string\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},colormodel:{valType:\"enumerated\",values:s,editType:\"calc\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",!1],dflt:!1,editType:\"plot\"},zmin:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},zmax:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",dflt:1,editType:\"calc\"},dy:{valType:\"number\",dflt:1,editType:\"calc\"},text:{valType:\"data_array\",editType:\"plot\"},hovertext:{valType:\"data_array\",editType:\"plot\"},hoverinfo:a({},n.hoverinfo,{flags:[\"x\",\"y\",\"z\",\"color\",\"name\",\"text\"],dflt:\"x+y+z+text+name\"}),hovertemplate:i({},{keys:[\"z\",\"color\",\"colormodel\"]}),transforms:void 0})},{\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"./constants\":856}],855:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./constants\"),a=t(\"fast-isnumeric\"),o=t(\"../../plots/cartesian/axes\"),s=t(\"../../lib\").maxRowLength,l=t(\"./helpers\").getImageSize;function u(t,e,r,i){return function(a){return n.constrain((a-t)*e,r,i)}}function c(t,e){return function(r){return n.constrain(r,t,e)}}e.exports=function(t,e){var r,n;if(e._hasZ)r=e.z.length,n=s(e.z);else if(e._hasSource){var f=l(e.source);r=f.height,n=f.width}var h,p=o.getFromId(t,e.xaxis||\"x\"),d=o.getFromId(t,e.yaxis||\"y\"),g=p.d2c(e.x0)-e.dx/2,v=d.d2c(e.y0)-e.dy/2,m=[g,g+n*e.dx],y=[v,v+r*e.dy];if(p&&\"log\"===p.type)for(h=0;h<n;h++)m.push(g+h*e.dx);if(d&&\"log\"===d.type)for(h=0;h<r;h++)y.push(v+h*e.dy);return e._extremes[p._id]=o.findExtremes(p,m),e._extremes[d._id]=o.findExtremes(d,y),e._scaler=function(t){var e=i.colormodel[t.colormodel],r=(e.colormodel||t.colormodel).length;t._sArray=[];for(var n=0;n<r;n++)e.min[n]!==t.zmin[n]||e.max[n]!==t.zmax[n]?t._sArray.push(u(t.zmin[n],(e.max[n]-e.min[n])/(t.zmax[n]-t.zmin[n]),e.min[n],e.max[n])):t._sArray.push(c(e.min[n],e.max[n]));return function(e){for(var n=e.slice(0,r),i=0;i<r;i++){var o=n[i];if(!a(o))return!1;n[i]=t._sArray[i](o)}return n}}(e),[{x0:g,y0:v,z:e.z,w:n,h:r}]}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"./constants\":856,\"./helpers\":859,\"fast-isnumeric\":190}],856:[function(t,e,r){\"use strict\";e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(t){return t.slice(0,3)},suffix:[\"\",\"\",\"\"]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(t){return t.slice(0,4)},suffix:[\"\",\"\",\"\",\"\"]},rgba256:{colormodel:\"rgba\",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(t){return t.slice(0,4)},suffix:[\"\",\"\",\"\",\"\"]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(t){var e=t.slice(0,3);return e[1]=e[1]+\"%\",e[2]=e[2]+\"%\",e},suffix:[\"°\",\"%\",\"%\"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(t){var e=t.slice(0,4);return e[1]=e[1]+\"%\",e[2]=e[2]+\"%\",e},suffix:[\"°\",\"%\",\"%\",\"\"]}},pixelatedStyle:[\"image-rendering: optimizeSpeed\",\"image-rendering: -moz-crisp-edges\",\"image-rendering: -o-crisp-edges\",\"image-rendering: -webkit-optimize-contrast\",\"image-rendering: optimize-contrast\",\"image-rendering: crisp-edges\",\"image-rendering: pixelated\",\"\"].join(\"; \")}},{}],857:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"./constants\"),o=t(\"../../snapshot/helpers\").IMAGE_URL_PREFIX;e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"source\"),e.source&&!e.source.match(o)&&delete e.source,e._hasSource=!!e.source;var s,l=r(\"z\");e._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),e._hasZ||e._hasSource?(r(\"x0\"),r(\"y0\"),r(\"dx\"),r(\"dy\"),e._hasZ?(r(\"colormodel\",\"rgb\"),r(\"zmin\",(s=a.colormodel[e.colormodel]).zminDflt||s.min),r(\"zmax\",s.zmaxDflt||s.max)):e._hasSource&&(e.colormodel=\"rgba256\",s=a.colormodel[e.colormodel],e.zmin=s.zminDflt,e.zmax=s.zmaxDflt),r(\"zsmooth\"),r(\"text\"),r(\"hovertext\"),r(\"hovertemplate\"),e._length=null):e.visible=!1}},{\"../../lib\":515,\"../../snapshot/helpers\":651,\"./attributes\":854,\"./constants\":856}],858:[function(t,e,r){\"use strict\";e.exports=function(t,e){return\"xVal\"in e&&(t.x=e.xVal),\"yVal\"in e&&(t.y=e.yVal),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),t.color=e.color,t.colormodel=e.trace.colormodel,t.z||(t.z=e.color),t}},{}],859:[function(t,e,r){\"use strict\";var n=t(\"probe-image-size/sync\"),i=t(\"../../snapshot/helpers\").IMAGE_URL_PREFIX,a=t(\"buffer/\").Buffer;r.getImageSize=function(t){var e=t.replace(i,\"\"),r=new a(e,\"base64\");return n(r)}},{\"../../snapshot/helpers\":651,\"buffer/\":85,\"probe-image-size/sync\":277}],860:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"./constants\");e.exports=function(t,e,r){var o=t.cd[0],s=o.trace,l=t.xa,u=t.ya;if(!(n.inbox(e-o.x0,e-(o.x0+o.w*s.dx),0)>0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var c,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?c=o.z[h][f]:s._hasSource&&(c=s._canvas.el.getContext(\"2d\",{willReadFrequently:!0}).getImageData(f,h,1,1).data),c){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split(\"+\");-1!==g.indexOf(\"all\")&&(g=[\"color\"]),-1!==g.indexOf(\"color\")&&(p=!0)}var v,m=a.colormodel[s.colormodel],y=m.colormodel||s.colormodel,x=y.length,b=s._scaler(c),_=m.suffix,w=[];(s.hovertemplate||p)&&(w.push(\"[\"+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(\", \")),4===x&&w.push(\", \"+b[3]+_[3]),w.push(\"]\"),w=w.join(\"\"),t.extraText=y.toUpperCase()+\": \"+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?v=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(v=s.text[h][f]);var k=u.c2p(o.y0+(h+.5)*s.dy),T=o.x0+(f+.5)*s.dx,M=o.y0+(h+.5)*s.dy,A=\"[\"+c.slice(0,s.colormodel.length).join(\", \")+\"]\";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:k,y1:k,color:b,xVal:T,xLabelVal:T,yVal:M,yLabelVal:M,zLabelVal:A,text:v,hovertemplateLabels:{zLabel:A,colorLabel:w,\"color[0]Label\":b[0]+_[0],\"color[1]Label\":b[1]+_[1],\"color[2]Label\":b[2]+_[2],\"color[3]Label\":b[3]+_[3]}})]}}}},{\"../../components/fx\":407,\"../../lib\":515,\"./constants\":856}],861:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"image\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}},{\"../../plots/cartesian\":578,\"./attributes\":854,\"./calc\":855,\"./defaults\":857,\"./event_data\":858,\"./hover\":860,\"./plot\":862,\"./style\":863}],862:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.strTranslate,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./constants\"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,u){var c=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(u,r,\"im\").each((function(e){var r=n.select(this),l=e[0],u=l.trace,p=(\"fast\"===u.zsmooth||!1===u.zsmooth&&h)&&!u._hasZ&&u._hasSource&&\"linear\"===c.type&&\"linear\"===f.type;u._realImage=p;var d,g,v,m,y,x,b=l.z,_=l.x0,w=l.y0,k=l.w,T=l.h,M=u.dx,A=u.dy;for(x=0;void 0===d&&x<k;)d=c.c2p(_+x*M),x++;for(x=k;void 0===g&&x>0;)g=c.c2p(_+x*M),x--;for(x=0;void 0===m&&x<T;)m=f.c2p(w+x*A),x++;for(x=T;void 0===y&&x>0;)y=f.c2p(w+x*A),x--;g<d&&(v=g,g=d,d=v),y<m&&(v=m,m=y,y=v),p||(d=Math.max(-.5*c._length,d),g=Math.min(1.5*c._length,g),m=Math.max(-.5*f._length,m),y=Math.min(1.5*f._length,y));var S=Math.round(g-d),E=Math.round(y-m);if(S<=0||E<=0)r.selectAll(\"image\").data([]).exit().remove();else{var C=r.selectAll(\"image\").data([e]);C.enter().append(\"svg:image\").attr({xmlns:o.svg,preserveAspectRatio:\"none\"}),C.exit().remove();var L=!1===u.zsmooth?s.pixelatedStyle:\"\";if(p){var P=i.simpleMap(c.range,c.r2l),O=i.simpleMap(f.range,f.r2l),I=P[1]<P[0],D=O[1]>O[0];if(I||D){var z=d+S/2,R=m+E/2;L+=\"transform:\"+a(z+\"px\",R+\"px\")+\"scale(\"+(I?-1:1)+\",\"+(D?-1:1)+\")\"+a(-z+\"px\",-R+\"px\")+\";\"}}C.attr(\"style\",L);var F=new Promise((function(t){if(u._hasZ)t();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===k&&u._canvas.el.height===T&&u._canvas.source===u.source)t();else{var e=document.createElement(\"canvas\");e.width=k,e.height=T;var r=e.getContext(\"2d\",{willReadFrequently:!0});u._image=u._image||new Image;var n=u._image;n.onload=function(){r.drawImage(n,0,0),u._canvas={el:e,source:u.source},t()},n.setAttribute(\"src\",u.source)}})).then((function(){var t,e;if(u._hasZ)e=N((function(t,e){return b[e][t]})),t=e.toDataURL(\"image/png\");else if(u._hasSource)if(p)t=u.source;else{var r=u._canvas.el.getContext(\"2d\",{willReadFrequently:!0}).getImageData(0,0,k,T).data;e=N((function(t,e){var n=4*(e*k+t);return[r[n],r[n+1],r[n+2],r[n+3]]})),t=e.toDataURL(\"image/png\")}C.attr({\"xlink:href\":t,height:E,width:S,x:d,y:m})}));t._promises.push(F)}function N(t){var e=document.createElement(\"canvas\");e.width=S,e.height=E;var r,n=e.getContext(\"2d\",{willReadFrequently:!0}),a=function(t){return i.constrain(Math.round(c.c2p(_+t*M)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*A)-m),0,E)},h=s.colormodel[u.colormodel],p=h.colormodel||u.colormodel,g=h.fmt;for(x=0;x<l.w;x++){var v=a(x),y=a(x+1);if(y!==v&&!isNaN(y)&&!isNaN(v))for(var b=0;b<l.h;b++){var k=o(b),T=o(b+1);T===k||isNaN(T)||isNaN(k)||!t(x,b)||(r=u._scaler(t(x,b)),n.fillStyle=r?p+\"(\"+g(r).join(\",\")+\")\":\"rgba(0,0,0,0)\",n.fillRect(v,k,y-v,T-k))}}return e}}))}},{\"../../constants/xmlns_namespaces\":492,\"../../lib\":515,\"./constants\":856,\"@plotly/d3\":58}],863:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\");e.exports=function(t){n.select(t).selectAll(\".im image\").style(\"opacity\",(function(t){return t[0].trace.opacity}))}},{\"@plotly/d3\":58}],864:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat,i=t(\"../../lib/extend\").extendDeep,a=t(\"../../plot_api/edit_types\").overrideAll,o=t(\"../../plots/font_attributes\"),s=t(\"../../components/color/attributes\"),l=t(\"../../plots/domain\").attributes,u=t(\"../../plots/cartesian/layout_attributes\"),c=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../constants/delta.js\"),h=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,p=o({editType:\"plot\",colorEditType:\"plot\"}),d={color:{valType:\"color\",editType:\"plot\"},line:{color:{valType:\"color\",dflt:s.defaultLine,editType:\"plot\"},width:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},thickness:{valType:\"number\",min:0,max:1,dflt:1,editType:\"plot\"},editType:\"calc\"},g={valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},v=c(\"step\",i({},d,{range:g}));e.exports={mode:{valType:\"flaglist\",editType:\"calc\",flags:[\"number\",\"delta\",\"gauge\"],dflt:\"number\"},value:{valType:\"number\",editType:\"calc\",anim:!0},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],editType:\"plot\"},domain:l({name:\"indicator\",trace:!0,editType:\"calc\"}),title:{text:{valType:\"string\",editType:\"plot\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],editType:\"plot\"},font:n({},p,{}),editType:\"plot\"},number:{valueformat:{valType:\"string\",dflt:\"\",editType:\"plot\",description:h(\"value\")},font:n({},p,{}),prefix:{valType:\"string\",dflt:\"\",editType:\"plot\"},suffix:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"plot\"},delta:{reference:{valType:\"number\",editType:\"calc\"},position:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],dflt:\"bottom\",editType:\"plot\"},relative:{valType:\"boolean\",editType:\"plot\",dflt:!1},valueformat:{valType:\"string\",editType:\"plot\",description:h(\"value\")},increasing:{symbol:{valType:\"string\",dflt:f.INCREASING.SYMBOL,editType:\"plot\"},color:{valType:\"color\",dflt:f.INCREASING.COLOR,editType:\"plot\"},editType:\"plot\"},decreasing:{symbol:{valType:\"string\",dflt:f.DECREASING.SYMBOL,editType:\"plot\"},color:{valType:\"color\",dflt:f.DECREASING.COLOR,editType:\"plot\"},editType:\"plot\"},font:n({},p,{}),prefix:{valType:\"string\",dflt:\"\",editType:\"plot\"},suffix:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"calc\"},gauge:{shape:{valType:\"enumerated\",editType:\"plot\",dflt:\"angular\",values:[\"angular\",\"bullet\"]},bar:i({},d,{color:{dflt:\"green\"}}),bgcolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:s.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},axis:a({range:g,visible:n({},u.visible,{dflt:!0}),tickmode:u.tickmode,nticks:u.nticks,tick0:u.tick0,dtick:u.dtick,tickvals:u.tickvals,ticktext:u.ticktext,ticks:n({},u.ticks,{dflt:\"outside\"}),ticklen:u.ticklen,tickwidth:u.tickwidth,tickcolor:u.tickcolor,ticklabelstep:u.ticklabelstep,showticklabels:u.showticklabels,tickfont:o({}),tickangle:u.tickangle,tickformat:u.tickformat,tickformatstops:u.tickformatstops,tickprefix:u.tickprefix,showtickprefix:u.showtickprefix,ticksuffix:u.ticksuffix,showticksuffix:u.showticksuffix,separatethousands:u.separatethousands,exponentformat:u.exponentformat,minexponent:u.minexponent,showexponent:u.showexponent,editType:\"plot\"},\"plot\"),steps:v,threshold:{line:{color:n({},d.line.color,{}),width:n({},d.line.width,{dflt:1}),editType:\"plot\"},thickness:n({},d.thickness,{dflt:.85}),value:{valType:\"number\",editType:\"calc\",dflt:!1},editType:\"plot\"},editType:\"plot\"}}},{\"../../components/color/attributes\":366,\"../../constants/delta.js\":485,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/cartesian/layout_attributes\":579,\"../../plots/domain\":593,\"../../plots/font_attributes\":594}],865:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"indicator\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":628}],866:[function(t,e,r){\"use strict\";e.exports={calc:function(t,e){var r=[],n=e.value;\"number\"!=typeof e._lastValue&&(e._lastValue=e.value);var i=e._lastValue,a=i;return e._hasDelta&&\"number\"==typeof e.delta.reference&&(a=e.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}}},{}],867:[function(t,e,r){\"use strict\";e.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},{}],868:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../../plot_api/plot_template\"),s=t(\"../../plots/array_container_defaults\"),l=t(\"./constants.js\"),u=t(\"../../plots/cartesian/tick_value_defaults\"),c=t(\"../../plots/cartesian/tick_mark_defaults\"),f=t(\"../../plots/cartesian/tick_label_defaults\"),h=t(\"../../plots/cartesian/prefix_suffix_defaults\");function p(t,e){function r(r,a){return n.coerce(t,e,i.gauge.steps,r,a)}r(\"color\"),r(\"line.color\"),r(\"line.width\"),r(\"range\"),r(\"thickness\")}e.exports={supplyDefaults:function(t,e,r,d){function g(r,a){return n.coerce(t,e,i,r,a)}a(e,d,g),g(\"mode\"),e._hasNumber=-1!==e.mode.indexOf(\"number\"),e._hasDelta=-1!==e.mode.indexOf(\"delta\"),e._hasGauge=-1!==e.mode.indexOf(\"gauge\");var v=g(\"value\");e._range=[0,\"number\"==typeof v?1.5*v:1];var m,y,x,b,_,w,k=new Array(2);function T(t,e){return n.coerce(x,b,i.gauge,t,e)}function M(t,e){return n.coerce(_,w,i.gauge.axis,t,e)}if(e._hasNumber&&(g(\"number.valueformat\"),g(\"number.font.color\",d.font.color),g(\"number.font.family\",d.font.family),g(\"number.font.size\"),void 0===e.number.font.size&&(e.number.font.size=l.defaultNumberFontSize,k[0]=!0),g(\"number.prefix\"),g(\"number.suffix\"),m=e.number.font.size),e._hasDelta&&(g(\"delta.font.color\",d.font.color),g(\"delta.font.family\",d.font.family),g(\"delta.font.size\"),void 0===e.delta.font.size&&(e.delta.font.size=(e._hasNumber?.5:1)*(m||l.defaultNumberFontSize),k[1]=!0),g(\"delta.reference\",e.value),g(\"delta.relative\"),g(\"delta.valueformat\",e.delta.relative?\"2%\":\"\"),g(\"delta.increasing.symbol\"),g(\"delta.increasing.color\"),g(\"delta.decreasing.symbol\"),g(\"delta.decreasing.color\"),g(\"delta.position\"),g(\"delta.prefix\"),g(\"delta.suffix\"),y=e.delta.font.size),e._scaleNumbers=(!e._hasNumber||k[0])&&(!e._hasDelta||k[1])||!1,g(\"title.font.color\",d.font.color),g(\"title.font.family\",d.font.family),g(\"title.font.size\",.25*(m||y||l.defaultNumberFontSize)),g(\"title.text\"),e._hasGauge){(x=t.gauge)||(x={}),b=o.newContainer(e,\"gauge\"),T(\"shape\"),(e._isBullet=\"bullet\"===e.gauge.shape)||g(\"title.align\",\"center\"),(e._isAngular=\"angular\"===e.gauge.shape)||g(\"align\",\"center\"),T(\"bgcolor\",d.paper_bgcolor),T(\"borderwidth\"),T(\"bordercolor\"),T(\"bar.color\"),T(\"bar.line.color\"),T(\"bar.line.width\"),T(\"bar.thickness\",l.valueThickness*(\"bullet\"===e.gauge.shape?.5:1)),s(x,b,{name:\"steps\",handleItemDefaults:p}),T(\"threshold.value\"),T(\"threshold.thickness\"),T(\"threshold.line.width\"),T(\"threshold.line.color\"),_={},x&&(_=x.axis||{}),w=o.newContainer(b,\"axis\"),M(\"visible\"),e._range=M(\"range\",e._range);var A={outerTicks:!0};u(_,w,M,\"linear\"),h(_,w,M,\"linear\",A),f(_,w,M,\"linear\",A),c(_,w,M,A)}else g(\"title.align\",\"center\"),g(\"align\",\"center\"),e._isAngular=e._isBullet=!1;e._length=null}}},{\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../plots/array_container_defaults\":561,\"../../plots/cartesian/prefix_suffix_defaults\":583,\"../../plots/cartesian/tick_label_defaults\":587,\"../../plots/cartesian/tick_mark_defaults\":588,\"../../plots/cartesian/tick_value_defaults\":589,\"../../plots/domain\":593,\"./attributes\":864,\"./constants.js\":867}],869:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"indicator\",basePlotModule:t(\"./base_plot\"),categories:[\"svg\",\"noOpacity\",\"noHover\"],animatable:!0,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\").calc,plot:t(\"./plot\"),meta:{}}},{\"./attributes\":864,\"./base_plot\":865,\"./calc\":866,\"./defaults\":868,\"./plot\":870}],870:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolate,a=t(\"d3-interpolate\").interpolateNumber,o=t(\"../../lib\"),s=o.strScale,l=o.strTranslate,u=o.rad2deg,c=t(\"../../constants/alignment\").MID_SHIFT,f=t(\"../../components/drawing\"),h=t(\"./constants\"),p=t(\"../../lib/svg_text_utils\"),d=t(\"../../plots/cartesian/axes\"),g=t(\"../../plots/cartesian/axis_defaults\"),v=t(\"../../plots/cartesian/position_defaults\"),m=t(\"../../plots/cartesian/layout_attributes\"),y=t(\"../../components/color\"),x={left:\"start\",center:\"middle\",right:\"end\"},b={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function w(t){return t&&t.duration>0}function k(t,e,r,a){var o,s,f,h,p=r[0].trace,g=a.size,v=a.radius,m=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[g.l+g.w/2,g.t+g.h/2+v/2],_=a.gauge,k=a.layer,A=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function C(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function L(t){return n.svg.arc().innerRadius((m+v)/2-t/2*(v-m)).outerRadius((m+v)/2+t/2*(v-m)).startAngle(-E)}function P(t){t.attr(\"d\",(function(t){return L(t.thickness).startAngle(C(t.range[0])).endAngle(C(t.range[1]))()}))}_.enter().append(\"g\").classed(\"angular\",!0),_.attr(\"transform\",l(b[0],b[1])),k.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),k.selectAll(\"g.xangularaxistick,path,text\").remove(),(o=M(t,p.gauge.axis)).type=\"linear\",o.range=p.gauge.axis.range,o._id=\"xangularaxis\",o.ticklabeloverflow=\"allow\",o.setScale();var O=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},I={},D=d.makeLabelFns(o,0).labelStandoff;I.xFn=function(t){var e=O(t);return Math.cos(e)*D},I.yFn=function(t){var e=O(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(D+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*c)},I.anchorFn=function(t){var e=O(t),r=Math.cos(e);return Math.abs(r)<.1?\"middle\":r>0?\"start\":\"end\"},I.heightFn=function(t,e,r){var n=O(t);return-.5*(1+Math.sin(n))*r};var z=function(t){return l(b[0]+v*Math.cos(t),b[1]-v*Math.sin(t))};if(f=function(t){return z(O(t))},s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h=\"inside\"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:k,path:\"M\"+h*R+\",0h\"+h*o.ticklen,transFn:function(t){var e=O(t);return z(e)+\"rotate(\"+-u(e)+\")\"}}),d.drawLabels(t,o,{vals:s,layer:k,transFn:f,labelFns:I})}var F=[y].concat(p.gauge.steps),N=_.selectAll(\"g.bg-arc\").data(F);N.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),N.select(\"path\").call(P).call(T),N.exit().remove();var B=L(p.gauge.bar.thickness),j=_.selectAll(\"g.value-arc\").data([p.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var U,V,H,q=j.select(\"path\");w(A)?(q.transition().duration(A.duration).ease(A.easing).each(\"end\",(function(){S&&S()})).each(\"interrupt\",(function(){S&&S()})).attrTween(\"d\",(U=B,V=C(r[0].lastY),H=C(r[0].y),function(){var t=i(V,H);return function(e){return U.endAngle(t(e))()}})),p._lastValue=r[0].y):q.attr(\"d\",\"number\"==typeof r[0].y?B.endAngle(C(r[0].y)):\"M0,0Z\"),q.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll(\"g.threshold-arc\").data(F);Y.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),Y.select(\"path\").call(P).call(T),Y.exit().remove();var W=_.selectAll(\"g.gauge-outline\").data([x]);W.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),W.select(\"path\").call(P).call(T),W.exit().remove()}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style(\"stroke-width\",(function(t){return t.line.width}))}function M(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},e),a={type:\"linear\",_id:\"x\"+e._id},s={letter:\"x\",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,m,t,e)}return g(i,a,l,s,n),v(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+\"x\"+r]}function S(t,e,r,i){var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),o=n.select(a);return o.text(t).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function E(t,e,r,n,i,a){var s=\"_cache\"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,i){var u,c=t._fullLayout;w(r)&&i&&(u=i()),o.makeTraceGroups(c._indicatorlayer,e,\"trace\").each((function(e){var i,g,v,m,C,L=e[0].trace,P=n.select(this),O=L._hasGauge,I=L._isAngular,D=L._isBullet,z=L.domain,R={w:c._size.w*(z.x[1]-z.x[0]),h:c._size.h*(z.y[1]-z.y[0]),l:c._size.l+c._size.w*z.x[0],r:c._size.r+c._size.w*(1-z.x[1]),t:c._size.t+c._size.h*(1-z.y[1]),b:c._size.b+c._size.h*z.y[0]},F=R.l+R.w/2,N=R.t+R.h/2,B=Math.min(R.w/2,R.h),j=h.innerRadius*B,U=L.align||\"center\";if(g=N,O){if(I&&(i=F,g=N+B/2,v=function(t){return function(t,e){return[e/Math.sqrt(t.width/2*(t.width/2)+t.height*t.height),t,e]}(t,.9*j)}),D){var V=h.bulletPadding,H=1-h.bulletNumberDomainSize+V;i=R.l+(H+(1-H)*b[U])*R.w,v=function(t){return A(t,(h.bulletNumberDomainSize-V)*R.w,R.h)}}}else i=R.l+b[U]*R.w,v=function(t){return A(t,R.w,R.h)};(function(t,e,r,i){var u,c,h,g=r[0].trace,v=i.numbersX,m=i.numbersY,k=g.align||\"center\",T=x[k],A=i.transitionOpts,C=i.onComplete,L=o.ensureSingle(e,\"g\",\"numbers\"),P=[];g._hasNumber&&P.push(\"number\"),g._hasDelta&&(P.push(\"delta\"),\"left\"===g.delta.position&&P.reverse());var O=L.selectAll(\"text\").data(P);function I(e,r,n,i){if(!e.match(\"s\")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace(\"s\",\"f\").replace(/\\d+/,(function(t){return parseInt(t)-1})),o=M(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}O.enter().append(\"text\"),O.attr(\"text-anchor\",(function(){return T})).attr(\"class\",(function(t){return t})).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),O.exit().remove();var D,z=g.mode+g.align;if(g._hasDelta&&(D=function(){var e=M(t,{tickformat:g.delta.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.delta.suffix,s=g.delta.prefix,l=function(t){return g.delta.relative?t.relativeDelta:t.delta},u=function(t,e){return 0===t||\"number\"!=typeof t||isNaN(t)?\"-\":(t>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+s+e(t)+o},h=function(t){return t.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=l(r[0]));var v=L.select(\"text.delta\");function m(){v.text(u(l(r[0]),i)).call(y.fill,h(r[0])).call(p.convertToTspans,t)}return v.call(f.font,g.delta.font).call(y.fill,h({delta:g._deltaLastValue})),w(A)?v.transition().duration(A.duration).ease(A.easing).tween(\"text\",(function(){var t=n.select(this),e=l(r[0]),o=g._deltaLastValue,s=I(g.delta.valueformat,i,o,e),c=a(o,e);return g._deltaLastValue=e,function(e){t.text(u(c(e),s)),t.call(y.fill,h({delta:c(e)}))}})).each(\"end\",(function(){m(),C&&C()})).each(\"interrupt\",(function(){m(),C&&C()})):m(),c=S(u(l(r[0]),i),g.delta.font,T,t),v}(),z+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,z+=g.delta.increasing.symbol+g.delta.decreasing.symbol,h=c),g._hasNumber&&(function(){var e=M(t,{tickformat:g.number.valueformat},g._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=g.number.suffix,s=g.number.prefix,l=L.select(\"text.number\");function c(){var e=\"number\"==typeof r[0].y?s+i(r[0].y)+o:\"-\";l.text(e).call(f.font,g.number.font).call(p.convertToTspans,t)}w(A)?l.transition().duration(A.duration).ease(A.easing).each(\"end\",(function(){c(),C&&C()})).each(\"interrupt\",(function(){c(),C&&C()})).attrTween(\"text\",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);g._lastValue=r[0].y;var l=I(g.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):c(),u=S(s+i(r[0].y)+o,g.number.font,T,t)}(),z+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,h=u),g._hasDelta&&g._hasNumber){var R,F,N=[(u.left+u.right)/2,(u.top+u.bottom)/2],B=[(c.left+c.right)/2,(c.top+c.bottom)/2],j=.75*g.delta.font.size;\"left\"===g.delta.position&&(R=E(g,\"deltaPos\",0,-1*(u.width*b[g.align]+c.width*(1-b[g.align])+j),z,Math.min),F=N[1]-B[1],h={width:u.width+c.width+j,height:Math.max(u.height,c.height),left:c.left+R,right:u.right,top:Math.min(u.top,c.top+F),bottom:Math.max(u.bottom,c.bottom+F)}),\"right\"===g.delta.position&&(R=E(g,\"deltaPos\",0,u.width*(1-b[g.align])+c.width*b[g.align]+j,z,Math.max),F=N[1]-B[1],h={width:u.width+c.width+j,height:Math.max(u.height,c.height),left:u.left,right:c.right+R,top:Math.min(u.top,c.top+F),bottom:Math.max(u.bottom,c.bottom+F)}),\"bottom\"===g.delta.position&&(R=null,F=c.height,h={width:Math.max(u.width,c.width),height:u.height+c.height,left:Math.min(u.left,c.left),right:Math.max(u.right,c.right),top:u.bottom-u.height,bottom:u.bottom+c.height}),\"top\"===g.delta.position&&(R=null,F=u.top,h={width:Math.max(u.width,c.width),height:u.height+c.height,left:Math.min(u.left,c.left),right:Math.max(u.right,c.right),top:u.bottom-u.height-c.height,bottom:u.bottom}),D.attr({dx:R,dy:F})}(g._hasNumber||g._hasDelta)&&L.attr(\"transform\",(function(){var t=i.numbersScaler(h);z+=t[2];var e,r=E(g,\"numbersScale\",1,t[0],z,Math.min);g._scaleNumbers||(r=1),e=g._isAngular?m-r*h.bottom:m-r*(h.top+h.bottom)/2,g._numbersTop=r*h.top+e;var n=h[k];\"center\"===k&&(n=(h.left+h.right)/2);var a=v-r*n;return a=E(g,\"numbersTranslate\",0,a,z,Math.max),l(a,e)+s(r)}))})(t,P,e,{numbersX:i,numbersY:g,numbersScaler:v,transitionOpts:r,onComplete:u}),O&&(m={range:L.gauge.axis.range,color:L.gauge.bgcolor,line:{color:L.gauge.bordercolor,width:0},thickness:1},C={range:L.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:L.gauge.bordercolor,width:L.gauge.borderwidth},thickness:1});var q=P.selectAll(\"g.angular\").data(I?e:[]);q.exit().remove();var G=P.selectAll(\"g.angularaxis\").data(I?e:[]);G.exit().remove(),I&&k(t,0,e,{radius:B,innerRadius:j,gauge:q,layer:G,size:R,gaugeBg:m,gaugeOutline:C,transitionOpts:r,onComplete:u});var Y=P.selectAll(\"g.bullet\").data(D?e:[]);Y.exit().remove();var W=P.selectAll(\"g.bulletaxis\").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,n){var i,a,o,s,u,c=r[0].trace,f=n.gauge,p=n.layer,g=n.gaugeBg,v=n.gaugeOutline,m=n.size,x=c.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append(\"g\").classed(\"bullet\",!0),f.attr(\"transform\",l(m.l,m.t)),p.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),p.selectAll(\"g.xbulletaxistick,path,text\").remove();var k=m.h,A=c.gauge.bar.thickness*k,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(c._hasNumber||c._hasDelta?1-h.bulletNumberDomainSize:1);function C(t){t.attr(\"width\",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr(\"x\",(function(t){return i.c2p(t.range[0])})).attr(\"y\",(function(t){return.5*(1-t.thickness)*k})).attr(\"height\",(function(t){return t.thickness*k}))}(i=M(t,c.gauge.axis))._id=\"xbulletaxis\",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],u=m.t+m.h,i.visible&&(d.drawTicks(t,i,{vals:\"inside\"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,u,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,u)}));var L=[g].concat(c.gauge.steps),P=f.selectAll(\"g.bg-bullet\").data(L);P.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),P.select(\"rect\").call(C).call(T),P.exit().remove();var O=f.selectAll(\"g.value-bullet\").data([c.gauge.bar]);O.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),O.select(\"rect\").attr(\"height\",A).attr(\"y\",(k-A)/2).call(T),w(b)?O.select(\"rect\").transition().duration(b.duration).ease(b.easing).each(\"end\",(function(){_&&_()})).each(\"interrupt\",(function(){_&&_()})).attr(\"width\",Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y)))):O.select(\"rect\").attr(\"width\",\"number\"==typeof r[0].y?Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y))):0),O.exit().remove();var I=r.filter((function(){return c.gauge.threshold.value||0===c.gauge.threshold.value})),D=f.selectAll(\"g.threshold-bullet\").data(I);D.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),D.select(\"line\").attr(\"x1\",i.c2p(c.gauge.threshold.value)).attr(\"x2\",i.c2p(c.gauge.threshold.value)).attr(\"y1\",(1-c.gauge.threshold.thickness)/2*k).attr(\"y2\",(1-(1-c.gauge.threshold.thickness)/2)*k).call(y.stroke,c.gauge.threshold.line.color).style(\"stroke-width\",c.gauge.threshold.line.width),D.exit().remove();var z=f.selectAll(\"g.gauge-outline\").data([v]);z.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),z.select(\"rect\").call(C).call(T),z.exit().remove()}(t,0,e,{gauge:Y,layer:W,size:R,gaugeBg:m,gaugeOutline:C,transitionOpts:r,onComplete:u});var X=P.selectAll(\"text.title\").data(e);X.exit().remove(),X.enter().append(\"text\").classed(\"title\",!0),X.attr(\"text-anchor\",(function(){return D?x.right:x[L.title.align]})).text(L.title.text).call(f.font,L.title.font).call(p.convertToTspans,t),X.attr(\"transform\",(function(){var t,e=R.l+R.w*b[L.title.align],r=h.titlePadding,n=f.bBox(X.node());return O?(I&&(t=L.gauge.axis.visible?f.bBox(G.node()).top-r-n.bottom:R.t+R.h/2-B/2-n.bottom-r),D&&(t=g-(n.top+n.bottom)/2,e=R.l-h.bulletPadding*R.w)):t=L._numbersTop-r-n.bottom,l(e,t)}))}))}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axes\":566,\"../../plots/cartesian/axis_defaults\":568,\"../../plots/cartesian/layout_attributes\":579,\"../../plots/cartesian/position_defaults\":582,\"./constants\":867,\"@plotly/d3\":58,\"d3-interpolate\":116}],871:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,u=t(\"../../plot_api/edit_types\").overrideAll,c=e.exports=u(l({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},y:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}},z:{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:a(),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),valuehoverformat:i(\"value\",1),showlegend:l({},s.showlegend,{dflt:!1})},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),\"calc\",\"nested\");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType=\"calc+clearAxisTypes\",c.transforms=void 0},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../mesh3d/attributes\":876}],872:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\"),i=t(\"../streamtube/calc\").processGrid,a=t(\"../streamtube/calc\").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l<e._len;l++){var u=e._value[l];o=Math.min(o,u),s=Math.max(s,u)}e._minValues=o,e._maxValues=s,e._vMin=void 0===e.isomin||null===e.isomin?o:e.isomin,e._vMax=void 0===e.isomax||null===e.isomin?s:e.isomax,n(t,e,{vals:[e._vMin,e._vMax],containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":375,\"../streamtube/calc\":1054}],873:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../lib/gl_format_color\").parseColorScale,a=t(\"../../lib/str2rgbarray\"),o=t(\"../../components/colorscale\").extractOpts,s=t(\"../../plots/gl3d/zip3\"),l=function(t,e){for(var r=e.length-1;r>0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n<t&&t<=i)return{id:r,distRatio:(i-t)/(i-n)}}return{id:0,distRatio:0}};function u(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.data=null,this.showContour=!1}var c=u.prototype;c.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._meshX[e],n=this.data._meshY[e],i=this.data._meshZ[e],a=this.data._Ys.length,o=this.data._Zs.length,s=l(r,this.data._Xs).id,u=l(n,this.data._Ys).id,c=l(i,this.data._Zs).id,f=t.index=c+o*u+o*a*s;t.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var h=this.data.hovertext||this.data.text;return Array.isArray(h)&&void 0!==h[f]?t.textLabel=h[f]:h&&(t.textLabel=h),!0}},c.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map((function(e){return t.d2l(e,0,n)*r}))}this.data=h(t);var l={positions:s(n(r.xaxis,t._meshX,e.dataScale[0],t.xcalendar),n(r.yaxis,t._meshY,e.dataScale[1],t.ycalendar),n(r.zaxis,t._meshZ,e.dataScale[2],t.zcalendar)),cells:s(t._meshI,t._meshJ,t._meshK),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:a(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},u=o(t);l.vertexIntensity=t._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=i(t),this.mesh.update(l)},c.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var f=[\"xyz\",\"xzy\",\"yxz\",\"yzx\",\"zxy\",\"zyx\"];function h(t){t._meshI=[],t._meshJ=[],t._meshK=[];var e,r,n,i,a,o,s,u=t.surface.show,c=t.spaceframe.show,h=t.surface.fill,p=t.spaceframe.fill,d=!1,g=!1,v=0,m=t._Xs,y=t._Ys,x=t._Zs,b=m.length,_=y.length,w=x.length,k=f.indexOf(t._gridFill.replace(/-/g,\"\").replace(/\\+/g,\"\")),T=function(t,e,r){switch(k){case 5:return r+w*e+w*_*t;case 4:return r+w*t+w*b*e;case 3:return e+_*r+_*w*t;case 2:return e+_*t+_*b*r;case 1:return t+b*r+b*w*e;default:return t+b*e+b*_*r}},M=t._minValues,A=t._maxValues,S=t._vMin,E=t._vMax;function C(t,e,s){for(var l=o.length,u=r;u<l;u++)if(t===n[u]&&e===i[u]&&s===a[u])return u;return-1}function L(){r=e}function P(){n=[],i=[],a=[],o=[],e=0,L()}function O(t,r,s,l){return n.push(t),i.push(r),a.push(s),o.push(l),++e-1}function I(t,e,r){for(var n=[],i=0;i<t.length;i++)n[i]=t[i]*(1-r)+r*e[i];return n}function D(t){s=t}function z(t,e){return\"all\"===t||null===t||t.indexOf(e)>-1}function R(t,e){return null===t?e:t}function F(e,r,n){L();var i,a,o,l=[r],u=[n];if(s>=1)l=[r],u=[n];else if(s>0){var c=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i<t.length;i++)n[i]=(t[i]+e[i]+r[i])/3;return n}(r,n,i),o=Math.sqrt(1-s),l=I(a,r,o),u=I(a,n,o),c=I(a,i,o),f=e[0],h=e[1],p=e[2];return{xyzv:[[r,n,u],[u,l,r],[n,i,c],[c,u,n],[i,r,l],[l,c,i]],abc:[[f,h,-1],[-1,-1,f],[h,p,-1],[-1,-1,h],[p,f,-1],[-1,-1,p]]}}(r,n);l=c.xyzv,u=c.abc}for(var f=0;f<l.length;f++){r=l[f],n=u[f];for(var h=[],p=0;p<3;p++){var d=r[p][0],g=r[p][1],m=r[p][2],y=r[p][3],x=n[p]>-1?n[p]:C(d,g,m);h[p]=x>-1?x:O(d,g,m,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++v}}function N(t,e,r,n){var i=t[3];i<r&&(i=r),i>n&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function B(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[B(e[0][3],n,i),B(e[1][3],n,i),B(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var u=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var c=e[a[0]],f=e[a[1]],h=e[a[2]],p=N(h,c,n,i),d=N(h,f,n,i);o=l(t,[d,p,c],[-1,-1,r[a[0]]])||o,o=l(t,[c,f,d],[r[a[0]],r[a[1]],-1])||o,u=!0}})),u||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var c=e[a[0]],f=e[a[1]],h=e[a[2]],p=N(f,c,n,i),d=N(h,c,n,i);o=l(t,[d,p,c],[-1,-1,r[a[0]]])||o,u=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[B(a[0][3],r,n),B(a[1][3],r,n),B(a[2][3],r,n),B(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[u,c,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=N(h,u,r,n),d=N(h,c,r,n),v=N(h,f,r,n);i=F(null,[p,d,v],[-1,-1,-1])||i}s=!0}})),s||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]],p=N(f,u,r,n),d=N(f,c,r,n),v=N(h,c,r,n),m=N(h,u,r,n);g?(i=F(t,[u,m,p],[e[l[0]],-1,-1])||i,i=F(t,[c,d,v],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,v,m],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]],p=N(c,u,r,n),d=N(f,u,r,n),v=N(h,u,r,n);g?(i=F(t,[u,p,d],[e[l[0]],-1,-1])||i,i=F(t,[u,d,v],[e[l[0]],-1,-1])||i,i=F(t,[u,v,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,v],[-1,-1,-1])||i,s=!0}}))),i}function q(t,e,r,n,i,a,o,s,l,u,c){var f=!1;return d&&(z(t,\"A\")&&(f=H(null,[e,r,n,a],u,c)||f),z(t,\"B\")&&(f=H(null,[r,n,i,l],u,c)||f),z(t,\"C\")&&(f=H(null,[r,a,o,l],u,c)||f),z(t,\"D\")&&(f=H(null,[n,a,s,l],u,c)||f),z(t,\"E\")&&(f=H(null,[r,n,a,l],u,c)||f)),g&&(f=H(t,[r,n,a,l],u,c)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,u,c,f=!1,h=function(){f=V(t,[s,l,u],[-1,-1,-1],i,a)||f,f=V(t,[u,c,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=I(U([T(e,r-0,n-0)])[0],U([T(e-1,r-0,n-0)])[0],p),l=I(U([T(e,r-0,n-1)])[0],U([T(e-1,r-0,n-1)])[0],p),u=I(U([T(e,r-1,n-1)])[0],U([T(e-1,r-1,n-1)])[0],p),c=I(U([T(e,r-1,n-0)])[0],U([T(e-1,r-1,n-0)])[0],p),h()),d&&(s=I(U([T(e-0,r,n-0)])[0],U([T(e-0,r-1,n-0)])[0],d),l=I(U([T(e-0,r,n-1)])[0],U([T(e-0,r-1,n-1)])[0],d),u=I(U([T(e-1,r,n-1)])[0],U([T(e-1,r-1,n-1)])[0],d),c=I(U([T(e-1,r,n-0)])[0],U([T(e-1,r-1,n-0)])[0],d),h()),g&&(s=I(U([T(e-0,r-0,n)])[0],U([T(e-0,r-0,n-1)])[0],g),l=I(U([T(e-0,r-1,n)])[0],U([T(e-0,r-1,n-1)])[0],g),u=I(U([T(e-1,r-1,n)])[0],U([T(e-1,r-1,n-1)])[0],g),c=I(U([T(e-1,r-0,n)])[0],U([T(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,u,c,f){var h=t;return f?(d&&\"even\"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,u,c)):(d&&\"odd\"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,u,c))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;s<e.length;s++)for(var l=e[s],u=1;u<w;u++)for(var c=1;c<_;c++)a.push(Y(t,T(l,c-1,u-1),T(l,c-1,u),T(l,c,u-1),T(l,c,u),r,n,(l+c+u)%2,i&&i[o]?i[o]:[])),o++;return a}function K(t,e,r,n,i){for(var a=[],o=0,s=0;s<e.length;s++)for(var l=e[s],u=1;u<b;u++)for(var c=1;c<w;c++)a.push(Y(t,T(u-1,l,c-1),T(u,l,c-1),T(u-1,l,c),T(u,l,c),r,n,(u+l+c)%2,i&&i[o]?i[o]:[])),o++;return a}function J(t,e,r,n,i){for(var a=[],o=0,s=0;s<e.length;s++)for(var l=e[s],u=1;u<_;u++)for(var c=1;c<b;c++)a.push(Y(t,T(c-1,u-1,l),T(c-1,u,l),T(c,u-1,l),T(c,u,l),r,n,(c+u+l)%2,i&&i[o]?i[o]:[])),o++;return a}function $(t,e,r){for(var n=1;n<w;n++)for(var i=1;i<_;i++)for(var a=1;a<b;a++)X(t,T(a-1,i-1,n-1),T(a-1,i-1,n),T(a-1,i,n-1),T(a-1,i,n),T(a,i-1,n-1),T(a,i-1,n),T(a,i,n-1),T(a,i,n),e,r,(a+i+n)%2)}function Q(t,e,r){d=!0,$(t,e,r),d=!1}function tt(t,e,r,n,i,a){for(var o=[],s=0,l=0;l<e.length;l++)for(var u=e[l],c=1;c<w;c++)for(var f=1;f<_;f++)o.push(W(t,u,f,c,r,n,i[l],a&&a[s]&&a[s])),s++;return o}function et(t,e,r,n,i,a){for(var o=[],s=0,l=0;l<e.length;l++)for(var u=e[l],c=1;c<b;c++)for(var f=1;f<w;f++)o.push(W(t,c,u,f,r,n,i[l],a&&a[s]&&a[s])),s++;return o}function rt(t,e,r,n,i,a){for(var o=[],s=0,l=0;l<e.length;l++)for(var u=e[l],c=1;c<_;c++)for(var f=1;f<b;f++)o.push(W(t,f,c,u,r,n,i[l],a&&a[s]&&a[s])),s++;return o}function nt(t,e){for(var r=[],n=t;n<e;n++)r.push(n);return r}return function(){P(),function(){for(var e=0;e<b;e++)for(var r=0;r<_;r++)for(var n=0;n<w;n++){var i=T(e,r,n);O(t._x[i],t._y[i],t._z[i],t._value[i])}}();var e=null;if(c&&p&&(D(p),g=!0,$(e,S,E),g=!1),u&&h){D(h);for(var r=t.surface.pattern,s=t.surface.count,f=0;f<s;f++){var d=1===s?.5:f/(s-1),k=(1-d)*S+d*E,C=Math.abs(k-M)>Math.abs(k-A)?[M,k]:[k,A];Q(r,C[0],C[1])}}var L=[[Math.min(S,A),Math.max(S,A)],[Math.min(M,E),Math.max(M,E)]];[\"x\",\"y\",\"z\"].forEach((function(r){for(var n=[],i=0;i<L.length;i++){var a=0,o=L[i][0],s=L[i][1],u=t.slices[r];if(u.show&&u.fill){D(u.fill);var c=[],f=[],h=[];if(u.locations.length)for(var p=0;p<u.locations.length;p++){var d=l(u.locations[p],\"x\"===r?m:\"y\"===r?y:x);0===d.distRatio?c.push(d.id):d.id>0&&(f.push(d.id),\"x\"===r?h.push([d.distRatio,0,0]):\"y\"===r?h.push([0,d.distRatio,0]):h.push([0,0,d.distRatio]))}else c=nt(1,\"x\"===r?b-1:\"y\"===r?_-1:w-1);f.length>0&&(n[a]=\"x\"===r?tt(e,f,o,s,h,n[a]):\"y\"===r?et(e,f,o,s,h,n[a]):rt(e,f,o,s,h,n[a]),a++),c.length>0&&(n[a]=\"x\"===r?Z(e,c,o,s,n[a]):\"y\"===r?K(e,c,o,s,n[a]):J(e,c,o,s,n[a]),a++)}var g=t.caps[r];g.show&&g.fill&&(D(g.fill),n[a]=\"x\"===r?Z(e,[0,b-1],o,s,n[a]):\"y\"===r?K(e,[0,_-1],o,s,n[a]):J(e,[0,w-1],o,s,n[a]),a++)}})),0===v&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=m,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new u(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{\"../../../stackgl_modules\":1133,\"../../components/colorscale\":379,\"../../lib/gl_format_color\":511,\"../../lib/str2rgbarray\":540,\"../../plots/gl3d/zip3\":618}],874:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"../../components/colorscale/defaults\");function s(t,e,r,n,a){var s=a(\"isomin\"),l=a(\"isomax\");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var u=a(\"x\"),c=a(\"y\"),f=a(\"z\"),h=a(\"value\");u&&u.length&&c&&c.length&&f&&f.length&&h&&h.length?(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],n),a(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach((function(t){a(t+\"hoverformat\");var e=\"caps.\"+t;a(e+\".show\")&&a(e+\".fill\");var r=\"slices.\"+t;a(r+\".show\")&&(a(r+\".fill\"),a(r+\".locations\"))})),a(\"spaceframe.show\")&&a(\"spaceframe.fill\"),a(\"surface.show\")&&(a(\"surface.count\"),a(\"surface.fill\"),a(\"surface.pattern\")),a(\"contour.show\")&&(a(\"contour.color\"),a(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:\"\",cLetter:\"c\"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,0,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"../../registry\":647,\"./attributes\":871}],875:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\").createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":607,\"./attributes\":871,\"./calc\":872,\"./convert\":873,\"./defaults\":874}],876:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../surface/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat;e.exports=l({x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},i:{valType:\"data_array\",editType:\"calc\"},j:{valType:\"data_array\",editType:\"calc\"},k:{valType:\"data_array\",editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:a({editType:\"calc\"}),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",editType:\"calc\"},color:{valType:\"color\",editType:\"calc\"},vertexcolor:{valType:\"data_array\",editType:\"calc\"},facecolor:{valType:\"data_array\",editType:\"calc\"},transforms:void 0},n(\"\",{colorAttr:\"`intensity`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:l({vertexnormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-12,editType:\"calc\"},facenormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-6,editType:\"calc\"},editType:\"calc\"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:\"calc\"}),showlegend:l({},s.showlegend,{dflt:!1})})},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../surface/attributes\":1070}],877:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":375}],878:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../../stackgl_modules\").delaunay_triangulate,a=t(\"../../../stackgl_modules\").alpha_shape,o=t(\"../../../stackgl_modules\").convex_hull,s=t(\"../../lib/gl_format_color\").parseColorScale,l=t(\"../../lib/str2rgbarray\"),u=t(\"../../components/colorscale\").extractOpts,c=t(\"../../plots/gl3d/zip3\");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n<r;n++)e[n]=l(t[n]);return e}function d(t,e,r,n){for(var i=[],a=e.length,o=0;o<a;o++)i[o]=t.d2l(e[o],0,n)*r;return i}function g(t){for(var e=[],r=t.length,n=0;n<r;n++)e[n]=Math.round(t[n]);return e}function v(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n]<=-.5||t[n]>=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=c(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!v(t.i,f)||!v(t.j,f)||!v(t.k,f))return;n=c(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=[\"x\",\"y\",\"z\"].indexOf(t),n=[],a=e.length,o=0;o<a;o++)n[o]=[e[o][(r+1)%3],e[o][(r+2)%3]];return i(n)}(t.delaunayaxis,h);var m={positions:h,cells:n,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:l(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};if(t.intensity){var y=u(t);this.color=\"#fff\";var x=t.intensitymode;m[x+\"Intensity\"]=t.intensity,m[x+\"IntensityBounds\"]=[y.min,y.max],m.colormap=s(t)}else t.vertexcolor?(this.color=t.vertexcolor[0],m.vertexColors=p(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],m.cellColors=p(t.facecolor)):(this.color=t.color,m.meshColor=l(t.color));this.mesh.update(m)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new f(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\"../../../stackgl_modules\":1133,\"../../components/colorscale\":379,\"../../lib/gl_format_color\":511,\"../../lib/str2rgbarray\":540,\"../../plots/gl3d/zip3\":618}],879:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../components/colorscale/defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map((function(t){var e=l(t);return e&&i.isArrayOrTypedArray(e)?e:null}));return e.every((function(t){return t&&t.length===e[0].length}))&&e}u([\"x\",\"y\",\"z\"])?(u([\"i\",\"j\",\"k\"]),(!e.i||e.j&&e.k)&&(!e.j||e.k&&e.i)&&(!e.k||e.i&&e.j)?(n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],s),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"alphahull\",\"delaunayaxis\",\"opacity\"].forEach((function(t){l(t)})),l(\"contour.show\")&&(l(\"contour.color\"),l(\"contour.width\")),\"intensity\"in t?(l(\"intensity\"),l(\"intensitymode\"),a(t,e,s,l,{prefix:\"\",cLetter:\"c\"})):(e.showscale=!1,\"facecolor\"in t?l(\"facecolor\"):\"vertexcolor\"in t?l(\"vertexcolor\"):l(\"color\",r)),l(\"text\"),l(\"hovertext\"),l(\"hovertemplate\"),l(\"xhoverformat\"),l(\"yhoverformat\"),l(\"zhoverformat\"),e._length=null):e.visible=!1):e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"../../registry\":647,\"./attributes\":876}],880:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\"),moduleType:\"trace\",name:\"mesh3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":607,\"./attributes\":876,\"./calc\":877,\"./convert\":878,\"./defaults\":879}],881:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").extendFlat,i=t(\"../scatter/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../components/drawing/attributes\").dash,s=t(\"../../components/fx/attributes\"),l=t(\"../../constants/delta.js\"),u=l.INCREASING.COLOR,c=l.DECREASING.COLOR,f=i.line;function h(t){return{line:{color:n({},f.color,{dflt:t}),width:f.width,dash:o,editType:\"style\"},editType:\"style\"}}e.exports={xperiod:i.xperiod,xperiod0:i.xperiod0,xperiodalignment:i.xperiodalignment,xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},open:{valType:\"data_array\",editType:\"calc\"},high:{valType:\"data_array\",editType:\"calc\"},low:{valType:\"data_array\",editType:\"calc\"},close:{valType:\"data_array\",editType:\"calc\"},line:{width:n({},f.width,{}),dash:n({},o,{}),editType:\"style\"},increasing:h(u),decreasing:h(c),text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},tickwidth:{valType:\"number\",min:0,max:.5,dflt:.3,editType:\"calc\"},hoverlabel:n({},s.hoverlabel,{split:{valType:\"boolean\",dflt:!1,editType:\"style\"}})}},{\"../../components/drawing/attributes\":388,\"../../components/fx/attributes\":398,\"../../constants/delta.js\":485,\"../../lib\":515,\"../../plots/cartesian/axis_format_attributes\":569,\"../scatter/attributes\":936}],882:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=n._,a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../../constants/numerical\").BADNUM;function l(t,e,r,n){return{o:t,h:e,l:r,c:n}}function u(t,e,r,o,l,u){for(var c=l.makeCalcdata(e,\"open\"),f=l.makeCalcdata(e,\"high\"),h=l.makeCalcdata(e,\"low\"),p=l.makeCalcdata(e,\"close\"),d=Array.isArray(e.text),g=Array.isArray(e.hovertext),v=!0,m=null,y=!!e.xperiodalignment,x=[],b=0;b<o.length;b++){var _=o[b],w=c[b],k=f[b],T=h[b],M=p[b];if(_!==s&&w!==s&&k!==s&&T!==s&&M!==s){M===w?null!==m&&M!==m&&(v=M>m):v=M>w,m=M;var A=u(w,k,T,M);A.pos=_,A.yc=(w+M)/2,A.i=b,A.dir=v?\"increasing\":\"decreasing\",A.x=A.pos,A.y=[T,k],y&&(A.orig_p=r[b]),d&&(A.tx=e.text[b]),g&&(A.htx=e.hovertext[b]),x.push(A)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,\"open:\")+\" \",high:i(t,\"high:\")+\" \",low:i(t,\"low:\")+\" \",close:i(t,\"close:\")+\" \"}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a<s.length;a++){var u=s[a];if(\"ohlc\"===u.type&&!0===u.visible&&u.xaxis===e._id){l.push(u);var c=e.makeCalcdata(u,\"x\");u._origX=c;var f=o(r,e,\"x\",c).vals;u._xcalc=f;var h=n.distinctVals(f).minDiff;h&&isFinite(h)&&(i=Math.min(i,h))}}for(i===1/0&&(i=1),a=0;a<l.length;a++)l[a]._minDiff=i}return i*r.tickwidth}(t,r,e),c=e._minDiff;e._minDiff=null;var f=e._origX;e._origX=null;var h=e._xcalc;e._xcalc=null;var p=u(t,e,f,h,i,l);return e._extremes[r._id]=a.findExtremes(r,h,{vpad:c/2}),p.length?(n.extendFlat(p[0].t,{wHover:c/2,tickLen:s}),p):[{t:{empty:!0}}]},calcCommon:u}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566}],883:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./ohlc_defaults\"),a=t(\"../scatter/period_defaults\"),o=t(\"./attributes\");function s(t,e,r,n){r(n+\".line.color\"),r(n+\".line.width\",e.line.width),r(n+\".line.dash\",e.line.dash)}e.exports=function(t,e,r,l){function u(r,i){return n.coerce(t,e,o,r,i)}i(t,e,u,l)?(a(t,e,l,u,{x:!0}),u(\"xhoverformat\"),u(\"yhoverformat\"),u(\"line.width\"),u(\"line.dash\"),s(0,e,u,\"increasing\"),s(0,e,u,\"decreasing\"),u(\"text\"),u(\"hovertext\"),u(\"tickwidth\"),l._requestRangeslider[e.xaxis]=!0):e.visible=!1}},{\"../../lib\":515,\"../scatter/period_defaults\":956,\"./attributes\":881,\"./ohlc_defaults\":886}],884:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../lib\"),a=t(\"../../components/fx\"),o=t(\"../../components/color\"),s=t(\"../../lib\").fillText,l=t(\"../../constants/delta.js\"),u={increasing:l.INCREASING.SYMBOL,decreasing:l.DECREASING.SYMBOL};function c(t,e,r,n){var i,s,l=t.cd,u=t.xa,c=l[0].trace,f=l[0].t,h=c.type,p=\"ohlc\"===h?\"l\":\"min\",d=\"ohlc\"===h?\"h\":\"max\",g=f.bPos||0,v=f.bdPos||f.tickLen,m=f.wHover,y=Math.min(1,v/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function x(t){var r=function(t){return t.pos+g-e}(t);return a.inbox(r-m,r+m,i)}function b(t){var e=t[p],n=t[d];return e===n||a.inbox(e-r,n-r,i)}function _(t){return(x(t)+b(t))/2}i=t.maxHoverDistance-y,s=t.maxSpikeDistance-y;var w=a.getDistanceFunction(n,x,b,_);if(a.getClosest(l,w,t),!1===t.index)return null;var k=l[t.index];if(k.empty)return null;var T=c[k.dir],M=T.line.color;return o.opacity(M)&&T.line.width?t.color=M:t.color=T.fillcolor,t.x0=u.c2p(k.pos+g-v,!0),t.x1=u.c2p(k.pos+g+v,!0),t.xLabelVal=void 0!==k.orig_p?k.orig_p:k.pos,t.spikeDistance=_(k)*s/i,t.xSpike=u.c2p(k.pos,!0),t}function f(t,e,r,a){var o=t.cd,s=t.ya,l=o[0].trace,u=o[0].t,f=[],h=c(t,e,r,a);if(!h)return[];var p=o[h.index].hi||l.hoverinfo,d=p.split(\"+\");if(\"all\"!==p&&-1===d.indexOf(\"y\"))return[];for(var g=[\"high\",\"open\",\"close\",\"low\"],v={},m=0;m<g.length;m++){var y,x=g[m],b=l[x][h.index],_=s.c2p(b,!0);b in v?(y=v[b]).yLabel+=\"<br>\"+u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name=\"\",f.push(y),v[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=c(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function v(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var m=p.hi||l.hoverinfo,y=m.split(\"+\"),x=\"all\"===m,b=x||-1!==y.indexOf(\"y\"),_=x||-1!==y.indexOf(\"text\"),w=b?[v(\"open\"),v(\"high\"),v(\"low\"),v(\"close\")+\"  \"+u[g]]:[];return _&&s(p,l,w),h.extraText=w.join(\"<br>\"),h.y0=h.y1=o.c2p(p.yc,!0),[h]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{\"../../components/color\":367,\"../../components/fx\":407,\"../../constants/delta.js\":485,\"../../lib\":515,\"../../plots/cartesian/axes\":566}],885:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"ohlc\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"showLegend\"],meta:{},attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\").calc,plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"./select\")}},{\"../../plots/cartesian\":578,\"./attributes\":881,\"./calc\":882,\"./defaults\":883,\"./hover\":884,\"./plot\":887,\"./select\":888,\"./style\":889}],886:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),u=r(\"low\"),c=r(\"close\");if(r(\"hoverlabel.split\"),n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],a),s&&l&&u&&c){var f=Math.min(s.length,l.length,u.length,c.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{\"../../lib\":515,\"../../registry\":647}],887:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,\"trace ohlc\").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var u=a.tickLen,c=e.selectAll(\"path\").data(i.identity);c.enter().append(\"path\"),c.exit().remove(),c.attr(\"d\",(function(t){if(t.empty)return\"M0,0Z\";var e=s.c2p(t.pos-u,!0),r=s.c2p(t.pos+u,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return\"M\"+e+\",\"+o.c2p(t.o,!0)+\"H\"+n+\"M\"+n+\",\"+o.c2p(t.h,!0)+\"V\"+o.c2p(t.l,!0)+\"M\"+r+\",\"+o.c2p(t.c,!0)+\"H\"+n}))}}))}},{\"../../lib\":515,\"@plotly/d3\":58}],888:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var l=n[r];e.contains([i.c2p(l.pos+s),a.c2p(l.yc)],null,l.i,t)?(o.push({pointNumber:l.i,x:i.c2d(l.pos),y:a.c2d(l.yc)}),l.selected=1):l.selected=0}return o}},{}],889:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/color\");e.exports=function(t,e,r){var o=r||n.select(t).selectAll(\"g.ohlclayer\").selectAll(\"g.trace\");o.style(\"opacity\",(function(t){return t[0].trace.opacity})),o.each((function(t){var e=t[0].trace;n.select(this).selectAll(\"path\").each((function(t){if(!t.empty){var r=e[t.dir].line;n.select(this).style(\"fill\",\"none\").call(a.stroke,r.color).call(i.dashLine,r.dash,r.width).style(\"opacity\",e.selectedpoints&&!t.selected?.3:1)}}))}))}},{\"../../components/color\":367,\"../../components/drawing\":389,\"@plotly/d3\":58}],890:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat,i=t(\"../../plots/attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../components/colorscale/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/domain\").attributes,u=n({editType:\"calc\"},o(\"line\",{editTypeOverride:\"calc\"}),{shape:{valType:\"enumerated\",values:[\"linear\",\"hspline\"],dflt:\"linear\",editType:\"plot\"},hovertemplate:s({editType:\"plot\",arrayOk:!1},{keys:[\"count\",\"probability\"]})});e.exports={domain:l({name:\"parcats\",trace:!0,editType:\"calc\"}),hoverinfo:n({},i.hoverinfo,{flags:[\"count\",\"probability\"],editType:\"plot\",arrayOk:!1}),hoveron:{valType:\"enumerated\",values:[\"category\",\"color\",\"dimension\"],dflt:\"category\",editType:\"plot\"},hovertemplate:s({editType:\"plot\",arrayOk:!1},{keys:[\"count\",\"probability\",\"category\",\"categorycount\",\"colorcount\",\"bandcolorcount\"]}),arrangement:{valType:\"enumerated\",values:[\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"perpendicular\",editType:\"plot\"},bundlecolors:{valType:\"boolean\",dflt:!0,editType:\"plot\"},sortpaths:{valType:\"enumerated\",values:[\"forward\",\"backward\"],dflt:\"forward\",editType:\"plot\"},labelfont:a({editType:\"calc\"}),tickfont:a({editType:\"calc\"}),dimensions:{_isLinkedToArray:\"dimension\",label:{valType:\"string\",editType:\"calc\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},values:{valType:\"data_array\",dflt:[],editType:\"calc\"},displayindex:{valType:\"integer\",editType:\"calc\"},editType:\"calc\",visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"}},line:u,counts:{valType:\"number\",min:0,dflt:1,arrayOk:!0,editType:\"calc\"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/domain\":593,\"../../plots/font_attributes\":594,\"../../plots/template_attributes\":642}],891:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getModuleCalcData,i=t(\"./plot\"),a=\"parcats\";r.name=a,r.plot=function(t,e,r,o){var s=n(t.calcdata,a);if(s.length){var l=s[0];i(t,l,r,o)}},r.clean=function(t,e,r,n){var i=n._has&&n._has(\"parcats\"),a=e._has&&e._has(\"parcats\");i&&!a&&n._paperdiv.selectAll(\".parcats\").remove()}},{\"../../plots/get_data\":602,\"./plot\":896}],892:[function(t,e,r){\"use strict\";var n=t(\"../../lib/gup\").wrap,i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/calc\"),o=t(\"../../lib/filter_unique.js\"),s=t(\"../../components/drawing\"),l=t(\"../../lib\"),u=t(\"fast-isnumeric\");function c(t,e,r){t.valueInds.push(e),t.count+=r}function f(t,e,r){return{categoryInds:t,color:e,rawColor:r,valueInds:[],count:0}}function h(t,e,r){t.valueInds.push(e),t.count+=r}function p(t){var e;if(function(t){for(var e=new Array(t.length),r=0;r<t.length;r++){if(t[r]<0||t[r]>=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map((function(t){return t.displayindex}))))for(e=0;e<t.length;e++)t[e]._displayindex=t[e].displayindex;else for(e=0;e<t.length;e++)t[e]._displayindex=e}e.exports=function(t,e){var r=l.filterVisible(e.dimensions);if(0===r.length)return[];var d,g,v,m=r.map((function(t){var e;if(\"trace\"===t.categoryorder)e=null;else if(\"array\"===t.categoryorder)e=t.categoryarray;else{e=o(t.values);for(var r=!0,n=0;n<e.length;n++)if(!u(e[n])){r=!1;break}e.sort(r?l.sorterAsc:void 0),\"category descending\"===t.categoryorder&&(e=e.reverse())}return function(t,e){e=null==e?[]:e.map((function(t){return t}));var r={},n={},i=[];e.forEach((function(t,e){r[t]=0,n[t]=e}));for(var a=0;a<t.length;a++){var o,s=t[a];void 0===r[s]?(r[s]=1,o=e.push(s)-1,n[s]=o):(r[s]++,o=n[s]),i.push(o)}var l=e.map((function(t){return r[t]}));return{uniqueValues:e,uniqueCounts:l,inds:i}}(t.values,e)}));d=l.isArrayOrTypedArray(e.counts)?e.counts:[e.counts],p(r),r.forEach((function(t,e){!function(t,e){t._categoryarray=e.uniqueValues,null===t.ticktext||void 0===t.ticktext?t._ticktext=[]:t._ticktext=t.ticktext.slice();for(var r=t._ticktext.length;r<e.uniqueValues.length;r++)t._ticktext.push(e.uniqueValues[r])}(t,m[e])}));var y,x=e.line;x?(i(e,\"line\")&&a(t,e,{vals:e.line.color,containerStr:\"line\",cLetter:\"c\"}),y=s.tryColorscale(x)):y=l.identity;var b,_,w,k,T,M=r[0].values.length,A={},S=m.map((function(t){return t.inds}));for(v=0,b=0;b<M;b++){var E=[];for(_=0;_<S.length;_++)E.push(S[_][b]);g=d[b%d.length],v+=g;var C=(w=b,k=void 0,T=void 0,l.isArrayOrTypedArray(x.color)?T=k=x.color[w%x.color.length]:k=x.color,{color:y(k),rawColor:T}),L=E+\"-\"+C.rawColor;void 0===A[L]&&(A[L]=f(E,C.color,C.rawColor)),h(A[L],b,g)}var P,O=r.map((function(t,e){return function(t,e,r,n,i){return{dimensionInd:t,containerInd:e,displayInd:r,dimensionLabel:n,count:i,categories:[],dragX:null}}(e,t._index,t._displayindex,t.label,v)}));for(b=0;b<M;b++)for(g=d[b%d.length],_=0;_<O.length;_++){var I=O[_].containerInd,D=m[_].inds[b],z=O[_].categories;if(void 0===z[D]){var R=e.dimensions[I]._categoryarray[D],F=e.dimensions[I]._ticktext[D];z[D]={dimensionInd:_,categoryInd:P=D,categoryValue:R,displayInd:P,categoryLabel:F,valueInds:[],count:0,dragY:null}}c(z[D],b,g)}return n(function(t,e,r){var n=t.map((function(t){return t.categories.length})).reduce((function(t,e){return Math.max(t,e)}));return{dimensions:t,paths:e,trace:void 0,maxCats:n,count:r}}(O,A,v))}},{\"../../components/colorscale/calc\":375,\"../../components/colorscale/helpers\":378,\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/filter_unique.js\":506,\"../../lib/gup\":512,\"fast-isnumeric\":190}],893:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../plots/domain\").defaults,s=t(\"../../plots/array_container_defaults\"),l=t(\"./attributes\"),u=t(\"../parcoords/merge_length\");function c(t,e){function r(r,i){return n.coerce(t,e,l.dimensions,r,i)}var i=r(\"values\"),a=r(\"visible\");if(i&&i.length||(a=e.visible=!1),a){r(\"label\"),r(\"displayindex\",e._index);var o,s=t.categoryarray,u=Array.isArray(s)&&s.length>0;u&&(o=\"array\");var c=r(\"categoryorder\",o);\"array\"===c?(r(\"categoryarray\"),r(\"ticktext\")):(delete t.categoryarray,delete t.ticktext),u||\"array\"!==c||(e.categoryorder=\"trace\")}}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:\"dimensions\",handleItemDefaults:c}),d=function(t,e,r,o,s){s(\"line.shape\"),s(\"line.hovertemplate\");var l=s(\"line.color\",o.colorway[0]);if(i(t,\"line\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\"line.colorscale\"),a(t,e,o,s,{prefix:\"line.\",cLetter:\"c\"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,h);o(e,f,h),Array.isArray(p)&&p.length||(e.visible=!1),u(e,p,\"values\",d),h(\"hoveron\"),h(\"hovertemplate\"),h(\"arrangement\"),h(\"bundlecolors\"),h(\"sortpaths\"),h(\"counts\");var g={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(h,\"labelfont\",g);var v={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,\"tickfont\",v)}},{\"../../components/colorscale/defaults\":377,\"../../components/colorscale/helpers\":378,\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../../plots/domain\":593,\"../parcoords/merge_length\":907,\"./attributes\":890}],894:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":890,\"./base_plot\":891,\"./calc\":892,\"./defaults\":893,\"./plot\":896}],895:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"../../plot_api/plot_api\"),o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=s.strTranslate,u=t(\"../../components/drawing\"),c=t(\"tinycolor2\"),f=t(\"../../lib/svg_text_utils\");function h(t,e,r,i){var a=e._context.staticPlot,o=t.map(F.bind(0,e,r)),c=i.selectAll(\"g.parcatslayer\").data([null]);c.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",a?\"none\":\"all\");var h=c.selectAll(\"g.trace.parcats\").data(o,p),y=h.enter().append(\"g\").attr(\"class\",\"trace parcats\");h.attr(\"transform\",(function(t){return l(t.x,t.y)})),y.append(\"g\").attr(\"class\",\"paths\");var x=h.select(\"g.paths\").selectAll(\"path.path\").data((function(t){return t.paths}),p);x.attr(\"fill\",(function(t){return t.model.color}));var w=x.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",0);_(w),x.attr(\"d\",(function(t){return t.svgD})),w.empty()||x.sort(g),x.exit().remove(),x.on(\"mouseover\",v).on(\"mouseout\",m).on(\"click\",b),y.append(\"g\").attr(\"class\",\"dimensions\");var M=h.select(\"g.dimensions\").selectAll(\"g.dimension\").data((function(t){return t.dimensions}),p);M.enter().append(\"g\").attr(\"class\",\"dimension\"),M.attr(\"transform\",(function(t){return l(t.x,0)})),M.exit().remove();var A=M.selectAll(\"g.category\").data((function(t){return t.categories}),p),S=A.enter().append(\"g\").attr(\"class\",\"category\");A.attr(\"transform\",(function(t){return l(0,t.y)})),S.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),A.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),k(S);var E=A.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p);E.each((function(){s.raiseToTop(this)})),E.attr(\"fill\",(function(t){return t.color}));var D=E.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);E.attr(\"fill\",(function(t){return t.color})).attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})).attr(\"y\",(function(t){return t.y})).attr(\"cursor\",(function(t){return\"fixed\"===t.parcatsViewModel.arrangement?\"default\":\"perpendicular\"===t.parcatsViewModel.arrangement?\"ns-resize\":\"move\"})),T(D),E.exit().remove(),S.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\");var z=e._fullLayout.paper_bgcolor;A.select(\"text.catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"alignment-baseline\",\"middle\").style(\"text-shadow\",f.makeTextShadow(z)).style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",(function(t){return d(t)?t.width+5:-5})).attr(\"y\",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){u.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),S.append(\"text\").attr(\"class\",\"dimlabel\"),A.select(\"text.dimlabel\").attr(\"text-anchor\",\"middle\").attr(\"alignment-baseline\",\"baseline\").attr(\"cursor\",(function(t){return\"fixed\"===t.parcatsViewModel.arrangement?\"default\":\"ew-resize\"})).attr(\"x\",(function(t){return t.width/2})).attr(\"y\",-5).text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})).each((function(t){u.font(n.select(this),t.parcatsViewModel.labelfont)})),A.selectAll(\"rect.bandrect\").on(\"mouseover\",C).on(\"mouseout\",L),A.exit().remove(),M.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on(\"dragstart\",P).on(\"drag\",O).on(\"dragend\",I)),h.each((function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll(\"g.paths\").selectAll(\"path.path\"),t.dimensionSelection=n.select(this).selectAll(\"g.dimensions\").selectAll(\"g.dimension\")})),h.exit().remove()}function p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function g(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor<e.model.rawColor?-1:0}function v(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")){s.raiseToTop(this),w(n.select(this));var e=y(t),r=x(t);if(t.parcatsViewModel.graphDiv.emit(\"plotly_hover\",{points:e,event:n.event,constraints:r}),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\")){var i,a,l,u=n.mouse(this)[0],f=t.parcatsViewModel.graphDiv,h=t.parcatsViewModel.trace,p=f._fullLayout,d=p._paperdiv.node().getBoundingClientRect(),g=t.parcatsViewModel.graphDiv.getBoundingClientRect();for(l=0;l<t.leftXs.length-1;l++)if(t.leftXs[l]+t.dimWidths[l]-2<=u&&u<=t.leftXs[l+1]+2){var v=t.parcatsViewModel.dimensions[l],m=t.parcatsViewModel.dimensions[l+1];i=(v.x+v.width+m.x)/2,a=(t.topYs[l]+t.topYs[l+1]+t.height)/2;break}var b=t.parcatsViewModel.x+i,_=t.parcatsViewModel.y+a,k=c.mostReadable(t.model.color,[\"black\",\"white\"]),T=t.model.count,M=T/t.parcatsViewModel.model.count,A={countLabel:T,probabilityLabel:M.toFixed(3)},S=[];-1!==t.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&S.push([\"Count:\",A.countLabel].join(\" \")),-1!==t.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&S.push([\"P:\",A.probabilityLabel].join(\" \"));var E=S.join(\"<br>\"),C=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+g.left,y:_-d.top+g.top,text:E,color:t.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:k,idealAlign:C<b?\"right\":\"left\",hovertemplate:(h.line||{}).hovertemplate,hovertemplateLabels:A,eventData:[{data:h._input,fullData:h,count:T,probability:M}]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:f})}}}function m(t){if(!t.parcatsViewModel.dragDimension&&(_(n.select(this)),o.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),t.parcatsViewModel.pathSelection.sort(g),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"skip\"))){var e=y(t),r=x(t);t.parcatsViewModel.graphDiv.emit(\"plotly_unhover\",{points:e,event:n.event,constraints:r})}}function y(t){for(var e=[],r=D(t.parcatsViewModel),n=0;n<t.model.valueInds.length;n++){var i=t.model.valueInds[n];e.push({curveNumber:r,pointNumber:i})}return e}function x(t){for(var e={},r=t.parcatsViewModel.model.dimensions,n=0;n<r.length;n++){var i=r[n],a=i.categories[t.model.categoryInds[n]];e[i.containerInd]=a.categoryValue}return void 0!==t.model.rawColor&&(e.color=t.model.rawColor),e}function b(t){if(-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")){var e=y(t),r=x(t);t.parcatsViewModel.graphDiv.emit(\"plotly_click\",{points:e,event:n.event,constraints:r})}}function _(t){t.attr(\"fill\",(function(t){return t.model.color})).attr(\"fill-opacity\",.6).attr(\"stroke\",\"lightgray\").attr(\"stroke-width\",.2).attr(\"stroke-opacity\",1)}function w(t){t.attr(\"fill-opacity\",.8).attr(\"stroke\",(function(t){return c.mostReadable(t.model.color,[\"black\",\"white\"])})).attr(\"stroke-width\",.3)}function k(t){t.select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",1).attr(\"stroke-opacity\",1)}function T(t){t.attr(\"stroke\",\"black\").attr(\"stroke-width\",.2).attr(\"stroke-opacity\",1).attr(\"fill-opacity\",1)}function M(t){var e=t.parcatsViewModel.pathSelection,r=t.categoryViewModel.model.dimensionInd,n=t.categoryViewModel.model.categoryInd;return e.filter((function(e){return e.model.categoryInds[r]===n&&e.model.color===t.color}))}function A(t,e,r){var i=n.select(t).datum(),a=i.categoryViewModel.model,o=i.parcatsViewModel.graphDiv,s=n.select(t.parentNode).selectAll(\"rect.bandrect\"),l=[];s.each((function(t){M(t).each((function(t){Array.prototype.push.apply(l,y(t))}))}));var u={};u[a.dimensionInd]=a.categoryValue,o.emit(e,{points:l,event:r,constraints:u})}function S(t,e,r){var i=n.select(t).datum(),a=i.categoryViewModel.model,o=i.parcatsViewModel.graphDiv,s=M(i),l=[];s.each((function(t){Array.prototype.push.apply(l,y(t))}));var u={};u[a.dimensionInd]=a.categoryValue,void 0!==i.rawColor&&(u.color=i.rawColor),o.emit(e,{points:l,event:r,constraints:u})}function E(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=n.select(r.parentNode).select(\"rect.catrect\"),u=l.node().getBoundingClientRect(),c=l.datum(),f=c.parcatsViewModel,h=f.model.dimensions[c.model.dimensionInd],p=f.trace,d=u.top+u.height/2;f.dimensions.length>1&&h.displayInd===f.dimensions.length-1?(i=u.left,a=\"left\"):(i=u.left+u.width,a=\"right\");var g=c.model.count,v=c.model.categoryLabel,m=g/c.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:v,probabilityLabel:m.toFixed(3)},x=[];-1!==c.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&x.push([\"Count:\",y.countLabel].join(\" \")),-1!==c.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&x.push([\"P(\"+y.categoryLabel+\"):\",y.probabilityLabel].join(\" \"));var b=x.join(\"<br>\");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:v,probability:m}]}}function C(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron,u=this;\"color\"===l?(function(t){var e=n.select(t).datum(),r=M(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll(\"rect.bandrect\").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}))}(u),S(u,\"plotly_hover\",n.event)):(function(t){n.select(t.parentNode).selectAll(\"rect.bandrect\").each((function(t){var e=M(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}(u),A(u,\"plotly_hover\",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"none\")&&(\"category\"===l?e=E(r,a,u):\"color\"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),u=n.select(r).datum(),f=u.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a=\"left\"):(i=l.left+l.width,a=\"right\");var v=f.model.categoryLabel,m=u.parcatsViewModel.model.count,y=0;u.categoryViewModel.bands.forEach((function(t){t.color===u.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===u.color&&(b+=t.model.count)}));var _=y/m,w=y/b,k=y/x,T={countLabel:m,categoryLabel:v,probabilityLabel:_.toFixed(3)},M=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"count\")&&M.push([\"Count:\",T.countLabel].join(\" \")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")&&(M.push(\"P(color ∩ \"+v+\"): \"+T.probabilityLabel),M.push(\"P(\"+v+\" | color): \"+w.toFixed(3)),M.push(\"P(color | \"+v+\"): \"+k.toFixed(3)));var A=M.join(\"<br>\"),S=c.mostReadable(u.color,[\"black\",\"white\"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:A,color:u.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:T,eventData:[{data:d._input,fullData:d,category:v,count:m,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,u):\"dimension\"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each((function(){i.push(E(t,e,this))})),i}(r,a,u)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}))}}function L(t){var e=t.parcatsViewModel;e.dragDimension||(_(e.pathSelection),k(e.dimensionSelection.selectAll(\"g.category\")),T(e.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(g),-1!==e.hoverinfoItems.indexOf(\"skip\"))||(\"color\"===t.parcatsViewModel.hoveron?S(this,\"plotly_unhover\",n.event):A(this,\"plotly_unhover\",n.event))}function P(t){\"fixed\"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll(\"g.category\").select(\"rect.catrect\").each((function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map((function(t){return t.displayInd})),e.model.dragY=e.y,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll(\"rect.bandrect\").each((function(e){e.y<i&&i<=e.y+e.height&&(t.potentialClickBand=this)})))})),t.parcatsViewModel.dragDimension=t,o.loneUnhover(t.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function O(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&(t.dragHasMoved=!0,null!==t.dragDimensionDisplayInd)){var e=t.dragDimensionDisplayInd,r=e-1,i=e+1,a=t.parcatsViewModel.dimensions[e];if(null!==t.dragCategoryDisplayInd){var o=a.categories[t.dragCategoryDisplayInd];o.model.dragY+=n.event.dy;var s=o.model.dragY,l=o.model.displayInd,u=a.categories,c=u[l-1],f=u[l+1];void 0!==c&&s<c.y+c.height/2&&(o.model.displayInd=c.model.displayInd,c.model.displayInd=l),void 0!==f&&s+o.height>f.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||\"freeform\"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var h=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragX<h.x+h.width&&(a.model.displayInd=h.model.displayInd,h.model.displayInd=e),void 0!==p&&a.model.dragX+a.width>p.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),B(t.parcatsViewModel),R(t.parcatsViewModel),z(t.parcatsViewModel)}}function I(t){if(\"fixed\"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var e={},r=D(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.forEach((function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e[\"dimensions[\"+i+\"].displayindex\"]=r}));var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map((function(t){return t.displayInd}));if(s=t.initialDragCategoryDisplayInds.some((function(t,e){return t!==l[e]}))){var u=t.model.categories.slice().sort((function(t,e){return t.displayInd-e.displayInd})),c=u.map((function(t){return t.categoryValue})),f=u.map((function(t){return t.categoryLabel}));e[\"dimensions[\"+t.model.containerInd+\"].categoryarray\"]=[c],e[\"dimensions[\"+t.model.containerInd+\"].ticktext\"]=[f],e[\"dimensions[\"+t.model.containerInd+\"].categoryorder\"]=\"array\"}}-1===t.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")&&!t.dragHasMoved&&t.potentialClickBand&&(\"color\"===t.parcatsViewModel.hoveron?S(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent):A(t.potentialClickBand,\"plotly_click\",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd&&(t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null),t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,j(t.parcatsViewModel),B(t.parcatsViewModel),n.transition().duration(300).ease(\"cubic-in-out\").each((function(){R(t.parcatsViewModel,!0),z(t.parcatsViewModel,!0)})).each(\"end\",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function D(t){for(var e,r=t.graphDiv._fullData,n=0;n<r.length;n++)if(t.key===r[n].uid){e=n;break}return e}function z(t,e){var r;void 0===e&&(e=!1),t.pathSelection.data((function(t){return t.paths}),p),(r=t.pathSelection,e?r.transition():r).attr(\"d\",(function(t){return t.svgD}))}function R(t,e){function r(t){return e?t.transition():t}void 0===e&&(e=!1),t.dimensionSelection.data((function(t){return t.dimensions}),p);var i=t.dimensionSelection.selectAll(\"g.category\").data((function(t){return t.categories}),p);r(t.dimensionSelection).attr(\"transform\",(function(t){return l(t.x,0)})),r(i).attr(\"transform\",(function(t){return l(0,t.y)})),i.select(\".dimlabel\").text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})),i.select(\".catlabel\").attr(\"text-anchor\",(function(t){return d(t)?\"start\":\"end\"})).attr(\"x\",(function(t){return d(t)?t.width+5:-5})).each((function(t){var e,r;d(t)?(e=t.width+5,r=\"start\"):(e=-5,r=\"end\"),n.select(this).selectAll(\"tspan\").attr(\"x\",e).attr(\"text-anchor\",r)}));var a=i.selectAll(\"rect.bandrect\").data((function(t){return t.bands}),p),o=a.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"cursor\",\"move\").attr(\"stroke-opacity\",0).attr(\"fill\",(function(t){return t.color})).attr(\"fill-opacity\",0);a.attr(\"fill\",(function(t){return t.color})).attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})).attr(\"y\",(function(t){return t.y})),T(o),a.each((function(){s.raiseToTop(this)})),a.exit().remove()}function F(t,e,r){var n,i=r[0],a=e.margin||{l:80,r:80,t:100,b:80},o=i.trace,s=o.domain,l=e.width,u=e.height,c=Math.floor(l*(s.x[1]-s.x[0])),f=Math.floor(u*(s.y[1]-s.y[0])),h=s.x[0]*l+a.l,p=e.height-s.y[1]*e.height+a.t,d=o.line.shape;n=\"all\"===o.hoverinfo?[\"count\",\"probability\"]:(o.hoverinfo||\"\").split(\"+\");var g={trace:o,key:o.uid,model:i,x:h,y:p,width:c,height:f,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:d,dragDimension:null,margin:a,paths:[],dimensions:[],graphDiv:t,traceSelection:null,pathSelection:null,dimensionSelection:null};return i.dimensions&&(j(g),B(g)),g}function N(t,e,r,n,a){var o,s,l=[],u=[];for(s=0;s<r.length-1;s++)o=i(r[s]+t[s],t[s+1]),l.push(o(a)),u.push(o(1-a));var c=\"M \"+t[0]+\",\"+e[0];for(c+=\"l\"+r[0]+\",0 \",s=1;s<r.length;s++)c+=\"C\"+l[s-1]+\",\"+e[s-1]+\" \"+u[s-1]+\",\"+e[s]+\" \"+t[s]+\",\"+e[s],c+=\"l\"+r[s]+\",0 \";for(c+=\"l0,\"+n+\" \",c+=\"l -\"+r[r.length-1]+\",0 \",s=r.length-2;s>=0;s--)c+=\"C\"+u[s]+\",\"+(e[s+1]+n)+\" \"+l[s]+\",\"+(e[s]+n)+\" \"+(t[s]+r[s])+\",\"+(e[s]+n),c+=\"l-\"+r[s]+\",0 \";return c+\"Z\"}function B(t){var e=t.dimensions,r=t.model,n=e.map((function(t){return t.categories.map((function(t){return t.y}))})),i=t.model.dimensions.map((function(t){return t.categories.map((function(t){return t.displayInd}))})),a=t.model.dimensions.map((function(t){return t.displayInd})),o=t.dimensions.map((function(t){return t.model.dimensionInd})),s=e.map((function(t){return t.x})),l=e.map((function(t){return t.width})),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(t){var e=t.categoryInds.map((function(t,e){return i[e][t]}));return o.map((function(t){return e[t]}))}u.sort((function(e,r){var n=f(e),i=f(r);return\"backward\"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),n<i?-1:n>i?1:0}));for(var h=new Array(u.length),p=e[0].model.count,d=e[0].categories.map((function(t){return t.height})).reduce((function(t,e){return t+e})),g=0;g<u.length;g++){var v,m=u[g];v=p>0?d*(m.count/p):0;for(var y,x=new Array(n.length),b=0;b<m.categoryInds.length;b++){var _=m.categoryInds[b],w=i[b][_],k=a[b];x[k]=n[k][w],n[k][w]+=v;var T=t.dimensions[k].categories[w],M=T.bands.length,A=T.bands[M-1];if(void 0===A||m.rawColor!==A.rawColor){var S=void 0===A?0:A.y+A.height;T.bands.push({key:S,color:m.color,rawColor:m.rawColor,height:v,width:T.width,count:m.count,y:S,categoryViewModel:T,parcatsViewModel:t})}else{var E=T.bands[M-1];E.height+=v,E.count+=m.count}}y=\"hspline\"===t.pathShape?N(s,x,l,v,.5):N(s,x,l,v,0),h[g]={key:m.valueInds[0],model:m,height:v,leftXs:s,topYs:x,dimWidths:l,svgD:y,parcatsViewModel:t}}t.paths=h}function j(t){var e=t.model.dimensions.map((function(t){return{displayInd:t.displayInd,dimensionInd:t.dimensionInd}}));e.sort((function(t,e){return t.displayInd-e.displayInd}));var r=[];for(var n in e){var i=e[n].dimensionInd,a=t.model.dimensions[i];r.push(U(t,a))}t.dimensions=r}function U(t,e){var r,n=t.model.dimensions.length,i=e.displayInd;r=40+(n>1?(t.width-80-16)/(n-1):0)*i;var a,o,s,l,u,c=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),g=8*(f-h)/2,v=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(v.sort((function(t,e){return t.displayInd-e.displayInd})),u=0;u<h;u++)l=v[u].categoryInd,o=e.categories[l],a=p>0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+a+8,c.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:c,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){h(r,t,n,e)}},{\"../../components/drawing\":389,\"../../components/fx\":407,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plot_api/plot_api\":552,\"@plotly/d3\":58,\"d3-interpolate\":116,tinycolor2:313}],896:[function(t,e,r){\"use strict\";var n=t(\"./parcats\");e.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},{\"./parcats\":895}],897:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/layout_attributes\"),a=t(\"../../plots/font_attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/plot_template\").templatedArray;e.exports={domain:o({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:a({editType:\"plot\"}),tickfont:a({editType:\"plot\"}),rangefont:a({editType:\"plot\"}),dimensions:l(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:s({},i.tickvals,{editType:\"plot\"}),ticktext:s({},i.ticktext,{editType:\"plot\"}),tickformat:s({},i.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:s({editType:\"calc\"},n(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"})),unselected:{line:{color:{valType:\"color\",dflt:\"#7f7f7f\",editType:\"plot\"},opacity:{valType:\"number\",min:0,max:1,dflt:\"auto\",editType:\"plot\"},editType:\"plot\"},editType:\"plot\"}}},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/layout_attributes\":579,\"../../plots/domain\":593,\"../../plots/font_attributes\":594}],898:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib/gup\").keyFun,o=t(\"../../lib/gup\").repeat,s=t(\"../../lib\").sorterAsc,l=t(\"../../lib\").strTranslate,u=n.bar.snapRatio;function c(t,e){return t*(1-u)+e*u}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r<e.length;r++)if(t>=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],u=l,f=a;i*f<i*o;f+=i){var p=f+i,d=e[p];if(i*r<i*h(l,d))return c(l,u);if(i*r<i*d||p===o)return c(d,l);u=l,l=d}}function d(t){t.attr(\"x\",-n.bar.captureWidth/2).attr(\"width\",n.bar.captureWidth)}function g(t){t.attr(\"visibility\",\"visible\").style(\"visibility\",\"visible\").attr(\"fill\",\"yellow\").attr(\"opacity\",0)}function v(t){if(!t.brush.filterSpecified)return\"0,\"+t.height;for(var e,r,n,i=m(t.brush.filter.getConsolidated(),t.height),a=[0],o=i.length?i[0][0]:null,s=0;s<i.length;s++)r=(e=i[s])[1]-e[0],a.push(o),a.push(r),(n=s+1)<i.length&&(o=i[n][0]-e[1]);return a.push(t.height),a}function m(t,e){return t.map((function(t){return t.map((function(t){return Math.max(0,t*e)})).sort(s)}))}function y(){i.select(document.body).style(\"cursor\",null)}function x(t){t.attr(\"stroke-dasharray\",v)}function b(t,e){var r=i.select(t).selectAll(\".highlight, .highlight-shadow\");x(e?r.transition().duration(n.bar.snapDuration).each(\"end\",e):r)}function _(t,e){var r,i=t.brush,a=NaN,o={};if(i.filterSpecified){var s=t.height,l=i.filter.getConsolidated(),u=m(l,s),c=NaN,f=NaN,h=NaN;for(r=0;r<=u.length;r++){var p=u[r];if(p&&p[0]<=e&&e<=p[1]){c=r;break}if(f=r?r-1:NaN,p&&p[0]>e){h=r;break}}if(a=c,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-u[f][1]<u[h][0]-e?f:h),!isNaN(a)){var d=u[a],g=function(t,e){var r=n.bar.handleHeight;if(!(e>t[1]+r||e<t[0]-r))return e>=.9*t[1]+.1*t[0]?\"n\":e<=.9*t[0]+.1*t[1]?\"s\":\"ns\"}(d,e);g&&(o.interval=l[a],o.intervalPix=d,o.region=g)}}if(t.ordinal&&!o.region){var v=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r<v.length;r++){var x=[.25*v[Math.max(r-1,0)]+.75*v[r],.25*v[Math.min(r+1,v.length-1)]+.75*v[r]];if(y>=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function k(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a=\"crosshair\";r.clickableOrdinalRange?a=\"pointer\":r.region&&(a=r.region+\"-resize\"),i.select(document.body).style(\"cursor\",a)}function T(t){t.on(\"mousemove\",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||k(this,t)})).on(\"mouseleave\",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on(\"dragstart\",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,u=o.svgBrush;if(u.wasDragged=!1,u.grabbingBar=\"ns\"===s.region,u.grabbingBar){var c=l.map(e.unitToPaddedPx);u.grabPoint=r-c[0]-n.verticalPadding,u.barLength=c[1]-c[0]}u.clickableOrdinalRange=s.clickableOrdinalRange,u.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(u.stayingIntervals=u.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),u.startExtent=s.region?l[\"s\"===s.region?1:0]:a,e.parent.inBrushDrag=!0,u.brushStartCallback()}(this,t)})).on(\"drag\",(function(t){w(this,t)})).on(\"dragend\",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(k(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&A(r)):A(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),a.newExtent=[p(0,l,a.newExtent[0],a.stayingIntervals),p(1,l,a.newExtent[1],a.stayingIntervals)];var u=a.newExtent[1]>a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||A(r),a.brushCallback(e),u?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function M(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(M)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t,e,r){var i=t.selectAll(\".\"+n.cn.axisBrush).data(o,a);i.enter().append(\"g\").classed(n.cn.axisBrush,!0),function(t,e,r){var i=r._context.staticPlot,a=t.selectAll(\".background\").data(o);a.enter().append(\"rect\").classed(\"background\",!0).call(d).call(g).style(\"pointer-events\",i?\"none\":\"auto\").attr(\"transform\",l(0,n.verticalPadding)),a.call(T).attr(\"height\",(function(t){return t.height-n.verticalPadding}));var s=t.selectAll(\".highlight-shadow\").data(o);s.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width+n.bar.strokeWidth).attr(\"stroke\",e).attr(\"opacity\",n.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),s.attr(\"y1\",(function(t){return t.height})).call(x);var u=t.selectAll(\".highlight\").data(o);u.enter().append(\"line\").classed(\"highlight\",!0).attr(\"x\",-n.bar.width/2).attr(\"stroke-width\",n.bar.width-n.bar.strokeWidth).attr(\"stroke\",n.bar.fillColor).attr(\"opacity\",n.bar.fillOpacity).attr(\"stroke-linecap\",\"butt\"),u.attr(\"y1\",(function(t){return t.height})).call(x)}(i,e,r)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(M)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},{\"../../lib\":515,\"../../lib/gup\":512,\"./constants\":902,\"@plotly/d3\":58}],899:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:t(\"./base_plot\"),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}},{\"./attributes\":897,\"./base_plot\":900,\"./calc\":901,\"./defaults\":903}],900:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../constants/xmlns_namespaces\");r.name=\"parcoords\",r.plot=function(t){var e=i(t.calcdata,\"parcoords\")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\"parcoords\"),a=e._has&&e._has(\"parcoords\");i&&!a&&(n._paperdiv.selectAll(\".parcoords\").remove(),n._glimages.selectAll(\"*\").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\".svg-container\");r.filter((function(t,e){return e===r.size()-1})).selectAll(\".gl-canvas-context, .gl-canvas-focus\").each((function(){var t=this,r=t.toDataURL(\"image/png\");e.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":r,preserveAspectRatio:\"none\",x:0,y:0,width:t.style.width,height:t.style.height})})),window.setTimeout((function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")}),60)}},{\"../../constants/xmlns_namespaces\":492,\"../../plots/get_data\":602,\"./plot\":909,\"@plotly/d3\":58}],901:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,\"line\")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:\"line\",cLetter:\"c\"})):(r=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=.5;return e}(e._length),o=[[0,e.line.color],[1,e.line.color]]),a({lineColor:r,cscale:o})}},{\"../../components/colorscale\":379,\"../../lib\":515,\"../../lib/gup\":512}],902:[function(t,e,r){\"use strict\";e.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:[\"contextLineLayer\",\"focusLineLayer\",\"pickLineLayer\"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:\"magenta\",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:\"axis-extent-text\",parcoordsLineLayers:\"parcoords-line-layers\",parcoordsLineLayer:\"parcoords-lines\",parcoords:\"parcoords\",parcoordsControlView:\"parcoords-control-view\",yAxis:\"y-axis\",axisOverlays:\"axis-overlays\",axis:\"axis\",axisHeading:\"axis-heading\",axisTitle:\"axis-title\",axisExtent:\"axis-extent\",axisExtentTop:\"axis-extent-top\",axisExtentTopText:\"axis-extent-top-text\",axisExtentBottom:\"axis-extent-bottom\",axisExtentBottomText:\"axis-extent-bottom-text\",axisBrush:\"axis-brush\"},id:{filterBarPattern:\"filter-bar-pattern\"}}},{}],903:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"../../plots/domain\").defaults,s=t(\"../../plots/array_container_defaults\"),l=t(\"../../plots/cartesian/axes\"),u=t(\"./attributes\"),c=t(\"./axisbrush\"),f=t(\"./constants\").maxDimensionCount,h=t(\"./merge_length\");function p(t,e,r,i){function a(r,i){return n.coerce(t,e,u.dimensions,r,i)}var o=a(\"values\"),s=a(\"visible\");if(o&&o.length||(s=e.visible=!1),s){a(\"label\"),a(\"tickvals\"),a(\"ticktext\"),a(\"tickformat\");var f=a(\"range\");e._ax={_id:\"y\",type:\"linear\",showexponent:\"all\",exponentformat:\"B\",range:f},l.setConvert(e._ax,i.layout),a(\"multiselect\");var h=a(\"constraintrange\");h&&(e.constraintrange=c.cleanRanges(h,e))}}e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,u,r,i)}var d=t.dimensions;Array.isArray(d)&&d.length>f&&(n.log(\"parcoords traces support up to \"+f+\" dimensions at the moment\"),d.splice(f));var g=s(t,e,{name:\"dimensions\",layout:l,handleItemDefaults:p}),v=function(t,e,r,o,s){var l=s(\"line.color\",r);if(i(t,\"line\")&&n.isArrayOrTypedArray(l)){if(l.length)return s(\"line.colorscale\"),a(t,e,o,s,{prefix:\"line.\",cLetter:\"c\"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,c);o(e,l,c),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,\"values\",v);var m={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(c,\"labelfont\",m),n.coerceFont(c,\"tickfont\",m),n.coerceFont(c,\"rangefont\",m),c(\"labelangle\"),c(\"labelside\"),c(\"unselected.line.color\"),c(\"unselected.line.opacity\")}},{\"../../components/colorscale/defaults\":377,\"../../components/colorscale/helpers\":378,\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../../plots/cartesian/axes\":566,\"../../plots/domain\":593,\"./attributes\":897,\"./axisbrush\":898,\"./constants\":902,\"./merge_length\":907}],904:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!(\"visible\"in t)}},{\"../../lib\":515}],905:[function(t,e,r){\"use strict\";var n=t(\"./base_index\");n.plot=t(\"./plot\"),e.exports=n},{\"./base_index\":899,\"./plot\":909}],906:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\\n               p17_20, p21_24, p25_28, p29_32,\\n               p33_36, p37_40, p41_44, p45_48,\\n               p49_52, p53_56, p57_60, colors;\\n\\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\\nuniform float maskHeight;\\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\\nuniform vec4 contextColor;\\nuniform sampler2D maskTexture, palette;\\n\\nbool isPick    = (drwLayer > 1.5);\\nbool isContext = (drwLayer < 0.5);\\n\\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\\n\\nfloat val(mat4 p, mat4 v) {\\n    return dot(matrixCompMult(p, v) * UNITS, UNITS);\\n}\\n\\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\\n    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\\n    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\\n    return y1 * (1.0 - ratio) + y2 * ratio;\\n}\\n\\nint iMod(int a, int b) {\\n    return a - b * (a / b);\\n}\\n\\nbool fOutside(float p, float lo, float hi) {\\n    return (lo < hi) && (lo > p || p > hi);\\n}\\n\\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\\n    return (\\n        fOutside(p[0], lo[0], hi[0]) ||\\n        fOutside(p[1], lo[1], hi[1]) ||\\n        fOutside(p[2], lo[2], hi[2]) ||\\n        fOutside(p[3], lo[3], hi[3])\\n    );\\n}\\n\\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\\n    return (\\n        vOutside(p[0], lo[0], hi[0]) ||\\n        vOutside(p[1], lo[1], hi[1]) ||\\n        vOutside(p[2], lo[2], hi[2]) ||\\n        vOutside(p[3], lo[3], hi[3])\\n    );\\n}\\n\\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\\n    return mOutside(A, loA, hiA) ||\\n           mOutside(B, loB, hiB) ||\\n           mOutside(C, loC, hiC) ||\\n           mOutside(D, loD, hiD);\\n}\\n\\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\\n    mat4 pnts[4];\\n    pnts[0] = A;\\n    pnts[1] = B;\\n    pnts[2] = C;\\n    pnts[3] = D;\\n\\n    for(int i = 0; i < 4; ++i) {\\n        for(int j = 0; j < 4; ++j) {\\n            for(int k = 0; k < 4; ++k) {\\n                if(0 == iMod(\\n                    int(255.0 * texture2D(maskTexture,\\n                        vec2(\\n                            (float(i * 2 + j / 2) + 0.5) / 8.0,\\n                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\\n                        ))[3]\\n                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\\n                    2\\n                )) return true;\\n            }\\n        }\\n    }\\n    return false;\\n}\\n\\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\\n    float x = 0.5 * sign(v) + 0.5;\\n    float y = axisY(x, A, B, C, D);\\n    float z = 1.0 - abs(v);\\n\\n    z += isContext ? 0.0 : 2.0 * float(\\n        outsideBoundingBox(A, B, C, D) ||\\n        outsideRasterMask(A, B, C, D)\\n    );\\n\\n    return vec4(\\n        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\\n        z,\\n        1.0\\n    );\\n}\\n\\nvoid main() {\\n    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\\n    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\\n    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\\n    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\\n\\n    float v = colors[3];\\n\\n    gl_Position = position(isContext, v, A, B, C, D);\\n\\n    fragColor =\\n        isContext ? vec4(contextColor) :\\n        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\\n}\\n\"]),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n    gl_FragColor = fragColor;\\n}\\n\"]),o=t(\"./constants\").maxDimensionCount,s=t(\"../../lib\"),l=1e-6,u=2048,c=new Uint8Array(4),f=new Uint8Array(4),h={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function p(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function d(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(function(t){t.read({x:0,y:0,width:1,height:1,data:c})}(t),r.drawCompleted=!0),function s(l){var u=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],p(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*u,a.offset=2*l*n,e(a),l*n+u<i&&(r.currentRafs[o]=window.requestAnimationFrame((function(){s(l+1)}))),r.drawCompleted=!1)}(0)}function g(t,e){for(var r=new Array(256),n=0;n<256;n++)r[n]=t(n/255).concat(e);return r}function v(t,e){return(t>>>8*e)%256/255}function m(t,e,r){for(var n=new Array(8*e),i=0,a=0;a<e;a++)for(var o=0;o<2;o++)for(var s=0;s<4;s++){var l=4*t+s,u=r[64*a+l];63===l&&0===o&&(u*=-1),n[i++]=u}return n}function y(t){var e=\"0\"+t;return e.substr(e.length-2)}function x(t){return t<o?\"p\"+y(t+1)+\"_\"+y(t+4):\"colors\"}function b(t,e,r,n,i,a,o,l,u,c,f,h,p,d){for(var g=[[],[]],v=0;v<64;v++)g[0][v]=v===i?1:0,g[1][v]=v===a?1:0;o*=d,l*=d,u*=d,c*=d;var m=t.lines.canvasOverdrag*d,y=t.domain,x=t.canvasWidth*d,b=t.canvasHeight*d,_=t.pad.l*d,w=t.pad.b*d,k=t.layoutHeight*d,T=t.layoutWidth*d,M=t.deselectedLines.color,A=t.deselectedLines.opacity;return s.extendFlat({key:f,resolution:[x,b],viewBoxPos:[o+m,l],viewBoxSize:[u,c],i0:i,i1:a,dim0A:g[0].slice(0,16),dim0B:g[0].slice(16,32),dim0C:g[0].slice(32,48),dim0D:g[0].slice(48,64),dim1A:g[1].slice(0,16),dim1B:g[1].slice(16,32),dim1C:g[1].slice(32,48),dim1D:g[1].slice(48,64),drwLayer:h,contextColor:[M[0]/255,M[1]/255,M[2]/255,\"auto\"!==A?M[3]*A:Math.max(1/255,Math.pow(1/t.lines.color.length,1/3))],scissorX:(n===e?0:o+m)+(_-m)+T*y.x[0],scissorWidth:(n===r?x-o+m:u+.5)+(n===e?o+m:0),scissorY:l+w+k*y.y[0],scissorHeight:c,viewportX:_-m+T*y.x[0],viewportY:w+k*y.y[0],viewportWidth:x,viewportHeight:b},p)}function _(t){var e=2047,r=Math.max(0,Math.floor(t[0]*e),0),n=Math.min(e,Math.ceil(t[1]*e),e);return[Math.min(r,n),Math.max(r,n)]}e.exports=function(t,e){var r,n,c,y,w,k=e.context,T=e.pick,M=e.regl,A=M._gl,S=A.getParameter(A.ALIASED_LINE_WIDTH_RANGE),E=Math.max(S[0],Math.min(S[1],e.viewModel.plotGlPixelRatio)),C={currentRafs:{},drawCompleted:!0,clearOnly:!1},L=function(t){for(var e={},r=0;r<=o;r+=4)e[x(r)]=t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)});return e}(M),P=M.texture(h),O=[];D(e);var I=M({profile:!1,blend:{enable:k,func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:1,dstAlpha:1},equation:{rgb:\"add\",alpha:\"add\"},color:[0,0,0,0]},depth:{enable:!k,mask:!0,func:\"less\",range:[0,1]},cull:{enable:!0,face:\"back\"},scissor:{enable:!0,box:{x:M.prop(\"scissorX\"),y:M.prop(\"scissorY\"),width:M.prop(\"scissorWidth\"),height:M.prop(\"scissorHeight\")}},viewport:{x:M.prop(\"viewportX\"),y:M.prop(\"viewportY\"),width:M.prop(\"viewportWidth\"),height:M.prop(\"viewportHeight\")},dither:!1,vert:i,frag:a,primitive:\"lines\",lineWidth:E,attributes:L,uniforms:{resolution:M.prop(\"resolution\"),viewBoxPos:M.prop(\"viewBoxPos\"),viewBoxSize:M.prop(\"viewBoxSize\"),dim0A:M.prop(\"dim0A\"),dim1A:M.prop(\"dim1A\"),dim0B:M.prop(\"dim0B\"),dim1B:M.prop(\"dim1B\"),dim0C:M.prop(\"dim0C\"),dim1C:M.prop(\"dim1C\"),dim0D:M.prop(\"dim0D\"),dim1D:M.prop(\"dim1D\"),loA:M.prop(\"loA\"),hiA:M.prop(\"hiA\"),loB:M.prop(\"loB\"),hiB:M.prop(\"hiB\"),loC:M.prop(\"loC\"),hiC:M.prop(\"hiC\"),loD:M.prop(\"loD\"),hiD:M.prop(\"hiD\"),palette:P,contextColor:M.prop(\"contextColor\"),maskTexture:M.prop(\"maskTexture\"),drwLayer:M.prop(\"drwLayer\"),maskHeight:M.prop(\"maskHeight\")},offset:M.prop(\"offset\"),count:M.prop(\"count\")});function D(t){r=t.model,n=t.viewModel,c=n.dimensions.slice(),y=c[0]?c[0].values.length:0;var e=r.lines,i=T?e.color.map((function(t,r){return r/e.color.length})):e.color,a=function(t,e,r){for(var n=new Array(t*(o+4)),i=0,a=0;a<t;a++){for(var s=0;s<o;s++)n[i++]=s<e.length?e[s].paddedUnitValues[a]:.5;n[i++]=v(a,2),n[i++]=v(a,1),n[i++]=v(a,0),n[i++]=(u=r[a],Math.max(l,Math.min(.999999,u)))}var u;return n}(y,c,i);(function(t,e,r){for(var n=0;n<=o;n+=4)t[x(n)](m(n/4,e,r))})(L,y,a),k||T||(P=M.texture(s.extendFlat({data:g(r.unitToColor,255)},h)))}return{render:function(t,e,n){var i,a,o,s=t.length,l=1/0,f=-1/0;for(i=0;i<s;i++)t[i].dim0.canvasX<l&&(l=t[i].dim0.canvasX,a=i),t[i].dim1.canvasX>f&&(f=t[i].dim1.canvasX,o=i);0===s&&p(M,0,0,r.canvasWidth,r.canvasHeight);var h=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&n<c.length?c[n].brush.filter.getBounds():[-1/0,1/0];i[0][n]=a[0],i[1][n]=a[1]}var o=new Array(16384);for(e=0;e<16384;e++)o[e]=255;if(!t)for(e=0;e<c.length;e++){var s=e%8,l=(e-s)/8,f=Math.pow(2,s),h=c[e].brush.filter.get();if(!(h.length<2)){var p=_(h[0])[1];for(r=1;r<h.length;r++){var d=_(h[r]);for(n=p+1;n<d[0];n++)o[8*n+l]&=~f;p=Math.max(p,d[1])}}}var g={shape:[8,u],format:\"alpha\",type:\"uint8\",mag:\"nearest\",min:\"nearest\",data:o};return w?w(g):w=M.texture(g),{maskTexture:w,maskHeight:u,loA:i[0].slice(0,16),loB:i[0].slice(16,32),loC:i[0].slice(32,48),loD:i[0].slice(48,64),hiA:i[1].slice(0,16),hiB:i[1].slice(16,32),hiC:i[1].slice(32,48),hiD:i[1].slice(48,64)}}(k);for(i=0;i<s;i++){var g=t[i],v=g.dim0.crossfilterDimensionIndex,m=g.dim1.crossfilterDimensionIndex,x=g.canvasX,A=g.canvasY,S=x+g.panelSizeX,E=g.plotGlPixelRatio;if(e||!O[v]||O[v][0]!==x||O[v][1]!==S){O[v]=[x,S];var L=b(r,a,o,i,v,m,x,A,g.panelSizeX,g.panelSizeY,g.dim0.crossfilterDimensionIndex,k?0:T?2:1,h,E);C.clearOnly=n;var P=e?r.lines.blockLineCount:y;d(M,I,C,P,y,L)}}},readPixel:function(t,e){return M.read({x:t,y:e,width:1,height:1,data:f}),f},readPixels:function(t,e,r,n){var i=new Uint8Array(4*r*n);return M.read({x:t,y:e,width:r,height:n,data:i}),i},destroy:function(){for(var e in t.style[\"pointer-events\"]=\"none\",P.destroy(),w&&w.destroy(),L)L[e].destroy()},update:D}}},{\"../../lib\":515,\"./constants\":902,glslify:227}],907:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i,a;for(n||(n=1/0),i=0;i<e.length;i++)(a=e[i]).visible&&(n=Math.min(n,a[r].length));for(n===1/0&&(n=0),t._length=n,i=0;i<e.length;i++)(a=e[i]).visible&&(a._length=n);return n}},{}],908:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"color-rgba\"),s=t(\"../../plots/cartesian/axes\"),l=i.strRotate,u=i.strTranslate,c=t(\"../../lib/svg_text_utils\"),f=t(\"../../components/drawing\"),h=t(\"../../components/colorscale\"),p=t(\"../../lib/gup\"),d=p.keyFun,g=p.repeat,v=p.unwrap,m=t(\"./helpers\"),y=t(\"./constants\"),x=t(\"./axisbrush\"),b=t(\"./lines\");function _(t,e,r){return i.aggNums(t,null,e,r)}function w(t,e){return T(_(Math.min,t,e),_(Math.max,t,e))}function k(t){var e=t.range;return e?T(e[0],e[1]):w(t.values,t._length)}function T(t,e){return!isNaN(t)&&isFinite(t)||(t=0),!isNaN(e)&&isFinite(e)||(e=0),t===e&&(0===t?(t-=1,e+=1):(t*=.9,e*=1.1)),[t,e]}function M(t,e,r,i,o){var s,l,u=k(r);return i?n.scale.ordinal().domain(i.map((s=a(r.tickformat),l=o,l?function(t,e){var r=l[e];return null==r?s(t):r}:s))).range(i.map((function(r){var n=(r-u[0])/(u[1]-u[0]);return t-e+n*(2*e-t)}))):n.scale.linear().domain(u).range([t-e,e])}function A(t){if(t.tickvals){var e=k(t);return n.scale.ordinal().domain(t.tickvals).range(t.tickvals.map((function(t){return(t-e[0])/(e[1]-e[0])})))}}function S(t){var e=t.map((function(t){return t[0]})),r=t.map((function(t){var e=o(t[1]);return n.rgb(\"rgb(\"+e[0]+\",\"+e[1]+\",\"+e[2]+\")\")})),i=\"rgb\".split(\"\").map((function(t){return n.scale.linear().clamp(!0).domain(e).range(r.map((i=t,function(t){return t[i]})));var i}));return function(t){return i.map((function(e){return e(t)}))}}function E(t){return t.dimensions.some((function(t){return t.brush.filterSpecified}))}function C(t,e,r){var a=v(e),s=a.trace,l=m.convertTypedArray(a.lineColor),u=s.line,c={color:o(s.unselected.line.color),opacity:s.unselected.line.opacity},f=h.extractOpts(u),p=f.reversescale?h.flipScale(a.cscale):a.cscale,d=s.domain,g=s.dimensions,x=t.width,b=s.labelangle,_=s.labelside,w=s.labelfont,T=s.tickfont,M=s.rangefont,A=i.extendDeepNoArrays({},u,{color:l.map(n.scale.linear().domain(k({values:l,range:[f.min,f.max],_length:s._length}))),blockLineCount:y.blockLineCount,canvasOverdrag:y.overdrag*y.canvasPixelRatio}),E=Math.floor(x*(d.x[1]-d.x[0])),C=Math.floor(t.height*(d.y[1]-d.y[0])),L=t.margin||{l:80,r:80,t:100,b:80},P=E,O=C;return{key:r,colCount:g.filter(m.isVisible).length,dimensions:g,tickDistance:y.tickDistance,unitToColor:S(p),lines:A,deselectedLines:c,labelAngle:b,labelSide:_,labelFont:w,tickFont:T,rangeFont:M,layoutWidth:x,layoutHeight:t.height,domain:d,translateX:d.x[0]*x,translateY:t.height-d.y[1]*t.height,pad:L,canvasWidth:P*y.canvasPixelRatio+2*A.canvasOverdrag,canvasHeight:O*y.canvasPixelRatio,width:P,height:O,canvasPixelRatio:y.canvasPixelRatio}}function L(t,e,r){var o=r.width,s=r.height,l=r.dimensions,u=r.canvasPixelRatio,c=function(t){return o*t/Math.max(1,r.colCount-1)},f=y.verticalPadding/s,h=function(t,e){return n.scale.linear().range([e,t-e])}(s,y.verticalPadding),p={key:r.key,xScale:c,model:r,inBrushDrag:!1},d={};return p.dimensions=l.filter(m.isVisible).map((function(o,l){var g=function(t,e){return n.scale.linear().domain(k(t)).range([e,1-e])}(o,f),v=d[o.label];d[o.label]=(v||0)+1;var b=o.label+(v?\"__\"+v:\"\"),_=o.constraintrange,w=_&&_.length;w&&!Array.isArray(_[0])&&(_=[_]);var T=w?_.map((function(t){return t.map(g)})):[[-1/0,1/0]],S=o.values;S.length>o._length&&(S=S.slice(0,o._length));var C,L=o.tickvals;function P(t,e){return{val:t,text:C[e]}}function O(t,e){return t.val-e.val}if(Array.isArray(L)&&L.length){C=o.ticktext,Array.isArray(C)&&C.length?C.length>L.length?C=C.slice(0,L.length):L.length>C.length&&(L=L.slice(0,C.length)):C=L.map(a(o.tickformat));for(var I=1;I<L.length;I++)if(L[I]<L[I-1]){for(var D=L.map(P).sort(O),z=0;z<L.length;z++)L[z]=D[z].val,C[z]=D[z].text;break}}else L=void 0;return S=m.convertTypedArray(S),{key:b,label:o.label,tickFormat:o.tickformat,tickvals:L,ticktext:C,ordinal:m.isOrdinal(o),multiselect:o.multiselect,xIndex:l,crossfilterDimensionIndex:l,visibleIndex:o._index,height:s,values:S,paddedUnitValues:S.map(g),unitTickvals:L&&L.map(g),xScale:c,x:c(l),canvasX:c(l)*u,unitToPaddedPx:h,domainScale:M(s,y.verticalPadding,o,L,C),ordinalScale:A(o),parent:p,model:r,brush:x.makeBrush(t,w,T,(function(){t.linePickActive(!1)}),(function(){var e=p;e.focusLayer&&e.focusLayer.render(e.panels,!0);var r=E(e);!t.contextShown()&&r?(e.contextLayer&&e.contextLayer.render(e.panels,!0),t.contextShown(!0)):t.contextShown()&&!r&&(e.contextLayer&&e.contextLayer.render(e.panels,!0,!0),t.contextShown(!1))}),(function(r){if(p.focusLayer.render(p.panels,!0),p.pickLayer&&p.pickLayer.render(p.panels,!0),t.linePickActive(!0),e&&e.filterChanged){var n=g.invert,a=r.map((function(t){return t.map(n).sort(i.sorterAsc)})).sort((function(t,e){return t[0]-e[0]}));e.filterChanged(p.key,o._index,a)}}))}})),p}function P(t){t.classed(y.cn.axisExtentText,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"default\")}function O(t,e){var r=\"top\"===e?1:-1,n=t*Math.PI/180;return{dir:r,dx:Math.sin(n),dy:Math.cos(n),degrees:t}}function I(t,e,r){for(var n=e.panels||(e.panels=[]),i=t.data(),a=0;a<i.length-1;a++){var o=n[a]||(n[a]={}),s=i[a],l=i[a+1];o.dim0=s,o.dim1=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=e.model.canvasHeight,o.y=0,o.canvasY=0,o.plotGlPixelRatio=r}}function D(t,e){return s.tickText(t._ax,e,!1).text}function z(t,e){if(t.ordinal)return\"\";var r=t.domainScale.domain(),n=r[e?r.length-1:0];return D(t.model.dimensions[t.visibleIndex],n)}e.exports=function(t,e,r,a){var o=t._context.staticPlot,h=t._fullLayout,p=h._toppaper,_=h._glcontainer,k=t._context.plotGlPixelRatio,M=t._fullLayout.paper_bgcolor;!function(t){for(var e=0;e<t.length;e++)for(var r=0;r<t[e].length;r++)for(var n=t[e][r].trace,i=n.dimensions,a=0;a<i.length;a++){var o=i[a].values,l=i[a]._ax;l&&(l.range?l.range=T(l.range[0],l.range[1]):l.range=w(o,n._length),l.dtick||(l.dtick=.01*(Math.abs(l.range[1]-l.range[0])||1)),l.tickformat=i[a].tickformat,s.calcTicks(l),l.cleanRange())}}(e);var A,S,R=(A=!0,S=!1,{linePickActive:function(t){return arguments.length?A=!!t:A},contextShown:function(t){return arguments.length?S=!!t:S}}),F=e.filter((function(t){return v(t).trace.visible})).map(C.bind(0,r)).map(L.bind(0,R,a));_.each((function(t,e){return i.extendFlat(t,F[e])}));var N=_.selectAll(\".gl-canvas\").each((function(t){t.viewModel=F[0],t.viewModel.plotGlPixelRatio=k,t.viewModel.paperColor=M,t.model=t.viewModel?t.viewModel.model:null})),B=null;N.filter((function(t){return t.pick})).style(\"pointer-events\",o?\"none\":\"auto\").on(\"mousemove\",(function(t){if(R.linePickActive()&&t.lineLayer&&a&&a.hover){var e=n.event,r=this.width,i=this.height,o=n.mouse(this),s=o[0],l=o[1];if(s<0||l<0||s>=r||l>=i)return;var u=t.lineLayer.readPixel(s,i-1-l),c=0!==u[3],f=c?u[2]+256*(u[1]+256*u[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==B&&(c?a.hover(h):a.unhover&&a.unhover(h),B=f)}})),N.style(\"opacity\",(function(t){return t.pick?0:1})),p.style(\"background\",\"rgba(255, 255, 255, 0)\");var j=p.selectAll(\".\"+y.cn.parcoords).data(F,d);j.exit().remove(),j.enter().append(\"g\").classed(y.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),j.attr(\"transform\",(function(t){return u(t.model.translateX,t.model.translateY)}));var U=j.selectAll(\".\"+y.cn.parcoordsControlView).data(g,d);U.enter().append(\"g\").classed(y.cn.parcoordsControlView,!0),U.attr(\"transform\",(function(t){return u(t.model.pad.l,t.model.pad.t)}));var V=U.selectAll(\".\"+y.cn.yAxis).data((function(t){return t.dimensions}),d);V.enter().append(\"g\").classed(y.cn.yAxis,!0),U.each((function(t){I(V,t,k)})),N.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),V.attr(\"transform\",(function(t){return u(t.xScale(t.xIndex),0)})),V.call(n.behavior.drag().origin((function(t){return t})).on(\"drag\",(function(t){var e=t.parent;R.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,V.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),I(V,e,k),V.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr(\"transform\",(function(t){return u(t.xScale(t.xIndex),0)})),n.select(this).attr(\"transform\",u(t.x,0)),V.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on(\"dragend\",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,I(V,e,k),n.select(this).attr(\"transform\",(function(t){return u(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),V.exit().remove();var H=V.selectAll(\".\"+y.cn.axisOverlays).data(g,d);H.enter().append(\"g\").classed(y.cn.axisOverlays,!0),H.selectAll(\".\"+y.cn.axis).remove();var q=H.selectAll(\".\"+y.cn.axis).data(g,d);q.enter().append(\"g\").classed(y.cn.axis,!0),q.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return m.isOrdinal(t)?e:D(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(q.selectAll(\"text\"),t.model.tickFont)})),q.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),q.selectAll(\"text\").style(\"text-shadow\",c.makeTextShadow(M)).style(\"cursor\",\"default\");var G=H.selectAll(\".\"+y.cn.axisHeading).data(g,d);G.enter().append(\"g\").classed(y.cn.axisHeading,!0);var Y=G.selectAll(\".\"+y.cn.axisTitle).data(g,d);Y.enter().append(\"text\").classed(y.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",o?\"none\":\"auto\"),Y.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),c.convertToTspans(r,t)})).attr(\"transform\",(function(t){var e=O(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?\"\":u(0,2*r+t.model.height))+l(e.degrees)+u(-r*e.dx,-r*e.dy)})).attr(\"text-anchor\",(function(t){var e=O(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?\"start\":\"end\":\"middle\"}));var W=H.selectAll(\".\"+y.cn.axisExtent).data(g,d);W.enter().append(\"g\").classed(y.cn.axisExtent,!0);var X=W.selectAll(\".\"+y.cn.axisExtentTop).data(g,d);X.enter().append(\"g\").classed(y.cn.axisExtentTop,!0),X.attr(\"transform\",u(0,-y.axisExtentOffset));var Z=X.selectAll(\".\"+y.cn.axisExtentTopText).data(g,d);Z.enter().append(\"text\").classed(y.cn.axisExtentTopText,!0).call(P),Z.text((function(t){return z(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var K=W.selectAll(\".\"+y.cn.axisExtentBottom).data(g,d);K.enter().append(\"g\").classed(y.cn.axisExtentBottom,!0),K.attr(\"transform\",(function(t){return u(0,t.model.height+y.axisExtentOffset)}));var J=K.selectAll(\".\"+y.cn.axisExtentBottomText).data(g,d);J.enter().append(\"text\").classed(y.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(P),J.text((function(t){return z(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(H,M,t)}},{\"../../components/colorscale\":379,\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/gup\":512,\"../../lib/svg_text_utils\":541,\"../../plots/cartesian/axes\":566,\"./axisbrush\":898,\"./constants\":902,\"./helpers\":904,\"./lines\":906,\"@plotly/d3\":58,\"color-rgba\":91}],909:[function(t,e,r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"../../lib/prepare_regl\"),a=t(\"./helpers\").isVisible,o={};function s(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}(e.exports=function(t,e){var r=t._fullLayout;if(i(t,[],o)){var l={},u={},c={},f={},h=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=f[r]=n._fullInput.index;l[r]=t.data[i].dimensions,u[r]=t.data[i].dimensions.slice()})),n(t,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,i){var a=u[e][n],o=i.map((function(t){return t.slice()})),s=\"dimensions[\"+n+\"].constraintrange\",l=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===l[s]){var h=a.constraintrange;l[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit(\"plotly_restyle\",[d,[f[e]]])},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return s(t,e,r)-s(t,e,n)}}(r,u[e].filter(a));l[e].sort(n),u[e].filter((function(t){return!a(t)})).sort((function(t){return u[e].indexOf(t)})).forEach((function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(u[e].indexOf(t),0,t)})),t.emit(\"plotly_restyle\",[{dimensions:[l[e]]},[f[e]]])}})}}).reglPrecompiled=o},{\"../../lib/prepare_regl\":528,\"./helpers\":904,\"./parcoords\":908}],910:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/domain\").attributes,a=t(\"../../plots/font_attributes\"),o=t(\"../../components/color/attributes\"),s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,u=t(\"../../lib/extend\").extendFlat,c=a({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});e.exports={labels:{valType:\"data_array\",editType:\"calc\"},label0:{valType:\"number\",dflt:0,editType:\"calc\"},dlabel:{valType:\"number\",dflt:1,editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},marker:{colors:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:o.defaultLine,arrayOk:!0,editType:\"style\"},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},editType:\"calc\"},text:{valType:\"data_array\",editType:\"plot\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"percent\"],extras:[\"none\"],editType:\"calc\"},hoverinfo:u({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:s({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplate:l({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:u({},c,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:u({},c,{}),outsidetextfont:u({},c,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:u({},c,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:i({name:\"pie\",trace:!0,editType:\"calc\"}),hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},sort:{valType:\"boolean\",dflt:!0,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",dflt:0,editType:\"calc\"},pull:{valType:\"number\",min:0,max:1,dflt:0,arrayOk:!0,editType:\"calc\"},_deprecated:{title:{valType:\"string\",dflt:\"\",editType:\"calc\"},titlefont:u({},c,{}),titleposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"calc\"}}}},{\"../../components/color/attributes\":366,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/domain\":593,\"../../plots/font_attributes\":594,\"../../plots/template_attributes\":642}],911:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"pie\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":628}],912:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../../components/color\"),o={};function s(t){return function(e,r){return!!e&&!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e)}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r<t.length;r++)a.push(i(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)a.push(i(t[r]).darken(20).toHexString());e[n]=a}return a}e.exports={calc:function(t,e){var r,i,a=[],o=t._fullLayout,l=o.hiddenlabels||[],u=e.labels,c=e.marker.colors||[],f=e.values,h=e._length,p=e._hasValues&&h;if(e.dlabel)for(u=new Array(h),r=0;r<h;r++)u[r]=String(e.label0+r*e.dlabel);var d={},g=s(o[\"_\"+e.type+\"colormap\"]),v=0,m=!1;for(r=0;r<h;r++){var y,x,b;if(p){if(y=f[r],!n(y))continue;y=+y}else y=1;void 0!==(x=u[r])&&\"\"!==x||(x=r);var _=d[x=String(x)];void 0===_?(d[x]=a.length,(b=-1!==l.indexOf(x))||(v+=y),a.push({v:y,label:x,color:g(c[r],x),i:r,pts:[r],hidden:b})):(m=!0,(i=a[_]).v+=y,i.pts.push(r),i.hidden||(v+=y),!1===i.color&&c[r]&&(i.color=g(c[r],x)))}return a=a.filter((function(t){return t.v>=0})),(\"funnelarea\"===e.type?m:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=v),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r=\"pie\");var n=t._fullLayout,i=t.calcdata,a=n[r+\"colorway\"],s=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=l(a,o));for(var u=0,c=0;c<i.length;c++){var f=i[c];if(f[0].trace.type===r)for(var h=0;h<f.length;h++){var p=f[h];!1===p.color&&(s[p.label]?p.color=s[p.label]:(s[p.label]=p.color=a[u%a.length],u++))}}},makePullColorFn:s,generateExtendedColors:l}},{\"../../components/color\":367,\"fast-isnumeric\":190,tinycolor2:313}],913:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"./attributes\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText;function l(t,e){var r=Array.isArray(t),a=i.isArrayOrTypedArray(e),o=Math.min(r?t.length:1/0,a?e.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,l=0;l<o;l++){var u=e[l];if(n(u)&&u>0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function u(r,n){return i.coerce(t,e,a,r,n)}var c=l(u(\"labels\"),u(\"values\")),f=c.len;if(e._hasLabels=c.hasLabels,e._hasValues=c.hasValues,!e._hasLabels&&e._hasValues&&(u(\"label0\"),u(\"dlabel\")),f){e._length=f,u(\"marker.line.width\")&&u(\"marker.line.color\"),u(\"marker.colors\"),u(\"scalegroup\");var h,p=u(\"text\"),d=u(\"texttemplate\");if(d||(h=u(\"textinfo\",Array.isArray(p)?\"text+percent\":\"percent\")),u(\"hovertext\"),u(\"hovertemplate\"),d||h&&\"none\"!==h){var g=u(\"textposition\");s(t,e,n,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||\"auto\"===g||\"outside\"===g)&&u(\"automargin\"),(\"inside\"===g||\"auto\"===g||Array.isArray(g))&&u(\"insidetextorientation\")}o(e,n,u);var v=u(\"hole\");if(u(\"title.text\")){var m=u(\"title.position\",v?\"middle center\":\"top center\");v||\"middle center\"!==m||(e.title.position=\"top center\"),i.coerceFont(u,\"title.font\",n.font)}u(\"sort\"),u(\"direction\"),u(\"rotation\"),u(\"pull\")}else e.visible=!1}}},{\"../../lib\":515,\"../../plots/domain\":593,\"../bar/defaults\":661,\"./attributes\":910,\"fast-isnumeric\":190}],914:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx/helpers\").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),\"funnelarea\"===e.type&&(delete r.v,delete r.i),r}},{\"../../components/fx/helpers\":403}],915:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");function i(t){return-1!==t.indexOf(\"e\")?t.replace(/[.]?0+e/,\"e\"):-1!==t.indexOf(\".\")?t.replace(/[.]?0+$/,\"\"):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+\"%\"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r<e.length;r++){var n=t[e[r]];if(n||0===n||\"\"===n)return n}},r.castOption=function(t,e){return Array.isArray(t)?r.getFirstFilled(t,e):t||void 0},r.getRotationAngle=function(t){return(\"auto\"===t?0:t)*Math.PI/180}},{\"../../lib\":515}],916:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),layoutAttributes:t(\"./layout_attributes\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOne:t(\"./style_one\"),moduleType:\"trace\",name:\"pie\",basePlotModule:t(\"./base_plot\"),categories:[\"pie-like\",\"pie\",\"showLegend\"],meta:{}}},{\"./attributes\":910,\"./base_plot\":911,\"./calc\":912,\"./defaults\":913,\"./layout_attributes\":917,\"./layout_defaults\":918,\"./plot\":919,\"./style\":920,\"./style_one\":921}],917:[function(t,e,r){\"use strict\";e.exports={hiddenlabels:{valType:\"data_array\",editType:\"calc\"},piecolorway:{valType:\"colorlist\",editType:\"calc\"},extendpiecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],918:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"hiddenlabels\"),r(\"piecolorway\",e.colorway),r(\"extendpiecolors\")}},{\"../../lib\":515,\"./layout_attributes\":917}],919:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../plots/plots\"),a=t(\"../../components/fx\"),o=t(\"../../components/color\"),s=t(\"../../components/drawing\"),l=t(\"../../lib\"),u=l.strScale,c=l.strTranslate,f=t(\"../../lib/svg_text_utils\"),h=t(\"../bar/uniform_text\"),p=h.recordMinTextSize,d=h.clearMinTextSize,g=t(\"../bar/constants\").TEXTPAD,v=t(\"./helpers\"),m=t(\"./event_data\"),y=t(\"../../lib\").isValidTextValue;function x(t,e,r){var i=r[0],o=i.cx,s=i.cy,u=i.trace,c=\"funnelarea\"===u.type;\"_hasHoverLabel\"in u||(u._hasHoverLabel=!1),\"_hasHoverEvent\"in u||(u._hasHoverEvent=!1),t.on(\"mouseover\",(function(t){var r=e._fullLayout,f=e._fullData[u.index];if(!e._dragging&&!1!==r.hovermode){var h=f.hoverinfo;if(Array.isArray(h)&&(h=a.castHoverinfo({hoverinfo:[v.castOption(h,t.pts)],_module:u._module},r,0)),\"all\"===h&&(h=\"label+text+value+percent+name\"),f.hovertemplate||\"none\"!==h&&\"skip\"!==h&&h){var p=t.rInscribed||0,d=o+t.pxmid[0]*(1-p),g=s+t.pxmid[1]*(1-p),y=r.separators,x=[];if(h&&-1!==h.indexOf(\"label\")&&x.push(t.label),t.text=v.castOption(f.hovertext||f.text,t.pts),h&&-1!==h.indexOf(\"text\")){var b=t.text;l.isValidTextValue(b)&&x.push(b)}t.value=t.v,t.valueLabel=v.formatPieValue(t.v,y),h&&-1!==h.indexOf(\"value\")&&x.push(t.valueLabel),t.percent=t.v/i.vTotal,t.percentLabel=v.formatPiePercent(t.percent,y),h&&-1!==h.indexOf(\"percent\")&&x.push(t.percentLabel);var _=f.hoverlabel,w=_.font,k=[];a.loneHover({trace:u,x0:d-p*i.r,x1:d+p*i.r,y:g,_x0:c?o+t.TL[0]:d-p*i.r,_x1:c?o+t.TR[0]:d+p*i.r,_y0:c?s+t.TL[1]:g-p*i.r,_y1:c?s+t.BL[1]:g+p*i.r,text:x.join(\"<br>\"),name:f.hovertemplate||-1!==h.indexOf(\"name\")?f.name:void 0,idealAlign:t.pxmid[0]<0?\"left\":\"right\",color:v.castOption(_.bgcolor,t.pts)||t.color,borderColor:v.castOption(_.bordercolor,t.pts),fontFamily:v.castOption(w.family,t.pts),fontSize:v.castOption(w.size,t.pts),fontColor:v.castOption(w.color,t.pts),nameLength:v.castOption(_.namelength,t.pts),textAlign:v.castOption(_.align,t.pts),hovertemplate:v.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[m(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:k}),t.bbox=k[0],u._hasHoverLabel=!0}u._hasHoverEvent=!0,e.emit(\"plotly_hover\",{points:[m(t,f)],event:n.event})}})),t.on(\"mouseout\",(function(t){var r=e._fullLayout,i=e._fullData[u.index],o=n.select(this).datum();u._hasHoverEvent&&(t.originalEvent=n.event,e.emit(\"plotly_unhover\",{points:[m(o,i)],event:n.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),u._hasHoverLabel=!1)})),t.on(\"click\",(function(t){var r=e._fullLayout,i=e._fullData[u.index];e._dragging||!1===r.hovermode||(e._hoverdata=[m(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=v.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=v.castOption(t._input.textfont.color,e.pts));var i=v.castOption(t.insidetextfont.family,e.pts)||v.castOption(t.textfont.family,e.pts)||r.family,a=v.castOption(t.insidetextfont.size,e.pts)||v.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;i<t.length;i++)if((n=(r=t[i][0]).trace).title.text){var a=n.title.text;n._meta&&(a=l.templateString(a,n._meta));var o=s.tester.append(\"text\").attr(\"data-notex\",1).text(a).call(s.font,n.title.font).call(f.convertToTspans,e),u=s.bBox(o.node(),!0);r.titleBox={width:u.width,height:u.height},o.remove()}}function w(t,e,r){var n=r.r||e.rpx1,i=e.rInscribed;if(e.startangle===e.stopangle)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var a,o=e.ring,s=1===o&&Math.abs(e.startangle-e.stopangle)===2*Math.PI,l=e.halfangle,u=e.midangle,c=r.trace.insidetextorientation,f=\"horizontal\"===c,h=\"tangential\"===c,p=\"radial\"===c,d=\"auto\"===c,g=[];if(!d){var v,m=function(r,i){if(function(t,e){var r=t.startangle,n=t.stopangle;return r>e&&e>n||r<e&&e<n}(e,r)){var s=Math.abs(r-e.startangle),l=Math.abs(r-e.stopangle),u=s<l?s:l;(a=\"tan\"===i?T(t,n,o,u,0):k(t,n,o,u,Math.PI/2)).textPosAngle=r,g.push(a)}};if(f||h){for(v=4;v>=-4;v-=2)m(Math.PI*v,\"tan\");for(v=4;v>=-4;v-=2)m(Math.PI*(v+1),\"tan\")}if(f||p){for(v=4;v>=-4;v-=2)m(Math.PI*(v+1.5),\"rad\");for(v=4;v>=-4;v-=2)m(Math.PI*(v+.5),\"rad\")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=k(t,n,o,l,u)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=T(t,n,o,l,u)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_<g.length;_++){var w=g[_].scale;if(b<w&&(b=w,x=_),!d&&b>=1)break}return g[x]}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:M(a,o/e),rotate:A(i)}}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:M(a,o/e),rotate:A(i+Math.PI/2)}}function M(t,e){return Math.cos(e)-t*e}function A(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function C(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function L(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,r=O(a),-1!==a.title.position.indexOf(\"top\")?(o.y-=(1+r)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf(\"bottom\")&&(o.y+=(1+r)*t.r);var l,u,c=(l=t.r,u=t.trace.aspectratio,l/(void 0===u?1:u)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf(\"left\")?(f+=c,o.x-=(1+r)*c,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf(\"center\")?f*=2:-1!==a.title.position.indexOf(\"right\")&&(f+=c,o.x+=(1+r)*c,s.tx-=t.titleBox.width/2),n=f/t.titleBox.width,i=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(n,i),tx:s.tx,ty:s.ty}}function P(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function O(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;e<t.pull.length;e++)t.pull[e]>r&&(r=t.pull[e]);return r}function I(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n][0],a=i.trace,o=a.domain,s=e.w*(o.x[1]-o.x[0]),l=e.h*(o.y[1]-o.y[0]);a.title.text&&\"middle center\"!==a.title.position&&(l-=P(i,e));var u=s/2,c=l/2;\"funnelarea\"!==a.type||a.scalegroup||(c/=a.aspectratio),i.r=Math.min(u,c)/(1+O(a)),i.cx=e.l+e.w*(a.domain.x[1]+a.domain.x[0])/2,i.cy=e.t+e.h*(1-a.domain.y[0])-l/2,a.title.text&&-1!==a.title.position.indexOf(\"bottom\")&&(i.cy-=P(i,e)),a.scalegroup&&-1===r.indexOf(a.scalegroup)&&r.push(a.scalegroup)}!function(t,e){for(var r,n,i,a=0;a<e.length;a++){var o=1/0,s=e[a];for(n=0;n<t.length;n++)if((i=(r=t[n][0]).trace).scalegroup===s){var l;if(\"pie\"===i.type)l=r.r*r.r;else if(\"funnelarea\"===i.type){var u,c;i.aspectratio>1?c=(u=r.r)/i.aspectratio:u=(c=r.r)*i.aspectratio,l=(u*=(1+i.baseratio)/2)*c}o=Math.min(o,l/r.vTotal)}for(n=0;n<t.length;n++)if((i=(r=t[n][0]).trace).scalegroup===s){var f=o*r.vTotal;\"funnelarea\"===i.type&&(f/=(1+i.baseratio)/2,f/=i.aspectratio),r.r=Math.sqrt(f)}}}(t,r)}function D(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function z(t,e,r){var n=t._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&\"none\"!==o){var s,u=o.split(\"+\"),c=function(t){return-1!==u.indexOf(t)},f=c(\"label\"),h=c(\"text\"),p=c(\"value\"),d=c(\"percent\"),g=n.separators;if(s=f?[e.label]:[],h){var m=v.getFirstFilled(i.text,e.pts);y(m)&&s.push(m)}p&&s.push(v.formatPieValue(e.v,g)),d&&s.push(v.formatPiePercent(e.v/r.vTotal,g)),e.text=s.join(\"<br>\")}if(a){var x=l.castOption(i,e.i,\"texttemplate\");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:v.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:v.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,\"customdata\")}}(e),_=v.getFirstFilled(i.text,e.pts);(y(_)||\"\"===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=\"\"}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._context.staticPlot,a=t._fullLayout,h=a._size;d(\"pie\",a),_(e,t),I(e,h);var g=l.makeTraceGroups(a._pielayer,e,\"trace\").each((function(e){var d=n.select(this),g=e[0],m=g.trace;(function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=v.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,u=\"px0\",c=\"px1\";if(\"counterclockwise\"===o.direction){for(e=0;e<t.length&&t[e].hidden;e++);if(e===t.length)return;s+=l*t[e].v,l*=-1,u=\"px1\",c=\"px0\"}for(n=D(a,s),e=0;e<t.length;e++)(r=t[e]).hidden||(r[u]=n,r.startangle=s,s+=l*r.v/2,r.pxmid=D(a,s),r.midangle=s,n=D(a,s+=l*r.v/2),r.stopangle=s,r[c]=n,r.largeArc=r.v>i.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))})(e),d.attr(\"stroke-linejoin\",\"round\"),d.each((function(){var y=n.select(this).selectAll(\"g.slice\").data(e);y.enter().append(\"g\").classed(\"slice\",!0),y.exit().remove();var _=[[[],[]],[[],[]]],k=!1;y.each((function(i,o){if(i.hidden)n.select(this).selectAll(\"path,g\").remove();else{i.pointNumber=i.i,i.curveNumber=m.index,_[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var u=g.cx,c=g.cy,h=n.select(this),d=h.selectAll(\"path.surface\").data([i]);if(d.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":r?\"none\":\"all\"}),h.call(x,t,e),m.pull){var y=+v.castOption(m.pull,i.pts)||0;y>0&&(u+=y*i.pxmid[0],c+=y*i.pxmid[1])}i.cxFinal=u,i.cyFinal=c;var T=m.hole;if(i.v===g.vTotal){var M=\"M\"+(u+i.px0[0])+\",\"+(c+i.px0[1])+P(i.px0,i.pxmid,!0,1)+P(i.pxmid,i.px0,!0,1)+\"Z\";T?d.attr(\"d\",\"M\"+(u+T*i.px0[0])+\",\"+(c+T*i.px0[1])+P(i.px0,i.pxmid,!1,T)+P(i.pxmid,i.px0,!1,T)+\"Z\"+M):d.attr(\"d\",M)}else{var A=P(i.px0,i.px1,!0,1);if(T){var S=1-T;d.attr(\"d\",\"M\"+(u+T*i.px1[0])+\",\"+(c+T*i.px1[1])+P(i.px1,i.px0,!1,T)+\"l\"+S*i.px0[0]+\",\"+S*i.px0[1]+A+\"Z\")}else d.attr(\"d\",\"M\"+u+\",\"+c+\"l\"+i.px0[0]+\",\"+i.px0[1]+A+\"Z\")}z(t,i,g);var E=v.castOption(m.textposition,i.pts),L=h.selectAll(\"g.slicetext\").data(i.text&&\"none\"!==E?[0]:[]);L.enter().append(\"g\").classed(\"slicetext\",!0),L.exit().remove(),L.each((function(){var r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),h=l.ensureUniformFontSize(t,\"outside\"===E?function(t,e,r){return{color:v.castOption(t.outsidetextfont.color,e.pts)||v.castOption(t.textfont.color,e.pts)||r.color,family:v.castOption(t.outsidetextfont.family,e.pts)||v.castOption(t.textfont.family,e.pts)||r.family,size:v.castOption(t.outsidetextfont.size,e.pts)||v.castOption(t.textfont.size,e.pts)||r.size}}(m,i,a.font):b(m,i,a.font));r.text(i.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,h).call(f.convertToTspans,t);var d,y=s.bBox(r.node());if(\"outside\"===E)d=C(y,i);else if(d=w(y,i,g),\"auto\"===E&&d.scale<1){var x=l.ensureUniformFontSize(t,m.outsidetextfont);r.call(s.font,x),d=C(y=s.bBox(r.node()),i)}var _=d.textPosAngle,T=void 0===_?i.pxmid:D(g.r,_);if(d.targetX=u+T[0]*d.rCenter+(d.x||0),d.targetY=c+T[1]*d.rCenter+(d.y||0),R(d,y),d.outside){var M=d.targetY;i.yLabelMin=M-y.height/2,i.yLabelMid=M,i.yLabelMax=M+y.height/2,i.labelExtraX=0,i.labelExtraY=0,k=!0}d.fontSize=h.size,p(m.type,d,a),e[o].transform=d,l.setTransormAndDisplay(r,d)}))}function P(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return\"a\"+n*g.r+\",\"+n*g.r+\" 0 \"+i.largeArc+(r?\" 1 \":\" 0 \")+a+\",\"+o}}));var T=n.select(this).selectAll(\"g.titletext\").data(m.title.text?[0]:[]);if(T.enter().append(\"g\").classed(\"titletext\",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),i=m.title.text;m._meta&&(i=l.templateString(i,m._meta)),r.text(i).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(s.font,m.title.font).call(f.convertToTspans,t),e=\"middle center\"===m.title.position?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}(g):L(g,h),r.attr(\"transform\",c(e.x,e.y)+u(Math.min(1,e.scale))+c(e.tx,e.ty))})),k&&function(t,e){var r,n,i,a,o,s,l,u,c,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,u,c,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,m=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(u=0;u<f.length;u++)(c=f[u])===t||(v.castOption(e.pull,t.pts)||0)>=(v.castOption(e.pull,c.pts)||0)||((t.pxmid[1]-c.pxmid[1])*l>0?(y=c.cyFinal+o(c.px0[1],c.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-m)*l>0&&(i=3*s*Math.abs(u-f.indexOf(t)),(h=c.cxFinal+a(c.px0[0],c.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:m,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(u=t[n][r]).sort(i),c=t[1-n][r],f=c.concat(u),p=[],h=0;h<u.length;h++)void 0!==u[h].yLabelMid&&p.push(u[h]);for(d=!1,h=0;n&&h<c.length;h++)if(void 0!==c[h].yLabelMid){d=c[h];break}for(h=0;h<p.length;h++){var x=h&&p[h-1];d&&!h&&(x=d),y(p[h],x)}}}(_,m),function(t,e){t.each((function(t){var r=n.select(this);if(t.labelExtraX||t.labelExtraY){var i=r.select(\"g.slicetext text\");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,l.setTransormAndDisplay(i,t.transform);var a=t.cxFinal+t.pxmid[0],s=\"M\"+a+\",\"+(t.cyFinal+t.pxmid[1]),u=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var c=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(c)>Math.abs(f)?s+=\"l\"+f*t.pxmid[0]/t.pxmid[1]+\",\"+f+\"H\"+(a+t.labelExtraX+u):s+=\"l\"+t.labelExtraX+\",\"+c+\"v\"+(f-c)+\"h\"+u}else s+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+u;l.ensureSingle(r,\"path\",\"textline\").call(o.stroke,e.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,e.outsidetextfont.size/8),d:s,fill:\"none\"})}else r.select(\"path.textline\").remove()}))}(y,m),k&&m.automargin){var M=s.bBox(d.node()),A=m.domain,S=h.w*(A.x[1]-A.x[0]),E=h.h*(A.y[1]-A.y[0]),P=(.5*S-g.r)/h.w,O=(.5*E-g.r)/h.h;i.autoMargin(t,\"pie.\"+m.uid+\".automargin\",{xl:A.x[0]-P,xr:A.x[1]+P,yb:A.y[0]-O,yt:A.y[1]+O,l:Math.max(g.cx-g.r-M.left,0),r:Math.max(M.right-(g.cx+g.r),0),b:Math.max(M.bottom-(g.cy+g.r),0),t:Math.max(g.cy-g.r-M.top,0),pad:5})}}))}));setTimeout((function(){g.selectAll(\"tspan\").each((function(){var t=n.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))}))}),0)},formatSliceLabel:z,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:L,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:R}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../components/fx\":407,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../../plots/plots\":628,\"../bar/constants\":659,\"../bar/uniform_text\":673,\"./event_data\":914,\"./helpers\":915,\"@plotly/d3\":58}],920:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"./style_one\"),a=t(\"../bar/uniform_text\").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(\".trace\");a(t,e,\"pie\"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\"path.surface\").each((function(t){n.select(this).call(i,t,e)}))}))}},{\"../bar/uniform_text\":673,\"./style_one\":921,\"@plotly/d3\":58}],921:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"./helpers\").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style(\"stroke-width\",s).call(n.fill,e.color).call(n.stroke,o)}},{\"../../components/color\":367,\"./helpers\":915}],922:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\");e.exports={x:n.x,y:n.y,xy:{valType:\"data_array\",editType:\"calc\"},indices:{valType:\"data_array\",editType:\"calc\"},xbounds:{valType:\"data_array\",editType:\"calc\"},ybounds:{valType:\"data_array\",editType:\"calc\"},text:n.text,marker:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,arrayOk:!1,editType:\"calc\"},blend:{valType:\"boolean\",dflt:null,editType:\"calc\"},sizemin:{valType:\"number\",min:.1,max:2,dflt:.5,editType:\"calc\"},sizemax:{valType:\"number\",min:.1,dflt:20,editType:\"calc\"},border:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},arearatio:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},transforms:void 0}},{\"../scatter/attributes\":936}],923:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_pointcloud2d,i=t(\"../../lib/str2rgbarray\"),a=t(\"../../plots/cartesian/autorange\").findExtremes,o=t(\"../scatter/get_trace_color\");function s(t,e){this.scene=t,this.uid=e,this.type=\"pointcloud\",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color=\"rgb(0, 0, 0)\",this.name=\"\",this.hoverinfo=\"all\",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,u=this.xData=this.pickXData=t.x,c=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;l<e;l++)o=n[2*l],s=n[2*l+1],o<d[0]&&(d[0]=o),o>d[2]&&(d[2]=o),s<d[1]&&(d[1]=s),s>d[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;l<e;l++)r[l]=l}else for(e=u.length,n=new Float32Array(2*e),r=new Int32Array(e),l=0;l<e;l++)o=u[l],s=c[l],r[l]=l,n[2*l]=o,n[2*l+1]=s,o<d[0]&&(d[0]=o),o>d[2]&&(d[2]=o),s<d[1]&&(d[1]=s),s>d[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),v=i(t.marker.border.color),m=t.opacity*t.marker.opacity;g[3]*=m,this.pointcloudOptions.color=g;var y=t.marker.blend;null===y&&(y=u.length<100||c.length<100),this.pointcloudOptions.blend=y,v[3]*=m,this.pointcloudOptions.borderColor=v;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,k=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:k}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1133,\"../../lib/str2rgbarray\":540,\"../../plots/cartesian/autorange\":565,\"../scatter/get_trace_color\":946}],924:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a(\"x\"),a(\"y\"),a(\"xbounds\"),a(\"ybounds\"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a(\"text\"),a(\"marker.color\",r),a(\"marker.opacity\"),a(\"marker.blend\"),a(\"marker.sizemin\"),a(\"marker.sizemax\"),a(\"marker.border.color\",r),a(\"marker.border.arearatio\"),e._length=null}},{\"../../lib\":515,\"./attributes\":922}],925:[function(t,e,r){\"use strict\";[\"*pointcloud* trace is deprecated!\",\"Please consider switching to the *scattergl* trace type.\"].join(\" \"),e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../scatter3d/calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"pointcloud\",basePlotModule:t(\"../../plots/gl2d\"),categories:[\"gl\",\"gl2d\",\"showLegend\"],meta:{}}},{\"../../plots/gl2d\":605,\"../scatter3d/calc\":965,\"./attributes\":922,\"./convert\":923,\"./defaults\":924}],926:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../components/fx/attributes\"),s=t(\"../../plots/domain\").attributes,l=t(\"../../plots/template_attributes\").hovertemplateAttrs,u=t(\"../../components/colorscale/attributes\"),c=t(\"../../plot_api/plot_template\").templatedArray,f=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers,h=t(\"../../lib/extend\").extendFlat,p=t(\"../../plot_api/edit_types\").overrideAll;(e.exports=p({hoverinfo:h({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:\"sankey\",trace:!0}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\"},valueformat:{valType:\"string\",dflt:\".3s\",description:f(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\"number\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\"number\",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:[\"value\",\"label\"]})},link:{arrowlen:{valType:\"number\",min:0,dflt:0},label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0}},source:{valType:\"data_array\",dflt:[]},target:{valType:\"data_array\",dflt:[]},value:{valType:\"data_array\",dflt:[]},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:[\"value\",\"label\"]}),colorscales:c(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:h(u().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")).transforms=void 0},{\"../../components/color/attributes\":366,\"../../components/colorscale/attributes\":374,\"../../components/fx/attributes\":398,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plot_api/plot_template\":555,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/domain\":593,\"../../plots/font_attributes\":594,\"../../plots/template_attributes\":642}],927:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../components/fx/layout_attributes\"),s=t(\"../../lib/setcursor\"),l=t(\"../../components/dragelement\"),u=t(\"../../components/selections\").prepSelect,c=t(\"../../lib\"),f=t(\"../../registry\"),h=\"sankey\";function p(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a=\"pan\"===n.dragmode?\"move\":\"crosshair\",o=r._bgRect;if(o&&\"pan\"!==i&&\"zoom\"!==i){s(o,a);var h={_id:\"x\",c2p:c.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:\"y\",c2p:c.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:c.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;r<e.length;r++)if(e[r].pointNumber===t)return e[r]}for(var l=0;l<r.length;l++){var u=s(r[l].pointNumber);if(u)if(u.group){for(var c=0;c<u.childrenNodes.length;c++)o.push(u.childrenNodes[c].pointNumber);a[u.pointNumber-i.node._count]=!1}else o.push(u.pointNumber)}n=a.filter(Boolean).concat([o]),f.call(\"_guiRestyle\",t,{\"node.groups\":[n]},e)},prepFn:function(t,e,r){u(t,e,r,d,i)}};l.init(d)}}r.name=h,r.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},\"plot\",\"nested\"),r.plot=function(t){var e=i(t.calcdata,h)[0];a(t,e),r.updateFx(t)},r.clean=function(t,e,r,n){var i=n._has&&n._has(h),a=e._has&&e._has(h);i&&!a&&(n._paperdiv.selectAll(\".sankey\").remove(),n._paperdiv.selectAll(\".bgsankey\").remove())},r.updateFx=function(t){for(var e=0;e<t._fullData.length;e++)p(t,e)}},{\"../../components/dragelement\":386,\"../../components/fx/layout_attributes\":408,\"../../components/selections\":455,\"../../lib\":515,\"../../lib/setcursor\":536,\"../../plot_api/edit_types\":548,\"../../plots/get_data\":602,\"../../registry\":647,\"./plot\":932}],928:[function(t,e,r){\"use strict\";var n=t(\"strongly-connected-components\"),i=t(\"../../lib\"),a=t(\"../../lib/gup\").wrap,o=i.isArrayOrTypedArray,s=i.isIndex,l=t(\"../../components/colorscale\");function u(t){var e,r=t.node,a=t.link,u=[],c=o(a.color),f=o(a.customdata),h={},p={},d=a.colorscales.length;for(e=0;e<d;e++){var g=a.colorscales[e],v=l.extractScale(g,{cLetter:\"c\"}),m=l.makeColorScaleFunc(v);p[g.label]=m}var y=0;for(e=0;e<a.value.length;e++)a.source[e]>y&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var k=_[e];for(x=0;x<k.length;x++){var T=k[x],M=b+e;w.hasOwnProperty(T)?i.warn(\"Node \"+T+\" is already part of a group.\"):w[T]=M}}var A={source:[],target:[]};for(e=0;e<a.value.length;e++){var S=a.value[e],E=a.source[e],C=a.target[e];if(S>0&&s(E,b)&&s(C,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(C)||w[E]!==w[C])){w.hasOwnProperty(C)&&(C=w[C]),w.hasOwnProperty(E)&&(E=w[E]),C=+C,h[E=+E]=h[C]=!0;var L=\"\";a.label&&a.label[e]&&(L=a.label[e]);var P=null;L&&p.hasOwnProperty(L)&&(P=p[L]),u.push({pointNumber:e,label:L,color:c?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:C,value:+S}),A.source.push(E),A.target.push(C)}}var O=b+_.length,I=o(r.color),D=o(r.customdata),z=[];for(e=0;e<O;e++)if(h[e]){var R=r.label[e];z.push({group:e>b-1,childrenNodes:[],pointNumber:e,label:R,color:I?r.color[e]:r.color,customdata:D?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o<Math.min(e.length,r.length);o++)if(i.isIndex(e[o],t)&&i.isIndex(r[o],t)){if(e[o]===r[o])return!0;a[e[o]].push(r[o])}return n(a).components.some((function(t){return t.length>1}))}(O,A.source,A.target)&&(F=!0),{circular:F,links:u,nodes:z,groups:_,groupLookup:w}}e.exports=function(t,e){var r=u(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{\"../../components/colorscale\":379,\"../../lib\":515,\"../../lib/gup\":512,\"strongly-connected-components\":307}],929:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}},{}],930:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"tinycolor2\"),s=t(\"../../plots/domain\").defaults,l=t(\"../../components/fx/hoverlabel_defaults\"),u=t(\"../../plot_api/plot_template\"),c=t(\"../../plots/array_container_defaults\");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,v=u.newContainer(e,\"node\");function m(t,e){return n.coerce(g,v,i.node,t,e)}m(\"label\"),m(\"groups\"),m(\"x\"),m(\"y\"),m(\"pad\"),m(\"thickness\"),m(\"line.color\"),m(\"line.width\"),m(\"hoverinfo\",t.hoverinfo),l(g,v,m,d),m(\"hovertemplate\");var y=h.colorway;m(\"color\",v.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),m(\"customdata\");var x=t.link||{},b=u.newContainer(e,\"link\");function _(t,e){return n.coerce(x,b,i.link,t,e)}_(\"label\"),_(\"arrowlen\"),_(\"source\"),_(\"target\"),_(\"value\"),_(\"line.color\"),_(\"line.width\"),_(\"hoverinfo\",t.hoverinfo),l(x,b,_,d),_(\"hovertemplate\");var w,k=o(h.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\";_(\"color\",n.repeat(k,b.value.length)),_(\"customdata\"),c(x,b,{name:\"colorscales\",handleItemDefaults:f}),s(e,h,p),p(\"orientation\"),p(\"valueformat\"),p(\"valuesuffix\"),v.x.length&&v.y.length&&(w=\"freeform\"),p(\"arrangement\",w),n.coerceFont(p,\"textfont\",n.extendFlat({},h.font)),e._length=null}},{\"../../components/color\":367,\"../../components/fx/hoverlabel_defaults\":405,\"../../lib\":515,\"../../plot_api/plot_template\":555,\"../../plots/array_container_defaults\":561,\"../../plots/domain\":593,\"./attributes\":926,tinycolor2:313}],931:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"sankey\",basePlotModule:t(\"./base_plot\"),selectPoints:t(\"./select.js\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":926,\"./base_plot\":927,\"./calc\":928,\"./defaults\":930,\"./plot\":932,\"./select.js\":934}],932:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=i.numberFormat,o=t(\"./render\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),u=t(\"./constants\").cn,c=i._;function f(t){return\"\"!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select(\"path\").style(\"fill-opacity\",e),n.select(t).select(\"rect\").style(\"fill-opacity\",e)}function d(t){n.select(t).select(\"text.name\").style(\"fill\",\"black\")}function g(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function v(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(t,e,r){e&&r&&h(r,e).selectAll(\".\"+u.sankeyLink).filter(g(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll(\".\"+u.sankeyLink).filter(g(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll(\".\"+u.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll(\".\"+u.sankeyNode).filter(v(t)).call(m)}function b(t,e,r,n){var i=n.datum().link.label;n.style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll(\".\"+u.sankeyLink).filter((function(t){return t.link.label===i})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(u.sankeyNode).filter(v(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,g=0;g<t._fullData.length;g++)if(t._fullData[g].visible&&t._fullData[g].type===u.sankey&&!t._fullData[g]._viewInitial){var v=t._fullData[g].node;t._fullData[g]._viewInitial={node:{groups:v.groups.slice(),x:v.x.slice(),y:v.y.slice()}}}var w=c(t,\"source:\")+\" \",k=c(t,\"target:\")+\" \",T=c(t,\"concentration:\")+\" \",M=c(t,\"incoming flow count:\")+\" \",A=c(t,\"outgoing flow count:\")+\" \";o(t,i,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{linkEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&&(n.select(e).call(x.bind(0,r,i,!0)),\"skip\"!==r.link.trace.link.hoverinfo&&(r.link.fullData=r.link.trace,t.emit(\"plotly_hover\",{event:n.event,points:[r.link]})))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var o=i.link.trace.link;if(\"none\"!==o.hoverinfo&&\"skip\"!==o.hoverinfo){for(var u=[],c=0,h=0;h<i.flow.links.length;h++){var g=i.flow.links[h];if(\"closest\"!==t._fullLayout.hovermode||i.link.pointNumber===g.pointNumber){i.link.pointNumber===g.pointNumber&&(c=h),g.fullData=g.trace,o=i.link.trace.link;var v=y(g),m={valueLabel:a(i.valueFormat)(g.value)+i.valueSuffix};u.push({x:v[0],y:v[1],name:m.valueLabel,text:[g.label||\"\",w+g.source.label,k+g.target.label,g.concentrationscale?T+a(\"%0.2f\")(g.flow.labelConcentration):\"\"].filter(f).join(\"<br>\"),color:_(o,\"bgcolor\")||l.addOpacity(g.color,1),borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:n.event.x<v[0]?\"right\":\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:m,eventData:[g]})}}s.loneHover(u,{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,anchorIndex:c}).each((function(){i.link.concentrationscale||p(this,.65),d(this)}))}}function y(t){var e,r;t.circular?(e=(t.circularPathData.leftInnerExtent+t.circularPathData.rightInnerExtent)/2,r=t.circularPathData.verticalFullExtent):(e=(t.source.x1+t.target.x0)/2,r=(t.y0+t.y1)/2);var n=[e,r];return\"v\"===t.trace.orientation&&n.reverse(),n[0]+=i.parent.translateX,n[1]+=i.parent.translateY,n}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(b.bind(0,i,a,!0)),\"skip\"!==i.link.trace.link.hoverinfo&&(i.link.fullData=i.link.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.link]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r){var i=r.link;i.originalEvent=n.event,t._hoverdata=[i],s.click(t,{target:!0})}},nodeEvents:{hover:function(e,r,i){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,r,i),\"skip\"!==r.node.trace.node.hoverinfo&&(r.node.fullData=r.node.trace,t.emit(\"plotly_hover\",{event:n.event,points:[r.node]})))},follow:function(e,i){if(!1!==t._fullLayout.hovermode){var o=i.node.trace.node;if(\"none\"!==o.hoverinfo&&\"skip\"!==o.hoverinfo){var l=n.select(e).select(\".\"+u.nodeRect),c=t._fullLayout._paperdiv.node().getBoundingClientRect(),h=l.node().getBoundingClientRect(),g=h.left-2-c.left,v=h.right+2-c.left,m=h.top+h.height/4-c.top,y={valueLabel:a(i.valueFormat)(i.node.value)+i.valueSuffix};i.node.fullData=i.node.trace,t._fullLayout._calcInverseTransform(t);var x=t._fullLayout._invScaleX,b=t._fullLayout._invScaleY,w=s.loneHover({x0:x*g,x1:x*v,y:b*m,name:a(i.valueFormat)(i.node.value)+i.valueSuffix,text:[i.node.label,M+i.node.targetLinks.length,A+i.node.sourceLinks.length].filter(f).join(\"<br>\"),color:_(o,\"bgcolor\")||i.tinyColorHue,borderColor:_(o,\"bordercolor\"),fontFamily:_(o,\"font.family\"),fontSize:_(o,\"font.size\"),fontColor:_(o,\"font.color\"),nameLength:_(o,\"namelength\"),textAlign:_(o,\"align\"),idealAlign:\"left\",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),\"skip\"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit(\"plotly_unhover\",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{\"../../components/color\":367,\"../../components/fx\":407,\"../../lib\":515,\"./constants\":929,\"./render\":933,\"@plotly/d3\":58}],933:[function(t,e,r){\"use strict\";var n=t(\"d3-force\"),i=t(\"d3-interpolate\").interpolateNumber,a=t(\"@plotly/d3\"),o=t(\"@plotly/d3-sankey\"),s=t(\"@plotly/d3-sankey-circular\"),l=t(\"./constants\"),u=t(\"tinycolor2\"),c=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../../lib\"),p=h.strTranslate,d=h.strRotate,g=t(\"../../lib/gup\"),v=g.keyFun,m=g.repeat,y=g.unwrap,x=t(\"../../lib/svg_text_utils\"),b=t(\"../../registry\"),_=t(\"../../constants/alignment\"),w=_.CAP_SHIFT,k=_.LINE_SPACING;function T(t,e,r){var n,i=y(e),a=i.trace,c=a.domain,f=\"h\"===a.orientation,p=a.node.pad,d=a.node.thickness,g=t.width*(c.x[1]-c.x[0]),v=t.height*(c.y[1]-c.y[0]),m=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[g,v]:[v,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(m).links(x);var _,w,k,T=n();for(var M in n.nodePadding()<p&&h.warn(\"node.pad was reduced to \",n.nodePadding(),\" to fit within the figure.\"),i._groupLookup){var A,S=parseInt(i._groupLookup[M]);for(_=0;_<T.nodes.length;_++)if(T.nodes[_].pointNumber===S){A=T.nodes[_];break}if(A){var E={pointNumber:parseInt(M),x0:A.x0,x1:A.x1,y0:A.y0,y1:A.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};T.nodes.unshift(E),A.childrenNodes.unshift(E)}}if(function(){for(_=0;_<T.nodes.length;_++){var t,e,r=T.nodes[_],n={};for(w=0;w<r.targetLinks.length;w++)t=(e=r.targetLinks[w]).source.pointNumber+\":\"+e.target.pointNumber,n.hasOwnProperty(t)||(n[t]=[]),n[t].push(e);var i=Object.keys(n);for(w=0;w<i.length;w++){var a=n[t=i[w]],o=0,s={};for(k=0;k<a.length;k++)s[(e=a[k]).label]||(s[e.label]=0),s[e.label]+=e.value,o+=e.value;for(k=0;k<a.length;k++)(e=a[k]).flow={value:o,labelConcentration:s[e.label]/o,concentration:e.value/o,links:a},e.concentrationscale&&(e.color=u(e.concentrationscale(e.flow.labelConcentration)))}var l=0;for(w=0;w<r.sourceLinks.length;w++)l+=r.sourceLinks[w].value;for(w=0;w<r.sourceLinks.length;w++)(e=r.sourceLinks[w]).concentrationOut=e.value/l;var c=0;for(w=0;w<r.targetLinks.length;w++)c+=r.targetLinks[w].value;for(w=0;w<r.targetLinks.length;w++)(e=r.targetLinks[w]).concenrationIn=e.value/c}}(),a.node.x.length&&a.node.y.length){for(_=0;_<Math.min(a.node.x.length,a.node.y.length,T.nodes.length);_++)if(a.node.x[_]&&a.node.y[_]){var C=[a.node.x[_]*g,a.node.y[_]*v];T.nodes[_].x0=C[0]-d/2,T.nodes[_].x1=C[0]+d/2;var L=T.nodes[_].y1-T.nodes[_].y0;T.nodes[_].y0=C[1]-L/2,T.nodes[_].y1=C[1]+L/2}\"snap\"===a.arrangement&&function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_<n.length;_++){var s=t[n[_].index];s.x0>o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(m=T.nodes).forEach((function(t){var e,r,n,i=0,a=t.length;for(t.sort((function(t,e){return t.y0-e.y0})),n=0;n<a;++n)(e=t[n]).y0>=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p})),n.update(T)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:g,height:v,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,linkArrowLength:a.link.arrowlen,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:c.x[0]*t.width+t.margin.l,translateY:t.height-c.y[1]*t.height+t.margin.t,dragParallel:f?v:g,dragPerpendicular:f?g:v,arrangement:a.arrangement,sankey:n,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function M(t,e,r){var n=u(e.color),i=e.source.label+\"|\"+e.target.label+\"__\"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:c.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:A,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,linkArrowLength:t.linkArrowLength,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function A(){return function(t){var e=t.linkArrowLength;if(t.link.circular)return function(t,e){var r=t.width/2,n=t.circularPathData;return\"top\"===t.circularLinkType?\"M \"+(n.targetX-e)+\" \"+(n.targetY+r)+\" L\"+(n.rightInnerExtent-e)+\" \"+(n.targetY+r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 1 \"+(n.rightFullExtent-r-e)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r-e)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 1 \"+(n.rightInnerExtent-e)+\" \"+(n.verticalFullExtent-r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 1 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 0 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY-n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"L\"+(n.rightInnerExtent-e)+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 0 \"+(n.rightFullExtent+r-e)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r-e)+\" \"+(n.targetY-n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 0 \"+(n.rightInnerExtent-e)+\" \"+(n.targetY-r)+\"L\"+(n.targetX-e)+\" \"+(n.targetY-r)+(e>0?\"L\"+n.targetX+\" \"+n.targetY:\"\")+\"Z\":\"M \"+(n.targetX-e)+\" \"+(n.targetY-r)+\" L\"+(n.rightInnerExtent-e)+\" \"+(n.targetY-r)+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightSmallArcRadius+r)+\" 0 0 0 \"+(n.rightFullExtent-r-e)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"L\"+(n.rightFullExtent-r-e)+\" \"+n.verticalRightInnerExtent+\"A\"+(n.rightLargeArcRadius+r)+\" \"+(n.rightLargeArcRadius+r)+\" 0 0 0 \"+(n.rightInnerExtent-e)+\" \"+(n.verticalFullExtent+r)+\"L\"+n.leftInnerExtent+\" \"+(n.verticalFullExtent+r)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftLargeArcRadius+r)+\" 0 0 0 \"+(n.leftFullExtent+r)+\" \"+n.verticalLeftInnerExtent+\"L\"+(n.leftFullExtent+r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"A\"+(n.leftLargeArcRadius+r)+\" \"+(n.leftSmallArcRadius+r)+\" 0 0 0 \"+n.leftInnerExtent+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY-r)+\"L\"+n.sourceX+\" \"+(n.sourceY+r)+\"L\"+n.leftInnerExtent+\" \"+(n.sourceY+r)+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftSmallArcRadius-r)+\" 0 0 1 \"+(n.leftFullExtent-r)+\" \"+(n.sourceY+n.leftSmallArcRadius)+\"L\"+(n.leftFullExtent-r)+\" \"+n.verticalLeftInnerExtent+\"A\"+(n.leftLargeArcRadius-r)+\" \"+(n.leftLargeArcRadius-r)+\" 0 0 1 \"+n.leftInnerExtent+\" \"+(n.verticalFullExtent-r)+\"L\"+(n.rightInnerExtent-e)+\" \"+(n.verticalFullExtent-r)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightLargeArcRadius-r)+\" 0 0 1 \"+(n.rightFullExtent+r-e)+\" \"+n.verticalRightInnerExtent+\"L\"+(n.rightFullExtent+r-e)+\" \"+(n.targetY+n.rightSmallArcRadius)+\"A\"+(n.rightLargeArcRadius-r)+\" \"+(n.rightSmallArcRadius-r)+\" 0 0 1 \"+(n.rightInnerExtent-e)+\" \"+(n.targetY+r)+\"L\"+(n.targetX-e)+\" \"+(n.targetY+r)+(e>0?\"L\"+n.targetX+\" \"+n.targetY:\"\")+\"Z\"}(t.link,e);var r=Math.abs((t.link.target.x0-t.link.source.x1)/2);e>r&&(e=r);var n=t.link.source.x1,a=t.link.target.x0-e,o=i(n,a),s=o(.5),l=o(.5),u=t.link.y0-t.link.width/2,c=t.link.y0+t.link.width/2,f=t.link.y1-t.link.width/2,h=t.link.y1+t.link.width/2,p=\"M\"+n+\",\"+u,d=\"C\"+s+\",\"+u+\" \"+l+\",\"+f+\" \"+a+\",\"+f,g=\"C\"+l+\",\"+h+\" \"+s+\",\"+c+\" \"+n+\",\"+c,v=e>0?\"L\"+(a+e)+\",\"+(f+t.link.width/2):\"\";return p+d+(v+=\"L\"+a+\",\"+h)+g+\"Z\"}}function S(t,e){var r=u(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s=\"node_\"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:c.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join(\"_\"),interactionState:t.interactionState,figure:t}}function E(t){t.attr(\"transform\",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function C(t){t.call(E)}function L(t,e){t.call(C),e.attr(\"d\",A())}function P(t){t.attr(\"width\",(function(t){return t.node.x1-t.node.x0})).attr(\"height\",(function(t){return t.visibleHeight}))}function O(t){return t.link.width>1||t.linkLineWidth>0}function I(t){return p(t.translateX,t.translateY)+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function D(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on(\"mousemove.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on(\"mouseout.basic\",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)})).on(\"click.basic\",(function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)}))}function z(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on(\"dragstart\",(function(a){if(\"fixed\"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,\"g\",\"dragcover\",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e<t.length;e++)t[e].y=(t[e].y0+t[e].y1)/2,t[e].x=(t[e].x0+t[e].x1)/2}(r.graph.nodes);var a=r.graph.nodes.filter((function(t){return t.originalX===r.node.originalX})).filter((function(t){return!t.partOfGroup}));r.forceLayouts[e]=n.forceSimulation(a).alphaDecay(0).force(\"collide\",n.forceCollide().radius((function(t){return t.dy/2+r.nodePad/2})).strength(1).iterations(l.forceIterations)).force(\"constrain\",function(t,e,r,n){return function(){for(var t=0,i=0;i<r.length;i++){var a=r[i];a===n.interactionState.dragInProgress?(a.x=a.lastDraggedX,a.y=a.lastDraggedY):(a.vx=(a.originalX-a.x)/l.forceTicksPerFrame,a.y=Math.min(n.size-a.dy/2,Math.max(a.dy/2,a.y))),t=Math.max(t,Math.abs(a.vx),Math.abs(a.vy))}!n.interactionState.dragInProgress&&t<.1&&n.forceLayouts[e].alpha()>0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o<l.forceTicksPerFrame;o++)r.forceLayouts[n].tick();if(function(t){for(var e=0;e<t.length;e++)t[e].y0=t[e].y-t[e].dy/2,t[e].y1=t[e].y0+t[e].dy,t[e].x0=t[e].x-t[e].dx/2,t[e].x1=t[e].x0+t[e].dx}(r.graph.nodes),r.sankey.update(r.graph),L(t.filter(N(r)),e),r.forceLayouts[n].alpha()>0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on(\"drag\",(function(r){if(\"fixed\"!==r.arrangement){var n=a.event.x,i=a.event.y;\"snap\"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):(\"freeform\"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),\"snap\"!==r.arrangement&&(r.sankey.update(r.graph),L(t.filter(N(r)),e))}})).on(\"dragend\",(function(t){if(\"fixed\"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e<t.node.childrenNodes.length;e++)t.node.childrenNodes[e].x=t.node.x,t.node.childrenNodes[e].y=t.node.y;\"snap\"!==t.arrangement&&R(t,i)}}));t.on(\".drag\",null).call(o)}function R(t,e){for(var r=[],n=[],i=0;i<t.graph.nodes.length;i++){var a=(t.graph.nodes[i].x0+t.graph.nodes[i].x1)/2,o=(t.graph.nodes[i].y0+t.graph.nodes[i].y1)/2;r.push(a/t.figure.width),n.push(o/t.figure.height)}b.call(\"_guiRestyle\",e,{\"node.x\":[r],\"node.y\":[n]},t.trace.index).then((function(){e._fullLayout._dragCover&&e._fullLayout._dragCover.remove()}))}function F(t){t.lastDraggedX=t.x0+t.dx/2,t.lastDraggedY=t.y0+t.dy/2}function N(t){return function(e){return e.node.originalX===t.node.originalX}}e.exports=function(t,e,r,n,i){var o=t._context.staticPlot,s=!1;h.ensureSingle(t._fullLayout._infolayer,\"g\",\"first-render\",(function(){s=!0}));var g=t._fullLayout._dragCover,b=r.filter((function(t){return y(t).trace.visible})).map(T.bind(null,n)),_=e.selectAll(\".\"+l.cn.sankey).data(b,v);_.exit().remove(),_.enter().append(\"g\").classed(l.cn.sankey,!0).style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"shape-rendering\",\"geometricPrecision\").style(\"pointer-events\",o?\"none\":\"auto\").attr(\"transform\",I),_.each((function(e,r){t._fullData[r]._sankey=e;var n=\"bgsankey-\"+e.trace.uid+\"-\"+r;h.ensureSingle(t._fullLayout._draggers,\"rect\",n),t._fullData[r]._bgRect=a.select(\".\"+n),t._fullData[r]._bgRect.style(\"pointer-events\",o?\"none\":\"all\").attr(\"width\",e.width).attr(\"height\",e.height).attr(\"x\",e.translateX).attr(\"y\",e.translateY).classed(\"bgsankey\",!0).style({fill:\"transparent\",\"stroke-width\":0})})),_.transition().ease(l.ease).duration(l.duration).attr(\"transform\",I);var C=_.selectAll(\".\"+l.cn.sankeyLinks).data(m,v);C.enter().append(\"g\").classed(l.cn.sankeyLinks,!0).style(\"fill\",\"none\");var L=C.selectAll(\".\"+l.cn.sankeyLink).data((function(t){return t.graph.links.filter((function(t){return t.value})).map(M.bind(null,t))}),v);L.enter().append(\"path\").classed(l.cn.sankeyLink,!0).call(D,_,i.linkEvents),L.style(\"stroke\",(function(t){return O(t)?c.tinyRGB(u(t.linkLineColor)):t.tinyColorHue})).style(\"stroke-opacity\",(function(t){return O(t)?c.opacity(t.linkLineColor):t.tinyColorAlpha})).style(\"fill\",(function(t){return t.tinyColorHue})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})).style(\"stroke-width\",(function(t){return O(t)?t.linkLineWidth:1})).attr(\"d\",A()),L.style(\"opacity\",(function(){return t._context.staticPlot||s||g?1:0})).transition().ease(l.ease).duration(l.duration).style(\"opacity\",1),L.exit().transition().ease(l.ease).duration(l.duration).style(\"opacity\",0).remove();var R=_.selectAll(\".\"+l.cn.sankeyNodeSet).data(m,v);R.enter().append(\"g\").classed(l.cn.sankeyNodeSet,!0),R.style(\"cursor\",(function(t){switch(t.arrangement){case\"fixed\":return\"default\";case\"perpendicular\":return\"ns-resize\";default:return\"move\"}}));var F=R.selectAll(\".\"+l.cn.sankeyNode).data((function(t){var e=t.graph.nodes;return function(t){var e,r=[];for(e=0;e<t.length;e++)t[e].originalX=(t[e].x0+t[e].x1)/2,t[e].originalY=(t[e].y0+t[e].y1)/2,-1===r.indexOf(t[e].originalX)&&r.push(t[e].originalX);for(r.sort((function(t,e){return t-e})),e=0;e<t.length;e++)t[e].originalLayerIndex=r.indexOf(t[e].originalX),t[e].originalLayer=t[e].originalLayerIndex/(r.length-1)}(e),e.map(S.bind(null,t))}),v);F.enter().append(\"g\").classed(l.cn.sankeyNode,!0).call(E).style(\"opacity\",(function(e){return!t._context.staticPlot&&!s||e.partOfGroup?0:1})),F.call(D,_,i.nodeEvents).call(z,L,i,t),F.transition().ease(l.ease).duration(l.duration).call(E).style(\"opacity\",(function(t){return t.partOfGroup?0:1})),F.exit().transition().ease(l.ease).duration(l.duration).style(\"opacity\",0).remove();var N=F.selectAll(\".\"+l.cn.nodeRect).data(m);N.enter().append(\"rect\").classed(l.cn.nodeRect,!0).call(P),N.style(\"stroke-width\",(function(t){return t.nodeLineWidth})).style(\"stroke\",(function(t){return c.tinyRGB(u(t.nodeLineColor))})).style(\"stroke-opacity\",(function(t){return c.opacity(t.nodeLineColor)})).style(\"fill\",(function(t){return t.tinyColorHue})).style(\"fill-opacity\",(function(t){return t.tinyColorAlpha})),N.transition().ease(l.ease).duration(l.duration).call(P);var B=F.selectAll(\".\"+l.cn.nodeLabel).data(m);B.enter().append(\"text\").classed(l.cn.nodeLabel,!0).style(\"cursor\",\"default\"),B.attr(\"data-notex\",1).text((function(t){return t.node.label})).each((function(e){var r=a.select(this);f.font(r,e.textFont),x.convertToTspans(r,t)})).style(\"text-shadow\",x.makeTextShadow(t._fullLayout.paper_bgcolor)).attr(\"text-anchor\",(function(t){return t.horizontal&&t.left?\"end\":\"start\"})).attr(\"transform\",(function(t){var e=a.select(this),r=x.lineCount(e),n=t.textFont.size*((r-1)*k-w),i=t.nodeLineWidth/2+3,o=((t.horizontal?t.visibleHeight:t.visibleWidth)-n)/2;t.horizontal&&(t.left?i=-i:i+=t.visibleWidth);var s=t.horizontal?\"\":\"scale(-1,1)\"+d(90);return p(t.horizontal?i:o,t.horizontal?o:i)+s})),B.transition().ease(l.ease).duration(l.duration)}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../constants/alignment\":483,\"../../lib\":515,\"../../lib/gup\":512,\"../../lib/svg_text_utils\":541,\"../../registry\":647,\"./constants\":929,\"@plotly/d3\":58,\"@plotly/d3-sankey\":57,\"@plotly/d3-sankey-circular\":56,\"d3-force\":111,\"d3-interpolate\":116,tinycolor2:313}],934:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,i=n._sankey.graph.nodes,a=0;a<i.length;a++){var o=i[a];if(!o.partOfGroup){var s=[(o.x0+o.x1)/2,(o.y0+o.y1)/2];\"v\"===n.orientation&&s.reverse(),e&&e.contains(s,!1,a,t)&&r.push({pointNumber:o.pointNumber})}}return r}},{}],935:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,\"tx\"),n.mergeArray(e.texttemplate,t,\"txt\"),n.mergeArray(e.hovertext,t,\"htx\"),n.mergeArray(e.customdata,t,\"data\"),n.mergeArray(e.textposition,t,\"tp\"),e.textfont&&(n.mergeArrayCastPositive(e.textfont.size,t,\"ts\"),n.mergeArray(e.textfont.color,t,\"tc\"),n.mergeArray(e.textfont.family,t,\"tf\"));var i=e.marker;if(i){n.mergeArrayCastPositive(i.size,t,\"ms\"),n.mergeArrayCastPositive(i.opacity,t,\"mo\"),n.mergeArray(i.symbol,t,\"mx\"),n.mergeArray(i.angle,t,\"ma\"),n.mergeArray(i.standoff,t,\"mf\"),n.mergeArray(i.color,t,\"mc\");var a=i.line;i.line&&(n.mergeArray(a.color,t,\"mlc\"),n.mergeArrayCastPositive(a.width,t,\"mlw\"));var o=i.gradient;o&&\"none\"!==o.type&&(n.mergeArray(o.type,t,\"mgt\"),n.mergeArray(o.color,t,\"mgc\"))}}},{\"../../lib\":515}],936:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../components/colorscale/attributes\"),s=t(\"../../plots/font_attributes\"),l=t(\"../../components/drawing/attributes\").dash,u=t(\"../../components/drawing/attributes\").pattern,c=t(\"../../components/drawing\"),f=t(\"./constants\"),h=t(\"../../lib/extend\").extendFlat;e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\",anim:!0},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\",anim:!0},dx:{valType:\"number\",dflt:1,editType:\"calc\",anim:!0},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\",anim:!0},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\",anim:!0},dy:{valType:\"number\",dflt:1,editType:\"calc\",anim:!0},xperiod:{valType:\"any\",dflt:0,editType:\"calc\"},yperiod:{valType:\"any\",dflt:0,editType:\"calc\"},xperiod0:{valType:\"any\",editType:\"calc\"},yperiod0:{valType:\"any\",editType:\"calc\"},xperiodalignment:{valType:\"enumerated\",values:[\"start\",\"middle\",\"end\"],dflt:\"middle\",editType:\"calc\"},yperiodalignment:{valType:\"enumerated\",values:[\"start\",\"middle\",\"end\"],dflt:\"middle\",editType:\"calc\"},xhoverformat:n(\"x\"),yhoverformat:n(\"y\"),stackgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc\"},groupnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},stackgaps:{valType:\"enumerated\",values:[\"infer zero\",\"interpolate\"],dflt:\"infer zero\",editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},texttemplate:i({},{}),hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"],editType:\"calc\"},hoveron:{valType:\"flaglist\",flags:[\"points\",\"fills\"],editType:\"style\"},hovertemplate:a({},{keys:f.eventDataKeys}),line:{color:{valType:\"color\",editType:\"style\",anim:!0},width:{valType:\"number\",min:0,dflt:2,editType:\"style\",anim:!0},shape:{valType:\"enumerated\",values:[\"linear\",\"spline\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},smoothing:{valType:\"number\",min:0,max:1.3,dflt:1,editType:\"plot\"},dash:h({},l,{editType:\"style\"}),backoff:{valType:\"number\",min:0,dflt:\"auto\",arrayOk:!0,editType:\"plot\"},simplify:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cliponaxis:{valType:\"boolean\",dflt:!0,editType:\"plot\"},fill:{valType:\"enumerated\",values:[\"none\",\"tozeroy\",\"tozerox\",\"tonexty\",\"tonextx\",\"toself\",\"tonext\"],editType:\"calc\"},fillcolor:{valType:\"color\",editType:\"style\",anim:!0},fillpattern:u,marker:h({symbol:{valType:\"enumerated\",values:c.symbolList,dflt:\"circle\",arrayOk:!0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,arrayOk:!0,editType:\"style\",anim:!0},angle:{valType:\"angle\",dflt:0,arrayOk:!0,editType:\"plot\",anim:!1},angleref:{valType:\"enumerated\",values:[\"previous\",\"up\"],dflt:\"up\",editType:\"plot\",anim:!1},standoff:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"plot\",anim:!0},size:{valType:\"number\",min:0,dflt:6,arrayOk:!0,editType:\"calc\",anim:!0},maxdisplayed:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},sizeref:{valType:\"number\",dflt:1,editType:\"calc\"},sizemin:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"diameter\",\"area\"],dflt:\"diameter\",editType:\"calc\"},line:h({width:{valType:\"number\",min:0,arrayOk:!0,editType:\"style\",anim:!0},editType:\"calc\"},o(\"marker.line\",{anim:!0})),gradient:{type:{valType:\"enumerated\",values:[\"radial\",\"horizontal\",\"vertical\",\"none\"],arrayOk:!0,dflt:\"none\",editType:\"calc\"},color:{valType:\"color\",arrayOk:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},o(\"marker\",{anim:!0})),selected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},unselected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"middle center\",arrayOk:!0,editType:\"calc\"},textfont:s({editType:\"calc\",colorEditType:\"style\",arrayOk:!0})}},{\"../../components/colorscale/attributes\":374,\"../../components/drawing\":389,\"../../components/drawing/attributes\":388,\"../../lib/extend\":505,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/font_attributes\":594,\"../../plots/template_attributes\":642,\"./constants\":940}],937:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/cartesian/align_period\"),s=t(\"../../constants/numerical\").BADNUM,l=t(\"./subtypes\"),u=t(\"./colorscale_calc\"),c=t(\"./arrays_to_calcdata\"),f=t(\"./calc_selection\");function h(t,e,r,n,i,o,s){var u=e._length,c=t._fullLayout,f=r._id,h=n._id,p=c._firstScatter[g(e)]===e.uid,d=(v(e,c,r,n)||{}).orientation,m=e.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};s&&(y.ppad=x.ppad=s);var b=u<2||i[0]!==i[u-1]||o[0]!==o[u-1];b&&(\"tozerox\"===m||\"tonextx\"===m&&(p||\"h\"===d))?y.tozero=!0:(e.error_y||{}).visible||\"tonexty\"!==m&&\"tozeroy\"!==m&&(l.hasMarkers(e)||l.hasText(e))||(y.padded=!1,y.ppad=0),b&&(\"tozeroy\"===m||\"tonexty\"===m&&(p||\"v\"===d))?x.tozero=!0:\"tonextx\"!==m&&\"tozerox\"!==m||(x.padded=!1),f&&(e._extremes[f]=a.findExtremes(r,i,y)),h&&(e._extremes[h]=a.findExtremes(n,o,x))}function p(t,e){if(l.hasMarkers(t)){var r,n=t.marker,o=1.6*(t.marker.sizeref||1);if(r=\"area\"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/o),3)}:function(t){return Math.max((t||0)/o,3)},i.isArrayOrTypedArray(n.size)){var s={type:\"linear\"};a.setConvert(s);for(var u=s.makeCalcdata(t.marker,\"size\"),c=new Array(e),f=0;f<e;f++)c[f]=r(u[f]);return c}return r(n.size)}}function d(t,e){var r=g(e),n=t._firstScatter;n[r]||(n[r]=e.uid)}function g(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?\"-\"+e:\"\")}function v(t,e,r,n){var i=t.stackgroup;if(i){var a=e._scatterStackOpts[r._id+n._id][i],o=\"v\"===a.orientation?n:r;return\"linear\"===o.type||\"log\"===o.type?a:void 0}}e.exports={calc:function(t,e){var r,l,g,m,y,x,b=t._fullLayout,_=e._xA=a.getFromId(t,e.xaxis||\"x\",\"x\"),w=e._yA=a.getFromId(t,e.yaxis||\"y\",\"y\"),k=_.makeCalcdata(e,\"x\"),T=w.makeCalcdata(e,\"y\"),M=o(e,_,\"x\",k),A=o(e,w,\"y\",T),S=M.vals,E=A.vals,C=e._length,L=new Array(C),P=e.ids,O=v(e,b,_,w),I=!1;d(b,e);var D,z=\"x\",R=\"y\";O?(i.pushUnique(O.traceIndices,e._expandedIndex),(r=\"v\"===O.orientation)?(R=\"s\",D=\"x\"):(z=\"s\",D=\"y\"),y=\"interpolate\"===O.stackgaps):h(t,e,_,w,S,E,p(e,C));var F=!!e.xperiodalignment,N=!!e.yperiodalignment;for(l=0;l<C;l++){var B=L[l]={},j=n(S[l]),U=n(E[l]);j&&U?(B[z]=S[l],B[R]=E[l],F&&(B.orig_x=k[l],B.xEnd=M.ends[l],B.xStart=M.starts[l]),N&&(B.orig_y=T[l],B.yEnd=A.ends[l],B.yStart=A.starts[l])):O&&(r?j:U)?(B[D]=r?S[l]:E[l],B.gap=!0,y?(B.s=s,I=!0):B.s=0):B[z]=B[R]=s,P&&(B.id=String(P[l]))}if(c(L,e),u(t,e),f(L,e),O){for(l=0;l<L.length;)L[l][D]===s?L.splice(l,1):l++;if(i.sort(L,(function(t,e){return t[D]-e[D]||t.i-e.i})),I){for(l=0;l<L.length-1&&L[l].gap;)l++;for((x=L[l].s)||(x=L[l].s=0),g=0;g<l;g++)L[g].s=x;for(m=L.length-1;m>l&&L[m].gap;)m--;for(x=L[m].s,g=L.length-1;g>m;g--)L[g].s=x;for(;l<m;)if(L[++l].gap){for(g=l+1;L[g].gap;)g++;for(var V=L[l-1][D],H=L[l-1].s,q=(L[g].s-H)/(L[g][D]-V);l<g;)L[l].s=H+(L[l][D]-V)*q,l++}}}return L},calcMarkerSize:p,calcAxisExpansion:h,setFirstScatter:d,getStackOpts:v}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566,\"./arrays_to_calcdata\":935,\"./calc_selection\":938,\"./colorscale_calc\":939,\"./subtypes\":961,\"fast-isnumeric\":190}],938:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},{\"../../lib\":515}],939:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/helpers\").hasColorscale,i=t(\"../../components/colorscale/calc\"),a=t(\"./subtypes\");e.exports=function(t,e){a.hasLines(e)&&n(e,\"line\")&&i(t,e,{vals:e.line.color,containerStr:\"line\",cLetter:\"c\"}),a.hasMarkers(e)&&(n(e,\"marker\")&&i(t,e,{vals:e.marker.color,containerStr:\"marker\",cLetter:\"c\"}),n(e,\"marker.line\")&&i(t,e,{vals:e.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}))}},{\"../../components/colorscale/calc\":375,\"../../components/colorscale/helpers\":378,\"./subtypes\":961}],940:[function(t,e,r){\"use strict\";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},{}],941:[function(t,e,r){\"use strict\";var n=t(\"./calc\");function i(t,e,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,t.splice(e,0,s),e&&r===t[e-1][o]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=function(t,e,r,n){var i=t[e-1],a=t[e+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}e.exports=function(t,e){var r=e.xaxis,a=e.yaxis,o=r._id+a._id,s=t._fullLayout._scatterStackOpts[o];if(s){var l,u,c,f,h,p,d,g,v,m,y,x,b,_,w,k=t.calcdata;for(var T in s){var M=(m=s[T]).traceIndices;if(M.length){for(y=\"interpolate\"===m.stackgaps,x=m.groupnorm,\"v\"===m.orientation?(b=\"x\",_=\"y\"):(b=\"y\",_=\"x\"),w=new Array(M.length),l=0;l<w.length;l++)w[l]=!1;p=k[M[0]];var A=new Array(p.length);for(l=0;l<p.length;l++)A[l]=p[l][b];for(l=1;l<M.length;l++){for(h=k[M[l]],u=c=0;u<h.length;u++){for(d=h[u][b];d>A[c]&&c<A.length;c++)i(h,u,A[c],l,w,y,b),u++;if(d!==A[c]){for(f=0;f<l;f++)i(k[M[f]],c,d,f,w,y,b);A.splice(c,0,d)}c++}for(;c<A.length;c++)i(h,u,A[c],l,w,y,b),u++}var S=A.length;for(u=0;u<p.length;u++){for(g=p[u][_]=p[u].s,l=1;l<M.length;l++)(h=k[M[l]])[0].trace._rawLength=h[0].trace._length,h[0].trace._length=S,g+=h[u].s,h[u][_]=g;if(x)for(v=(\"fraction\"===x?g:g/100)||1,l=0;l<M.length;l++){var E=k[M[l]][u];E[_]/=v,E.sNorm=E.s/v}}for(l=0;l<M.length;l++){var C=(h=k[M[l]])[0].trace,L=n.calcMarkerSize(C,C._rawLength),P=Array.isArray(L);if(L&&w[l]||P){var O=L;for(L=new Array(S),u=0;u<S;u++)L[u]=h[u].gap?0:P?O[h[u].i]:O}var I=new Array(S),D=new Array(S);for(u=0;u<S;u++)I[u]=h[u].x,D[u]=h[u].y;n.calcAxisExpansion(t,C,r,a,I,D,L),h[0].t.orientation=m.orientation}}}}}},{\"./calc\":937}],942:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0;e<t.length;e++){var r=t[e];if(\"scatter\"===r.type){var n=r.fill;if(\"none\"!==n&&\"toself\"!==n&&(r.opacity=void 0,\"tonexty\"===n||\"tonextx\"===n))for(var i=e-1;i>=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],943:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./attributes\"),o=t(\"./constants\"),s=t(\"./subtypes\"),l=t(\"./xy_defaults\"),u=t(\"./period_defaults\"),c=t(\"./stack_defaults\"),f=t(\"./marker_defaults\"),h=t(\"./line_defaults\"),p=t(\"./line_shape_defaults\"),d=t(\"./text_defaults\"),g=t(\"./fillcolor_defaults\"),v=t(\"../../lib\").coercePattern;e.exports=function(t,e,r,m){function y(r,i){return n.coerce(t,e,a,r,i)}var x=l(t,e,m,y);if(x||(e.visible=!1),e.visible){u(t,e,m,y),y(\"xhoverformat\"),y(\"yhoverformat\");var b=c(t,e,m,y),_=!b&&x<o.PTS_LINESONLY?\"lines+markers\":\"lines\";y(\"text\"),y(\"hovertext\"),y(\"mode\",_),s.hasLines(e)&&(h(t,e,r,m,y,{backoff:!0}),p(t,e,y),y(\"connectgaps\"),y(\"line.simplify\")),s.hasMarkers(e)&&f(t,e,r,m,y,{gradient:!0}),s.hasText(e)&&(y(\"texttemplate\"),d(t,e,m,y));var w=[];(s.hasMarkers(e)||s.hasText(e))&&(y(\"cliponaxis\"),y(\"marker.maxdisplayed\"),w.push(\"points\")),y(\"fill\",b?b.fillDflt:\"none\"),\"none\"!==e.fill&&(g(t,e,r,y),s.hasLines(e)||p(t,e,y),v(y,\"fillpattern\",e.fillcolor,!1));var k=(e.line||{}).color,T=(e.marker||{}).color;\"tonext\"!==e.fill&&\"toself\"!==e.fill||w.push(\"fills\"),y(\"hoveron\",w.join(\"+\")||\"points\"),\"fills\"!==e.hoveron&&y(\"hovertemplate\");var M=i.getComponentMethod(\"errorbars\",\"supplyDefaults\");M(t,e,k||T||r,{axis:\"y\"}),M(t,e,k||T||r,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,y)}}},{\"../../lib\":515,\"../../registry\":647,\"./attributes\":936,\"./constants\":940,\"./fillcolor_defaults\":944,\"./line_defaults\":949,\"./line_shape_defaults\":951,\"./marker_defaults\":955,\"./period_defaults\":956,\"./stack_defaults\":959,\"./subtypes\":961,\"./text_defaults\":962,\"./xy_defaults\":963}],944:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../lib\").isArrayOrTypedArray;e.exports=function(t,e,r,a){var o=!1;if(e.marker){var s=e.marker.color,l=(e.marker.line||{}).color;s&&!i(s)?o=s:l&&!i(l)&&(o=l)}a(\"fillcolor\",n.addOpacity((e.line||{}).color||o||r,.5))}},{\"../../components/color\":367,\"../../lib\":515}],945:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r){var i={},a={_fullLayout:r},o=n.getFromTrace(a,e,\"x\"),s=n.getFromTrace(a,e,\"y\");return i.xLabel=n.tickText(o,o.c2l(t.x),!0).text,i.yLabel=n.tickText(s,s.c2l(t.y),!0).text,i}},{\"../../plots/cartesian/axes\":566}],946:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"./subtypes\");e.exports=function(t,e){var r,a;if(\"lines\"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if(\"none\"===t.mode)return t.fill?t.fillcolor:\"\";var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:\"\")?n.opacity(a)<.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},{\"../../components/color\":367,\"./subtypes\":961}],947:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/fx\"),a=t(\"../../registry\"),o=t(\"./get_trace_color\"),s=t(\"../../components/color\"),l=n.fillText;e.exports=function(t,e,r,u){var c=t.cd,f=c[0].trace,h=t.xa,p=t.ya,d=h.c2p(e),g=p.c2p(r),v=[d,g],m=f.hoveron||\"\",y=-1!==f.mode.indexOf(\"markers\")?3:.5,x=!!f.xperiodalignment,b=!!f.yperiodalignment;if(-1!==m.indexOf(\"points\")){var _=function(t){var e=Math.max(y,t.mrc||0),r=h.c2p(t.x)-d,n=p.c2p(t.y)-g;return Math.max(Math.sqrt(r*r+n*n)-e,1-y/e)},w=i.getDistanceFunction(u,(function(t){if(x){var e=h.c2p(t.xStart),r=h.c2p(t.xEnd);return d>=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a<n?i*a/n:a-n+i}),(function(t){if(b){var e=p.c2p(t.yStart),r=p.c2p(t.yEnd);return g>=Math.min(e,r)&&g<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-g);return a<n?i*a/n:a-n+i}),_);if(i.getClosest(c,w,t),!1!==t.index){var k=c[t.index],T=h.c2p(k.x,!0),M=p.c2p(k.y,!0),A=k.mrc||1;t.index=k.i;var S=c[0].t.orientation,E=S&&(k.sNorm||k.s),C=\"h\"===S?E:void 0!==k.orig_x?k.orig_x:k.x,L=\"v\"===S?E:void 0!==k.orig_y?k.orig_y:k.y;return n.extendFlat(t,{color:o(f,k),x0:T-A,x1:T+A,xLabelVal:C,y0:M-A,y1:M+A,yLabelVal:L,spikeDistance:_(k),hovertemplate:f.hovertemplate}),l(k,f,t),a.getComponentMethod(\"errorbars\",\"hoverInfo\")(k,f,t),[t]}}if(-1!==m.indexOf(\"fills\")&&f._polygons){var P,O,I,D,z,R,F,N,B,j=f._polygons,U=[],V=!1,H=1/0,q=-1/0,G=1/0,Y=-1/0;for(P=0;P<j.length;P++)(I=j[P]).contains(v)&&(V=!V,U.push(I),G=Math.min(G,I.ymin),Y=Math.max(Y,I.ymax));if(V){var W=((G=Math.max(G,0))+(Y=Math.min(Y,p._length)))/2;for(P=0;P<U.length;P++)for(D=U[P].pts,O=1;O<D.length;O++)(N=D[O-1][1])>W!=(B=D[O][1])>=W&&(R=D[O-1][0],F=D[O][0],B-N&&(z=R+(F-R)*(W-N)/(B-N),H=Math.min(H,z),q=Math.max(q,z)));H=Math.max(H,0),q=Math.min(q,h._length);var X=s.defaultLine;return s.opacity(f.fillcolor)?X=f.fillcolor:s.opacity((f.line||{}).color)&&(X=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:X,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{\"../../components/color\":367,\"../../components/fx\":407,\"../../lib\":515,\"../../registry\":647,\"./get_trace_color\":946}],948:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"./cross_trace_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./cross_trace_calc\"),arraysToCalcdata:t(\"./arrays_to_calcdata\"),plot:t(\"./plot\"),colorbar:t(\"./marker_colorbar\"),formatLabels:t(\"./format_labels\"),style:t(\"./style\").style,styleOnSelect:t(\"./style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"./select\"),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":578,\"./arrays_to_calcdata\":935,\"./attributes\":936,\"./calc\":937,\"./cross_trace_calc\":941,\"./cross_trace_defaults\":942,\"./defaults\":943,\"./format_labels\":945,\"./hover\":947,\"./marker_colorbar\":954,\"./plot\":957,\"./select\":958,\"./style\":960,\"./subtypes\":961}],949:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArrayOrTypedArray,i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\");e.exports=function(t,e,r,o,s,l){l||(l={});var u=(t.marker||{}).color;s(\"line.color\",r),i(t,\"line\")?a(t,e,o,s,{prefix:\"line.\",cLetter:\"c\"}):s(\"line.color\",!n(u)&&u||r),s(\"line.width\"),l.noDash||s(\"line.dash\"),l.backoff&&s(\"line.backoff\")}},{\"../../components/colorscale/defaults\":377,\"../../components/colorscale/helpers\":378,\"../../lib\":515}],950:[function(t,e,r){\"use strict\";var n=t(\"../../components/drawing\"),i=t(\"../../constants/numerical\"),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,u=t(\"../../lib\"),c=u.segmentsIntersect,f=u.constrain,h=t(\"./constants\");e.exports=function(t,e){var r,i,o,p,d,g,v,m,y,x,b,_,w,k,T,M,A,S,E=e.trace||{},C=e.xaxis,L=e.yaxis,P=\"log\"===C.type,O=\"log\"===L.type,I=C._length,D=L._length,z=e.backoff,R=E.marker,F=e.connectGaps,N=e.baseTolerance,B=e.shape,j=\"linear\"===B,U=E.fill&&\"none\"!==E.fill,V=[],H=h.minTolerance,q=t.length,G=new Array(q),Y=0;function W(r){var n=t[r];if(!n)return!1;var i=e.linearized?C.l2p(n.x):C.c2p(n.x),o=e.linearized?L.l2p(n.y):L.c2p(n.y);if(i===a){if(P&&(i=C.c2p(n.x,!0)),i===a)return!1;O&&o===a&&(i*=Math.abs(C._m*D*(C._m>0?s:l)/(L._m*I*(L._m>0?s:l)))),i*=1e3}if(o===a){if(O&&(o=L.c2p(n.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function X(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,u=i*o+a*s;if(u>0&&u<l){var c=o*a-s*i;if(c*c<l)return!0}}function Z(t,e){var r=t[0]/I,n=t[1]/D,i=Math.max(0,-r,r-1,-n,n-1);return i&&void 0!==A&&X(r,n,A,S)&&(i=0),i&&e&&X(r,n,e[0]/I,e[1]/D)&&(i=0),(1+h.toleranceGrowth*i)*N}function K(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}var J,$,Q,tt,et,rt,nt,it=h.maxScreensAway,at=-I*it,ot=I*(1+it),st=-D*it,lt=D*(1+it),ut=[[at,st,ot,st],[ot,st,ot,lt],[ot,lt,at,lt],[at,lt,at,st]];function ct(t){if(t[0]<at||t[0]>ot||t[1]<st||t[1]>lt)return[f(t[0],at,ot),f(t[1],st,lt)]}function ft(t,e){return t[0]===e[0]&&(t[0]===at||t[0]===ot)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function ht(t,e,r){return function(n,i){var a=ct(n),o=ct(i),s=[];if(a&&o&&ft(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*u.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);return l&&((a&&o?l>0==a[t]>o[t]?a:o:a||o)[t]+=l),s}}function pt(t){var e=t[0],r=t[1],n=e===G[Y-1][0],i=r===G[Y-1][1];if(!n||!i)if(Y>1){var a=e===G[Y-2][0],o=r===G[Y-2][1];n&&(e===at||e===ot)&&a?o?Y--:G[Y-1]=t:i&&(r===st||r===lt)&&o?a?Y--:G[Y-1]=t:G[Y++]=t}else G[Y++]=t}function dt(t){G[Y-1][0]!==t[0]&&G[Y-1][1]!==t[1]&&pt([Q,tt]),pt(t),et=null,Q=tt=0}\"linear\"===B||\"spline\"===B?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=ut[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&K(o,t)<K(r[0],t)?r.unshift(o):r.push(o),n++)}return r}:\"hv\"===B||\"vh\"===B?nt=function(t,e){var r=[],n=ct(t),i=ct(e);return n&&i&&ft(n,i)||(n&&r.push(n),i&&r.push(i)),r}:\"hvh\"===B?nt=ht(0,at,ot):\"vhv\"===B&&(nt=ht(1,st,lt));var gt=u.isArrayOrTypedArray(R);function vt(e){if(e&&z&&(e.i=r,e.d=t,e.trace=E,e.marker=gt?R[e.i]:R,e.backoff=z),A=e[0]/I,S=e[1]/D,J=e[0]<at?at:e[0]>ot?ot:0,$=e[1]<st?st:e[1]>lt?lt:0,J||$){if(Y)if(et){var n=nt(et,e);n.length>1&&(dt(n[0]),G[Y++]=n[1])}else rt=nt(G[Y-1],e)[0],G[Y++]=rt;else G[Y++]=[J||e[0],$||e[1]];var i=G[Y-1];J&&$&&(i[0]!==J||i[1]!==$)?(et&&(Q!==J&&tt!==$?pt(Q&&tt?(a=et,s=(o=e)[0]-a[0],l=(o[1]-a[1])/s,(a[1]*o[0]-o[1]*a[0])/s>0?[l>0?at:ot,lt]:[l>0?ot:at,st]):[Q||J,tt||$]):Q&&tt&&pt([Q,tt])),pt([J,$])):Q-J&&tt-$&&pt([J||Q,$||tt]),et=e,Q=J,tt=$}else et&&dt(nt(et,e)[0]),G[Y++]=e;var a,o,s,l}for(r=0;r<q;r++)if(i=W(r)){for(Y=0,et=null,vt(i),r++;r<q;r++){if(!(p=W(r))){if(F)continue;break}if(j&&e.simplify){var mt=W(r+1);if(x=K(p,i),U&&(0===Y||Y===q-1)||!(x<Z(p,mt)*H)){for(m=[(p[0]-i[0])/x,(p[1]-i[1])/x],d=i,b=x,_=k=T=0,v=!1,o=p,r++;r<t.length;r++){if(g=mt,mt=W(r+1),!g){if(F)continue;break}if(M=(y=[g[0]-i[0],g[1]-i[1]])[0]*m[1]-y[1]*m[0],k=Math.min(k,M),(T=Math.max(T,M))-k>Z(g,mt))break;o=g,(w=y[0]*m[0]+y[1]*m[1])>b?(b=w,p=g,v=!1):w<_&&(_=w,d=g,v=!0)}if(v?(vt(p),o!==d&&vt(d)):(d!==i&&vt(d),o!==p&&vt(p)),vt(o),r>=t.length||!g)break;vt(g),i=g}}else vt(p)}et&&pt([Q||et[0],tt||et[1]]),V.push(G.slice(0,Y))}var yt=B.slice(B.length-1);if(z&&\"h\"!==yt&&\"v\"!==yt){for(var xt=!1,bt=-1,_t=[],wt=0;wt<V.length;wt++)for(var kt=0;kt<V[wt].length-1;kt++){var Tt=V[wt][kt],Mt=V[wt][kt+1],At=n.applyBackoff(Mt,Tt);At[0]===Mt[0]&&At[1]===Mt[1]||(xt=!0),_t[bt+1]||(_t[++bt]=[Tt,[At[0],At[1]]])}return xt?_t:V}return V}},{\"../../components/drawing\":389,\"../../constants/numerical\":491,\"../../lib\":515,\"./constants\":940}],951:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],952:[function(t,e,r){\"use strict\";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var i,a,o,s,l,u={},c=!1,f=-1,h=0,p=-1;for(a=0;a<r.length;a++)(o=(i=r[a][0].trace).stackgroup||\"\")?o in u?l=u[o]:(l=u[o]=h,h++):i.fill in n&&p>=0?l=p:(l=p=h,h++),l<f&&(c=!0),i._groupIndex=f=l;var d=r.slice();c&&d.sort((function(t,e){var r=t[0].trace,n=e[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index}));var g={};for(a=0;a<d.length;a++)o=(i=d[a][0].trace).stackgroup||\"\",!0===i.visible?(i._nexttrace=null,i.fill in n&&(s=g[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&(\"tozero\"===i.fill.substr(0,6)||\"toself\"===i.fill||\"to\"===i.fill.substr(0,2)&&!i._prevtrace),g[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d}},{}],953:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports=function(t,e){e||(e=2);var r=t.marker,i=r.sizeref||1,a=r.sizemin||0,o=\"area\"===r.sizemode?function(t){return Math.sqrt(t/i)}:function(t){return t/i};return function(t){var r=o(t/e);return n(r)&&r>0?Math.max(r,a):0}}},{\"fast-isnumeric\":190}],954:[function(t,e,r){\"use strict\";e.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}},{}],955:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/helpers\").hasColorscale,a=t(\"../../components/colorscale/defaults\"),o=t(\"./subtypes\");e.exports=function(t,e,r,s,l,u){var c=o.isBubble(t),f=(t.line||{}).color;u=u||{},f&&(r=f),l(\"marker.symbol\"),l(\"marker.opacity\",c?.7:1),l(\"marker.size\"),u.noAngle||(l(\"marker.angle\"),u.noAngleRef||l(\"marker.angleref\"),u.noStandOff||l(\"marker.standoff\")),l(\"marker.color\",r),i(t,\"marker\")&&a(t,e,s,l,{prefix:\"marker.\",cLetter:\"c\"}),u.noSelect||(l(\"selected.marker.color\"),l(\"unselected.marker.color\"),l(\"selected.marker.size\"),l(\"unselected.marker.size\")),u.noLine||(l(\"marker.line.color\",f&&!Array.isArray(f)&&e.marker.color!==f?f:c?n.background:n.defaultLine),i(t,\"marker.line\")&&a(t,e,s,l,{prefix:\"marker.line.\",cLetter:\"c\"}),l(\"marker.line.width\",c?1:0)),c&&(l(\"marker.sizeref\"),l(\"marker.sizemin\"),l(\"marker.sizemode\")),u.gradient&&\"none\"!==l(\"marker.gradient.type\")&&l(\"marker.gradient.color\")}},{\"../../components/color\":367,\"../../components/colorscale/defaults\":377,\"../../components/colorscale/helpers\":378,\"./subtypes\":961}],956:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").dateTick0,i=t(\"../../constants/numerical\").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n(\"xperiod\");o&&(n(\"xperiod0\",a(o,e.xcalendar)),n(\"xperiodalignment\"))}if(i.y){var s=n(\"yperiod\");s&&(n(\"yperiod0\",a(s,e.ycalendar)),n(\"yperiodalignment\"))}}},{\"../../constants/numerical\":491,\"../../lib\":515}],957:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=a.ensureSingle,s=a.identity,l=t(\"../../components/drawing\"),u=t(\"./subtypes\"),c=t(\"./line_points\"),f=t(\"./link_traces\"),h=t(\"../../lib/polygon\").tester;function p(t,e,r,f,p,d,g){var v;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,c=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(u.hasMarkers(h)){var p=h.marker.maxdisplayed;if(0!==p){var d=i.filter((function(t){return t.x>=c[0]&&t.x<=c[1]&&t.y>=f[0]&&t.y<=f[1]})),g=Math.ceil(d.length/p),v=0;o.forEach((function(t,r){var n=t[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<e&&v++}));var m=Math.round(v*g/3+Math.floor(v/3)*g/7.1);i.forEach((function(t){delete t.vis})),d.forEach((function(t,e){0===Math.round((e+m)%g)&&(t.vis=!0)}))}}}(0,e,r,f,p);var m=!!g&&g.duration>0;function y(t){return m?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,k=n.select(d),T=o(k,\"g\",\"errorbars\"),M=o(k,\"g\",\"lines\"),A=o(k,\"g\",\"points\"),S=o(k,\"g\",\"text\");if(i.getComponentMethod(\"errorbars\",\"plot\")(t,T,r,g),!0===_.visible){var E,C;y(k).style(\"opacity\",_.opacity);var L=_.fill.charAt(_.fill.length-1);\"x\"!==L&&\"y\"!==L&&(L=\"\"),f[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=k;var P,O,I=\"\",D=[],z=_._prevtrace;z&&(I=z._prevRevpath||\"\",C=z._nextFill,D=z._polygons);var R,F,N,B,j,U,V,H=\"\",q=\"\",G=[],Y=a.noop;if(E=_._ownFill,u.hasLines(_)||\"none\"!==_.fill){for(C&&C.datum(f),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split(\"\").reverse().join(\"\"))):R=F=\"spline\"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return\"M\"+t.join(\"L\")},N=function(t){return F(t.reverse())},G=c(f,{xaxis:x,yaxis:b,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:_.fill}),V=_._polygons=new Array(G.length),v=0;v<G.length;v++)_._polygons[v]=h(G[v]);G.length&&(B=G[0][0],U=(j=G[G.length-1])[j.length-1]),Y=function(t){return function(e){if(P=R(e),O=N(e),H?L?(H+=\"L\"+P.substr(1),q=O+\"L\"+q.substr(1)):(H+=\"Z\"+P,q=O+\"Z\"+q):(H=P,q=O),u.hasLines(_)&&e.length>1){var r=n.select(this);if(r.datum(f),t)y(r.style(\"opacity\",0).attr(\"d\",P).call(l.lineGroupStyle)).style(\"opacity\",1);else{var i=y(r);i.attr(\"d\",P),l.singleLineStyle(f,i)}}}}}var W=M.selectAll(\".js-line\").data(G);y(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),B&&U&&(L?(\"y\"===L?B[1]=U[1]=b.c2p(0,!0):\"x\"===L&&(B[0]=U[0]=x.c2p(0,!0)),y(E).attr(\"d\",\"M\"+U+\"L\"+B+\"L\"+H.substr(1)).call(l.singleFillStyle,t)):y(E).attr(\"d\",H+\"Z\").call(l.singleFillStyle,t))):C&&(\"tonext\"===_.fill.substr(0,6)&&H&&I?(\"tonext\"===_.fill?y(C).attr(\"d\",H+\"Z\"+I+\"Z\").call(l.singleFillStyle,t):y(C).attr(\"d\",H+\"L\"+I.substr(1)+\"Z\").call(l.singleFillStyle,t),_._polygons=_._polygons.concat(D)):(Z(C),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?Z(E):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),A.datum(f),S.datum(f),function(e,i,a){var o,c=a[0].trace,f=u.hasMarkers(c),h=u.hasText(c),p=tt(c),d=et,g=et;if(f||h){var v=s,_=c.stackgroup,w=_&&\"infer zero\"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;c.marker.maxdisplayed||c._needsCull?v=w?J:K:_&&!w&&(v=$),f&&(d=v),h&&(g=v)}var k,T=(o=e.selectAll(\"path.point\").data(d,p)).enter().append(\"path\").classed(\"point\",!0);m&&T.call(l.pointStyle,c,t).call(l.translatePoints,x,b).style(\"opacity\",0).transition().style(\"opacity\",1),o.order(),f&&(k=l.makePointStyleFns(c)),o.each((function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,c,k,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,c.xcalendar,c.ycalendar),c.customdata&&i.classed(\"plotly-customdata\",null!==e.data&&void 0!==e.data)):a.remove()})),m?o.exit().transition().style(\"opacity\",0).remove():o.exit().remove(),(o=i.selectAll(\"g\").data(g,p)).enter().append(\"g\").classed(\"textpoint\",!0).append(\"text\"),o.order(),o.each((function(t){var e=n.select(this),i=y(e.select(\"text\"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,c.xcalendar,c.ycalendar):e.remove()})),o.selectAll(\"text\").call(l.textPointStyle,c,t).each((function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll(\"tspan.line\").each((function(){y(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(A,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(A,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr(\"d\",\"M0,0Z\")}function K(t){return t.filter((function(t){return!t.gap&&t.vis}))}function J(t){return t.filter((function(t){return t.vis}))}function $(t){return t.filter((function(t){return!t.gap}))}function Q(t){return t.id}function tt(t){if(t.ids)return Q}function et(){return!1}}e.exports=function(t,e,r,i,a,u){var c,h,d=!a,g=!!a&&a.duration>0,v=f(t,e,r);(c=i.selectAll(\"g.trace\").data(v,(function(t){return t[0].trace.uid}))).enter().append(\"g\").attr(\"class\",(function(t){return\"trace scatter trace\"+t[0].trace.uid})).style(\"stroke-miterlimit\",2),c.order(),function(t,e,r){e.each((function(e){var i=o(n.select(this),\"g\",\"fills\");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,u=[];a._ownfill&&u.push(\"_ownFill\"),a._nexttrace&&u.push(\"_nextFill\");var c=i.selectAll(\"g\").data(u,s);c.enter().append(\"g\"),c.exit().each((function(t){a[t]=null})).remove(),c.order().each((function(t){a[t]=o(n.select(this),\"path\",\"js-fill\")}))}))}(t,c,e),g?(u&&(h=u()),n.transition().duration(a.duration).ease(a.easing).each(\"end\",(function(){h&&h()})).each(\"interrupt\",(function(){h&&h()})).each((function(){i.selectAll(\"g.trace\").each((function(r,n){p(t,n,e,r,v,this,a)}))}))):c.each((function(r,n){p(t,n,e,r,v,this,a)})),d&&c.exit().remove(),i.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/polygon\":527,\"../../registry\":647,\"./line_points\":950,\"./link_traces\":952,\"./subtypes\":961,\"@plotly/d3\":58}],958:[function(t,e,r){\"use strict\";var n=t(\"./subtypes\");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)i=s[r],a=l.c2p(i.x),o=u.c2p(i.y),null!==i.i&&e.contains([a,o],!1,r,t)?(c.push({pointNumber:i.i,x:l.c2d(i.x),y:u.c2d(i.y)}),i.selected=1):i.selected=0;return c}},{\"./subtypes\":961}],959:[function(t,e,r){\"use strict\";var n=[\"orientation\",\"groupnorm\",\"stackgaps\"];e.exports=function(t,e,r,i){var a=r._scatterStackOpts,o=i(\"stackgroup\");if(o){var s=e.xaxis+e.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(e):(u=l[o]={traceIndices:[],traces:[e]},c=!0);for(var f={orientation:e.x&&!e.y?\"h\":\"v\"},h=0;h<n.length;h++){var p=n[h],d=p+\"Found\";if(!u[d]){var g=void 0!==t[p],v=\"orientation\"===p;if((g||c)&&(u[p]=i(p,f[p]),v&&(u.fillDflt=\"h\"===u[p]?\"tonextx\":\"tonexty\"),g&&(u[d]=!0,!c&&(delete u.traces[0][p],v))))for(var m=0;m<u.traces.length-1;m++){var y=u.traces[m];y._input.fill!==y.fill&&(y.fill=u.fillDflt)}}}return u}}},{}],960:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../registry\");function o(t,e,r){i.pointStyle(t.selectAll(\"path.point\"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll(\"text\"),e,r)}e.exports={style:function(t){var e=n.select(t).selectAll(\"g.trace.scatter\");e.style(\"opacity\",(function(t){return t[0].trace.opacity})),e.selectAll(\"g.points\").each((function(e){o(n.select(this),e.trace||e[0].trace,t)})),e.selectAll(\"g.text\").each((function(e){s(n.select(this),e.trace||e[0].trace,t)})),e.selectAll(\"g.trace path.js-line\").call(i.lineGroupStyle),e.selectAll(\"g.trace path.js-fill\").call(i.fillGroupStyle,t),a.getComponentMethod(\"errorbars\",\"style\")(e)},stylePoints:o,styleText:s,styleOnSelect:function(t,e,r){var n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll(\"path.point\"),n),i.selectedTextStyle(r.selectAll(\"text\"),n)):(o(r,n,t),s(r,n,t))}}},{\"../../components/drawing\":389,\"../../registry\":647,\"@plotly/d3\":58}],961:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"lines\")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf(\"markers\")||\"splom\"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"text\")},isBubble:function(t){return n.isPlainObject(t.marker)&&n.isArrayOrTypedArray(t.marker.size)}}},{\"../../lib\":515}],962:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r,i,a){a=a||{},i(\"textposition\"),n.coerceFont(i,\"textfont\",r.font),a.noSelect||(i(\"selected.textfont.color\"),i(\"unselected.textfont.color\"))}},{\"../../lib\":515}],963:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\");e.exports=function(t,e,r,a){var o,s=a(\"x\"),l=a(\"y\");if(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],r),s){var u=n.minRowLength(s);l?o=Math.min(u,n.minRowLength(l)):(o=u,a(\"y0\"),a(\"dy\"))}else{if(!l)return 0;o=n.minRowLength(l),a(\"x0\"),a(\"dx\")}return e._length=o,o}},{\"../../lib\":515,\"../../registry\":647}],964:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/template_attributes\").texttemplateAttrs,l=t(\"../../plots/attributes\"),u=t(\"../../constants/gl3d_dashes\"),c=t(\"../../constants/gl3d_markers\"),f=t(\"../../lib/extend\").extendFlat,h=t(\"../../plot_api/edit_types\").overrideAll,p=t(\"../../lib/sort_object_keys\"),d=n.line,g=n.marker,v=g.line,m=f({width:d.width,dash:{valType:\"enumerated\",values:p(u),dflt:\"solid\"}},i(\"line\")),y=e.exports=h({x:n.x,y:n.y,z:{valType:\"data_array\"},text:f({},n.text,{}),texttemplate:s({},{}),hovertext:f({},n.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),mode:f({},n.mode,{dflt:\"lines+markers\"}),surfaceaxis:{valType:\"enumerated\",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:\"color\"},projection:{x:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}},y:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}},z:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:m,marker:f({symbol:{valType:\"enumerated\",values:p(c),dflt:\"circle\",arrayOk:!0},size:f({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:f({},g.opacity,{arrayOk:!1}),colorbar:g.colorbar,line:f({width:f({},v.width,{arrayOk:!1})},i(\"marker.line\"))},i(\"marker\")),textposition:f({},n.textposition,{dflt:\"top center\"}),textfont:{color:n.textfont.color,size:n.textfont.size,family:f({},n.textfont.family,{arrayOk:!1})},opacity:l.opacity,hoverinfo:f({},l.hoverinfo)},\"calc\",\"nested\");y.x.editType=y.y.editType=y.z.editType=\"calc+clearAxisTypes\"},{\"../../components/colorscale/attributes\":374,\"../../constants/gl3d_dashes\":488,\"../../constants/gl3d_markers\":489,\"../../lib/extend\":505,\"../../lib/sort_object_keys\":538,\"../../plot_api/edit_types\":548,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936}],965:[function(t,e,r){\"use strict\";var n=t(\"../scatter/arrays_to_calcdata\"),i=t(\"../scatter/colorscale_calc\");e.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(t,e),r}},{\"../scatter/arrays_to_calcdata\":935,\"../scatter/colorscale_calc\":939}],966:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");function i(t,e,r,i){if(!e||!e.visible)return null;for(var a=n.getComponentMethod(\"errorbars\",\"makeComputeError\")(e),o=new Array(t.length),s=0;s<t.length;s++){var l=a(+t[s],s);if(\"log\"===i.type){var u=i.c2l(t[s]),c=t[s]-l[0],f=t[s]+l[1];if(o[s]=[(i.c2l(c,!0)-u)*r,(i.c2l(f,!0)-u)*r],c>0){var h=i.c2l(c);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e<t.length;e++)if(t[e])return t[e].length;return 0}(n);if(0===a)return null;for(var o=new Array(a),s=0;s<a;s++){for(var l=[[0,0,0],[0,0,0]],u=0;u<3;u++)if(n[u])for(var c=0;c<2;c++)l[c][u]=n[u][s][c];o[s]=l}return o}},{\"../../registry\":647}],967:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_line3d,i=t(\"../../../stackgl_modules\").gl_scatter3d,a=t(\"../../../stackgl_modules\").gl_error3d,o=t(\"../../../stackgl_modules\").gl_mesh3d,s=t(\"../../../stackgl_modules\").delaunay_triangulate,l=t(\"../../lib\"),u=t(\"../../lib/str2rgbarray\"),c=t(\"../../lib/gl_format_color\").formatColor,f=t(\"../scatter/make_bubble_size_func\"),h=t(\"../../constants/gl3d_dashes\"),p=t(\"../../constants/gl3d_markers\"),d=t(\"../../plots/cartesian/axes\"),g=t(\"../../components/fx/helpers\").appendArrayPointValue,v=t(\"./calc_errors\");function m(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=\"\",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var y=m.prototype;function x(t){return null==t?0:t.indexOf(\"left\")>-1?-1:t.indexOf(\"right\")>-1?1:0}function b(t){return null==t?0:t.indexOf(\"top\")>-1?-1:t.indexOf(\"bottom\")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function k(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o<e;o++)void 0===t[o]?a[o]=n:a[o]=r(t[o],i)}else a=r(t,l.identity);return a}function T(t,e){var r,n,i,a,o,s,h=[],p=t.fullSceneLayout,m=t.dataScale,y=p.xaxis,T=p.yaxis,M=p.zaxis,A=e.marker,S=e.line,E=e.x||[],C=e.y||[],L=e.z||[],P=E.length,O=e.xcalendar,I=e.ycalendar,D=e.zcalendar;for(o=0;o<P;o++)r=y.d2l(E[o],0,O)*m[0],n=T.d2l(C[o],0,I)*m[1],i=M.d2l(L[o],0,D)*m[2],h[o]=[r,n,i];if(Array.isArray(e.text))s=e.text;else if(void 0!==e.text)for(s=new Array(P),o=0;o<P;o++)s[o]=e.text;function z(t,e){var r=p[t];return d.tickText(r,r.d2l(e),!0).text}var R=e.texttemplate;if(R){var F=t.fullLayout._d3locale,N=Array.isArray(R),B=N?Math.min(R.length,P):P,j=N?function(t){return R[t]}:function(){return R};for(s=new Array(B),o=0;o<B;o++){var U={x:E[o],y:C[o],z:L[o]},V={xLabel:z(\"xaxis\",E[o]),yLabel:z(\"yaxis\",C[o]),zLabel:z(\"zaxis\",L[o])},H={};g(H,e,o);var q=e._meta||{};s[o]=l.texttemplateString(j(o),V,F,H,U,q)}}if(a={position:h,mode:e.mode,text:s},\"line\"in e&&(a.lineColor=c(S,1,P),a.lineWidth=S.width,a.lineDashes=S.dash),\"marker\"in e){var G=f(e);a.scatterColor=c(A,1,P),a.scatterSize=k(A.size,P,_,20,G),a.scatterMarker=k(A.symbol,P,w,\"●\"),a.scatterLineWidth=A.line.width,a.scatterLineColor=c(A.line,1,P),a.scatterAngle=0}\"textposition\"in e&&(a.textOffset=function(t){var e=[0,0];if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=[0,0],t[r]&&(e[r][0]=x(t[r]),e[r][1]=b(t[r]));else e[0]=x(t),e[1]=b(t);return e}(e.textposition),a.textColor=c(e.textfont,1,P),a.textSize=k(e.textfont.size,P,l.identity,12),a.textFont=e.textfont.family,a.textAngle=0);var Y=[\"x\",\"y\",\"z\"];for(a.project=[!1,!1,!1],a.projectScale=[1,1,1],a.projectOpacity=[1,1,1],o=0;o<3;++o){var W=e.projection[Y[o]];(a.project[o]=W.show)&&(a.projectOpacity[o]=W.opacity,a.projectScale[o]=W.scale)}a.errorBounds=v(e,m,p);var X=function(t){for(var e=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i<3;i++){var a=t[i];a&&!1!==a.copy_zstyle&&!1!==t[2].visible&&(a=t[2]),a&&a.visible&&(e[i]=a.width/2,r[i]=u(a.color),n[i]=a.thickness)}return{capSize:e,color:r,lineWidth:n}}([e.error_x,e.error_y,e.error_z]);return a.errorColor=X.color,a.errorLineWidth=X.lineWidth,a.errorCapSize=X.capSize,a.delaunayAxis=e.surfaceaxis,a.delaunayColor=u(e.surfacecolor),a}function M(t){if(l.isArrayOrTypedArray(t)){var e=t[0];return l.isArrayOrTypedArray(e)&&(t=e),\"rgb(\"+t.slice(0,3).map((function(t){return Math.round(255*t)}))+\")\"}return null}function A(t){return l.isArrayOrTypedArray(t)?4===t.length&&\"number\"==typeof t[0]?M(t):t.map(M):null}y.handlePick=function(t){if(t.object&&(t.object===this.linePlot||t.object===this.delaunayMesh||t.object===this.textMarkers||t.object===this.scatterPlot)){var e=t.index=t.data.index;return t.object.highlight&&t.object.highlight(null),this.scatterPlot&&(t.object=this.scatterPlot,this.scatterPlot.highlight(t.data)),t.textLabel=\"\",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[e]||0===this.textLabels[e])&&(t.textLabel=this.textLabels[e]):t.textLabel=this.textLabels),t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},y.update=function(t){var e,r,l,u,c=this.scene.glplot.gl,f=h.solid;this.data=t;var p=T(this.scene,t);\"mode\"in p&&(this.mode=p.mode),\"lineDashes\"in p&&p.lineDashes in h&&(f=h[p.lineDashes]),this.color=A(p.scatterColor)||A(p.lineColor),this.dataPoints=p.position,e={gl:this.scene.glplot.gl,position:p.position,color:p.lineColor,lineWidth:p.lineWidth||1,dashes:f[0],dashScale:f[1],opacity:t.opacity,connectGaps:t.connectgaps},-1!==this.mode.indexOf(\"lines\")?this.linePlot?this.linePlot.update(e):(this.linePlot=n(e),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var d=t.opacity;if(t.marker&&t.marker.opacity&&(d*=t.marker.opacity),r={gl:this.scene.glplot.gl,position:p.position,color:p.scatterColor,size:p.scatterSize,glyph:p.scatterMarker,opacity:d,orthographic:!0,lineWidth:p.scatterLineWidth,lineColor:p.scatterLineColor,project:p.project,projectScale:p.projectScale,projectOpacity:p.projectOpacity},-1!==this.mode.indexOf(\"markers\")?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=i(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),u={gl:this.scene.glplot.gl,position:p.position,glyph:p.text,color:p.textColor,size:p.textSize,angle:p.textAngle,alignment:p.textOffset,font:p.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:t.opacity},this.textLabels=t.hovertext||t.text,-1!==this.mode.indexOf(\"text\")?this.textMarkers?this.textMarkers.update(u):(this.textMarkers=i(u),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),l={gl:this.scene.glplot.gl,position:p.position,color:p.errorColor,error:p.errorBounds,lineWidth:p.errorLineWidth,capSize:p.errorCapSize,opacity:t.opacity},this.errorBars?p.errorBounds?this.errorBars.update(l):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):p.errorBounds&&(this.errorBars=a(l),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),p.delaunayAxis>=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n<t.length;++n){var u=t[n];!isNaN(u[i])&&isFinite(u[i])&&!isNaN(u[a])&&isFinite(u[a])&&(o.push([u[i],u[a]]),l.push(n))}var c=s(o);for(n=0;n<c.length;++n)for(var f=c[n],h=0;h<f.length;++h)f[h]=l[f[h]];return{positions:t,cells:c,meshColor:e}}(p.position,p.delaunayColor,p.delaunayAxis);g.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(g):(g.gl=c,this.delaunayMesh=o(g),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},y.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},e.exports=function(t,e){var r=new m(t,e.uid);return r.update(e),r}},{\"../../../stackgl_modules\":1133,\"../../components/fx/helpers\":403,\"../../constants/gl3d_dashes\":488,\"../../constants/gl3d_markers\":489,\"../../lib\":515,\"../../lib/gl_format_color\":511,\"../../lib/str2rgbarray\":540,\"../../plots/cartesian/axes\":566,\"../scatter/make_bubble_size_func\":953,\"./calc_errors\":966}],968:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/subtypes\"),o=t(\"../scatter/marker_defaults\"),s=t(\"../scatter/line_defaults\"),l=t(\"../scatter/text_defaults\"),u=t(\"./attributes\");e.exports=function(t,e,r,c){function f(r,n){return i.coerce(t,e,u,r,n)}if(function(t,e,r,i){var a=0,o=r(\"x\"),s=r(\"y\"),l=r(\"z\");return n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],i),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=a),a}(t,e,f,c)){f(\"text\"),f(\"hovertext\"),f(\"hovertemplate\"),f(\"xhoverformat\"),f(\"yhoverformat\"),f(\"zhoverformat\"),f(\"mode\"),a.hasLines(e)&&(f(\"connectgaps\"),s(t,e,r,c,f)),a.hasMarkers(e)&&o(t,e,r,c,f,{noSelect:!0,noAngle:!0}),a.hasText(e)&&(f(\"texttemplate\"),l(t,e,c,f,{noSelect:!0}));var h=(e.line||{}).color,p=(e.marker||{}).color;f(\"surfaceaxis\")>=0&&f(\"surfacecolor\",h||p);for(var d=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var v=\"projection.\"+d[g];f(v+\".show\")&&(f(v+\".opacity\"),f(v+\".scale\"))}var m=n.getComponentMethod(\"errorbars\",\"supplyDefaults\");m(t,e,h||p||r,{axis:\"z\"}),m(t,e,h||p||r,{axis:\"y\",inherit:\"z\"}),m(t,e,h||p||r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../lib\":515,\"../../registry\":647,\"../scatter/line_defaults\":949,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"./attributes\":964}],969:[function(t,e,r){\"use strict\";e.exports={plot:t(\"./convert\"),attributes:t(\"./attributes\"),markerSymbols:t(\"../../constants/gl3d_markers\"),supplyDefaults:t(\"./defaults\"),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:t(\"./calc\"),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../constants/gl3d_markers\":489,\"../../plots/gl3d\":607,\"./attributes\":964,\"./calc\":965,\"./convert\":967,\"./defaults\":968}],970:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../../plots/template_attributes\").texttemplateAttrs,s=t(\"../../components/colorscale/attributes\"),l=t(\"../../lib/extend\").extendFlat,u=n.marker,c=n.line,f=u.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),texttemplate:o({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),hovertext:l({},n.hovertext,{}),line:{color:c.color,width:c.width,dash:c.dash,backoff:c.backoff,shape:l({},c.shape,{values:[\"linear\",\"spline\"]}),smoothing:c.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:n.fillcolor,marker:l({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:l({width:f.width,editType:\"calc\"},s(\"marker.line\")),gradient:u.gradient,editType:\"calc\"},s(\"marker\")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron,hovertemplate:a()}},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936}],971:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,l=t(\"../carpet/lookup_carpetid\");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){var u;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var c,f,h=e._length,p=new Array(h),d=!1;for(u=0;u<h;u++)if(c=e.a[u],f=e.b[u],n(c)&&n(f)){var g=r.ab2xy(+c,+f,!0),v=r.isVisible(+c,+f);v||(d=!0),p[u]={x:g[0],y:g[1],a:c,b:f,vis:v}}else p[u]={x:!1,y:!1};return e._needsCull=d,p[0].carpet=r,p[0].trace=e,s(e,h),i(t,e),a(p,e),o(p,e),p}}},{\"../carpet/lookup_carpetid\":717,\"../scatter/arrays_to_calcdata\":935,\"../scatter/calc\":937,\"../scatter/calc_selection\":938,\"../scatter/colorscale_calc\":939,\"fast-isnumeric\":190}],972:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/constants\"),a=t(\"../scatter/subtypes\"),o=t(\"../scatter/marker_defaults\"),s=t(\"../scatter/line_defaults\"),l=t(\"../scatter/line_shape_defaults\"),u=t(\"../scatter/text_defaults\"),c=t(\"../scatter/fillcolor_defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}p(\"carpet\"),e.xaxis=\"x\",e.yaxis=\"y\";var d=p(\"a\"),g=p(\"b\"),v=Math.min(d.length,g.length);if(v){e._length=v,p(\"text\"),p(\"texttemplate\"),p(\"hovertext\"),p(\"mode\",v<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(s(t,e,r,h,p,{backoff:!0}),l(t,e,p),p(\"connectgaps\")),a.hasMarkers(e)&&o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&&u(t,e,h,p);var m=[];(a.hasMarkers(e)||a.hasText(e))&&(p(\"marker.maxdisplayed\"),m.push(\"points\")),p(\"fill\"),\"none\"!==e.fill&&(c(t,e,r,p),a.hasLines(e)||l(t,e,p)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||m.push(\"fills\"),\"fills\"!==p(\"hoveron\",m.join(\"+\")||\"points\")&&p(\"hovertemplate\"),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{\"../../lib\":515,\"../scatter/constants\":940,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/line_shape_defaults\":951,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"./attributes\":970}],973:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=n[i];return t.a=a.a,t.b=a.b,t.y=a.y,t}},{}],974:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r={},n=e._carpet,i=n.ab2ij([t.a,t.b]),a=Math.floor(i[0]),o=i[0]-a,s=Math.floor(i[1]),l=i[1]-s,u=n.evalxy([],a,s,o,l);return r.yLabel=u[1].toFixed(3),r}},{}],975:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\"),i=t(\"../../lib\").fillText;e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,u=t.xa._length,c=u*l/2,f=u-c;return s.x0=Math.max(Math.min(s.x0,f),c),s.x1=Math.max(Math.min(s.x1,f),c),o}var h=s.cd[s.index];s.a=h.a,s.b=h.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var p=s.trace,d=p._carpet,g=p._module.formatLabels(h,p);s.yLabel=g.yLabel,delete s.text;var v=[];if(!p.hovertemplate){var m=(h.hi||p.hoverinfo).split(\"+\");-1!==m.indexOf(\"all\")&&(m=[\"a\",\"b\",\"text\"]),-1!==m.indexOf(\"a\")&&y(d.aaxis,h.a),-1!==m.indexOf(\"b\")&&y(d.baxis,h.b),v.push(\"y: \"+s.yLabel),-1!==m.indexOf(\"text\")&&i(h,p,v),s.extraText=v.join(\"<br>\")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,v.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}}},{\"../../lib\":515,\"../scatter/hover\":947}],976:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":578,\"../scatter/marker_colorbar\":954,\"../scatter/select\":958,\"../scatter/style\":960,\"./attributes\":970,\"./calc\":971,\"./defaults\":972,\"./event_data\":973,\"./format_labels\":974,\"./hover\":975,\"./plot\":977}],977:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../components/drawing\");e.exports=function(t,e,r,o){var s,l,u,c=r[0][0].carpet,f=i.getFromId(t,c.xaxis||\"x\"),h=i.getFromId(t,c.yaxis||\"y\"),p={xaxis:f,yaxis:h,plot:e.plot};for(s=0;s<r.length;s++)(l=r[s][0].trace)._xA=f,l._yA=h;for(n(t,p,r,o),s=0;s<r.length;s++)l=r[s][0].trace,u=o.selectAll(\"g.trace\"+l.uid+\" .js-line\"),a.setClipUrl(u,r[s][0].carpet._clipPathId,t)}},{\"../../components/drawing\":389,\"../../plots/cartesian/axes\":566,\"../scatter/plot\":957}],978:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../scatter/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/colorscale/attributes\"),l=t(\"../../components/drawing/attributes\").dash,u=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll,f=a.marker,h=a.line,p=f.line;e.exports=c({lon:{valType:\"data_array\"},lat:{valType:\"data_array\"},locations:{valType:\"data_array\"},locationmode:{valType:\"enumerated\",values:[\"ISO-3\",\"USA-states\",\"country names\",\"geojson-id\"],dflt:\"ISO-3\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:{valType:\"string\",editType:\"calc\",dflt:\"id\"},mode:u({},a.mode,{dflt:\"markers\"}),text:u({},a.text,{}),texttemplate:i({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"location\",\"text\"]}),hovertext:u({},a.hovertext,{}),textfont:a.textfont,textposition:a.textposition,line:{color:h.color,width:h.width,dash:l},connectgaps:a.connectgaps,marker:u({symbol:f.symbol,opacity:f.opacity,angle:f.angle,angleref:u({},f.angleref,{values:[\"previous\",\"up\",\"north\"]}),standoff:f.standoff,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,colorbar:f.colorbar,line:u({width:p.width},s(\"marker.line\")),gradient:f.gradient},s(\"marker\")),fill:{valType:\"enumerated\",values:[\"none\",\"toself\"],dflt:\"none\"},fillcolor:a.fillcolor,selected:a.selected,unselected:a.unselected,hoverinfo:u({},o.hoverinfo,{flags:[\"lon\",\"lat\",\"location\",\"text\",\"name\"]}),hovertemplate:n()},\"calc\",\"nested\")},{\"../../components/colorscale/attributes\":374,\"../../components/drawing/attributes\":388,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936}],979:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../scatter/colorscale_calc\"),o=t(\"../scatter/arrays_to_calcdata\"),s=t(\"../scatter/calc_selection\"),l=t(\"../../lib\")._;function u(t){return t&&\"string\"==typeof t}e.exports=function(t,e){var r,c=Array.isArray(e.locations),f=c?e.locations.length:e._length,h=new Array(f);r=e.geojson?function(t){return u(t)||n(t)}:u;for(var p=0;p<f;p++){var d=h[p]={};if(c){var g=e.locations[p];d.loc=r(g)?g:null}else{var v=e.lon[p],m=e.lat[p];n(v)&&n(m)?d.lonlat=[+v,+m]:d.lonlat=[i,i]}}return o(h,e),a(t,e),s(h,e),f&&(h[0].t={labels:{lat:l(t,\"lat:\")+\" \",lon:l(t,\"lon:\")+\" \"}}),h}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../scatter/arrays_to_calcdata\":935,\"../scatter/calc_selection\":938,\"../scatter/colorscale_calc\":939,\"fast-isnumeric\":190}],980:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/text_defaults\"),l=t(\"../scatter/fillcolor_defaults\"),u=t(\"./attributes\");e.exports=function(t,e,r,c){function f(r,i){return n.coerce(t,e,u,r,i)}var h,p=f(\"locations\");if(p&&p.length){var d,g=f(\"geojson\");(\"string\"==typeof g&&\"\"!==g||n.isPlainObject(g))&&(d=\"geojson-id\"),\"geojson-id\"===f(\"locationmode\",d)&&f(\"featureidkey\"),h=p.length}else{var v=f(\"lon\")||[],m=f(\"lat\")||[];h=Math.min(v.length,m.length)}h?(e._length=h,f(\"text\"),f(\"hovertext\"),f(\"hovertemplate\"),f(\"mode\"),i.hasLines(e)&&(o(t,e,r,c,f),f(\"connectgaps\")),i.hasMarkers(e)&&a(t,e,r,c,f,{gradient:!0}),i.hasText(e)&&(f(\"texttemplate\"),s(t,e,c,f)),f(\"fill\"),\"none\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f)):e.visible=!1}},{\"../../lib\":515,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"./attributes\":978}],981:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){t.lon=e.lon,t.lat=e.lat,t.location=e.loc?e.loc:null;var a=n[i];return a.fIn&&a.fIn.properties&&(t.properties=a.fIn.properties),t}},{}],982:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r){var i={},a=r[e.geo]._subplot.mockAxis,o=t.lonlat;return i.lonLabel=n.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=n.tickText(a,a.c2l(o[1]),!0).text,i}},{\"../../plots/cartesian/axes\":566}],983:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../scatter/get_trace_color\"),o=t(\"../../lib\").fillText,s=t(\"./attributes\");e.exports=function(t,e,r){var l=t.cd,u=l[0].trace,c=t.xa,f=t.ya,h=t.subplot,p=h.projection.isLonLatOverEdges,d=h.project;if(n.getClosest(l,(function(t){var n=t.lonlat;if(n[0]===i)return 1/0;if(p(n))return 1/0;var a=d(n),o=d([e,r]),s=Math.abs(a[0]-o[0]),l=Math.abs(a[1]-o[1]),u=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-u,1-3/u)}),t),!1!==t.index){var g=l[t.index],v=g.lonlat,m=[c.c2p(v),f.c2p(v)],y=g.mrc||1;t.x0=m[0]-y,t.x1=m[0]+y,t.y0=m[1]-y,t.y1=m[1]+y,t.loc=g.loc,t.lon=v[0],t.lat=v[1];var x={};x[u.geo]={_subplot:h};var b=u._module.formatLabels(g,u,x);return t.lonLabel=b.lonLabel,t.latLabel=b.latLabel,t.color=a(u,g),t.extraText=function(t,e,r,n){if(!t.hovertemplate){var i=e.hi||t.hoverinfo,a=\"all\"===i?s.hoverinfo.flags:i.split(\"+\"),l=-1!==a.indexOf(\"location\")&&Array.isArray(t.locations),u=-1!==a.indexOf(\"lon\"),c=-1!==a.indexOf(\"lat\"),f=-1!==a.indexOf(\"text\"),h=[];return l?h.push(e.loc):u&&c?h.push(\"(\"+p(r.latLabel)+\", \"+p(r.lonLabel)+\")\"):u?h.push(n.lon+p(r.lonLabel)):c&&h.push(n.lat+p(r.latLabel)),f&&o(e,t,h),h.join(\"<br>\")}function p(t){return t+\"°\"}}(u,g,t,l[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}},{\"../../components/fx\":407,\"../../constants/numerical\":491,\"../../lib\":515,\"../scatter/get_trace_color\":946,\"./attributes\":978}],984:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),calcGeoJSON:t(\"./plot\").calcGeoJSON,plot:t(\"./plot\").plot,style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:t(\"../../plots/geo\"),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/geo\":598,\"../scatter/marker_colorbar\":954,\"../scatter/style\":960,\"./attributes\":978,\"./calc\":979,\"./defaults\":980,\"./event_data\":981,\"./format_labels\":982,\"./hover\":983,\"./plot\":985,\"./select\":986,\"./style\":987}],985:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../lib/topojson_utils\").getTopojsonFeatures,o=t(\"../../lib/geojson_utils\"),s=t(\"../../lib/geo_location_utils\"),l=t(\"../../plots/cartesian/autorange\").findExtremes,u=t(\"../../constants/numerical\").BADNUM,c=t(\"../scatter/calc\").calcMarkerSize,f=t(\"../scatter/subtypes\"),h=t(\"./style\");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d=\"geojson-id\"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r<h;r++){n=t[r];var g=\"geojson-id\"===p?n.fOut:s.locationToFeature(p,n.loc,d);n.lonlat=g?g.properties.ct:[u,u]}}var v,m,y={padded:!0};if(\"geojson\"===o.fitbounds&&\"geojson-id\"===i.locationmode){var x=s.computeBbox(s.getTraceGeojson(i));v=[x[0],x[2]],m=[x[1],x[3]]}else{for(v=new Array(h),m=new Array(h),r=0;r<h;r++)n=t[r],v[r]=n.lonlat[0],m[r]=n.lonlat[1];y.ppad=c(i,h)}i._extremes.lon=l(o.lonaxis._ax,v,y),i._extremes.lat=l(o.lataxis._ax,m,y)},plot:function(t,e,r){var a=e.layers.frontplot.select(\".scatterlayer\"),s=i.makeTraceGroups(a,r,\"trace scattergeo\");function l(t,e){t.lonlat[0]===u&&n.select(e).remove()}s.selectAll(\"*\").remove(),s.each((function(e){var r=n.select(this),a=e[0].trace;if(f.hasLines(a)||\"none\"!==a.fill){var s=o.calcTraceToLineCoords(e),u=\"none\"!==a.fill?o.makePolygon(s):o.makeLine(s);r.selectAll(\"path.js-line\").data([{geojson:u,trace:a}]).enter().append(\"path\").classed(\"js-line\",!0).style(\"stroke-miterlimit\",2)}f.hasMarkers(a)&&r.selectAll(\"path.point\").data(i.identity).enter().append(\"path\").classed(\"point\",!0).each((function(t){l(t,this)})),f.hasText(a)&&r.selectAll(\"g\").data(i.identity).enter().append(\"g\").append(\"text\").each((function(t){l(t,this)})),h(t,e)}))}}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../lib/geo_location_utils\":508,\"../../lib/geojson_utils\":509,\"../../lib/topojson_utils\":544,\"../../plots/cartesian/autorange\":565,\"../scatter/calc\":937,\"../scatter/subtypes\":961,\"./style\":987,\"@plotly/d3\":58}],986:[function(t,e,r){\"use strict\";var n=t(\"../scatter/subtypes\"),i=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e){var r,a,o,s,l,u=t.cd,c=t.xaxis,f=t.yaxis,h=[],p=u[0].trace;if(!n.hasMarkers(p)&&!n.hasText(p))return[];if(!1===e)for(l=0;l<u.length;l++)u[l].selected=0;else for(l=0;l<u.length;l++)(a=(r=u[l]).lonlat)[0]!==i&&(o=c.c2p(a),s=f.c2p(a),e.contains([o,s],null,l,t)?(h.push({pointNumber:l,lon:a[0],lat:a[1]}),r.selected=1):r.selected=0);return h}},{\"../../constants/numerical\":491,\"../scatter/subtypes\":961}],987:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/color\"),o=t(\"../scatter/style\"),s=o.stylePoints,l=o.styleText;e.exports=function(t,e){e&&function(t,e){var r=e[0].trace,o=e[0].node3;o.style(\"opacity\",e[0].trace.opacity),s(o,r,t),l(o,r,t),o.selectAll(\"path.js-line\").style(\"fill\",\"none\").each((function(t){var e=n.select(this),r=t.trace,o=r.line||{};e.call(a.stroke,o.color).call(i.dashLine,o.dash||\"\",o.width||0),\"none\"!==r.fill&&e.call(a.fill,r.fillcolor)}))}(t,e)}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../scatter/style\":960,\"@plotly/d3\":58}],988:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../scatter/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../components/colorscale/attributes\"),s=t(\"../../lib/sort_object_keys\"),l=t(\"../../lib/extend\").extendFlat,u=t(\"../../plot_api/edit_types\").overrideAll,c=t(\"./constants\").DASHES,f=i.line,h=i.marker,p=h.line,d=e.exports=u({x:i.x,x0:i.x0,dx:i.dx,y:i.y,y0:i.y0,dy:i.dy,xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),text:i.text,hovertext:i.hovertext,textposition:i.textposition,textfont:i.textfont,mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"]},line:{color:f.color,width:f.width,shape:{valType:\"enumerated\",values:[\"linear\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},dash:{valType:\"enumerated\",values:s(c),dflt:\"solid\"}},marker:l({},o(\"marker\"),{symbol:h.symbol,angle:h.angle,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:h.opacity,colorbar:h.colorbar,line:l({},o(\"marker.line\"),{width:p.width})}),connectgaps:i.connectgaps,fill:l({},i.fill,{dflt:\"none\"}),fillcolor:i.fillcolor,selected:{marker:i.selected.marker,textfont:i.selected.textfont},unselected:{marker:i.unselected.marker,textfont:i.unselected.textfont},opacity:n.opacity},\"calc\",\"nested\");d.x.editType=d.y.editType=d.x0.editType=d.y0.editType=\"calc+clearAxisTypes\",d.hovertemplate=i.hovertemplate,d.texttemplate=i.texttemplate},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../lib/sort_object_keys\":538,\"../../plot_api/edit_types\":548,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../scatter/attributes\":936,\"./constants\":991}],989:[function(t,e,r){\"use strict\";var n=t(\"./hover\");e.exports={moduleType:\"trace\",name:\"scattergl\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../scatter/cross_trace_defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),hoverPoints:n.hoverPoints,selectPoints:t(\"./select\"),meta:{}}},{\"../../plots/cartesian\":578,\"../scatter/cross_trace_defaults\":942,\"../scatter/marker_colorbar\":954,\"./attributes\":988,\"./calc\":990,\"./defaults\":993,\"./format_labels\":995,\"./hover\":997,\"./select\":1001}],990:[function(t,e,r){\"use strict\";var n=t(\"@plotly/point-cluster\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../plots/cartesian/autorange\").findExtremes,s=t(\"../../plots/cartesian/align_period\"),l=t(\"../scatter/calc\"),u=l.calcMarkerSize,c=l.calcAxisExpansion,f=l.setFirstScatter,h=t(\"../scatter/colorscale_calc\"),p=t(\"./convert\"),d=t(\"./scene_update\"),g=t(\"../../constants/numerical\").BADNUM,v=t(\"./constants\").TOO_MANY_POINTS;function m(t,e,r){var n=t._extremes[e._id],i=o(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}e.exports=function(t,e){var r,o=t._fullLayout,l=e._xA=a.getFromId(t,e.xaxis,\"x\"),y=e._yA=a.getFromId(t,e.yaxis,\"y\"),x=o._plots[e.xaxis+e.yaxis],b=e._length,_=b>=v,w=2*b,k={},T=l.makeCalcdata(e,\"x\"),M=y.makeCalcdata(e,\"y\"),A=s(e,l,\"x\",T),S=s(e,y,\"y\",M),E=A.vals,C=S.vals;e._x=E,e._y=C,e.xperiodalignment&&(e._origX=T,e._xStarts=A.starts,e._xEnds=A.ends),e.yperiodalignment&&(e._origY=M,e._yStarts=S.starts,e._yEnds=S.ends);var L=new Array(w),P=new Array(b);for(r=0;r<b;r++)L[2*r]=E[r]===g?NaN:E[r],L[2*r+1]=C[r]===g?NaN:C[r],P[r]=r;if(\"log\"===l.type)for(r=0;r<w;r+=2)L[r]=l.c2l(L[r]);if(\"log\"===y.type)for(r=1;r<w;r+=2)L[r]=y.c2l(L[r]);_&&\"log\"!==l.type&&\"log\"!==y.type?k.tree=n(L):k.ids=P,h(t,e);var O,I=function(t,e,r,n,a,o){var s=p.style(t,r);if(s.marker&&(s.marker.positions=n),s.line&&n.length>1&&i.extendFlat(s.line,p.linePositions(t,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,L,E,C),D=d(t,x);return f(o,e),_?I.marker&&(O=I.marker.sizeAvg||Math.max(I.marker.size,3)):O=u(e,b),c(t,e,l,y,E,C,O),I.errorX&&m(e,l,I.errorX),I.errorY&&m(e,y,I.errorY),I.fill&&!D.fill2d&&(D.fill2d=!0),I.marker&&!D.scatter2d&&(D.scatter2d=!0),I.line&&!D.line2d&&(D.line2d=!0),!I.errorX&&!I.errorY||D.error2d||(D.error2d=!0),I.text&&!D.glText&&(D.glText=!0),I.marker&&(I.marker.snap=b),D.lineOptions.push(I.line),D.errorXOptions.push(I.errorX),D.errorYOptions.push(I.errorY),D.fillOptions.push(I.fill),D.markerOptions.push(I.marker),D.markerSelectedOptions.push(I.markerSel),D.markerUnselectedOptions.push(I.markerUnsel),D.textOptions.push(I.text),D.textSelectedOptions.push(I.textSel),D.textUnselectedOptions.push(I.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),k._scene=D,k.index=D.count,k.x=E,k.y=C,k.positions=L,D.count++,[{x:!1,y:!1,t:k,trace:e}]}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/autorange\":565,\"../../plots/cartesian/axis_ids\":570,\"../scatter/calc\":937,\"../scatter/colorscale_calc\":939,\"./constants\":991,\"./convert\":992,\"./scene_update\":1e3,\"@plotly/point-cluster\":59}],991:[function(t,e,r){\"use strict\";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],992:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"svg-path-sdf\"),a=t(\"color-normalize\"),o=t(\"../../registry\"),s=t(\"../../lib\"),l=t(\"../../components/drawing\"),u=t(\"../../plots/cartesian/axis_ids\"),c=t(\"../../lib/gl_format_color\").formatColor,f=t(\"../scatter/subtypes\"),h=t(\"../scatter/make_bubble_size_func\"),p=t(\"./helpers\"),d=t(\"./constants\"),g=t(\"../../constants/interactions\").DESELECTDIM,v={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},m=t(\"../../components/fx/helpers\").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,u=Array.isArray(l)?l:[l],c=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var v=i._d3locale,y=Array.isArray(g),x=y?Math.min(g.length,a):a,b=y?function(t){return g[t]}:function(){return g};for(r=0;r<x;r++){var _={i:r},w=e._module.formatLabels(_,e,i),k={};m(k,e,r);var T=e._meta||{};p.text.push(s.texttemplateString(b(r),w,v,k,_,T))}}else Array.isArray(e.text)&&e.text.length<a?p.text=e.text.slice():p.text=e.text;if(Array.isArray(p.text))for(r=p.text.length;r<a;r++)p.text[r]=\"\";for(p.opacity=e.opacity,p.font={},p.align=[],p.baseline=[],r=0;r<u.length;r++){var M=u[r].split(/\\s+/);switch(M[1]){case\"left\":p.align.push(\"right\");break;case\"right\":p.align.push(\"left\");break;default:p.align.push(M[1])}switch(M[0]){case\"top\":p.baseline.push(\"bottom\");break;case\"bottom\":p.baseline.push(\"top\");break;default:p.baseline.push(M[0])}}if(Array.isArray(c))for(p.color=new Array(a),r=0;r<a;r++)p.color[r]=c[r];else p.color=c;if(s.isArrayOrTypedArray(f)||Array.isArray(h))for(p.font=new Array(a),r=0;r<a;r++){var A=p.font[r]={};A.size=(s.isTypedArray(f)?f[r]:Array.isArray(f)?n(f[r])?f[r]:0:f)*d,A.family=Array.isArray(h)?h[r]:h}else p.font={size:f*d,family:h};return p}function x(t,e){var r,n,i=e._length,o=e.marker,l={},u=s.isArrayOrTypedArray(o.symbol),f=s.isArrayOrTypedArray(o.angle),d=s.isArrayOrTypedArray(o.color),g=s.isArrayOrTypedArray(o.line.color),v=s.isArrayOrTypedArray(o.opacity),m=s.isArrayOrTypedArray(o.size),y=s.isArrayOrTypedArray(o.line.width);if(u||(n=p.isOpenSymbol(o.symbol)),u||d||g||v||f){l.symbols=new Array(i),l.angles=new Array(i),l.colors=new Array(i),l.borderColors=new Array(i);var x=o.symbol,b=o.angle,_=c(o,o.opacity,i),w=c(o.line,o.opacity,i);if(!Array.isArray(w[0])){var k=w;for(w=Array(i),r=0;r<i;r++)w[r]=k}if(!Array.isArray(_[0])){var T=_;for(_=Array(i),r=0;r<i;r++)_[r]=T}if(!Array.isArray(x)){var M=x;for(x=Array(i),r=0;r<i;r++)x[r]=M}if(!Array.isArray(b)){var A=b;for(b=Array(i),r=0;r<i;r++)b[r]=A}for(l.symbols=x,l.angles=b,l.colors=_,l.borderColors=w,r=0;r<i;r++)u&&(n=p.isOpenSymbol(o.symbol[r])),n&&(w[r]=_[r].slice(),_[r]=_[r].slice(),_[r][3]=0);for(l.opacity=e.opacity,l.markers=new Array(i),r=0;r<i;r++)l.markers[r]=E({mx:l.symbols[r],ma:l.angles[r]},e)}else n?(l.color=a(o.color,\"uint8\"),l.color[3]=0,l.borderColor=a(o.color,\"uint8\")):(l.color=a(o.color,\"uint8\"),l.borderColor=a(o.line.color,\"uint8\")),l.opacity=e.opacity*o.opacity,l.marker=E({mx:o.symbol,ma:o.angle},e);var S,C=h(e,1);if(m||y){var L,P=l.sizes=new Array(i),O=l.borderSizes=new Array(i),I=0;if(m){for(r=0;r<i;r++)P[r]=C(o.size[r]),I+=P[r];L=I/i}else for(S=C(o.size),r=0;r<i;r++)P[r]=S;if(y)for(r=0;r<i;r++)O[r]=o.line.width[r];else for(S=o.line.width,r=0;r<i;r++)O[r]=S;l.sizeAvg=L}else l.size=C(o&&o.size||10),l.borderSizes=C(o.line.width);return l}function b(t,e,r){var n=e.marker,i={};return r?(r.marker&&r.marker.symbol?i=x(0,s.extendFlat({},n,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),void 0!==r.marker.opacity&&(i.opacity=r.marker.opacity)),i):i}function _(t,e,r){var n={};if(!r)return n;if(r.textfont){var i={opacity:1,text:e.text,texttemplate:e.texttemplate,textposition:e.textposition,textfont:s.extendFlat({},e.textfont)};r.textfont&&s.extendFlat(i.textfont,r.textfont),n=y(t,i)}return n}function w(t,e,r){var n={capSize:2*e.width*r,lineWidth:e.thickness*r,color:e.color};return e.copy_ystyle&&(n=t.error_y),n}var k=d.SYMBOL_SDF_SIZE,T=d.SYMBOL_SIZE,M=d.SYMBOL_STROKE,A={},S=l.symbolFuncs[0](.05*T);function E(t,e){var r,n,a=t.mx;if(\"circle\"===a)return null;var o=l.symbolNumber(a),s=l.symbolFuncs[o%100],u=!!l.symbolNoDot[o%100],c=!!l.symbolNoFill[o%100],f=p.isDotSymbol(a);if(t.ma&&(a+=\"_\"+t.ma),A[a])return A[a];var h=l.getMarkerAngle(t,e);return r=f&&!u?s(1.1*T,h)+S:s(T,h),n=i(r,{w:k,h:k,viewBox:[-T,-T,T,T],stroke:c?M:-M}),A[a]=n,n||null}e.exports={style:function(t,e){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=t._context.plotGlPixelRatio;if(!0!==e.visible)return n;if(f.hasText(e)&&(n.text=y(t,e),n.textSel=_(t,e,e.selected),n.textUnsel=_(t,e,e.unselected)),f.hasMarkers(e)&&(n.marker=x(0,e),n.markerSel=b(0,e,e.selected),n.markerUnsel=b(0,e,e.unselected),!e.unselected&&s.isArrayOrTypedArray(e.marker.opacity))){var a=e.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r<a.length;r++)n.markerUnsel.opacity[r]=g*a[r]}if(f.hasLines(e)){n.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(d.DASHES[e.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=e.line.width*i;n.line.dashes=o}return e.error_x&&e.error_x.visible&&(n.errorX=w(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(n.errorY=w(e,e.error_y,i)),e.fill&&\"none\"!==e.fill&&(n.fill={closed:!0,fill:e.fillcolor,thickness:0}),n},markerStyle:x,markerSelection:b,linePositions:function(t,e,r){var n,i,a=r.length,o=a/2;if(f.hasLines(e)&&o)if(\"hv\"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i+2],r[2*i+1]));n.push(r[a-2],r[a-1])}else if(\"hvh\"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var s=(r[2*i]+r[2*i+2])/2;n.push(r[2*i],r[2*i+1],s,r[2*i+1],s,r[2*i+3])}n.push(r[a-2],r[a-1])}else if(\"vhv\"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var l=(r[2*i+1]+r[2*i+3])/2;n.push(r[2*i],r[2*i+1],r[2*i],l,r[2*i+2],l)}n.push(r[a-2],r[a-1])}else if(\"vh\"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+3]));n.push(r[a-2],r[a-1])}else n=r;var u=!1;for(i=0;i<n.length;i++)if(isNaN(n[i])){u=!0;break}var c=u||n.length>d.TOO_MANY_POINTS||f.hasMarkers(e)?\"rect\":\"round\";if(u&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i<n.length;i+=2)isNaN(n[i])||isNaN(n[i+1])?(n[i]=h,n[i+1]=p):(h=n[i],p=n[i+1])}return{join:c,positions:n}},errorBarPositions:function(t,e,r,i,a){var s=o.getComponentMethod(\"errorbars\",\"makeComputeError\"),l=u.getFromId(t,e.xaxis,\"x\"),c=u.getFromId(t,e.yaxis,\"y\"),f=r.length/2,h={};function p(t,i){var a=i._id.charAt(0),o=e[\"error_\"+a];if(o&&o.visible&&(\"linear\"===i.type||\"log\"===i.type)){for(var l=s(o),u={x:0,y:1}[a],c={x:[0,1,2,3],y:[2,3,0,1]}[a],p=new Float64Array(4*f),d=1/0,g=-1/0,v=0,m=0;v<f;v++,m+=4){var y=t[v];if(n(y)){var x=r[2*v+u],b=l(y,v),_=b[0],w=b[1];if(n(_)&&n(w)){var k=y-_,T=y+w;p[m+c[0]]=x-i.c2l(k),p[m+c[1]]=i.c2l(T)-x,p[m+c[2]]=0,p[m+c[3]]=0,d=Math.min(d,y-_),g=Math.max(g,y+w)}}}h[a]={positions:r,errors:p,_bnds:[d,g]}}}return p(i,l),p(a,c),h},textPosition:function(t,e,r,n){var i,a=e._length,o={};if(f.hasMarkers(e)){var s=r.font,l=r.align,u=r.baseline;for(o.offset=new Array(a),i=0;i<a;i++){var c=n.sizes?n.sizes[i]:n.size,h=Array.isArray(s)?s[i].size:s.size,p=Array.isArray(l)?l.length>1?l[i]:l[0]:l,d=Array.isArray(u)?u.length>1?u[i]:u[0]:u,g=v[p],m=v[d],y=c?c/.8+1:0,x=-m*y-.5*m;o.offset[i]=[g*y/h,x/h]}}return o}}},{\"../../components/drawing\":389,\"../../components/fx/helpers\":403,\"../../constants/interactions\":490,\"../../lib\":515,\"../../lib/gl_format_color\":511,\"../../plots/cartesian/axis_ids\":570,\"../../registry\":647,\"../scatter/make_bubble_size_func\":953,\"../scatter/subtypes\":961,\"./constants\":991,\"./helpers\":996,\"color-normalize\":89,\"fast-isnumeric\":190,\"svg-path-sdf\":311}],993:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\"),a=t(\"./helpers\"),o=t(\"./attributes\"),s=t(\"../scatter/constants\"),l=t(\"../scatter/subtypes\"),u=t(\"../scatter/xy_defaults\"),c=t(\"../scatter/period_defaults\"),f=t(\"../scatter/marker_defaults\"),h=t(\"../scatter/line_defaults\"),p=t(\"../scatter/fillcolor_defaults\"),d=t(\"../scatter/text_defaults\");e.exports=function(t,e,r,g){function v(r,i){return n.coerce(t,e,o,r,i)}var m=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=u(t,e,g,v);if(x){c(t,e,g,v),v(\"xhoverformat\"),v(\"yhoverformat\");var b=x<s.PTS_LINESONLY?\"lines+markers\":\"lines\";v(\"text\"),v(\"hovertext\"),v(\"hovertemplate\"),v(\"mode\",b),l.hasLines(e)&&(v(\"connectgaps\"),h(t,e,r,g,v),v(\"line.shape\")),l.hasMarkers(e)&&(f(t,e,r,g,v,{noAngleRef:!0,noStandOff:!0}),v(\"marker.line.width\",m||y?1:0)),l.hasText(e)&&(v(\"texttemplate\"),d(t,e,g,v));var _=(e.line||{}).color,w=(e.marker||{}).color;v(\"fill\"),\"none\"!==e.fill&&p(t,e,r,v);var k=i.getComponentMethod(\"errorbars\",\"supplyDefaults\");k(t,e,_||w||r,{axis:\"y\"}),k(t,e,_||w||r,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,v)}else e.visible=!1}},{\"../../lib\":515,\"../../registry\":647,\"../scatter/constants\":940,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/marker_defaults\":955,\"../scatter/period_defaults\":956,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"../scatter/xy_defaults\":963,\"./attributes\":988,\"./helpers\":996}],994:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../constants/interactions\").DESELECTDIM;e.exports={styleTextSelection:function(t){var e,r,o=t[0],s=o.trace,l=o.t,u=l._scene,c=l.index,f=u.selectBatch[c],h=u.unselectBatch[c],p=u.textOptions[c],d=u.textSelectedOptions[c]||{},g=u.textUnselectedOptions[c]||{},v=n.extendFlat({},p);if(f.length||h.length){var m=d.color,y=g.color,x=p.color,b=Array.isArray(x);for(v.color=new Array(s._length),e=0;e<f.length;e++)r=f[e],v.color[r]=m||(b?x[r]:x);for(e=0;e<h.length;e++){r=h[e];var _=b?x[r]:x;v.color[r]=y||(m?_:i.addOpacity(_,a))}}u.glText[c].update(v)}}},{\"../../components/color\":367,\"../../constants/interactions\":490,\"../../lib\":515}],995:[function(t,e,r){\"use strict\";var n=t(\"../scatter/format_labels\");e.exports=function(t,e,r){var i=t.i;return\"x\"in t||(t.x=e._x[i]),\"y\"in t||(t.y=e._y[i]),n(t,e,r)}},{\"../scatter/format_labels\":945}],996:[function(t,e,r){\"use strict\";var n=t(\"./constants\");r.isOpenSymbol=function(t){return\"string\"==typeof t?n.OPEN_RE.test(t):t%200>100},r.isDotSymbol=function(t){return\"string\"==typeof t?n.DOT_RE.test(t):t>200}},{\"./constants\":991}],997:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\");function o(t,e,r,o){var s=t.xa,l=t.ya,u=t.distance,c=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.ma=i.isArrayOrTypedArray(d.angle)?d.angle[f]:d.angle,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var v=d&&d.gradient;v&&\"none\"!==v.type&&(h.mgt=Array.isArray(v.type)?v.type[f]:v.type,h.mgc=Array.isArray(v.color)?v.color[f]:v.color);var m=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var k={};k[t.index]=h;var T=o._origX,M=o._origY,A=i.extendFlat({},t,{color:a(o,h),x0:m-x,x1:m+x,xLabelVal:T?T[f]:h.x,y0:y-x,y1:y+x,yLabelVal:M?M[f]:h.y,cd:k,distance:u,spikeDistance:c,hovertemplate:h.ht});return h.htx?A.text=h.htx:h.tx?A.text=h.tx:o.text&&(A.text=o.text),i.fillText(h,o,A),n.getComponentMethod(\"errorbars\",\"hoverInfo\")(h,o,A),A}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,u,c,f,h,p,d,g=t.cd,v=g[0].t,m=g[0].trace,y=t.xa,x=t.ya,b=v.x,_=v.y,w=y.c2p(e),k=x.c2p(r),T=t.distance;if(v.tree){var M=y.p2c(w-T),A=y.p2c(w+T),S=x.p2c(k-T),E=x.p2c(k+T);i=\"x\"===n?v.tree.range(Math.min(M,A),Math.min(x._rl[0],x._rl[1]),Math.max(M,A),Math.max(x._rl[0],x._rl[1])):v.tree.range(Math.min(M,A),Math.min(S,E),Math.max(M,A),Math.max(S,E))}else i=v.ids;var C=T;if(\"x\"===n){var L=!!m.xperiodalignment,P=!!m.yperiodalignment;for(c=0;c<i.length;c++){if(l=b[a=i[c]],f=Math.abs(y.c2p(l)-w),L){var O=y.c2p(m._xStarts[a]),I=y.c2p(m._xEnds[a]);f=w>=Math.min(O,I)&&w<=Math.max(O,I)?0:1/0}if(f<C){if(C=f,u=_[a],h=x.c2p(u)-k,P){var D=x.c2p(m._yStarts[a]),z=x.c2p(m._yEnds[a]);h=k>=Math.min(D,z)&&k<=Math.max(D,z)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[c]}}}else for(c=i.length-1;c>-1;c--)l=b[a=i[c]],u=_[a],f=y.c2p(l)-w,h=x.c2p(u)-k,(p=Math.sqrt(f*f+h*h))<C&&(C=d=p,s=a);return t.index=s,t.distance=C,t.dxy=d,void 0===s?[t]:[o(t,b,_,m)]},calcHover:o}},{\"../../lib\":515,\"../../registry\":647,\"../scatter/get_trace_color\":946}],998:[function(t,e,r){arguments[4][905][0].apply(r,arguments)},{\"./base_index\":989,\"./plot\":999,dup:905}],999:[function(t,e,r){\"use strict\";var n=t(\"regl-scatter2d\"),i=t(\"regl-line2d\"),a=t(\"regl-error2d\"),o=t(\"gl-text\"),s=t(\"../../lib\"),l=t(\"../../components/dragelement/helpers\").selectMode,u=t(\"../../lib/prepare_regl\"),c=t(\"../scatter/subtypes\"),f=t(\"../scatter/link_traces\"),h=t(\"./edit_style\").styleTextSelection,p={};function d(t,e,r,n){var i=t._size,a=t.width*n,o=t.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+e.domain[0]*f,l+r.domain[0]*h,a-u-(1-e.domain[1])*f,o-c-(1-r.domain[1])*h]}(e.exports=function(t,e,r){if(r.length){var g,v,m=t._fullLayout,y=e._scene,x=e.xaxis,b=e.yaxis;if(y)if(u(t,[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],p)){var _=y.count,w=m._glcanvas.data()[0].regl;if(f(t,e,r),y.dirty){if(!0===y.error2d&&(y.error2d=a(w)),!0===y.line2d&&(y.line2d=i(w)),!0===y.scatter2d&&(y.scatter2d=n(w)),!0===y.fill2d&&(y.fill2d=i(w)),!0===y.glText)for(y.glText=new Array(_),g=0;g<_;g++)y.glText[g]=new o(w);if(y.glText){if(_>y.glText.length){var k=_-y.glText.length;for(g=0;g<k;g++)y.glText.push(new o(w))}else if(_<y.glText.length){var T=y.glText.length-_;y.glText.splice(_,T).forEach((function(t){t.destroy()}))}for(g=0;g<_;g++)y.glText[g].update(y.textOptions[g])}if(y.line2d&&(y.line2d.update(y.lineOptions),y.lineOptions=y.lineOptions.map((function(t){if(t&&t.positions){for(var e=t.positions,r=0;r<e.length&&(isNaN(e[r])||isNaN(e[r+1]));)r+=2;for(var n=e.length-2;n>r&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),y.line2d.update(y.lineOptions)),y.error2d){var M=(y.errorXOptions||[]).concat(y.errorYOptions||[]);y.error2d.update(M)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=s.repeat(null,_),y.fill2d&&(y.fillOptions=y.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,u=y.lineOptions[e],c=[];s._ownfill&&c.push(e),s._nexttrace&&c.push(e+1),c.length&&(y.fillOrder[e]=c);var f,h,p=[],d=u&&u.positions||l.positions;if(\"tozeroy\"===s.fill){for(f=0;f<d.length&&isNaN(d[f+1]);)f+=2;for(h=d.length-2;h>f&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if(\"tozerox\"===s.fill){for(f=0;f<d.length&&isNaN(d[f]);)f+=2;for(h=d.length-2;h>f&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if(\"toself\"===s.fill||\"tonext\"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a<d.length;a+=2)(isNaN(d[a])||isNaN(d[a+1]))&&((p=p.concat(d.slice(i,a))).push(d[i],d[i+1]),p.push(null,null),i=a+2);p=p.concat(d.slice(i)),i&&p.push(d[i],d[i+1])}else{var g=s._nexttrace;if(g){var v=y.lineOptions[e+1];if(v){var m=v.positions;if(\"tonexty\"===s.fill){for(p=d.slice(),e=Math.floor(m.length/2);e--;){var x=m[2*e],b=m[2*e+1];isNaN(x)||isNaN(b)||p.push(x,b)}t.fill=g.fillcolor}}}}if(s._prevtrace&&\"tonext\"===s._prevtrace.fill){var _=y.lineOptions[e-1].positions,w=p.length/2,k=[i=w];for(a=0;a<_.length;a+=2)(isNaN(_[a])||isNaN(_[a+1]))&&(k.push(a/2+w+1),i=a+2);p=p.concat(_),t.hole=k}return t.fillmode=s.fill,t.opacity=s.opacity,t.positions=p,t}})),y.fill2d.update(y.fillOptions))}var A=m.dragmode,S=l(A),E=m.clickmode.indexOf(\"select\")>-1;for(g=0;g<_;g++){var C=r[g][0],L=C.trace,P=C.t,O=P.index,I=L._length,D=P.x,z=P.y;if(L.selectedpoints||S||E){if(S||(S=!0),L.selectedpoints){var R=y.selectBatch[O]=s.selIndices2selPoints(L),F={};for(v=0;v<R.length;v++)F[R[v]]=1;var N=[];for(v=0;v<I;v++)F[v]||N.push(v);y.unselectBatch[O]=N}var B=P.xpx=new Array(I),j=P.ypx=new Array(I);for(v=0;v<I;v++)B[v]=x.c2p(D[v]),j[v]=b.c2p(z[v])}else P.xpx=P.ypx=null}if(S){if(y.select2d||(y.select2d=n(m._glcanvas.data()[1].regl)),y.scatter2d){var U=new Array(_);for(g=0;g<_;g++)U[g]=y.selectBatch[g].length||y.unselectBatch[g].length?y.markerUnselectedOptions[g]:{};y.scatter2d.update(U)}y.select2d&&(y.select2d.update(y.markerOptions),y.select2d.update(y.markerSelectedOptions)),y.glText&&r.forEach((function(t){var e=((t||[])[0]||{}).trace||{};c.hasText(e)&&h(t)}))}else y.scatter2d&&y.scatter2d.update(y.markerOptions);var V={viewport:d(m,x,b,t._context.plotGlPixelRatio),range:[(x._rl||x.range)[0],(b._rl||b.range)[0],(x._rl||x.range)[1],(b._rl||b.range)[1]]},H=s.repeat(V,y.count);y.fill2d&&y.fill2d.update(H),y.line2d&&y.line2d.update(H),y.error2d&&y.error2d.update(H.concat(H)),y.scatter2d&&y.scatter2d.update(H),y.select2d&&y.select2d.update(H),y.glText&&y.glText.forEach((function(t){t.update(V)}))}else y.init()}}).reglPrecompiled=p},{\"../../components/dragelement/helpers\":385,\"../../lib\":515,\"../../lib/prepare_regl\":528,\"../scatter/link_traces\":952,\"../scatter/subtypes\":961,\"./edit_style\":994,\"gl-text\":225,\"regl-error2d\":280,\"regl-line2d\":281,\"regl-scatter2d\":282}],1e3:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){var r=e._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return e._scene||((r=e._scene={}).init=function(){n.extendFlat(r,a,i)},r.init(),r.update=function(t){var e=n.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var i=0;i<r.count;i++)r.glText[i].update(t)},r.draw=function(){for(var t=r.count,e=r.fill2d,i=r.error2d,a=r.line2d,o=r.scatter2d,s=r.glText,l=r.select2d,u=r.selectBatch,c=r.unselectBatch,f=0;f<t;f++){if(e&&r.fillOrder[f]&&e.draw(r.fillOrder[f]),a&&r.lineOptions[f]&&a.draw(f),i&&(r.errorXOptions[f]&&i.draw(f),r.errorYOptions[f]&&i.draw(f+t)),o&&r.markerOptions[f])if(c[f].length){var h=n.repeat([],r.count);h[f]=c[f],o.draw(h)}else u[f].length||o.draw(f);s[f]&&r.textOptions[f]&&s[f].render()}l&&l.draw(u),r.dirty=!1},r.destroy=function(){r.fill2d&&r.fill2d.destroy&&r.fill2d.destroy(),r.scatter2d&&r.scatter2d.destroy&&r.scatter2d.destroy(),r.error2d&&r.error2d.destroy&&r.error2d.destroy(),r.line2d&&r.line2d.destroy&&r.line2d.destroy(),r.select2d&&r.select2d.destroy&&r.select2d.destroy(),r.glText&&r.glText.forEach((function(t){t.destroy&&t.destroy()})),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.markerSelectedOptions=null,r.markerUnselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.textOptions=null,r.textSelectedOptions=null,r.textUnselectedOptions=null,r.selectBatch=null,r.unselectBatch=null,e._scene=null}),r.dirty||n.extendFlat(r,i),r}},{\"../../lib\":515}],1001:[function(t,e,r){\"use strict\";var n=t(\"../scatter/subtypes\"),i=t(\"./edit_style\").styleTextSelection;e.exports=function(t,e){var r=t.cd,a=t.xaxis,o=t.yaxis,s=[],l=r[0].trace,u=r[0].t,c=l._length,f=u.x,h=u.y,p=u._scene,d=u.index;if(!p)return s;var g=n.hasText(l),v=n.hasMarkers(l),m=!v&&!g;if(!0!==l.visible||m)return s;var y=[],x=[];if(!1!==e&&!e.degenerate)for(var b=0;b<c;b++)e.contains([u.xpx[b],u.ypx[b]],!1,b,t)?(y.push(b),s.push({pointNumber:b,x:a.c2d(f[b]),y:o.c2d(h[b])})):x.push(b);if(v){var _=p.scatter2d;if(y.length||x.length){if(!p.selectBatch[d].length&&!p.unselectBatch[d].length){var w=new Array(p.count);w[d]=p.markerUnselectedOptions[d],_.update.apply(_,w)}}else{var k=new Array(p.count);k[d]=p.markerOptions[d],_.update.apply(_,k)}}return p.selectBatch[d]=y,p.unselectBatch[d]=x,g&&i(r),s}},{\"../scatter/subtypes\":961,\"./edit_style\":994}],1002:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../scattergeo/attributes\"),o=t(\"../scatter/attributes\"),s=t(\"../../plots/mapbox/layout_attributes\"),l=t(\"../../plots/attributes\"),u=t(\"../../components/colorscale/attributes\"),c=t(\"../../lib/extend\").extendFlat,f=t(\"../../plot_api/edit_types\").overrideAll,h=t(\"../../plots/mapbox/layout_attributes\"),p=a.line,d=a.marker;e.exports=f({lon:a.lon,lat:a.lat,cluster:{enabled:{valType:\"boolean\"},maxzoom:c({},h.layers.maxzoom,{}),step:{valType:\"number\",arrayOk:!0,dflt:-1,min:-1},size:{valType:\"number\",arrayOk:!0,dflt:20,min:0},color:{valType:\"color\",arrayOk:!0},opacity:c({},d.opacity,{dflt:1})},mode:c({},o.mode,{dflt:\"markers\"}),text:c({},o.text,{}),texttemplate:i({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"text\"]}),hovertext:c({},o.hovertext,{}),line:{color:p.color,width:p.width},connectgaps:o.connectgaps,marker:c({symbol:{valType:\"string\",dflt:\"circle\",arrayOk:!0},angle:{valType:\"number\",dflt:\"auto\",arrayOk:!0},allowoverlap:{valType:\"boolean\",dflt:!1},opacity:d.opacity,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode},u(\"marker\")),fill:a.fill,fillcolor:o.fillcolor,textfont:s.layers.symbol.textfont,textposition:s.layers.symbol.textposition,below:{valType:\"string\"},selected:{marker:o.selected.marker},unselected:{marker:o.unselected.marker},hoverinfo:c({},l.hoverinfo,{flags:[\"lon\",\"lat\",\"text\",\"name\"]}),hovertemplate:n()},\"calc\",\"nested\")},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/attributes\":562,\"../../plots/mapbox/layout_attributes\":624,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936,\"../scattergeo/attributes\":978}],1003:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM,o=t(\"../../lib/geojson_utils\"),s=t(\"../../components/colorscale\"),l=t(\"../../components/drawing\"),u=t(\"../scatter/make_bubble_size_func\"),c=t(\"../scatter/subtypes\"),f=t(\"../../plots/mapbox/convert_text_opts\"),h=t(\"../../components/fx/helpers\").appendArrayPointValue,p=t(\"../../lib/svg_text_utils\").NEWLINES,d=t(\"../../lib/svg_text_utils\").BR_TAG_ALL;function g(t){return{type:t,geojson:o.makeBlank(),layout:{visibility:\"none\"},filter:null,paint:{}}}function v(t,e){return i.isArrayOrTypedArray(t)?e?function(e){return n(t[e])?+t[e]:0}:function(e){return t[e]}:t?function(){return t}:m}function m(){return\"\"}function y(t){return t[0]===a}function x(t,e){var r;if(i.isArrayOrTypedArray(t)&&i.isArrayOrTypedArray(e)){r=[\"step\",[\"get\",\"point_count\"],t[0]];for(var n=1;n<t.length;n++)r.push(e[n-1],t[n])}else r=t;return r}e.exports=function(t,e){var r,a=e[0].trace,b=!0===a.visible&&0!==a._length,_=\"none\"!==a.fill,w=c.hasLines(a),k=c.hasMarkers(a),T=c.hasText(a),M=k&&\"circle\"===a.marker.symbol,A=k&&\"circle\"!==a.marker.symbol,S=a.cluster&&a.cluster.enabled,E=g(\"fill\"),C=g(\"line\"),L=g(\"circle\"),P=g(\"symbol\"),O={fill:E,line:C,circle:L,symbol:P};if(!b)return O;if((_||w)&&(r=o.calcTraceToLineCoords(e)),_&&(E.geojson=o.makePolygon(r),E.layout.visibility=\"visible\",i.extendFlat(E.paint,{\"fill-color\":a.fillcolor})),w&&(C.geojson=o.makeLine(r),C.layout.visibility=\"visible\",i.extendFlat(C.paint,{\"line-width\":a.line.width,\"line-color\":a.line.color,\"line-opacity\":a.opacity})),M){var I=function(t){var e,r,a,o,c=t[0].trace,f=c.marker,h=c.selectedpoints,p=i.isArrayOrTypedArray(f.color),d=i.isArrayOrTypedArray(f.size),g=i.isArrayOrTypedArray(f.opacity);function v(t){return c.opacity*t}p&&(r=s.hasColorscale(c,\"marker\")?s.makeColorScaleFuncFromTrace(f):i.identity),d&&(a=u(c)),g&&(o=function(t){return v(n(t)?+i.constrain(t,0,1):0)});var m,x,b=[];for(e=0;e<t.length;e++){var _=t[e],w=_.lonlat;if(!y(w)){var k={};r&&(k.mcc=_.mcc=r(_.mc)),a&&(k.mrc=_.mrc=a(_.ms)),o&&(k.mo=o(_.mo)),h&&(k.selected=_.selected||0),b.push({type:\"Feature\",id:e+1,geometry:{type:\"Point\",coordinates:w},properties:k})}}if(h)for(m=l.makeSelectedPointStyleFns(c),e=0;e<b.length;e++){var T=b[e].properties;m.selectedOpacityFn&&(T.mo=v(m.selectedOpacityFn(T))),m.selectedColorFn&&(T.mcc=m.selectedColorFn(T)),m.selectedSizeFn&&(T.mrc=m.selectedSizeFn(T))}return{geojson:{type:\"FeatureCollection\",features:b},mcc:p||m&&m.selectedColorFn?{type:\"identity\",property:\"mcc\"}:f.color,mrc:d||m&&m.selectedSizeFn?{type:\"identity\",property:\"mrc\"}:(x=f.size,x/2),mo:g||m&&m.selectedOpacityFn?{type:\"identity\",property:\"mo\"}:v(f.opacity)}}(e);L.geojson=I.geojson,L.layout.visibility=\"visible\",S&&(L.filter=[\"!\",[\"has\",\"point_count\"]],O.cluster={type:\"circle\",filter:[\"has\",\"point_count\"],layout:{visibility:\"visible\"},paint:{\"circle-color\":x(a.cluster.color,a.cluster.step),\"circle-radius\":x(a.cluster.size,a.cluster.step),\"circle-opacity\":x(a.cluster.opacity,a.cluster.step)}},O.clusterCount={type:\"symbol\",filter:[\"has\",\"point_count\"],paint:{},layout:{\"text-field\":\"{point_count_abbreviated}\",\"text-font\":[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],\"text-size\":12}}),i.extendFlat(L.paint,{\"circle-color\":I.mcc,\"circle-radius\":I.mrc,\"circle-opacity\":I.mo})}if(M&&S&&(L.filter=[\"!\",[\"has\",\"point_count\"]]),(A||T)&&(P.geojson=function(t,e){for(var r=e._fullLayout,n=t[0].trace,a=n.marker||{},o=a.symbol,s=a.angle,l=\"circle\"!==o?v(o):m,u=\"auto\"!==s?v(s,!0):m,f=c.hasText(n)?v(n.text):m,g=[],x=0;x<t.length;x++){var b=t[x];if(!y(b.lonlat)){var _,w=n.texttemplate;if(w){var k=Array.isArray(w)?w[x]||\"\":w,T=n._module.formatLabels(b,n,r),M={};h(M,n,b.i);var A=n._meta||{};_=i.texttemplateString(k,T,r._d3locale,M,b,A)}else _=f(x);_&&(_=_.replace(p,\"\").replace(d,\"\\n\")),g.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:b.lonlat},properties:{symbol:l(x),angle:u(x),text:_}})}}return{type:\"FeatureCollection\",features:g}}(e,t),i.extendFlat(P.layout,{visibility:\"visible\",\"icon-image\":\"{symbol}-15\",\"text-field\":\"{text}\"}),A&&(i.extendFlat(P.layout,{\"icon-size\":a.marker.size/10}),\"angle\"in a.marker&&\"auto\"!==a.marker.angle&&i.extendFlat(P.layout,{\"icon-rotate\":{type:\"identity\",property:\"angle\"},\"icon-rotation-alignment\":\"map\"}),P.layout[\"icon-allow-overlap\"]=a.marker.allowoverlap,i.extendFlat(P.paint,{\"icon-opacity\":a.opacity*a.marker.opacity,\"icon-color\":a.marker.color})),T)){var D=(a.marker||{}).size,z=f(a.textposition,D);i.extendFlat(P.layout,{\"text-size\":a.textfont.size,\"text-anchor\":z.anchor,\"text-offset\":z.offset}),i.extendFlat(P.paint,{\"text-color\":a.textfont.color,\"text-opacity\":a.opacity})}return O}},{\"../../components/colorscale\":379,\"../../components/drawing\":389,\"../../components/fx/helpers\":403,\"../../constants/numerical\":491,\"../../lib\":515,\"../../lib/geojson_utils\":509,\"../../lib/svg_text_utils\":541,\"../../plots/mapbox/convert_text_opts\":621,\"../scatter/make_bubble_size_func\":953,\"../scatter/subtypes\":961,\"fast-isnumeric\":190}],1004:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/text_defaults\"),l=t(\"../scatter/fillcolor_defaults\"),u=t(\"./attributes\");e.exports=function(t,e,r,c){function f(r,i){return n.coerce(t,e,u,r,i)}function h(r,i){return n.coerce2(t,e,u,r,i)}if(function(t,e,r){var n=r(\"lon\")||[],i=r(\"lat\")||[],a=Math.min(n.length,i.length);return e._length=a,a}(0,e,f)){if(f(\"text\"),f(\"texttemplate\"),f(\"hovertext\"),f(\"hovertemplate\"),f(\"mode\"),f(\"below\"),i.hasLines(e)&&(o(t,e,r,c,f,{noDash:!0}),f(\"connectgaps\")),i.hasMarkers(e)){a(t,e,r,c,f,{noLine:!0,noAngle:!0}),f(\"marker.allowoverlap\"),f(\"marker.angle\");var p=e.marker;\"circle\"!==p.symbol&&(n.isArrayOrTypedArray(p.size)&&(p.size=p.size[0]),n.isArrayOrTypedArray(p.color)&&(p.color=p.color[0]))}var d=h(\"cluster.maxzoom\"),g=h(\"cluster.step\"),v=h(\"cluster.color\",e.marker&&e.marker.color||r),m=h(\"cluster.size\"),y=h(\"cluster.opacity\");f(\"cluster.enabled\",!1!==d||!1!==g||!1!==v||!1!==m||!1!==y),i.hasText(e)&&s(t,e,c,f,{noSelect:!0}),f(\"fill\"),\"none\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\"../../lib\":515,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"./attributes\":1002}],1005:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t}},{}],1006:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r){var i={},a=r[e.subplot]._subplot.mockAxis,o=t.lonlat;return i.lonLabel=n.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=n.tickText(a,a.c2l(o[1]),!0).text,i}},{\"../../plots/cartesian/axes\":566}],1007:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../scatter/get_trace_color\"),o=i.fillText,s=t(\"../../constants/numerical\").BADNUM,l=t(\"../../plots/mapbox/constants\").traceLayerPrefix;function u(t,e,r){if(!t.hovertemplate){var n=(e.hi||t.hoverinfo).split(\"+\"),i=-1!==n.indexOf(\"all\"),a=-1!==n.indexOf(\"lon\"),s=-1!==n.indexOf(\"lat\"),l=e.lonlat,u=[];return i||a&&s?u.push(\"(\"+c(l[1])+\", \"+c(l[0])+\")\"):a?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(i||-1!==n.indexOf(\"text\"))&&o(e,t,u),u.join(\"<br>\")}function c(t){return t+\"°\"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[0].trace,f=t.xa,h=t.ya,p=t.subplot,d=[],g=l+c.uid+\"-circle\",v=c.cluster&&c.cluster.enabled;if(v){var m=p.map.queryRenderedFeatures(null,{layers:[g]});d=m.map((function(t){return t.id}))}var y=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),x=e-y;if(n.getClosest(o,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;if(v&&-1===d.indexOf(t.i+1))return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=p.project([n,a]),l=o.x-f.c2p([x,a]),u=o.y-h.c2p([n,r]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+u*u)-c,1-3/c)}),t),!1!==t.index){var b=o[t.index],_=b.lonlat,w=[i.modHalf(_[0],360)+y,_[1]],k=f.c2p(w),T=h.c2p(w),M=b.mrc||1;t.x0=k-M,t.x1=k+M,t.y0=T-M,t.y1=T+M;var A={};A[c.subplot]={_subplot:p};var S=c._module.formatLabels(b,c,A);return t.lonLabel=S.lonLabel,t.latLabel=S.latLabel,t.color=a(c,b),t.extraText=u(c,b,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:u}},{\"../../components/fx\":407,\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/mapbox/constants\":620,\"../scatter/get_trace_color\":946}],1008:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"../scattergeo/calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,eventData:t(\"./event_data\"),selectPoints:t(\"./select\"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:t(\"../../plots/mapbox\"),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/mapbox\":622,\"../scatter/marker_colorbar\":954,\"../scattergeo/calc\":979,\"./attributes\":1002,\"./defaults\":1004,\"./event_data\":1005,\"./format_labels\":1006,\"./hover\":1007,\"./plot\":1009,\"./select\":1010}],1009:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./convert\"),a=t(\"../../plots/mapbox/constants\").traceLayerPrefix,o={cluster:[\"cluster\",\"clusterCount\",\"circle\"],nonCluster:[\"fill\",\"line\",\"circle\",\"symbol\"]};function s(t,e,r){this.type=\"scattermapbox\",this.subplot=t,this.uid=e,this.clusterEnabled=r,this.sourceIds={fill:\"source-\"+e+\"-fill\",line:\"source-\"+e+\"-line\",circle:\"source-\"+e+\"-circle\",symbol:\"source-\"+e+\"-symbol\",cluster:\"source-\"+e+\"-circle\",clusterCount:\"source-\"+e+\"-circle\"},this.layerIds={fill:a+e+\"-fill\",line:a+e+\"-line\",circle:a+e+\"-circle\",symbol:a+e+\"-symbol\",cluster:a+e+\"-cluster\",clusterCount:a+e+\"-cluster-count\"},this.below=null}var l=s.prototype;l.addSource=function(t,e,r){var i={type:\"geojson\",data:e.geojson};r&&r.enabled&&n.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom}),this.subplot.map.addSource(this.sourceIds[t],i)},l.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},l.addLayer=function(t,e,r){var n={type:e.type,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint};e.filter&&(n.filter=e.filter),this.subplot.addLayer(n,r)},l.update=function(t){var e,r,n,a=t[0].trace,s=this.subplot,l=s.map,u=i(s.gd,t),c=s.belowLookup[\"trace-\"+this.uid],f=!(!a.cluster||!a.cluster.enabled),h=!!this.clusterEnabled;if(c!==this.below){var p=o.nonCluster;for(e=p.length-1;e>=0;e--)r=p[e],l.removeLayer(this.layerIds[r]);for(e=0;e<p.length;e++)n=u[r=p[e]],this.addLayer(r,n,c);this.below=c}else if(f&&!h){for(e=o.nonCluster.length-1;e>=0;e--)r=o.nonCluster[e],l.removeLayer(this.layerIds[r]),l.removeSource(this.sourceIds[r]);for(this.addSource(\"circle\",u.circle,a.cluster),e=0;e<o.cluster.length;e++)n=u[r=o.cluster[e]],this.addLayer(r,n,c);this.clusterEnabled=f}else if(!f&&h){for(e=0;e<o.cluster.length;e++)r=o.cluster[e],l.removeLayer(this.layerIds[r]);for(l.removeSource(this.sourceIds.circle),e=0;e<o.nonCluster.length;e++)n=u[r=o.nonCluster[e]],this.addSource(r,n,a.cluster),this.addLayer(r,n,c);this.clusterEnabled=f}t[0].trace._glTrace=this},l.dispose=function(){for(var t=this.subplot.map,e=this.clusterEnabled?o.cluster:o.nonCluster,r=e.length-1;r>=0;r--){var n=e[r];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}},e.exports=function(t,e){var r,n,a,l=e[0].trace,u=l.cluster&&l.cluster.enabled,c=new s(t,l.uid,u),f=i(t.gd,e),h=c.below=t.belowLookup[\"trace-\"+l.uid];if(u)for(c.addSource(\"circle\",f.circle,l.cluster),r=0;r<o.cluster.length;r++)a=f[n=o.cluster[r]],c.addLayer(n,a,h);else for(r=0;r<o.nonCluster.length;r++)a=f[n=o.nonCluster[r]],c.addSource(n,a,l.cluster),c.addLayer(n,a,h);return e[0].trace._glTrace=c,c}},{\"../../lib\":515,\"../../plots/mapbox/constants\":620,\"./convert\":1003}],1010:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e){var r,o=t.cd,s=t.xaxis,l=t.yaxis,u=[],c=o[0].trace;if(!i.hasMarkers(c))return[];if(!1===e)for(r=0;r<o.length;r++)o[r].selected=0;else for(r=0;r<o.length;r++){var f=o[r],h=f.lonlat;if(h[0]!==a){var p=[n.modHalf(h[0],360),h[1]],d=[s.c2p(p),l.c2p(p)];e.contains(d,null,r,t)?(u.push({pointNumber:r,lon:h[0],lat:h[1]}),f.selected=1):f.selected=0}}return u}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../scatter/subtypes\":961}],1011:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,r:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},theta:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},r0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dr:{valType:\"number\",dflt:1,editType:\"calc\"},theta0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dtheta:{valType:\"number\",editType:\"calc\"},thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\",\"gradians\"],dflt:\"degrees\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"r\",\"theta\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"r\",\"theta\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936}],1012:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/cartesian/axes\"),o=t(\"../scatter/colorscale_calc\"),s=t(\"../scatter/arrays_to_calcdata\"),l=t(\"../scatter/calc_selection\"),u=t(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,f=r[c].radialaxis,h=r[c].angularaxis,p=f.makeCalcdata(e,\"r\"),d=h.makeCalcdata(e,\"theta\"),g=e._length,v=new Array(g),m=0;m<g;m++){var y=p[m],x=d[m],b=v[m]={};n(y)&&n(x)?(b.r=y,b.theta=x):b.r=i}var _=u(e,g);return e._extremes.x=a.findExtremes(f,p,{ppad:_}),o(t,e),s(v,e),l(v,e),v}},{\"../../constants/numerical\":491,\"../../plots/cartesian/axes\":566,\"../scatter/arrays_to_calcdata\":935,\"../scatter/calc\":937,\"../scatter/calc_selection\":938,\"../scatter/colorscale_calc\":939,\"fast-isnumeric\":190}],1013:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/line_shape_defaults\"),l=t(\"../scatter/text_defaults\"),u=t(\"../scatter/fillcolor_defaults\"),c=t(\"../scatter/constants\").PTS_LINESONLY,f=t(\"./attributes\");function h(t,e,r,n){var i,a=n(\"r\"),o=n(\"theta\");if(a)o?i=Math.min(a.length,o.length):(i=a.length,n(\"theta0\"),n(\"dtheta\"));else{if(!o)return 0;i=e.theta.length,n(\"r0\"),n(\"dr\")}return e._length=i,i}e.exports={handleRThetaDefaults:h,supplyDefaults:function(t,e,r,p){function d(r,i){return n.coerce(t,e,f,r,i)}var g=h(0,e,0,d);if(g){d(\"thetaunit\"),d(\"mode\",g<c?\"lines+markers\":\"lines\"),d(\"text\"),d(\"hovertext\"),\"fills\"!==e.hoveron&&d(\"hovertemplate\"),i.hasLines(e)&&(o(t,e,r,p,d,{backoff:!0}),s(t,e,d),d(\"connectgaps\")),i.hasMarkers(e)&&a(t,e,r,p,d,{gradient:!0}),i.hasText(e)&&(d(\"texttemplate\"),l(t,e,p,d));var v=[];(i.hasMarkers(e)||i.hasText(e))&&(d(\"cliponaxis\"),d(\"marker.maxdisplayed\"),v.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&(u(t,e,r,d),i.hasLines(e)||s(t,e,d)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||v.push(\"fills\"),d(\"hoveron\",v.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}}},{\"../../lib\":515,\"../scatter/constants\":940,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/line_shape_defaults\":951,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"./attributes\":1011}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r){var a,o,s={},l=r[e.subplot]._subplot;l?(a=l.radialAxis,o=l.angularAxis):(a=(l=r[e.subplot]).radialaxis,o=l.angularaxis);var u=a.c2l(t.r);s.rLabel=i.tickText(a,u,!0).text;var c=\"degrees\"===o.thetaunit?n.rad2deg(t.theta):t.theta;return s.thetaLabel=i.tickText(o,c,!0).text,s}},{\"../../lib\":515,\"../../plots/cartesian/axes\":566}],1015:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\");function i(t,e,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle=\"r\",a._hovertitle=\"θ\";var o={};o[e.subplot]={_subplot:r};var s=e._module.formatLabels(t,e,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=t.hi||e.hoverinfo,u=[];function c(t,e){u.push(t._hovertitle+\": \"+e)}if(!e.hovertemplate){var f=l.split(\"+\");-1!==f.indexOf(\"all\")&&(f=[\"r\",\"theta\",\"text\"]),-1!==f.indexOf(\"r\")&&c(i,n.rLabel),-1!==f.indexOf(\"theta\")&&c(a,n.thetaLabel),-1!==f.indexOf(\"text\")&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join(\"<br>\")}}e.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":947}],1016:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scatterpolar\",basePlotModule:t(\"../../plots/polar\"),categories:[\"polar\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":631,\"../scatter/marker_colorbar\":954,\"../scatter/select\":958,\"../scatter/style\":960,\"./attributes\":1011,\"./calc\":1012,\"./defaults\":1013,\"./format_labels\":1014,\"./hover\":1015,\"./plot\":1017}],1017:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r){for(var a=e.layers.frontplot.select(\"g.scatterlayer\"),o=e.xaxis,s=e.yaxis,l={xaxis:o,yaxis:s,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},u=e.radialAxis,c=e.angularAxis,f=0;f<r.length;f++)for(var h=r[f],p=0;p<h.length;p++){0===p&&(h[0].trace._xA=o,h[0].trace._yA=s);var d=h[p],g=d.r;if(g===i)d.x=d.y=i;else{var v=u.c2g(g),m=c.c2g(d.theta);d.x=v*Math.cos(m),d.y=v*Math.sin(m)}}n(t,l,r,a)}},{\"../../constants/numerical\":491,\"../scatter/plot\":957}],1018:[function(t,e,r){\"use strict\";var n=t(\"../scatterpolar/attributes\"),i=t(\"../scattergl/attributes\"),a=t(\"../../plots/template_attributes\").texttemplateAttrs;e.exports={mode:n.mode,r:n.r,theta:n.theta,r0:n.r0,dr:n.dr,theta0:n.theta0,dtheta:n.dtheta,thetaunit:n.thetaunit,text:n.text,texttemplate:a({editType:\"plot\"},{keys:[\"r\",\"theta\",\"text\"]}),hovertext:n.hovertext,hovertemplate:n.hovertemplate,line:i.line,connectgaps:i.connectgaps,marker:i.marker,fill:i.fill,fillcolor:i.fillcolor,textposition:i.textposition,textfont:i.textfont,hoverinfo:n.hoverinfo,selected:n.selected,unselected:n.unselected}},{\"../../plots/template_attributes\":642,\"../scattergl/attributes\":988,\"../scatterpolar/attributes\":1011}],1019:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scatterpolargl\",basePlotModule:t(\"../../plots/polar\"),categories:[\"gl\",\"regl\",\"polar\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scattergl/select\"),meta:{}}},{\"../../plots/polar\":631,\"../scatter/marker_colorbar\":954,\"../scattergl/select\":1001,\"./attributes\":1018,\"./calc\":1020,\"./defaults\":1021,\"./format_labels\":1022,\"./hover\":1023}],1020:[function(t,e,r){\"use strict\";var n=t(\"../scatter/colorscale_calc\"),i=t(\"../scatter/calc\").calcMarkerSize,a=t(\"../scattergl/convert\"),o=t(\"../../plots/cartesian/axes\"),s=t(\"../scattergl/constants\").TOO_MANY_POINTS;e.exports=function(t,e){var r=t._fullLayout,l=e.subplot,u=r[l].radialaxis,c=r[l].angularaxis,f=e._r=u.makeCalcdata(e,\"r\"),h=e._theta=c.makeCalcdata(e,\"theta\"),p=e._length,d={};p<f.length&&(f=f.slice(0,p)),p<h.length&&(h=h.slice(0,p)),d.r=f,d.theta=h,n(t,e);var g,v=d.opts=a.style(t,e);return p<s?g=i(e,p):v.marker&&(g=2*(v.marker.sizeAvg||Math.max(v.marker.size,3))),e._extremes.x=o.findExtremes(u,f,{ppad:g}),[{x:!1,y:!1,t:d,trace:e}]}},{\"../../plots/cartesian/axes\":566,\"../scatter/calc\":937,\"../scatter/colorscale_calc\":939,\"../scattergl/constants\":991,\"../scattergl/convert\":992}],1021:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatterpolar/defaults\").handleRThetaDefaults,o=t(\"../scatter/marker_defaults\"),s=t(\"../scatter/line_defaults\"),l=t(\"../scatter/text_defaults\"),u=t(\"../scatter/fillcolor_defaults\"),c=t(\"../scatter/constants\").PTS_LINESONLY,f=t(\"./attributes\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d=a(t,e,h,p);d?(p(\"thetaunit\"),p(\"mode\",d<c?\"lines+markers\":\"lines\"),p(\"text\"),p(\"hovertext\"),\"fills\"!==e.hoveron&&p(\"hovertemplate\"),i.hasLines(e)&&(s(t,e,r,h,p),p(\"connectgaps\")),i.hasMarkers(e)&&o(t,e,r,h,p,{noAngleRef:!0,noStandOff:!0}),i.hasText(e)&&(p(\"texttemplate\"),l(t,e,h,p)),p(\"fill\"),\"none\"!==e.fill&&u(t,e,r,p),n.coerceSelectionMarkerOpacity(e,p)):e.visible=!1}},{\"../../lib\":515,\"../scatter/constants\":940,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"../scatterpolar/defaults\":1013,\"./attributes\":1018}],1022:[function(t,e,r){\"use strict\";var n=t(\"../scatterpolar/format_labels\");e.exports=function(t,e,r){var i=t.i;return\"r\"in t||(t.r=e._r[i]),\"theta\"in t||(t.theta=e._theta[i]),n(t,e,r)}},{\"../scatterpolar/format_labels\":1014}],1023:[function(t,e,r){\"use strict\";var n=t(\"../scattergl/hover\"),i=t(\"../scatterpolar/hover\").makeHoverPointText;e.exports={hoverPoints:function(t,e,r,a){var o=t.cd[0].t,s=o.r,l=o.theta,u=n.hoverPoints(t,e,r,a);if(u&&!1!==u[0].index){var c=u[0];if(void 0===c.index)return u;var f=t.subplot,h=c.cd[c.index],p=c.trace;if(h.r=s[c.index],h.theta=l[c.index],f.isPtInside(h))return c.xLabelVal=void 0,c.yLabelVal=void 0,i(h,p,f,c),u}}}},{\"../scattergl/hover\":997,\"../scatterpolar/hover\":1015}],1024:[function(t,e,r){arguments[4][905][0].apply(r,arguments)},{\"./base_index\":1019,\"./plot\":1025,dup:905}],1025:[function(t,e,r){\"use strict\";var n=t(\"@plotly/point-cluster\"),i=t(\"fast-isnumeric\"),a=t(\"../scattergl/plot\"),o=t(\"../scattergl/scene_update\"),s=t(\"../scattergl/convert\"),l=t(\"../../lib\"),u=t(\"../scattergl/constants\").TOO_MANY_POINTS;e.exports=function(t,e,r){if(r.length){var c=e.radialAxis,f=e.angularAxis,h=o(t,e);return r.forEach((function(r){if(r&&r[0]&&r[0].trace){var a,o=r[0],p=o.trace,d=o.t,g=p._length,v=d.r,m=d.theta,y=d.opts,x=v.slice(),b=m.slice();for(a=0;a<v.length;a++)e.isPtInside({r:v[a],theta:m[a]})||(x[a]=NaN,b[a]=NaN);var _=new Array(2*g),w=Array(g),k=Array(g);for(a=0;a<g;a++){var T,M,A=x[a];if(i(A)){var S=c.c2g(A),E=f.c2g(b[a],p.thetaunit);T=S*Math.cos(E),M=S*Math.sin(E)}else T=M=NaN;w[a]=_[2*a]=T,k[a]=_[2*a+1]=M}d.tree=n(_),y.marker&&g>=u&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=k,d.rawx=w,d.rawy=k,d.r=v,d.theta=m,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}},e.exports.reglPrecompiled={}},{\"../../lib\":515,\"../scattergl/constants\":991,\"../scattergl/convert\":992,\"../scattergl/plot\":999,\"../scattergl/scene_update\":1e3,\"@plotly/point-cluster\":59,\"fast-isnumeric\":190}],1026:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../lib/extend\").extendFlat,o=t(\"../scatter/attributes\"),s=t(\"../../plots/attributes\"),l=o.line;e.exports={mode:o.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:o.text,texttemplate:i({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:a({},l.shape,{values:[\"linear\",\"spline\"]}),smoothing:l.smoothing,editType:\"calc\"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936}],1027:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../scatter/colorscale_calc\"),o=t(\"../scatter/arrays_to_calcdata\"),s=t(\"../scatter/calc_selection\"),l=t(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,u=e.subplot,c=r[u].realaxis,f=r[u].imaginaryaxis,h=c.makeCalcdata(e,\"real\"),p=f.makeCalcdata(e,\"imag\"),d=e._length,g=new Array(d),v=0;v<d;v++){var m=h[v],y=p[v],x=g[v]={};n(m)&&n(y)?(x.real=m,x.imag=y):x.real=i}return l(e,d),a(t,e),o(g,e),s(g,e),g}},{\"../../constants/numerical\":491,\"../scatter/arrays_to_calcdata\":935,\"../scatter/calc\":937,\"../scatter/calc_selection\":938,\"../scatter/colorscale_calc\":939,\"fast-isnumeric\":190}],1028:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/line_shape_defaults\"),l=t(\"../scatter/text_defaults\"),u=t(\"../scatter/fillcolor_defaults\"),c=t(\"../scatter/constants\").PTS_LINESONLY,f=t(\"./attributes\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d=function(t,e,r,n){var i,a=n(\"real\"),o=n(\"imag\");return a&&o&&(i=Math.min(a.length,o.length)),e._length=i,i}(0,e,0,p);if(d){p(\"mode\",d<c?\"lines+markers\":\"lines\"),p(\"text\"),p(\"hovertext\"),\"fills\"!==e.hoveron&&p(\"hovertemplate\"),i.hasLines(e)&&(o(t,e,r,h,p,{backoff:!0}),s(t,e,p),p(\"connectgaps\")),i.hasMarkers(e)&&a(t,e,r,h,p,{gradient:!0}),i.hasText(e)&&(p(\"texttemplate\"),l(t,e,h,p));var g=[];(i.hasMarkers(e)||i.hasText(e))&&(p(\"cliponaxis\"),p(\"marker.maxdisplayed\"),g.push(\"points\")),p(\"fill\"),\"none\"!==e.fill&&(u(t,e,r,p),i.hasLines(e)||s(t,e,p)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||g.push(\"fills\"),p(\"hoveron\",g.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{\"../../lib\":515,\"../scatter/constants\":940,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/line_shape_defaults\":951,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"./attributes\":1026}],1029:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r){var i={},a=r[e.subplot]._subplot;return i.realLabel=n.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=n.tickText(a.angularAxis,t.imag,!0).text,i}},{\"../../plots/cartesian/axes\":566}],1030:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\");function i(t,e,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle=\"real\",a._hovertitle=\"imag\";var o={};o[e.subplot]={_subplot:r};var s=e._module.formatLabels(t,e,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=t.hi||e.hoverinfo,u=[];function c(t,e){u.push(t._hovertitle+\": \"+e)}if(!e.hovertemplate){var f=l.split(\"+\");-1!==f.indexOf(\"all\")&&(f=[\"real\",\"imag\",\"text\"]),-1!==f.indexOf(\"real\")&&c(i,n.realLabel),-1!==f.indexOf(\"imag\")&&c(a,n.imagLabel),-1!==f.indexOf(\"text\")&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join(\"<br>\")}}e.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},{\"../scatter/hover\":947}],1031:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:t(\"../../plots/smith\"),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/smith\":638,\"../scatter/marker_colorbar\":954,\"../scatter/select\":958,\"../scatter/style\":960,\"./attributes\":1026,\"./calc\":1027,\"./defaults\":1028,\"./format_labels\":1029,\"./hover\":1030,\"./plot\":1032}],1032:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/smith/helpers\").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select(\"g.scatterlayer\"),s=e.xaxis,l=e.yaxis,u={xaxis:s,yaxis:l,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},c=0;c<r.length;c++)for(var f=r[c],h=0;h<f.length;h++){0===h&&(f[0].trace._xA=s,f[0].trace._yA=l);var p=f[h],d=p.real;if(d===i)p.x=p.y=i;else{var g=a([d,p.imag]);p.x=g[0],p.y=g[1]}}n(t,u,r,o)}},{\"../../constants/numerical\":491,\"../../plots/smith/helpers\":637,\"../scatter/plot\":957}],1033:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../scatter/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/colorscale/attributes\"),l=t(\"../../components/drawing/attributes\").dash,u=t(\"../../lib/extend\").extendFlat,c=a.marker,f=a.line,h=c.line;e.exports={a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},c:{valType:\"data_array\",editType:\"calc\"},sum:{valType:\"number\",dflt:0,min:0,editType:\"calc\"},mode:u({},a.mode,{dflt:\"markers\"}),text:u({},a.text,{}),texttemplate:i({editType:\"plot\"},{keys:[\"a\",\"b\",\"c\",\"text\"]}),hovertext:u({},a.hovertext,{}),line:{color:f.color,width:f.width,dash:l,backoff:f.backoff,shape:u({},f.shape,{values:[\"linear\",\"spline\"]}),smoothing:f.smoothing,editType:\"calc\"},connectgaps:a.connectgaps,cliponaxis:a.cliponaxis,fill:u({},a.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:a.fillcolor,marker:u({symbol:c.symbol,opacity:c.opacity,angle:c.angle,angleref:c.angleref,standoff:c.standoff,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:u({width:h.width,editType:\"calc\"},s(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},s(\"marker\")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:u({},o.hoverinfo,{flags:[\"a\",\"b\",\"c\",\"text\",\"name\"]}),hoveron:a.hoveron,hovertemplate:n()}},{\"../../components/colorscale/attributes\":374,\"../../components/drawing/attributes\":388,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936}],1034:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,l=[\"a\",\"b\",\"c\"],u={a:[\"b\",\"c\"],b:[\"a\",\"c\"],c:[\"a\",\"b\"]};e.exports=function(t,e){var r,c,f,h,p,d,g=t._fullLayout[e.subplot].sum,v=e.sum||g,m={a:e.a,b:e.b,c:e.c};for(r=0;r<l.length;r++)if(!m[f=l[r]]){for(p=m[u[f][0]],d=m[u[f][1]],h=new Array(p.length),c=0;c<p.length;c++)h[c]=v-p[c]-d[c];m[f]=h}var y,x,b,_,w,k,T=e._length,M=new Array(T);for(r=0;r<T;r++)y=m.a[r],x=m.b[r],b=m.c[r],n(y)&&n(x)&&n(b)?(1!=(_=g/((y=+y)+(x=+x)+(b=+b)))&&(y*=_,x*=_,b*=_),k=y,w=b-x,M[r]={x:w,y:k,a:y,b:x,c:b}):M[r]={x:!1,y:!1};return s(e,T),i(t,e),a(M,e),o(M,e),M}},{\"../scatter/arrays_to_calcdata\":935,\"../scatter/calc\":937,\"../scatter/calc_selection\":938,\"../scatter/colorscale_calc\":939,\"fast-isnumeric\":190}],1035:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/constants\"),a=t(\"../scatter/subtypes\"),o=t(\"../scatter/marker_defaults\"),s=t(\"../scatter/line_defaults\"),l=t(\"../scatter/line_shape_defaults\"),u=t(\"../scatter/text_defaults\"),c=t(\"../scatter/fillcolor_defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,f,r,i)}var d,g=p(\"a\"),v=p(\"b\"),m=p(\"c\");if(g?(d=g.length,v?(d=Math.min(d,v.length),m&&(d=Math.min(d,m.length))):d=m?Math.min(d,m.length):0):v&&m&&(d=Math.min(v.length,m.length)),d){e._length=d,p(\"sum\"),p(\"text\"),p(\"hovertext\"),\"fills\"!==e.hoveron&&p(\"hovertemplate\"),p(\"mode\",d<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(s(t,e,r,h,p,{backoff:!0}),l(t,e,p),p(\"connectgaps\")),a.hasMarkers(e)&&o(t,e,r,h,p,{gradient:!0}),a.hasText(e)&&(p(\"texttemplate\"),u(t,e,h,p));var y=[];(a.hasMarkers(e)||a.hasText(e))&&(p(\"cliponaxis\"),p(\"marker.maxdisplayed\"),y.push(\"points\")),p(\"fill\"),\"none\"!==e.fill&&(c(t,e,r,p),a.hasLines(e)||l(t,e,p)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||y.push(\"fills\"),p(\"hoveron\",y.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},{\"../../lib\":515,\"../scatter/constants\":940,\"../scatter/fillcolor_defaults\":944,\"../scatter/line_defaults\":949,\"../scatter/line_shape_defaults\":951,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scatter/text_defaults\":962,\"./attributes\":1033}],1036:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),n[i]){var a=n[i];t.a=a.a,t.b=a.b,t.c=a.c}else t.a=e.a,t.b=e.b,t.c=e.c;return t}},{}],1037:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r){var i={},a=r[e.subplot]._subplot;return i.aLabel=n.tickText(a.aaxis,t.a,!0).text,i.bLabel=n.tickText(a.baxis,t.b,!0).text,i.cLabel=n.tickText(a.caxis,t.c,!0).text,i}},{\"../../plots/cartesian/axes\":566}],1038:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\");e.exports=function(t,e,r,i){var a=n(t,e,r,i);if(a&&!1!==a[0].index){var o=a[0];if(void 0===o.index){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,p=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var d={};d[h.subplot]={_subplot:p};var g=h._module.formatLabels(f,h,d);o.aLabel=g.aLabel,o.bLabel=g.bLabel,o.cLabel=g.cLabel;var v=f.hi||h.hoverinfo,m=[];if(!h.hovertemplate){var y=v.split(\"+\");-1!==y.indexOf(\"all\")&&(y=[\"a\",\"b\",\"c\"]),-1!==y.indexOf(\"a\")&&x(p.aaxis,o.aLabel),-1!==y.indexOf(\"b\")&&x(p.baxis,o.bLabel),-1!==y.indexOf(\"c\")&&x(p.caxis,o.cLabel)}return o.extraText=m.join(\"<br>\"),o.hovertemplate=h.hovertemplate,a}function x(t,e){m.push(t._hovertitle+\": \"+e)}}},{\"../scatter/hover\":947}],1039:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),formatLabels:t(\"./format_labels\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../scatter/select\"),eventData:t(\"./event_data\"),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:t(\"../../plots/ternary\"),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}},{\"../../plots/ternary\":643,\"../scatter/marker_colorbar\":954,\"../scatter/select\":958,\"../scatter/style\":960,\"./attributes\":1033,\"./calc\":1034,\"./defaults\":1035,\"./event_data\":1036,\"./format_labels\":1037,\"./hover\":1038,\"./plot\":1040}],1040:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\");e.exports=function(t,e,r){var i=e.plotContainer;i.select(\".scatterlayer\").selectAll(\"*\").remove();for(var a=e.xaxis,o=e.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},l=e.layers.frontplot.select(\"g.scatterlayer\"),u=0;u<r.length;u++){var c=r[u];c.length&&(c[0].trace._xA=a,c[0].trace._yA=o)}n(t,s,r,l)}},{\"../scatter/plot\":957}],1041:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../scattergl/attributes\"),l=t(\"../../plots/cartesian/constants\").idRegex,u=t(\"../../plot_api/plot_template\").templatedArray,c=t(\"../../lib/extend\").extendFlat,f=n.marker,h=f.line,p=c(i(\"marker.line\",{editTypeOverride:\"calc\"}),{width:c({},h.width,{editType:\"calc\"}),editType:\"calc\"}),d=c(i(\"marker\"),{symbol:f.symbol,angle:f.angle,size:c({},f.size,{editType:\"markerSize\"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:p,editType:\"calc\"});function g(t){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:l[t],editType:\"plot\"}}}d.color.editType=d.cmin.editType=d.cmax.editType=\"style\",e.exports={dimensions:u(\"dimension\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},label:{valType:\"string\",editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},axis:{type:{valType:\"enumerated\",values:[\"linear\",\"log\",\"date\",\"category\"],editType:\"calc+clearAxisTypes\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:c({},s.text,{}),hovertext:c({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),marker:d,xaxes:g(\"x\"),yaxes:g(\"y\"),diagonal:{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},showupperhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},showlowerhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},selected:{marker:s.selected.marker,editType:\"calc\"},unselected:{marker:s.unselected.marker,editType:\"calc\"},opacity:s.opacity}},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plot_api/plot_template\":555,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/cartesian/constants\":573,\"../../plots/template_attributes\":642,\"../scatter/attributes\":936,\"../scattergl/attributes\":988}],1042:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../components/grid\");e.exports={moduleType:\"trace\",name:\"splom\",categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:t(\"../scatter/marker_colorbar\"),calc:t(\"./calc\"),plot:t(\"./plot\"),hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"./select\"),editStyle:t(\"./edit_style\"),meta:{}},n.register(i)},{\"../../components/grid\":411,\"../../registry\":647,\"../scatter/marker_colorbar\":954,\"./attributes\":1041,\"./calc\":1044,\"./defaults\":1045,\"./edit_style\":1046,\"./hover\":1048,\"./plot\":1050,\"./select\":1052}],1043:[function(t,e,r){\"use strict\";var n=t(\"regl-line2d\"),i=t(\"../../registry\"),a=t(\"../../lib/prepare_regl\"),o=t(\"../../plots/get_data\").getModuleCalcData,s=t(\"../../plots/cartesian\"),l=t(\"../../plots/cartesian/axis_ids\").getFromId,u=t(\"../../plots/cartesian/axes\").shouldShowZeroLine,c=\"splom\",f={};function h(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;o<i.length;o++){var s=i[o],u=a[o]=new Array(4),c=l(t,e._diag[s][0]);c&&(u[0]=c.r2l(c.range[0]),u[2]=c.r2l(c.range[1]));var f=l(t,e._diag[s][1]);f&&(u[1]=f.r2l(f.range[0]),u[3]=f.r2l(f.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function p(t){var e=t._fullLayout,r=e._glcanvas.data()[0].regl,i=e._splomGrid;i||(i=e._splomGrid=n(r)),i.update(function(t){var e,r=t._context.plotGlPixelRatio,n=t._fullLayout,i=n._size,a=[0,0,n.width*r,n.height*r],o={};function s(t,e,n,i,s,l){n*=r,i*=r,s*=r,l*=r;var u=e[t+\"color\"],c=e[t+\"width\"],f=String(u+c);f in o?o[f].data.push(NaN,NaN,n,i,s,l):o[f]={data:[n,i,s,l],join:\"rect\",thickness:c*r,color:u,viewport:a,range:a,overlay:!1}}for(e in n._splomSubplots){var l,c,f=n._plots[e],h=f.xaxis,p=f.yaxis,d=h._gridVals,g=p._gridVals,v=h._offset,m=h._length,y=p._length,x=i.b+p.domain[0]*i.h,b=-p._m,_=-b*p.r2l(p.range[0],p.calendar);if(h.showgrid)for(e=0;e<d.length;e++)l=v+h.l2p(d[e].x),s(\"grid\",h,l,x,l,x+y);if(p.showgrid)for(e=0;e<g.length;e++)s(\"grid\",p,v,c=x+_+b*g[e].x,v+m,c);u(t,h,p)&&(l=v+h.l2p(0),s(\"zeroline\",h,l,x,l,x+y)),u(t,p,h)&&s(\"zeroline\",p,v,c=x+_+0,v+m,c)}var w=[];for(e in o)w.push(o[e]);return w}(t))}e.exports={name:c,attr:s.attr,attrRegex:s.attrRegex,layoutAttributes:s.layoutAttributes,supplyLayoutDefaults:s.supplyLayoutDefaults,drawFramework:s.drawFramework,plot:function(t){var e=t._fullLayout,r=i.getModule(c),n=o(t.calcdata,r)[0];a(t,[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],f)&&(e._hasOnlyLargeSploms&&p(t),r.plot(t,{},n))},drag:function(t){var e=t.calcdata,r=t._fullLayout;r._hasOnlyLargeSploms&&p(t);for(var n=0;n<e.length;n++){var i=e[n][0].trace,a=r._splomScenes[i.uid];\"splom\"===i.type&&a&&a.matrix&&h(t,i,a)}},updateGrid:p,clean:function(t,e,r,n){var i,a={};if(n._splomScenes){for(i=0;i<t.length;i++){var o=t[i];\"splom\"===o.type&&(a[o.uid]=1)}for(i=0;i<r.length;i++){var l=r[i];if(!a[l.uid]){var u=n._splomScenes[l.uid];u&&u.destroy&&u.destroy(),n._splomScenes[l.uid]=null,delete n._splomScenes[l.uid]}}}0===Object.keys(n._splomScenes||{}).length&&delete n._splomScenes,n._splomGrid&&!e._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),s.clean(t,e,r,n)},updateFx:s.updateFx,toSVG:s.toSVG,reglPrecompiled:f}},{\"../../lib/prepare_regl\":528,\"../../plots/cartesian\":578,\"../../plots/cartesian/axes\":566,\"../../plots/cartesian/axis_ids\":570,\"../../plots/get_data\":602,\"../../registry\":647,\"regl-line2d\":281}],1044:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axis_ids\"),a=t(\"../scatter/calc\").calcMarkerSize,o=t(\"../scatter/calc\").calcAxisExpansion,s=t(\"../scatter/colorscale_calc\"),l=t(\"../scattergl/convert\").markerSelection,u=t(\"../scattergl/convert\").markerStyle,c=t(\"./scene_update\"),f=t(\"../../constants/numerical\").BADNUM,h=t(\"../scattergl/constants\").TOO_MANY_POINTS;e.exports=function(t,e){var r,p,d,g,v,m,y=e.dimensions,x=e._length,b={},_=b.cdata=[],w=b.data=[],k=e._visibleDims=[];function T(t,r){for(var i=t.makeCalcdata({v:r.values,vcalendar:e.calendar},\"v\"),a=0;a<i.length;a++)i[a]=i[a]===f?NaN:i[a];_.push(i),w.push(\"log\"===t.type?n.simpleMap(i,t.c2l):i)}for(r=0;r<y.length;r++)if((d=y[r]).visible){if(g=i.getFromId(t,e._diag[r][0]),v=i.getFromId(t,e._diag[r][1]),g&&v&&g.type!==v.type){n.log(\"Skipping splom dimension \"+r+\" with conflicting axis types\");continue}g?(T(g,d),v&&\"category\"===v.type&&(v._categories=g._categories.slice())):T(v,d),k.push(r)}for(s(t,e),n.extendFlat(b,u(t,e)),m=_.length*x>h?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;p<k.length;p++)d=y[r=k[p]],g=i.getFromId(t,e._diag[r][0])||{},v=i.getFromId(t,e._diag[r][1])||{},o(t,e,g,v,_[p],_[p],m);var M=c(t,e);return M.matrix||(M.matrix=!0),M.matrixOptions=b,M.selectedOptions=l(t,e,e.selected),M.unselectedOptions=l(t,e,e.unselected),[{x:!1,y:!1,t:{},trace:e}]}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/axis_ids\":570,\"../scatter/calc\":937,\"../scatter/colorscale_calc\":939,\"../scattergl/constants\":991,\"../scattergl/convert\":992,\"./scene_update\":1051}],1045:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/array_container_defaults\"),a=t(\"./attributes\"),o=t(\"../scatter/subtypes\"),s=t(\"../scatter/marker_defaults\"),l=t(\"../parcoords/merge_length\"),u=t(\"../scattergl/helpers\").isOpenSymbol;function c(t,e){function r(r,i){return n.coerce(t,e,a.dimensions,r,i)}r(\"label\");var i=r(\"values\");i&&i.length?r(\"visible\"):e.visible=!1,r(\"axis.type\"),r(\"axis.matches\")}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,a,r,i)}var p=i(t,e,{name:\"dimensions\",handleItemDefaults:c}),d=h(\"diagonal.visible\"),g=h(\"showupperhalf\"),v=h(\"showlowerhalf\");if(l(e,p,\"values\")&&(d||g||v)){h(\"text\"),h(\"hovertext\"),h(\"hovertemplate\"),h(\"xhoverformat\"),h(\"yhoverformat\"),s(t,e,r,f,h,{noAngleRef:!0,noStandOff:!0});var m=u(e.marker.symbol),y=o.isBubble(e);h(\"marker.line.width\",m||y?1:0),function(t,e,r,n){var i,a,o=e.dimensions,s=o.length,l=e.showupperhalf,u=e.showlowerhalf,c=e.diagonal.visible,f=new Array(s),h=new Array(s);for(i=0;i<s;i++){var p=i?i+1:\"\";f[i]=\"x\"+p,h[i]=\"y\"+p}var d=n(\"xaxes\",f),g=n(\"yaxes\",h),v=e._diag=new Array(s);e._xaxes={},e._yaxes={};var m=[],y=[];function x(t,n,i,a){if(t){var o=t.charAt(0),s=r._splomAxes[o];if(e[\"_\"+o+\"axes\"][t]=1,a.push(t),!(t in s)){var l=s[t]={};i&&(l.label=i.label||\"\",i.visible&&i.axis&&(i.axis.type&&(l.type=i.axis.type),i.axis.matches&&(l.matches=n)))}}}var b=!c&&!u,_=!c&&!l;for(e._axesDim={},i=0;i<s;i++){var w=o[i],k=0===i,T=i===s-1,M=k&&b||T&&_?void 0:d[i],A=k&&_||T&&b?void 0:g[i];x(M,A,w,m),x(A,M,w,y),v[i]=[M,A],e._axesDim[M]=i,e._axesDim[A]=i}for(i=0;i<m.length;i++)for(a=0;a<y.length;a++){var S=m[i]+y[a];i>a&&l||i<a&&u?r._splomSubplots[S]=1:i!==a||!c&&u&&l||(r._splomSubplots[S]=1)}(!u||!c&&l&&u)&&(r._splomGridDflt.xside=\"bottom\",r._splomGridDflt.yside=\"left\")}(0,e,f,h),n.coerceSelectionMarkerOpacity(e,h)}else e.visible=!1}},{\"../../lib\":515,\"../../plots/array_container_defaults\":561,\"../parcoords/merge_length\":907,\"../scatter/marker_defaults\":955,\"../scatter/subtypes\":961,\"../scattergl/helpers\":996,\"./attributes\":1041}],1046:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scattergl/convert\").markerStyle;e.exports=function(t,e){var r=e.trace,o=t._fullLayout._splomScenes[r.uid];if(o){i(t,r),n.extendFlat(o.matrixOptions,a(t,r));var s=n.extendFlat({},o.matrixOptions,o.viewOpts);o.matrix.update(s,null)}}},{\"../../lib\":515,\"../scatter/colorscale_calc\":939,\"../scattergl/convert\":992}],1047:[function(t,e,r){\"use strict\";r.getDimIndex=function(t,e){for(var r=e._id,n={x:0,y:1}[r.charAt(0)],i=t._visibleDims,a=0;a<i.length;a++){var o=i[a];if(t._diag[o][n]===r)return a}return!1}},{}],1048:[function(t,e,r){\"use strict\";var n=t(\"./helpers\"),i=t(\"../scattergl/hover\").calcHover;e.exports={hoverPoints:function(t,e,r){var a=t.cd[0].trace,o=t.scene.matrixOptions.cdata,s=t.xa,l=t.ya,u=s.c2p(e),c=l.c2p(r),f=t.distance,h=n.getDimIndex(a,s),p=n.getDimIndex(a,l);if(!1===h||!1===p)return[t];for(var d,g,v=o[h],m=o[p],y=f,x=0;x<v.length;x++){var b=v[x],_=m[x],w=s.c2p(b)-u,k=l.c2p(_)-c,T=Math.sqrt(w*w+k*k);T<y&&(y=g=T,d=x)}return t.index=d,t.distance=y,t.dxy=g,void 0===d?[t]:[i(t,v,m,a)]}}},{\"../scattergl/hover\":997,\"./helpers\":1047}],1049:[function(t,e,r){\"use strict\";var n=t(\"./base_index\");n.basePlotModule=t(\"./base_plot\"),e.exports=n},{\"./base_index\":1042,\"./base_plot\":1043}],1050:[function(t,e,r){\"use strict\";var n=t(\"regl-splom\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../components/dragelement/helpers\").selectMode;function s(t,e){var r,s,l,u,c,f=t._fullLayout,h=f._size,p=e.trace,d=e.t,g=f._splomScenes[p.uid],v=g.matrixOptions,m=v.cdata,y=f._glcanvas.data()[0].regl,x=f.dragmode;if(0!==m.length){v.lower=p.showupperhalf,v.upper=p.showlowerhalf,v.diagonal=p.diagonal.visible;var b=p._visibleDims,_=m.length,w=g.viewOpts={};for(w.ranges=new Array(_),w.domains=new Array(_),c=0;c<b.length;c++){l=b[c];var k=w.ranges[c]=new Array(4),T=w.domains[c]=new Array(4);(r=a.getFromId(t,p._diag[l][0]))&&(k[0]=r._rl[0],k[2]=r._rl[1],T[0]=r.domain[0],T[2]=r.domain[1]),(s=a.getFromId(t,p._diag[l][1]))&&(k[1]=s._rl[0],k[3]=s._rl[1],T[1]=s.domain[0],T[3]=s.domain[1])}var M=t._context.plotGlPixelRatio,A=h.l*M,S=h.b*M,E=h.w*M,C=h.h*M;w.viewport=[A,S,E+A,C+S],!0===g.matrix&&(g.matrix=n(y));var L=f.clickmode.indexOf(\"select\")>-1,P=!0;if(o(x)||p.selectedpoints||L){var O=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var I=p.selectedpoints,D={};for(l=0;l<I.length;l++)D[I[l]]=!0;var z=[];for(l=0;l<O;l++)D[l]||z.push(l);g.unselectBatch=z}var R=d.xpx=new Array(_),F=d.ypx=new Array(_);for(c=0;c<b.length;c++){if(l=b[c],r=a.getFromId(t,p._diag[l][0]))for(R[c]=new Array(O),u=0;u<O;u++)R[c][u]=r.c2p(m[c][u]);if(s=a.getFromId(t,p._diag[l][1]))for(F[c]=new Array(O),u=0;u<O;u++)F[c][u]=s.c2p(m[c][u])}if(g.selectBatch.length||g.unselectBatch.length){var N=i.extendFlat({},v,g.unselectedOptions,w),B=i.extendFlat({},v,g.selectedOptions,w);g.matrix.update(N,B),P=!1}}else d.xpx=d.ypx=null;if(P){var j=i.extendFlat({},v,w);g.matrix.update(j,null)}}}e.exports=function(t,e,r){if(r.length)for(var n=0;n<r.length;n++)s(t,r[n][0])}},{\"../../components/dragelement/helpers\":385,\"../../lib\":515,\"../../plots/cartesian/axis_ids\":570,\"regl-splom\":283}],1051:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){var r=t._fullLayout,i=e.uid,a=r._splomScenes;a||(a=r._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s=a[e.uid];return s||((s=a[i]=n.extendFlat({},o,{matrix:!1,selectBatch:[],unselectBatch:[]})).draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||n.extendFlat(s,o),s}},{\"../../lib\":515}],1052:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=n.pushUnique,a=t(\"../scatter/subtypes\"),o=t(\"./helpers\");e.exports=function(t,e){var r=t.cd,s=r[0].trace,l=r[0].t,u=t.scene,c=u.matrixOptions.cdata,f=t.xaxis,h=t.yaxis,p=[];if(!u)return p;var d=!a.hasMarkers(s)&&!a.hasText(s);if(!0!==s.visible||d)return p;var g=o.getDimIndex(s,f),v=o.getDimIndex(s,h);if(!1===g||!1===v)return p;var m=l.xpx[g],y=l.ypx[v],x=c[g],b=c[v],_=(t.scene.selectBatch||[]).slice(),w=[];if(!1!==e&&!e.degenerate)for(var k=0;k<x.length;k++)e.contains([m[k],y[k]],null,k,t)?(p.push({pointNumber:k,x:x[k],y:b[k]}),i(_,k)):-1!==_.indexOf(k)?i(_,k):w.push(k);var T=u.matrixOptions;return _.length||w.length?u.selectBatch.length||u.unselectBatch.length||u.matrix.update(u.unselectedOptions,n.extendFlat({},T,u.selectedOptions,u.viewOpts)):u.matrix.update(T,null),u.selectBatch=_,u.unselectBatch=w,p}},{\"../../lib\":515,\"../scatter/subtypes\":961,\"./helpers\":1047}],1053:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,a=t(\"../../plots/template_attributes\").hovertemplateAttrs,o=t(\"../mesh3d/attributes\"),s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,u={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},u:{valType:\"data_array\",editType:\"calc\"},v:{valType:\"data_array\",editType:\"calc\"},w:{valType:\"data_array\",editType:\"calc\"},starts:{x:{valType:\"data_array\",editType:\"calc\"},y:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},maxdisplayed:{valType:\"integer\",min:0,dflt:1e3,editType:\"calc\"},sizeref:{valType:\"number\",editType:\"calc\",min:0,dflt:1},text:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertemplate:a({editType:\"calc\"},{keys:[\"tubex\",\"tubey\",\"tubez\",\"tubeu\",\"tubev\",\"tubew\",\"norm\",\"divergence\"]}),uhoverformat:i(\"u\",1),vhoverformat:i(\"v\",1),whoverformat:i(\"w\",1),xhoverformat:i(\"x\"),yhoverformat:i(\"y\"),zhoverformat:i(\"z\"),showlegend:l({},s.showlegend,{dflt:!1})};l(u,n(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"})),[\"opacity\",\"lightposition\",\"lighting\"].forEach((function(t){u[t]=o[t]})),u.hoverinfo=l({},s.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"divergence\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"}),u.transforms=void 0,e.exports=u},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../mesh3d/attributes\":876}],1054:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/calc\");function a(t){var e,r,i,a,s,l,u,c,f,h,p,d,g=t._x,v=t._y,m=t._z,y=t._len,x=-1/0,b=1/0,_=-1/0,w=1/0,k=-1/0,T=1/0,M=\"\";for(y&&(u=g[0],f=v[0],p=m[0]),y>1&&(c=g[y-1],h=v[y-1],d=m[y-1]),e=0;e<y;e++)x=Math.max(x,g[e]),b=Math.min(b,g[e]),_=Math.max(_,v[e]),w=Math.min(w,v[e]),k=Math.max(k,m[e]),T=Math.min(T,m[e]),a||g[e]===u||(a=!0,M+=\"x\"),s||v[e]===f||(s=!0,M+=\"y\"),l||m[e]===p||(l=!0,M+=\"z\");a||(M+=\"x\"),s||(M+=\"y\"),l||(M+=\"z\");var A=o(t._x),S=o(t._y),E=o(t._z);M=(M=(M=M.replace(\"x\",(u>c?\"-\":\"+\")+\"x\")).replace(\"y\",(f>h?\"-\":\"+\")+\"y\")).replace(\"z\",(p>d?\"-\":\"+\")+\"z\");var C=function(){y=0,A=[],S=[],E=[]};(!y||y<A.length*S.length*E.length)&&C();var L=function(t){return\"x\"===t?g:\"y\"===t?v:m},P=function(t){return\"x\"===t?A:\"y\"===t?S:E},O=function(t){return t[y-1]<t[0]?-1:1},I=L(M[1]),D=L(M[3]),z=L(M[5]),R=P(M[1]).length,F=P(M[3]).length,N=P(M[5]).length,B=!1,j=function(t,e,r){return R*(F*t+e)+r},U=O(L(M[1])),V=O(L(M[3])),H=O(L(M[5]));for(e=0;e<N-1;e++){for(r=0;r<F-1;r++){for(i=0;i<R-1;i++){var q=j(e,r,i),G=j(e,r,i+1),Y=j(e,r+1,i),W=j(e+1,r,i);if(I[q]*U<I[G]*U&&D[q]*V<D[Y]*V&&z[q]*H<z[W]*H||(B=!0),B)break}if(B)break}if(B)break}return B&&(n.warn(\"Encountered arbitrary coordinates! Unable to input data grid.\"),C()),{xMin:b,yMin:w,zMin:T,xMax:x,yMax:_,zMax:k,Xs:A,Ys:S,Zs:E,len:y,fill:M}}function o(t){return n.distinctVals(t).vals}function s(t,e){if(void 0===e&&(e=t.length),n.isTypedArray(t))return t.subarray(0,e);for(var r=[],i=0;i<e;i++)r[i]=+t[i];return r}e.exports={calc:function(t,e){e._len=Math.min(e.u.length,e.v.length,e.w.length,e.x.length,e.y.length,e.z.length),e._u=s(e.u,e._len),e._v=s(e.v,e._len),e._w=s(e.w,e._len),e._x=s(e.x,e._len),e._y=s(e.y,e._len),e._z=s(e.z,e._len);var r=a(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;var n,o,l,u=0;e.starts&&(n=s(e.starts.x||[]),o=s(e.starts.y||[]),l=s(e.starts.z||[]),u=Math.min(n.length,o.length,l.length)),e._startsX=n||[],e._startsY=o||[],e._startsZ=l||[];var c,f=0,h=1/0;for(c=0;c<e._len;c++){var p=e._u[c],d=e._v[c],g=e._w[c],v=Math.sqrt(p*p+d*d+g*g);f=Math.max(f,v),h=Math.min(h,v)}for(i(t,e,{vals:[h,f],containerStr:\"\",cLetter:\"c\"}),c=0;c<u;c++){var m=n[c];r.xMax=Math.max(r.xMax,m),r.xMin=Math.min(r.xMin,m);var y=o[c];r.yMax=Math.max(r.yMax,y),r.yMin=Math.min(r.yMin,y);var x=l[c];r.zMax=Math.max(r.zMax,x),r.zMin=Math.min(r.zMin,x)}e._slen=u,e._normMax=f,e._xbnds=[r.xMin,r.xMax],e._ybnds=[r.yMin,r.yMax],e._zbnds=[r.zMin,r.zMax]},filter:s,processGrid:a}},{\"../../components/colorscale/calc\":375,\"../../lib\":515}],1055:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_streamtube3d,i=n.createTubeMesh,a=t(\"../../lib\"),o=t(\"../../lib/gl_format_color\").parseColorScale,s=t(\"../../components/colorscale\").extractOpts,l=t(\"../../plots/gl3d/zip3\"),u={xaxis:0,yaxis:1,zaxis:2};function c(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var f=c.prototype;function h(t){var e=t.length;return e>2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,c=e._len,f={};function d(t,e){var n=r[e],o=i[u[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,\"xaxis\"),d(e._v,\"yaxis\"),d(e._w,\"zaxis\"),c),!c)return{positions:[],cells:[]};var g=d(e._Xs,\"xaxis\"),v=d(e._Ys,\"yaxis\"),m=d(e._Zs,\"zaxis\");if(f.meshgrid=[g,v,m],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,\"xaxis\"),d(e._startsY,\"yaxis\"),d(e._startsZ,\"zaxis\"));else{for(var y=v[0],x=h(g),b=h(m),_=new Array(x.length*b.length),w=0,k=0;k<x.length;k++)for(var T=0;T<b.length;T++)_[w++]=[x[k],y,b[T]];f.startingPositions=_}f.colormap=o(e),f.tubeSize=e.sizeref,f.maxLength=e.maxdisplayed;var M=d(e._xbnds,\"xaxis\"),A=d(e._ybnds,\"yaxis\"),S=d(e._zbnds,\"zaxis\"),E=p(g),C=p(v),L=p(m),P=[[M[0]-E[0],A[0]-C[0],S[0]-L[0]],[M[1]+E[1],A[1]+C[1],S[1]+L[1]]],O=n(f,P),I=s(e);O.vertexIntensityBounds=[I.min/e._normMax,I.max/e._normMax];var D=e.lightposition;return O.lightPosition=[D.x,D.y,D.z],O.ambient=e.lighting.ambient,O.diffuse=e.lighting.diffuse,O.specular=e.lighting.specular,O.roughness=e.lighting.roughness,O.fresnel=e.lighting.fresnel,O.opacity=e.opacity,e._pad=O.tubeScale*e.sizeref*2,O}f.handlePick=function(t){var e=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(t,n){var i=e[n],a=r[u[n]];return i.l2c(t)/a}if(t.object===this.mesh){var i=t.data.position,a=t.data.velocity;return t.traceCoordinate=[n(i[0],\"xaxis\"),n(i[1],\"yaxis\"),n(i[2],\"zaxis\"),n(a[0],\"xaxis\"),n(a[1],\"yaxis\"),n(a[2],\"zaxis\"),t.data.intensity*this.data._normMax,t.data.divergence],t.textLabel=this.data.hovertext||this.data.text,!0}},f.update=function(t){this.data=t;var e=d(this.scene,t);this.mesh.update(e)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,n=d(t,e),a=i(r,n),o=new c(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},{\"../../../stackgl_modules\":1133,\"../../components/colorscale\":379,\"../../lib\":515,\"../../lib/gl_format_color\":511,\"../../plots/gl3d/zip3\":618}],1056:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/colorscale/defaults\"),a=t(\"./attributes\");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s(\"u\"),u=s(\"v\"),c=s(\"w\"),f=s(\"x\"),h=s(\"y\"),p=s(\"z\");l&&l.length&&u&&u.length&&c&&c.length&&f&&f.length&&h&&h.length&&p&&p.length?(s(\"starts.x\"),s(\"starts.y\"),s(\"starts.z\"),s(\"maxdisplayed\"),s(\"sizeref\"),s(\"lighting.ambient\"),s(\"lighting.diffuse\"),s(\"lighting.specular\"),s(\"lighting.roughness\"),s(\"lighting.fresnel\"),s(\"lightposition.x\"),s(\"lightposition.y\"),s(\"lightposition.z\"),i(t,e,o,s,{prefix:\"\",cLetter:\"c\"}),s(\"text\"),s(\"hovertext\"),s(\"hovertemplate\"),s(\"uhoverformat\"),s(\"vhoverformat\"),s(\"whoverformat\"),s(\"xhoverformat\"),s(\"yhoverformat\"),s(\"zhoverformat\"),e._length=null):e.visible=!1}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"./attributes\":1053}],1057:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"streamtube\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),colorbar:{min:\"cmin\",max:\"cmax\"},calc:t(\"./calc\").calc,plot:t(\"./convert\"),eventData:function(t,e){return t.tubex=t.x,t.tubey=t.y,t.tubez=t.z,t.tubeu=e.traceCoordinate[3],t.tubev=e.traceCoordinate[4],t.tubew=e.traceCoordinate[5],t.norm=e.traceCoordinate[6],t.divergence=e.traceCoordinate[7],delete t.x,delete t.y,delete t.z,t},meta:{}}},{\"../../plots/gl3d\":607,\"./attributes\":1053,\"./calc\":1054,\"./convert\":1055,\"./defaults\":1056}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../plots/attributes\"),i=t(\"../../plots/template_attributes\").hovertemplateAttrs,a=t(\"../../plots/template_attributes\").texttemplateAttrs,o=t(\"../../components/colorscale/attributes\"),s=t(\"../../plots/domain\").attributes,l=t(\"../pie/attributes\"),u=t(\"./constants\"),c=t(\"../../lib/extend\").extendFlat;e.exports={labels:{valType:\"data_array\",editType:\"calc\"},parents:{valType:\"data_array\",editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},branchvalues:{valType:\"enumerated\",values:[\"remainder\",\"total\"],dflt:\"remainder\",editType:\"calc\"},count:{valType:\"flaglist\",flags:[\"branches\",\"leaves\"],dflt:\"leaves\",editType:\"calc\"},level:{valType:\"any\",editType:\"plot\",anim:!0},maxdepth:{valType:\"integer\",editType:\"plot\",dflt:-1},marker:c({colors:{valType:\"data_array\",editType:\"calc\"},line:{color:c({},l.marker.line.color,{dflt:null}),width:c({},l.marker.line.width,{dflt:1}),editType:\"calc\"},editType:\"calc\"},o(\"marker\",{colorAttr:\"colors\",anim:!1})),leaf:{opacity:{valType:\"number\",editType:\"style\",min:0,max:1},editType:\"plot\"},text:l.text,textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"current path\",\"percent root\",\"percent entry\",\"percent parent\"],extras:[\"none\"],editType:\"plot\"},texttemplate:a({editType:\"plot\"},{keys:u.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:l.hovertext,hoverinfo:c({},n.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"name\",\"current path\",\"percent root\",\"percent entry\",\"percent parent\"],dflt:\"label+text+value+name\"}),hovertemplate:i({},{keys:u.eventDataKeys}),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:c({},l.outsidetextfont,{}),rotation:{valType:\"angle\",dflt:0,editType:\"plot\"},sort:l.sort,root:{color:{valType:\"color\",editType:\"calc\",dflt:\"rgba(0,0,0,0)\"},editType:\"calc\"},domain:s({name:\"sunburst\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/domain\":593,\"../../plots/template_attributes\":642,\"../pie/attributes\":910,\"./constants\":1061}],1059:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"sunburst\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":628}],1060:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../../components/colorscale\").makeColorScaleFuncFromTrace,s=t(\"../pie/calc\").makePullColorFn,l=t(\"../pie/calc\").generateExtendedColors,u=t(\"../../components/colorscale\").calc,c=t(\"../../constants/numerical\").ALMOST_EQUAL,f={},h={},p={};function d(t,e,r){var n=0,i=t.children;if(i){for(var a=i.length,o=0;o<a;o++)n+=d(i[o],e,r);r.branches&&n++}else r.leaves&&n++;return t.value=t.data.data.value=n,e._values||(e._values=[]),e._values[t.data.data.i]=n,n}r.calc=function(t,e){var r,l,f,h,p,g,v=t._fullLayout,m=e.ids,y=a.isArrayOrTypedArray(m),x=e.labels,b=e.parents,_=e.values,w=a.isArrayOrTypedArray(_),k=[],T={},M={},A=function(t){return t||\"number\"==typeof t},S=function(t){return!w||i(_[t])&&_[t]>=0};y?(r=Math.min(m.length,b.length),l=function(t){return A(m[t])&&S(t)},f=function(t){return String(m[t])}):(r=Math.min(x.length,b.length),l=function(t){return A(x[t])&&S(t)},f=function(t){return String(x[t])}),w&&(r=Math.min(r,_.length));for(var E=0;E<r;E++)if(l(E)){var C=f(E),L=A(b[E])?String(b[E]):\"\",P={i:E,id:C,pid:L,label:A(x[E])?String(x[E]):\"\"};w&&(P.v=+_[E]),k.push(P),g=C,T[p=L]?T[p].push(g):T[p]=[g],M[g]=1}if(T[\"\"]){if(T[\"\"].length>1){for(var O=a.randstr(),I=0;I<k.length;I++)\"\"===k[I].pid&&(k[I].pid=O);k.unshift({hasMultipleRoots:!0,id:O,pid:\"\",label:\"\"})}}else{var D,z=[];for(D in T)M[D]||z.push(D);if(1!==z.length)return a.warn([\"Multiple implied roots, cannot build\",e.type,\"hierarchy of\",e.name+\".\",\"These roots include:\",z.join(\", \")].join(\" \"));D=z[0],k.unshift({hasImpliedRoot:!0,id:D,pid:\"\",label:D})}try{h=n.stratify().id((function(t){return t.id})).parentId((function(t){return t.pid}))(k)}catch(t){return a.warn([\"Failed to build\",e.type,\"hierarchy of\",e.name+\".\",\"Error:\",t.message].join(\" \"))}var R=n.hierarchy(h),F=!1;if(w)switch(e.branchvalues){case\"remainder\":R.sum((function(t){return t.data.v}));break;case\"total\":R.each((function(t){var r=t.data.data,n=r.v;if(t.children){var i=t.children.reduce((function(t,e){return t+e.data.data.v}),0);if((r.hasImpliedRoot||r.hasMultipleRoots)&&(n=i),n<i*c)return F=!0,a.warn([\"Total value for node\",t.data.data.id,\"of\",e.name,\"is smaller than the sum of its children.\",\"\\nparent value =\",n,\"\\nchildren sum =\",i].join(\" \"))}t.value=n}))}else d(R,e,{branches:-1!==e.count.indexOf(\"branches\"),leaves:-1!==e.count.indexOf(\"leaves\")});if(!F){var N,B;e.sort&&R.sort((function(t,e){return e.value-t.value}));var j=e.marker.colors||[],U=!!j.length;return e._hasColorscale?(U||(j=w?e.values:e._values),u(t,e,{vals:j,containerStr:\"marker\",cLetter:\"c\"}),B=o(e.marker)):N=s(v[\"_\"+e.type+\"colormap\"]),R.each((function(t){var r=t.data.data;r.color=e._hasColorscale?B(j[r.i]):N(j[r.i],r.id)})),k[0].hierarchy=R,k}},r._runCrossTraceCalc=function(t,e){var r=e._fullLayout,n=e.calcdata,i=r[t+\"colorway\"],a=r[\"_\"+t+\"colormap\"];r[\"extend\"+t+\"colors\"]&&(i=l(i,\"icicle\"===t?p:\"treemap\"===t?h:f));var o,s=0;function u(t){var e=t.data.data,r=e.id;!1===e.color&&(a[r]?e.color=a[r]:t.parent?t.parent.parent?e.color=t.parent.data.data.color:(a[r]=e.color=i[s%i.length],s++):e.color=o)}for(var c=0;c<n.length;c++){var d=n[c][0];d.trace.type===t&&d.hierarchy&&(o=d.trace.root.color,d.hierarchy.each(u))}},r.crossTraceCalc=function(t){return r._runCrossTraceCalc(\"sunburst\",t)}},{\"../../components/colorscale\":379,\"../../constants/numerical\":491,\"../../lib\":515,\"../pie/calc\":912,\"d3-hierarchy\":115,\"fast-isnumeric\":190}],1061:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"linear\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"]}},{}],1062:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults,o=t(\"../bar/defaults\").handleText,s=t(\"../../components/colorscale\"),l=s.hasColorscale,u=s.handleDefaults;e.exports=function(t,e,r,s){function c(r,a){return n.coerce(t,e,i,r,a)}var f=c(\"labels\"),h=c(\"parents\");if(f&&f.length&&h&&h.length){var p=c(\"values\");p&&p.length?c(\"branchvalues\"):c(\"count\"),c(\"level\"),c(\"maxdepth\"),c(\"marker.line.width\")&&c(\"marker.line.color\",s.paper_bgcolor),c(\"marker.colors\");var d=e._hasColorscale=l(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;d&&u(t,e,s,c,{prefix:\"marker.\",cLetter:\"c\"}),c(\"leaf.opacity\",d?1:.7);var g=c(\"text\");c(\"texttemplate\"),e.texttemplate||c(\"textinfo\",Array.isArray(g)?\"text+label\":\"label\"),c(\"hovertext\"),c(\"hovertemplate\"),o(t,e,s,c,\"auto\",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c(\"insidetextorientation\"),c(\"sort\"),c(\"rotation\"),c(\"root.color\"),a(e,s,c),e._length=null}else e.visible=!1}},{\"../../components/colorscale\":379,\"../../lib\":515,\"../../plots/domain\":593,\"../bar/defaults\":661,\"./attributes\":1058}],1063:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../registry\"),a=t(\"../../components/fx/helpers\").appendArrayPointValue,o=t(\"../../components/fx\"),s=t(\"../../lib\"),l=t(\"../../lib/events\"),u=t(\"./helpers\"),c=t(\"../pie/helpers\").formatPieValue;function f(t,e,r){for(var n=t.data.data,i={curveNumber:e.index,pointNumber:n.i,data:e._input,fullData:e},o=0;o<r.length;o++){var s=r[o];s in t&&(i[s]=t[s])}return\"parentString\"in t&&!u.isHierarchyRoot(t)&&(i.parent=t.parentString),a(i,e,n.i),i}e.exports=function(t,e,r,a,h){var p=a[0],d=p.trace,g=p.hierarchy,v=\"sunburst\"===d.type,m=\"treemap\"===d.type||\"icicle\"===d.type;\"_hasHoverLabel\"in d||(d._hasHoverLabel=!1),\"_hasHoverEvent\"in d||(d._hasHoverEvent=!1),t.on(\"mouseover\",(function(i){var a=r._fullLayout;if(!r._dragging&&!1!==a.hovermode){var l,y=r._fullData[d.index],x=i.data.data,b=x.i,_=u.isHierarchyRoot(i),w=u.getParent(g,i),k=u.getValue(i),T=function(t){return s.castOption(y,b,t)},M=T(\"hovertemplate\"),A=o.castHoverinfo(y,a,b),S=a.separators;if(M||A&&\"none\"!==A&&\"skip\"!==A){var E,C;v&&(E=p.cx+i.pxmid[0]*(1-i.rInscribed),C=p.cy+i.pxmid[1]*(1-i.rInscribed)),m&&(E=i._hoverX,C=i._hoverY);var L,P={},O=[],I=[],D=function(t){return-1!==O.indexOf(t)};A&&(O=\"all\"===A?y._module.attributes.hoverinfo.flags:A.split(\"+\")),P.label=x.label,D(\"label\")&&P.label&&I.push(P.label),x.hasOwnProperty(\"v\")&&(P.value=x.v,P.valueLabel=c(P.value,S),D(\"value\")&&I.push(P.valueLabel)),P.currentPath=i.currentPath=u.getPath(i.data),D(\"current path\")&&!_&&I.push(P.currentPath);var z=[],R=function(){-1===z.indexOf(L)&&(I.push(L),z.push(L))};P.percentParent=i.percentParent=k/u.getValue(w),P.parent=i.parentString=u.getPtLabel(w),D(\"percent parent\")&&(L=u.formatPercent(P.percentParent,S)+\" of \"+P.parent,R()),P.percentEntry=i.percentEntry=k/u.getValue(e),P.entry=i.entry=u.getPtLabel(e),!D(\"percent entry\")||_||i.onPathbar||(L=u.formatPercent(P.percentEntry,S)+\" of \"+P.entry,R()),P.percentRoot=i.percentRoot=k/u.getValue(g),P.root=i.root=u.getPtLabel(g),D(\"percent root\")&&!_&&(L=u.formatPercent(P.percentRoot,S)+\" of \"+P.root,R()),P.text=T(\"hovertext\")||T(\"text\"),D(\"text\")&&(L=P.text,s.isValidTextValue(L)&&I.push(L)),l=[f(i,y,h.eventDataKeys)];var F={trace:y,y:C,_x0:i._x0,_x1:i._x1,_y0:i._y0,_y1:i._y1,text:I.join(\"<br>\"),name:M||D(\"name\")?y.name:void 0,color:T(\"hoverlabel.bgcolor\")||x.color,borderColor:T(\"hoverlabel.bordercolor\"),fontFamily:T(\"hoverlabel.font.family\"),fontSize:T(\"hoverlabel.font.size\"),fontColor:T(\"hoverlabel.font.color\"),nameLength:T(\"hoverlabel.namelength\"),textAlign:T(\"hoverlabel.align\"),hovertemplate:M,hovertemplateLabels:P,eventData:l};v&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?\"left\":\"right\"),m&&(F.x=E,F.idealAlign=E<0?\"left\":\"right\");var N=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:N}),l[0].bbox=N[0],d._hasHoverLabel=!0}if(m){var B=t.select(\"path.surface\");h.styleOne(B,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit(\"plotly_hover\",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on(\"mouseout\",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit(\"plotly_unhover\",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),m){var l=t.select(\"path.surface\");h.styleOne(l,s,a,{hovered:!1})}})),t.on(\"click\",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=v&&(u.isHierarchyRoot(t)||u.isLeaf(t)),c=u.getPtId(t),p=u.isEntry(t)?u.findEntryWithChild(g,c):u.findEntryWithLevel(g,c),m=u.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=m);var x=l.triggerHandler(r,\"plotly_\"+d.type+\"click\",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call(\"_storeDirectGUIEdit\",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:m}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:\"immediate\",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call(\"animate\",r,b,_)}}))}},{\"../../components/fx\":407,\"../../components/fx/helpers\":403,\"../../lib\":515,\"../../lib/events\":504,\"../../registry\":647,\"../pie/helpers\":915,\"./helpers\":1064,\"@plotly/d3\":58}],1064:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../../lib/setcursor\"),o=t(\"../pie/helpers\");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a<i.length;a++){var o=i[a];if(r.getPtId(o)===e)return n=t.copy()}})),n||t},r.isEntry=function(t){return!t.parent},r.isLeaf=function(t){return!t.children},r.getPtId=function(t){return t.data.data.id},r.getPtLabel=function(t){return t.data.data.label},r.getValue=function(t){return t.value},r.isHierarchyRoot=function(t){return\"\"===s(t)},r.setSliceCursor=function(t,e,n){var i=n.isTransitioning;if(!i){var o=t.datum();i=n.hideOnRoot&&r.isHierarchyRoot(o)||n.hideOnLeaves&&r.isLeaf(o)}a(t,i?null:\"pointer\")},r.getInsideTextFontKey=function(t,e,r,i,a){var o=(a||{}).onPathbar?\"pathbar.textfont\":\"insidetextfont\",s=r.data.data.i;return n.castOption(e,s,o+\".\"+t)||n.castOption(e,s,\"textfont.\"+t)||i.size},r.getOutsideTextFontKey=function(t,e,r,i){var a=r.data.data.i;return n.castOption(e,a,\"outsidetextfont.\"+t)||n.castOption(e,a,\"textfont.\"+t)||i.size},r.isOutsideText=function(t,e){return!t._hasColorscale&&r.isHierarchyRoot(e)},r.determineTextFont=function(t,e,a,o){return r.isOutsideText(t,e)?function(t,e,n){return{color:r.getOutsideTextFontKey(\"color\",t,e,n),family:r.getOutsideTextFontKey(\"family\",t,e,n),size:r.getOutsideTextFontKey(\"size\",t,e,n)}}(t,e,a):function(t,e,a,o){var s=(o||{}).onPathbar,l=e.data.data,u=l.i,c=n.castOption(t,u,(s?\"pathbar.textfont\":\"insidetextfont\")+\".color\");return!c&&t._input.textfont&&(c=n.castOption(t._input,u,\"textfont.color\")),{color:c||i.contrast(l.color),family:r.getInsideTextFontKey(\"family\",t,e,a,o),size:r.getInsideTextFontKey(\"size\",t,e,a,o)}}(t,e,a,o)},r.hasTransition=function(t){return!!(t&&t.duration>0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,\"label\").join(\"/\")+\"/\"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return\"0%\"===r&&(r=o.formatPiePercent(t,e)),r}},{\"../../components/color\":367,\"../../lib\":515,\"../../lib/setcursor\":536,\"../pie/helpers\":915}],1065:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\").plot,style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":954,\"./attributes\":1058,\"./base_plot\":1059,\"./calc\":1060,\"./defaults\":1062,\"./layout_attributes\":1066,\"./layout_defaults\":1067,\"./plot\":1068,\"./style\":1069}],1066:[function(t,e,r){\"use strict\";e.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1067:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"sunburstcolorway\",e.colorway),r(\"extendsunburstcolors\")}},{\"../../lib\":515,\"./layout_attributes\":1066}],1068:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-hierarchy\"),a=t(\"d3-interpolate\").interpolate,o=t(\"../../components/drawing\"),s=t(\"../../lib\"),l=t(\"../../lib/svg_text_utils\"),u=t(\"../bar/uniform_text\"),c=u.recordMinTextSize,f=u.clearMinTextSize,h=t(\"../pie/plot\"),p=t(\"../pie/helpers\").getRotationAngle,d=h.computeTransform,g=h.transformInsideText,v=t(\"./style\").styleOne,m=t(\"../bar/style\").resizeText,y=t(\"./fx\"),x=t(\"./constants\"),b=t(\"./helpers\");function _(t,e,u,f){var h=t._context.staticPlot,m=t._fullLayout,_=!m.uniformtext.mode&&b.hasTransition(f),k=n.select(u).selectAll(\"g.slice\"),T=e[0],M=T.trace,A=T.hierarchy,S=b.findEntryWithLevel(A,M.level),E=b.getMaxDepth(M),C=m._size,L=M.domain,P=C.w*(L.x[1]-L.x[0]),O=C.h*(L.y[1]-L.y[0]),I=.5*Math.min(P,O),D=T.cx=C.l+C.w*(L.x[1]+L.x[0])/2,z=T.cy=C.t+C.h*(1-L.y[0])-O/2;if(!S)return k.remove();var R=null,F={};_&&k.each((function(t){F[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!R&&b.isEntry(t)&&(R=t)}));var N=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(S).descendants(),B=S.height+1,j=0,U=E;T.hasMultipleRoots&&b.isHierarchyRoot(S)&&(N=N.slice(1),B-=1,j=1,U+=1),N=N.filter((function(t){return t.y1<=U}));var V=p(M.rotation);V&&N.forEach((function(t){t.x0+=V,t.x1+=V}));var H=Math.min(B,E),q=function(t){return(t-j)/H*I},G=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},Y=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,D,z)},W=function(t){return D+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},X=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(k=k.data(N,b.getPtId)).enter().append(\"g\").classed(\"slice\",!0),_?k.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=b.getPtId(t),n=F[r],i=F[b.getPtId(S)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+V;e=t.rpx1<i.rpx1?{x0:t.x0,x1:t.x1,rpx0:0,rpx1:0}:{x0:o,x1:o,rpx0:t.rpx0,rpx1:t.rpx1}}else{var s,l=b.getPtId(t.parent);k.each((function(t){if(b.getPtId(t)===l)return s=t}));var u,c=s.children;c.forEach((function(t,e){if(b.getPtId(t)===r)return u=e}));var f=c.length,h=a(s.x0,s.x1);e={rpx0:I,rpx1:I,x0:h(u/f),x1:h((u+1)/f)}}return a(n,e)}(t);return function(t){return Y(e(t))}})),t.select(\"g.slicetext\").attr(\"opacity\",0)})).remove():k.exit().remove(),k.order();var Z=null;if(_&&R){var K=b.getPtId(R);k.each((function(t){null===Z&&b.getPtId(t)===K&&(Z=t.x1)}))}var J=k;function $(t){var e,r=F[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},R)if(t.parent)if(Z){var i=t.x1>Z?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,Q(t));else e.x0=e.x1=V;else e.x0=e.x1=V;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),u=a(e.x0,t.x0),f=a(e.x1,t.x1),h=a(e.transform.scale,n.scale),p=a(e.transform.rotate,n.rotate),d=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,g=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=u(t),i=f(t),a=function(t){return g(Math.pow(t,d))}(t),s={pxmid:G(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return c(M.type,n,m),{transform:{targetX:W(s),targetY:X(s),scale:h(t),rotate:p(t),rCenter:a}}}}function Q(t){var e=t.parent,r=F[b.getPtId(e)],n={};if(r){var i=e.children,o=i.indexOf(t),s=i.length,l=a(r.x0,r.x1);n.x0=l(o/s),n.x1=l(o/s)}else n.x0=n.x1=0;return n}_&&(J=J.transition().each(\"end\",(function(){var e=n.select(this);b.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})}))),J.each((function(i){var u=n.select(this),f=s.ensureSingle(u,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",h?\"none\":\"all\")}));i.rpx0=q(i.y0),i.rpx1=q(i.y1),i.xmid=(i.x0+i.x1)/2,i.pxmid=G(i.rpx1,i.xmid),i.midangle=-(i.xmid-Math.PI/2),i.startangle=-(i.x0-Math.PI/2),i.stopangle=-(i.x1-Math.PI/2),i.halfangle=.5*Math.min(s.angleDelta(i.x0,i.x1)||Math.PI,Math.PI),i.ring=1-i.rpx0/i.rpx1,i.rInscribed=function(t){return 0===t.rpx0&&s.isFullCircle([t.x0,t.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2))}(i),_?f.transition().attrTween(\"d\",(function(t){var e=function(t){var e,r=F[b.getPtId(t)],n={x0:t.x0,x1:t.x1,rpx0:t.rpx0,rpx1:t.rpx1};if(r)e=r;else if(R)if(t.parent)if(Z){var i=(t.x1>Z?2*Math.PI:0)+V;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,Q(t));else e={rpx0:0,rpx1:0};else e={x0:V,x1:V};return a(e,n)}(t);return function(t){return Y(e(t))}})):f.attr(\"d\",Y),u.call(y,S,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(v,i,M);var p=s.ensureSingle(u,\"g\",\"slicetext\"),w=s.ensureSingle(p,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),k=s.ensureUniformFontSize(t,b.determineTextFont(M,i,m.font));w.text(r.formatSliceLabel(i,S,M,e,m)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(o.font,k).call(l.convertToTspans,t);var A=o.bBox(w.node());i.transform=g(A,i,T),i.transform.targetX=W(i),i.transform.targetY=X(i);var E=function(t,e){var r=t.transform;return d(r,e),r.fontSize=k.size,c(M.type,r,m),s.getTextTransform(r)};_?w.transition().attrTween(\"transform\",(function(t){var e=$(t);return function(t){return E(e(t),A)}})):w.attr(\"transform\",E(i,A))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,u=!r,c=!s.uniformtext.mode&&b.hasTransition(r);f(\"sunburst\",s),(a=l.selectAll(\"g.trace.sunburst\").data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),a.order(),c?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){o&&o()})).each(\"interrupt\",(function(){o&&o()})).each((function(){l.selectAll(\"g.trace\").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&m(t,s._sunburstlayer.selectAll(\".trace\"),\"sunburst\")),u&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&\"none\"!==o))return\"\";var l=i.separators,u=n[0],c=t.data.data,f=u.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var g,v=o.split(\"+\"),m=function(t){return-1!==v.indexOf(t)},y=[];if(m(\"label\")&&c.label&&y.push(c.label),c.hasOwnProperty(\"v\")&&m(\"value\")&&y.push(b.formatValue(c.v,l)),!h){m(\"current path\")&&y.push(b.getPath(t.data));var x=0;m(\"percent parent\")&&x++,m(\"percent entry\")&&x++,m(\"percent root\")&&x++;var _=x>1;if(x){var w,k=function(t){g=b.formatPercent(w,l),_&&(g+=\" of \"+t),y.push(g)};m(\"percent parent\")&&!h&&(w=d/b.getValue(p),k(\"parent\")),m(\"percent entry\")&&(w=d/b.getValue(e),k(\"entry\")),m(\"percent root\")&&(w=d/b.getValue(f),k(\"root\"))}}return m(\"text\")&&(g=s.castOption(r,c.i,\"text\"),s.isValidTextValue(g)&&y.push(g)),y.join(\"<br>\")}var T=s.castOption(r,c.i,\"texttemplate\");if(!T)return\"\";var M={};c.label&&(M.label=c.label),c.hasOwnProperty(\"v\")&&(M.value=c.v,M.valueLabel=b.formatValue(c.v,l)),M.currentPath=b.getPath(t.data),h||(M.percentParent=d/b.getValue(p),M.percentParentLabel=b.formatPercent(M.percentParent,l),M.parent=b.getPtLabel(p)),M.percentEntry=d/b.getValue(e),M.percentEntryLabel=b.formatPercent(M.percentEntry,l),M.entry=b.getPtLabel(e),M.percentRoot=d/b.getValue(f),M.percentRootLabel=b.formatPercent(M.percentRoot,l),M.root=b.getPtLabel(f),c.hasOwnProperty(\"color\")&&(M.color=c.color);var A=s.castOption(r,c.i,\"text\");return(s.isValidTextValue(A)||\"\"===A)&&(M.text=A),M.customdata=s.castOption(r,c.i,\"customdata\"),s.texttemplateString(T,M,i._d3locale,M,r._meta||{})}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../bar/style\":671,\"../bar/uniform_text\":673,\"../pie/helpers\":915,\"../pie/plot\":919,\"./constants\":1061,\"./fx\":1063,\"./helpers\":1064,\"./style\":1069,\"@plotly/d3\":58,\"d3-hierarchy\":115,\"d3-interpolate\":116}],1069:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../bar/uniform_text\").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,\"marker.line.color\")||i.defaultLine,u=a.castOption(r,s,\"marker.line.width\")||0;t.style(\"stroke-width\",u).call(i.fill,n.color).call(i.stroke,l).style(\"opacity\",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(\".trace\");o(t,e,\"sunburst\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{\"../../components/color\":367,\"../../lib\":515,\"../bar/uniform_text\":673,\"@plotly/d3\":58}],1070:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,o=t(\"../../plots/template_attributes\").hovertemplateAttrs,s=t(\"../../plots/attributes\"),l=t(\"../../lib/extend\").extendFlat,u=t(\"../../plot_api/edit_types\").overrideAll;function c(t){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},project:{x:{valType:\"boolean\",dflt:!1},y:{valType:\"boolean\",dflt:!1},z:{valType:\"boolean\",dflt:!1}},color:{valType:\"color\",dflt:n.defaultLine},usecolormap:{valType:\"boolean\",dflt:!1},width:{valType:\"number\",min:1,max:16,dflt:2},highlight:{valType:\"boolean\",dflt:!0},highlightcolor:{valType:\"color\",dflt:n.defaultLine},highlightwidth:{valType:\"number\",min:1,max:16,dflt:2}}}var f=e.exports=u(l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:o(),xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),zhoverformat:a(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},i(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:\"boolean\",dflt:!1},lightposition:{x:{valType:\"number\",min:-1e5,max:1e5,dflt:10},y:{valType:\"number\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\"number\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\"number\",min:0,max:1,dflt:.8},diffuse:{valType:\"number\",min:0,max:1,dflt:.8},specular:{valType:\"number\",min:0,max:2,dflt:.05},roughness:{valType:\"number\",min:0,max:1,dflt:.5},fresnel:{valType:\"number\",min:0,max:5,dflt:.2}},opacity:{valType:\"number\",min:0,max:1,dflt:1},opacityscale:{valType:\"any\",editType:\"calc\"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),\"calc\",\"nested\");f.x.editType=f.y.editType=f.z.editType=\"calc+clearAxisTypes\",f.transforms=void 0},{\"../../components/color\":367,\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642}],1071:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:\"\",cLetter:\"c\"}):n(t,e,{vals:e.z,containerStr:\"\",cLetter:\"c\"})}},{\"../../components/colorscale/calc\":375}],1072:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_surface3d,i=t(\"../../../stackgl_modules\").ndarray,a=t(\"../../../stackgl_modules\").ndarray_linear_interpolate.d2,o=t(\"../heatmap/interp2d\"),s=t(\"../heatmap/find_empties\"),l=t(\"../../lib\").isArrayOrTypedArray,u=t(\"../../lib/gl_format_color\").parseColorScale,c=t(\"../../lib/str2rgbarray\"),f=t(\"../../components/colorscale\").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++)null!=t.dataCoordinate[a]&&(t.dataCoordinate[a]*=this.scene.dataScale[a]);var o=this.data.hovertext||this.data.text;return Array.isArray(o)&&o[i]&&void 0!==o[i][n]?t.textLabel=o[i][n]:t.textLabel=o||\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t<e)return 0;for(var r=0;0===Math.floor(t%e);)t/=e,r++;return r}function v(t){for(var e=[],r=0;r<d.length;r++){var n=d[r];e.push(g(t,n))}return e}function m(t){for(var e=v(t),r=t,n=0;n<d.length;n++)if(e[n]>0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=v(t),n=v(e),i=1,a=0;a<d.length;a++)i*=Math.pow(d[a],Math.max(r[a],n[a]));return i}}p.calcXnums=function(t){var e,r=[];for(e=1;e<t;e++){var n=this.getXat(e-1,0),i=this.getXat(e,0);r[e-1]=i!==n&&null!=n&&null!=i?Math.abs(i-n):0}var a=0;for(e=1;e<t;e++)a+=r[e-1];for(e=1;e<t;e++)0===r[e-1]?r[e-1]=1:r[e-1]=Math.round(a/r[e-1]);return r},p.calcYnums=function(t){var e,r=[];for(e=1;e<t;e++){var n=this.getYat(0,e-1),i=this.getYat(0,e);r[e-1]=i!==n&&null!=n&&null!=i?Math.abs(i-n):0}var a=0;for(e=1;e<t;e++)a+=r[e-1];for(e=1;e<t;e++)0===r[e-1]?r[e-1]=1:r[e-1]=Math.round(a/r[e-1]);return r};var x=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],b=x[9],_=x[13];function w(t,e,r){var n=r[8]+r[2]*e[0]+r[5]*e[1];return t[0]=(r[6]+r[0]*e[0]+r[3]*e[1])/n,t[1]=(r[7]+r[1]*e[0]+r[4]*e[1])/n,t}function k(t,e,r){return function(t,e,r,n){for(var i=[0,0],o=t.shape[0],s=t.shape[1],l=0;l<o;l++)for(var u=0;u<s;u++)r(i,[l,u],n),t.set(l,u,a(e,i[0],i[1]))}(t,e,w,r),t}function T(t,e){for(var r=!1,n=0;n<t.length;n++)if(e===t[n]){r=!0;break}!1===r&&t.push(e)}p.estimateScale=function(t,e){for(var r=1+function(t){if(0!==t.length){for(var e=1,r=0;r<t.length;r++)e=y(e,t[r]);return e}}(0===e?this.calcXnums(t):this.calcYnums(t));r<b;)r*=2;for(;r>_;)r--,r/=m(r),++r<b&&(r=_);var n=Math.round(r/t);return n>1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,u=1+a+1,c=i(new Float32Array(l*u),[l,u]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h<t.length;++h){this.surface.padField(c,t[h]);var p=i(new Float32Array(o*s),[o,s]);k(p,c,f),t[h]=p}},p.setContourLevels=function(){var t,e,r,n=[[],[],[]],i=[!1,!1,!1],a=!1;for(t=0;t<3;++t)if(this.showContour[t]&&(a=!0,this.contourSize[t]>0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];e<this.contourEnd[t];e+=this.contourSize[t])r=e*this.scene.dataScale[t],T(n[t],r);if(a){var o=[[],[],[]];for(t=0;t<3;++t)this.showContour[t]&&(o[t]=i[t]?n[t]:this.scene.contourLevels[t]);this.surface.update({levels:o})}},p.update=function(t){var e,r,n,a,l=this.scene,h=l.fullSceneLayout,p=this.surface,d=u(t),g=l.dataScale,v=t.z[0].length,m=t._ylength,y=l.contourLevels;this.data=t;var x=[];for(e=0;e<3;e++)for(x[e]=[],r=0;r<v;r++)x[e][r]=[];for(r=0;r<v;r++)for(n=0;n<m;n++)x[0][r][n]=this.getXat(r,n,t.xcalendar,h.xaxis),x[1][r][n]=this.getYat(r,n,t.ycalendar,h.yaxis),x[2][r][n]=this.getZat(r,n,t.zcalendar,h.zaxis);if(t.connectgaps)for(t._emptypoints=s(x[2]),o(x[2],t._emptypoints),t._interpolatedZ=[],r=0;r<v;r++)for(t._interpolatedZ[r]=[],n=0;n<m;n++)t._interpolatedZ[r][n]=x[2][r][n];for(e=0;e<3;e++)for(r=0;r<v;r++)for(n=0;n<m;n++)null==(a=x[e][r][n])?x[e][r][n]=NaN:a=x[e][r][n]*=g[e];for(e=0;e<3;e++)for(r=0;r<v;r++)for(n=0;n<m;n++)null!=(a=x[e][r][n])&&(this.minValues[e]>a&&(this.minValues[e]=a),this.maxValues[e]<a&&(this.maxValues[e]=a));for(e=0;e<3;e++)this.objectOffset[e]=.5*(this.minValues[e]+this.maxValues[e]);for(e=0;e<3;e++)for(r=0;r<v;r++)for(n=0;n<m;n++)null!=(a=x[e][r][n])&&(x[e][r][n]-=this.objectOffset[e]);var b=[i(new Float32Array(v*m),[v,m]),i(new Float32Array(v*m),[v,m]),i(new Float32Array(v*m),[v,m])];for(e=0;e<3;e++)for(r=0;r<v;r++)for(n=0;n<m;n++)b[e].set(r,n,x[e][r][n]);x=[];var w={colormap:d,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!t.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:t.opacityscale,opacity:t.opacity},k=f(t);if(w.intensityBounds=[k.min,k.max],t.surfacecolor){var T=i(new Float32Array(v*m),[v,m]);for(r=0;r<v;r++)for(n=0;n<m;n++)T.set(r,n,t.surfacecolor[n][r]);b.push(T)}else w.intensityBounds[0]*=g[2],w.intensityBounds[1]*=g[2];(_<b[0].shape[0]||_<b[0].shape[1])&&(this.refineData=!1),!0===this.refineData&&(this.dataScaleX=this.estimateScale(b[0].shape[0],0),this.dataScaleY=this.estimateScale(b[0].shape[1],1),1===this.dataScaleX&&1===this.dataScaleY||this.refineCoords(b)),t.surfacecolor&&(w.intensity=b.pop());var M=[!0,!0,!0],A=[\"x\",\"y\",\"z\"];for(e=0;e<3;++e){var S=t.contours[A[e]];M[e]=S.highlight,w.showContour[e]=S.show||S.highlight,w.showContour[e]&&(w.contourProject[e]=[S.project.x,S.project.y,S.project.z],S.show?(this.showContour[e]=!0,w.levels[e]=y[e],p.highlightColor[e]=w.contourColor[e]=c(S.color),S.usecolormap?p.highlightTint[e]=w.contourTint[e]=0:p.highlightTint[e]=w.contourTint[e]=1,w.contourWidth[e]=S.width,this.contourStart[e]=S.start,this.contourEnd[e]=S.end,this.contourSize[e]=S.size):(this.showContour[e]=!1,this.contourStart[e]=null,this.contourEnd[e]=null,this.contourSize[e]=0),S.highlight&&(w.dynamicColor[e]=c(S.highlightcolor),w.dynamicWidth[e]=S.highlightwidth))}(function(t){var e=t[0].rgb,r=t[t.length-1].rgb;return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]})(d)&&(w.vertexColor=!0),w.objectOffset=this.objectOffset,w.coords=b,p.update(w),p.visible=t.visible,p.enableDynamic=M,p.enableHighlight=M,p.snapToData=!0,\"lighting\"in t&&(p.ambientLight=t.lighting.ambient,p.diffuseLight=t.lighting.diffuse,p.specularLight=t.lighting.specular,p.roughness=t.lighting.roughness,p.fresnel=t.lighting.fresnel),\"lightposition\"in t&&(p.lightPosition=[t.lightposition.x,t.lightposition.y,t.lightposition.z])},p.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\"../../../stackgl_modules\":1133,\"../../components/colorscale\":379,\"../../lib\":515,\"../../lib/gl_format_color\":511,\"../../lib/str2rgbarray\":540,\"../heatmap/find_empties\":807,\"../heatmap/interp2d\":810}],1073:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../components/colorscale/defaults\"),o=t(\"./attributes\");function s(t,e,r,n){var i=n(\"opacityscale\");\"max\"===i?e.opacityscale=[[0,.1],[1,1]]:\"min\"===i?e.opacityscale=[[0,1],[1,.1]]:\"extremes\"===i?e.opacityscale=function(t,e){for(var r=[],n=0;n<32;n++){var i=n/31,a=e+(1-e)*(1-Math.pow(Math.sin(t*i*Math.PI),2));r.push([i,Math.max(0,Math.min(1,a))])}return r}(1,.1):function(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var n=t[r];if(2!==n.length||+n[0]<e)return!1;e=+n[0]}return!0}(i)||(e.opacityscale=void 0)}function l(t,e,r){e in t&&!(r in t)&&(t[r]=t[e])}e.exports={supplyDefaults:function(t,e,r,u){var c,f;function h(r,n){return i.coerce(t,e,o,r,n)}var p=h(\"x\"),d=h(\"y\"),g=h(\"z\");if(!g||!g.length||p&&p.length<1||d&&d.length<1)e.visible=!1;else{e._xlength=Array.isArray(p)&&i.isArrayOrTypedArray(p[0])?g.length:g[0].length,e._ylength=g.length,n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],u),h(\"text\"),h(\"hovertext\"),h(\"hovertemplate\"),h(\"xhoverformat\"),h(\"yhoverformat\"),h(\"zhoverformat\"),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"hidesurface\",\"connectgaps\",\"opacity\"].forEach((function(t){h(t)}));var v=h(\"surfacecolor\"),m=[\"x\",\"y\",\"z\"];for(c=0;c<3;++c){var y=\"contours.\"+m[c],x=h(y+\".show\"),b=h(y+\".highlight\");if(x||b)for(f=0;f<3;++f)h(y+\".project.\"+m[f]);x&&(h(y+\".color\"),h(y+\".width\"),h(y+\".usecolormap\")),b&&(h(y+\".highlightcolor\"),h(y+\".highlightwidth\")),h(y+\".start\"),h(y+\".end\"),h(y+\".size\")}v||(l(t,\"zmin\",\"cmin\"),l(t,\"zmax\",\"cmax\"),l(t,\"zauto\",\"cauto\")),a(t,e,u,h,{prefix:\"\",cLetter:\"c\"}),s(0,e,0,h),e._length=null}},opacityscaleDefaults:s}},{\"../../components/colorscale/defaults\":377,\"../../lib\":515,\"../../registry\":647,\"./attributes\":1070}],1074:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,colorbar:{min:\"cmin\",max:\"cmax\"},calc:t(\"./calc\"),plot:t(\"./convert\"),moduleType:\"trace\",name:\"surface\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"2dMap\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":607,\"./attributes\":1070,\"./calc\":1071,\"./convert\":1072,\"./defaults\":1073}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../components/annotations/attributes\"),i=t(\"../../lib/extend\").extendFlat,a=t(\"../../plot_api/edit_types\").overrideAll,o=t(\"../../plots/font_attributes\"),s=t(\"../../plots/domain\").attributes,l=t(\"../../plots/cartesian/axis_format_attributes\").descriptionOnlyNumbers;(e.exports=a({domain:s({name:\"table\",trace:!0}),columnwidth:{valType:\"number\",arrayOk:!0,dflt:null},columnorder:{valType:\"data_array\"},header:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[],description:l(\"cell value\")},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:28},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:i({},o({arrayOk:!0}))},cells:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[],description:l(\"cell value\")},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:20},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:i({},o({arrayOk:!0}))}},\"calc\",\"from-root\")).transforms=void 0},{\"../../components/annotations/attributes\":350,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/domain\":593,\"../../plots/font_attributes\":594}],1076:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getModuleCalcData,i=t(\"./plot\"),a=\"table\";r.name=a,r.plot=function(t){var e=n(t.calcdata,a)[0];e.length&&i(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(a),o=e._has&&e._has(a);i&&!o&&n._paperdiv.selectAll(\".table\").remove()}},{\"../../plots/get_data\":602,\"./plot\":1083}],1077:[function(t,e,r){\"use strict\";var n=t(\"../../lib/gup\").wrap;e.exports=function(){return n({})}},{\"../../lib/gup\":512}],1078:[function(t,e,r){\"use strict\";e.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\\$.*\\$$/,goldenRatio:1.618,lineBreaker:\"<br>\",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:\"cubic-out\",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:\"cubic-out\",uplift:5,wrapSpacer:\" \",wrapSplitCharacter:\" \",cn:{table:\"table\",tableControlView:\"table-control-view\",scrollBackground:\"scroll-background\",yColumn:\"y-column\",columnBlock:\"column-block\",scrollAreaClip:\"scroll-area-clip\",scrollAreaClipRect:\"scroll-area-clip-rect\",columnBoundary:\"column-boundary\",columnBoundaryClippath:\"column-boundary-clippath\",columnBoundaryRect:\"column-boundary-rect\",columnCells:\"column-cells\",columnCell:\"column-cell\",cellRect:\"cell-rect\",cellText:\"cell-text\",cellTextHolder:\"cell-text-holder\",scrollbarKit:\"scrollbar-kit\",scrollbar:\"scrollbar\",scrollbarSlider:\"scrollbar-slider\",scrollbarGlyph:\"scrollbar-glyph\",scrollbarCaptureZone:\"scrollbar-capture-zone\"}}},{}],1079:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../lib/extend\").extendFlat,a=t(\"fast-isnumeric\");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r<t.length;r++)e=Math.max(e,o(t[r]));return e}return t}function s(t,e){return t+e}function l(t){var e,r=t.slice(),n=1/0,i=0;for(e=0;e<r.length;e++)Array.isArray(r[e])||(r[e]=[r[e]]),n=Math.min(n,r[e].length),i=Math.max(i,r[e].length);if(n!==i)for(e=0;e<r.length;e++){var a=i-r[e].length;a&&(r[e]=r[e].concat(u(a)))}return r}function u(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=\"\";return e}function c(t){return t.calcdata.columns.reduce((function(e,r){return r.xIndex<t.xIndex?e+r.columnWidth:e}),0)}function f(t,e){return Object.keys(t).map((function(r){return i({},t[r],{auxiliaryBlocks:e})}))}function h(t,e){for(var r,n={},i=0,a=0,o={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,u=0;u<t.length;u++)r=t[u],o.rows.push({rowIndex:u,rowHeight:r}),((a+=r)>=e||u===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=u+1,a=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[\"\"],d=l(d));var g=d.concat(p(r).map((function(){return u((d[0]||[\"\"]).length)}))),v=e.domain,m=Math.floor(t._fullLayout._size.w*(v.x[1]-v.x[0])),y=Math.floor(t._fullLayout._size.h*(v.y[1]-v.y[0])),x=e.header.values.length?g[0].map((function(){return e.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return e.cells.height})):[],_=x.reduce(s,0),w=h(b,y-_+n.uplift),k=f(h(x,_),[]),T=f(w,k),M={},A=e._fullInput.columnorder.concat(p(r.map((function(t,e){return e})))),S=g.map((function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1})),E=S.reduce(s,0);S=S.map((function(t){return t/E*m}));var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:v.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-v.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:y,columnOrder:A,groupHeight:y,rowBlocks:T,headerRowBlocks:k,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map((function(t){return t[0]})),gdColumnsOriginalOrder:g.map((function(t){return t[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(t,e){var r=M[t];return M[t]=(r||0)+1,{key:t+\"__\"+M[t],label:t,specIndex:e,xIndex:A[e],xScale:c,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return L.columns.forEach((function(t){t.calcdata=L,t.x=c(t)})),L}},{\"../../lib/extend\":505,\"./constants\":1078,\"fast-isnumeric\":190}],1080:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:\"header\",type:\"header\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:\"cells1\",type:\"cells\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:\"cells2\",type:\"cells\",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0;return[r,e?r+e.rows.length:0]}(t);return(t.values||[]).slice(e[0],e[1]).map((function(r,n){return{keyWithinBlock:n+(\"string\"==typeof r&&r.match(/[<$&> ]/)?\"_keybuster_\"+Math.random():\"\"),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}}))}},{\"../../lib/extend\":505}],1081:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../plots/domain\").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s(\"columnwidth\"),s(\"header.values\"),s(\"header.format\"),s(\"header.align\"),s(\"header.prefix\"),s(\"header.suffix\"),s(\"header.height\"),s(\"header.line.width\"),s(\"header.line.color\"),s(\"header.fill.color\"),n.coerceFont(s,\"header.font\",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(t,e){return t-e})),o=i.map((function(t){return a.indexOf(t)})),s=o.length;s<n;s++)o.push(s);e(\"columnorder\",o)}(e,s),s(\"cells.values\"),s(\"cells.format\"),s(\"cells.align\"),s(\"cells.prefix\"),s(\"cells.suffix\"),s(\"cells.height\"),s(\"cells.line.width\"),s(\"cells.line.color\"),s(\"cells.fill.color\"),n.coerceFont(s,\"cells.font\",n.extendFlat({},o.font)),e._length=null}},{\"../../lib\":515,\"../../plots/domain\":593,\"./attributes\":1075}],1082:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),moduleType:\"trace\",name:\"table\",basePlotModule:t(\"./base_plot\"),categories:[\"noOpacity\"],meta:{}}},{\"./attributes\":1075,\"./base_plot\":1076,\"./calc\":1077,\"./defaults\":1081,\"./plot\":1083}],1083:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"@plotly/d3\"),a=t(\"../../lib\").numberFormat,o=t(\"../../lib/gup\"),s=t(\"../../components/drawing\"),l=t(\"../../lib/svg_text_utils\"),u=t(\"../../lib\").raiseToTop,c=t(\"../../lib\").strTranslate,f=t(\"../../lib\").cancelTransition,h=t(\"./data_preparation_helper\"),p=t(\"./data_split_helpers\"),d=t(\"../../components/color\");function g(t){return Math.ceil(t.calcdata.maxLineWidth/2)}function v(t,e){return\"clip\"+t._fullLayout._uid+\"_scrollAreaBottomClip_\"+e.key}function m(t,e){return\"clip\"+t._fullLayout._uid+\"_columnBoundaryClippath_\"+e.calcdata.key+\"_\"+e.specIndex}function y(t){return[].concat.apply([],t.map((function(t){return t}))).map((function(t){return t.__data__}))}function x(t,e,r){var a=t.selectAll(\".\"+n.cn.scrollbarKit).data(o.repeat,o.keyFun);a.enter().append(\"g\").classed(n.cn.scrollbarKit,!0).style(\"shape-rendering\",\"geometricPrecision\"),a.each((function(t){var e=t.scrollbarState;e.totalHeight=function(t){var e=t.rowBlocks;return z(e,e.length-1)+(e.length?R(e[e.length-1],1/0):1)}(t),e.scrollableAreaHeight=t.groupHeight-S(t),e.currentlyVisibleHeight=Math.min(e.totalHeight,e.scrollableAreaHeight),e.ratio=e.currentlyVisibleHeight/e.totalHeight,e.barLength=Math.max(e.ratio*e.currentlyVisibleHeight,n.goldenRatio*n.scrollbarWidth),e.barWiggleRoom=e.currentlyVisibleHeight-e.barLength,e.wiggleRoom=Math.max(0,e.totalHeight-e.scrollableAreaHeight),e.topY=0===e.barWiggleRoom?0:t.scrollY/e.wiggleRoom*e.barWiggleRoom,e.bottomY=e.topY+e.barLength,e.dragMultiplier=e.wiggleRoom/e.barWiggleRoom})).attr(\"transform\",(function(t){var e=t.width+n.scrollbarWidth/2+n.scrollbarOffset;return c(e,S(t))}));var s=a.selectAll(\".\"+n.cn.scrollbar).data(o.repeat,o.keyFun);s.enter().append(\"g\").classed(n.cn.scrollbar,!0);var l=s.selectAll(\".\"+n.cn.scrollbarSlider).data(o.repeat,o.keyFun);l.enter().append(\"g\").classed(n.cn.scrollbarSlider,!0),l.attr(\"transform\",(function(t){return c(0,t.scrollbarState.topY||0)}));var u=l.selectAll(\".\"+n.cn.scrollbarGlyph).data(o.repeat,o.keyFun);u.enter().append(\"line\").classed(n.cn.scrollbarGlyph,!0).attr(\"stroke\",\"black\").attr(\"stroke-width\",n.scrollbarWidth).attr(\"stroke-linecap\",\"round\").attr(\"y1\",n.scrollbarWidth/2),u.attr(\"y2\",(function(t){return t.scrollbarState.barLength-n.scrollbarWidth/2})).attr(\"stroke-opacity\",(function(t){return t.columnDragInProgress||!t.scrollbarState.barWiggleRoom||r?0:.4})),u.transition().delay(0).duration(0),u.transition().delay(n.scrollbarHideDelay).duration(n.scrollbarHideDuration).attr(\"stroke-opacity\",0);var f=s.selectAll(\".\"+n.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);f.enter().append(\"line\").classed(n.cn.scrollbarCaptureZone,!0).attr(\"stroke\",\"white\").attr(\"stroke-opacity\",.01).attr(\"stroke-width\",n.scrollbarCaptureWidth).attr(\"stroke-linecap\",\"butt\").attr(\"y1\",0).on(\"mousedown\",(function(r){var n=i.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=n-a.top,l=i.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||C(e,t,null,l(s-o.barLength/2))(r)})).call(i.behavior.drag().origin((function(t){return i.event.stopPropagation(),t.scrollbarState.scrollbarScrollInProgress=!0,t})).on(\"drag\",C(e,t)).on(\"dragend\",(function(){}))),f.attr(\"y2\",(function(t){return t.scrollbarState.scrollableAreaHeight})),e._context.staticPlot&&(u.remove(),f.remove())}function b(t,e,r,a){var l,u=function(t){var e=t.selectAll(\".\"+n.cn.columnCell).data(p.splitToCells,(function(t){return t.keyWithinBlock}));return e.enter().append(\"g\").classed(n.cn.columnCell,!0),e.exit().remove(),e}(function(t){var e=t.selectAll(\".\"+n.cn.columnCells).data(o.repeat,o.keyFun);return e.enter().append(\"g\").classed(n.cn.columnCells,!0),e.exit().remove(),e}(r));(function(t){t.each((function(t,e){var r=t.calcdata.cells.font,n=t.column.specIndex,i={size:k(r.size,n,e),color:k(r.color,n,e),family:k(r.family,n,e)};t.rowNumber=t.key,t.align=k(t.calcdata.cells.align,n,e),t.cellBorderWidth=k(t.calcdata.cells.line.width,n,e),t.font=i}))})(u),l=function(t){var e=t.selectAll(\".\"+n.cn.cellRect).data(o.repeat,(function(t){return t.keyWithinBlock}));return e.enter().append(\"rect\").classed(n.cn.cellRect,!0),e}(u),l.attr(\"width\",(function(t){return t.column.columnWidth})).attr(\"stroke-width\",(function(t){return t.cellBorderWidth})).each((function(t){var e=i.select(this);d.stroke(e,k(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),d.fill(e,k(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))}));var c=function(t){var e=t.selectAll(\".\"+n.cn.cellText).data(o.repeat,(function(t){return t.keyWithinBlock}));return e.enter().append(\"text\").classed(n.cn.cellText,!0).style(\"cursor\",(function(){return\"auto\"})).on(\"mousedown\",(function(){i.event.stopPropagation()})),e}(function(t){var e=t.selectAll(\".\"+n.cn.cellTextHolder).data(o.repeat,(function(t){return t.keyWithinBlock}));return e.enter().append(\"g\").classed(n.cn.cellTextHolder,!0).style(\"shape-rendering\",\"geometricPrecision\"),e}(u));(function(t){t.each((function(t){s.font(i.select(this),t.font)}))})(c),_(c,e,a,t),D(u)}function _(t,e,r,o){t.text((function(t){var e=t.column.specIndex,r=t.rowNumber,i=t.value,o=\"string\"==typeof i,s=o&&i.match(/<br>/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var u,c=\"string\"==typeof(u=i)&&u.match(n.latexCheck);t.latex=c;var f,h,p=c?\"\":k(t.calcdata.cells.prefix,e,r)||\"\",d=c?\"\":k(t.calcdata.cells.suffix,e,r)||\"\",g=c?null:k(t.calcdata.cells.format,e,r)||null,v=p+(g?a(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!c&&(f=w(v)),t.cellHeightMayIncrease=s||c||t.mayHaveMarkup||(void 0===f?w(v):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var m=(\" \"===n.wrapSplitCharacter?v.replace(/<a href=/gi,\"<a_href=\"):v).split(n.wrapSplitCharacter),y=\" \"===n.wrapSplitCharacter?m.map((function(t){return t.replace(/<a_href=/gi,\"<a href=\")})):m;t.fragments=y.map((function(t){return{text:t,width:null}})),t.fragments.push({fragment:n.wrapSpacer,width:null}),h=y.join(n.lineBreaker)+n.lineBreaker+n.wrapSpacer}else delete t.fragments,h=v;return h})).attr(\"dy\",(function(t){return t.needsConvertToTspans?0:\"0.75em\"})).each((function(t){var a=this,s=i.select(a),u=t.wrappingNeeded?P:O;t.needsConvertToTspans?l.convertToTspans(s,o,u(r,a,e,o,t)):i.select(a.parentNode).attr(\"transform\",(function(t){return c(I(t),n.cellPad)})).attr(\"text-anchor\",(function(t){return{left:\"start\",center:\"middle\",right:\"end\"}[t.align]}))}))}function w(t){return-1!==t.indexOf(n.wrapSplitCharacter)}function k(t,e,r){if(Array.isArray(t)){var n=t[Math.min(e,t.length-1)];return Array.isArray(n)?n[Math.min(r,n.length-1)]:n}return t}function T(t,e,r){t.transition().ease(n.releaseTransitionEase).duration(n.releaseTransitionDuration).attr(\"transform\",c(e.x,r))}function M(t){return\"cells\"===t.type}function A(t){return\"header\"===t.type}function S(t){return(t.rowBlocks.length?t.rowBlocks[0].auxiliaryBlocks:[]).reduce((function(t,e){return t+R(e,1/0)}),0)}function E(t,e,r){var n=y(e)[0];if(void 0!==n){var i=n.rowBlocks,a=n.calcdata,o=z(i,i.length),s=n.calcdata.groupHeight-S(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=function(t,e,r){for(var n=[],i=0,a=0;a<t.length;a++){for(var o=t[a],s=o.rows,l=0,u=0;u<s.length;u++)l+=s[u].rowHeight;o.allRowsHeight=l,e<i+l&&e+r>i&&n.push(a),i+=l}return n}(i,l,s);1===u.length&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),e.each((function(t,e){t.page=u[e],t.scrollY=l})),e.attr(\"transform\",(function(t){var e=z(t.rowBlocks,t.page)-t.scrollY;return c(0,e)})),t&&(L(t,r,e,u,n.prevPages,n,0),L(t,r,e,u,n.prevPages,n,1),x(r,t))}}function C(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter((function(t){return s.key===t.key})),u=r||s.scrollbarState.dragMultiplier,c=s.scrollY;s.scrollY=void 0===a?s.scrollY+u*i.event.dy:a;var f=l.selectAll(\".\"+n.cn.yColumn).selectAll(\".\"+n.cn.columnBlock).filter(M);return E(t,f,l),s.scrollY===c}}function L(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(t,e){return e===o&&n[e]!==i[e]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll(\"tspan.line\").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=e[e.length-1].width,s=e.slice(0,-1),l=[],u=0,c=t.column.columnWidth-2*n.cellPad;for(t.value=\"\";s.length;)u+(i=(r=s.shift()).width+a)>c&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],u=0),l.push(r.text),u+=i;u&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0})),o.selectAll(\"tspan.line\").remove(),_(o.select(\".\"+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(D)}}function O(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=N(o),u=o.key-l.firstRowIndex,f=l.rows[u].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[u].rowHeight&&(l.rows[u].rowHeight=p,t.selectAll(\".\"+n.cn.columnCell).call(D),E(null,t.filter(M),0),x(r,a,!0)),s.attr(\"transform\",(function(){var t=this,e=t.parentNode.getBoundingClientRect(),r=i.select(t.parentNode).select(\".\"+n.cn.cellRect).node().getBoundingClientRect(),a=t.transform.baseVal.consolidate(),s=r.top-e.top+(a?a.matrix.f:n.cellPad);return c(I(o,i.select(t.parentNode).select(\".\"+n.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),o.settledY=!0}}}function I(t,e){switch(t.align){case\"left\":default:return n.cellPad;case\"right\":return t.column.columnWidth-(e||0)-n.cellPad;case\"center\":return(t.column.columnWidth-(e||0))/2}}function D(t){t.attr(\"transform\",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(N(t),t.key);return c(0,r+e)})).selectAll(\".\"+n.cn.cellRect).attr(\"height\",(function(t){return(e=N(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function z(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n<t.rows.length&&t.rows[n].rowIndex<e;n++)r+=t.rows[n].rowHeight;return r}function F(t){var e=t.allRowsHeight;if(void 0!==e)return e;for(var r=0,n=0;n<t.rows.length;n++)r+=t.rows[n].rowHeight;return t.allRowsHeight=r,r}function N(t){return t.rowBlocks[t.page]}e.exports=function(t,e){var r=!t._context.staticPlot,a=t._fullLayout._paper.selectAll(\".\"+n.cn.table).data(e.map((function(e){var r=o.unwrap(e).trace;return h(t,r)})),o.keyFun);a.exit().remove(),a.enter().append(\"g\").classed(n.cn.table,!0).attr(\"overflow\",\"visible\").style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"overflow\",\"visible\").style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"all\"),a.attr(\"width\",(function(t){return t.width+t.size.l+t.size.r})).attr(\"height\",(function(t){return t.height+t.size.t+t.size.b})).attr(\"transform\",(function(t){return c(t.translateX,t.translateY)}));var l=a.selectAll(\".\"+n.cn.tableControlView).data(o.repeat,o.keyFun),d=l.enter().append(\"g\").classed(n.cn.tableControlView,!0).style(\"box-sizing\",\"content-box\");if(r){var _=\"onwheel\"in document?\"wheel\":\"mousewheel\";d.on(\"mousemove\",(function(e){l.filter((function(t){return e===t})).call(x,t)})).on(_,(function(e){if(!e.scrollbarState.wheeling){e.scrollbarState.wheeling=!0;var r=e.scrollY+i.event.deltaY;C(t,l,null,r)(e)||(i.event.stopPropagation(),i.event.preventDefault()),e.scrollbarState.wheeling=!1}})).call(x,t,!0)}l.attr(\"transform\",(function(t){return c(t.size.l,t.size.t)}));var w=l.selectAll(\".\"+n.cn.scrollBackground).data(o.repeat,o.keyFun);w.enter().append(\"rect\").classed(n.cn.scrollBackground,!0).attr(\"fill\",\"none\"),w.attr(\"width\",(function(t){return t.width})).attr(\"height\",(function(t){return t.height})),l.each((function(e){s.setClipUrl(i.select(this),v(t,e),t)}));var k=l.selectAll(\".\"+n.cn.yColumn).data((function(t){return t.columns}),o.keyFun);k.enter().append(\"g\").classed(n.cn.yColumn,!0),k.exit().remove(),k.attr(\"transform\",(function(t){return c(t.x,0)})),r&&k.call(i.behavior.drag().origin((function(e){return T(i.select(this),e,-n.uplift),u(this),e.calcdata.columnDragInProgress=!0,x(l.filter((function(t){return e.calcdata.key===t.key})),t),e})).on(\"drag\",(function(t){var e=i.select(this),r=function(e){return(t===e?i.event.x:e.x)+e.columnWidth/2};t.x=Math.max(-n.overdrag,Math.min(t.calcdata.width+n.overdrag-t.columnWidth,i.event.x)),y(k).filter((function(e){return e.calcdata.key===t.calcdata.key})).sort((function(t,e){return r(t)-r(e)})).forEach((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e)})),k.filter((function(e){return t!==e})).transition().ease(n.transitionEase).duration(n.transitionDuration).attr(\"transform\",(function(t){return c(t.x,0)})),e.call(f).attr(\"transform\",c(t.x,-n.uplift))})).on(\"dragend\",(function(e){var r=i.select(this),n=e.calcdata;e.x=e.xScale(e),e.calcdata.columnDragInProgress=!1,T(r,e,0),function(t,e,r){var n=e.gdColumnsOriginalOrder;e.gdColumns.sort((function(t,e){return r[n.indexOf(t)]-r[n.indexOf(e)]})),e.columnorder=r,t.emit(\"plotly_restyle\")}(t,n,n.columns.map((function(t){return t.xIndex})))}))),k.each((function(e){s.setClipUrl(i.select(this),m(t,e),t)}));var S=k.selectAll(\".\"+n.cn.columnBlock).data(p.splitToPanels,o.keyFun);S.enter().append(\"g\").classed(n.cn.columnBlock,!0).attr(\"id\",(function(t){return t.key})),S.style(\"cursor\",(function(t){return t.dragHandle?\"ew-resize\":t.calcdata.scrollbarState.barWiggleRoom?\"ns-resize\":\"default\"}));var L=S.filter(A),P=S.filter(M);r&&P.call(i.behavior.drag().origin((function(t){return i.event.stopPropagation(),t})).on(\"drag\",C(t,l,-1)).on(\"dragend\",(function(){}))),b(t,l,L,S),b(t,l,P,S);var O=l.selectAll(\".\"+n.cn.scrollAreaClip).data(o.repeat,o.keyFun);O.enter().append(\"clipPath\").classed(n.cn.scrollAreaClip,!0).attr(\"id\",(function(e){return v(t,e)}));var I=O.selectAll(\".\"+n.cn.scrollAreaClipRect).data(o.repeat,o.keyFun);I.enter().append(\"rect\").classed(n.cn.scrollAreaClipRect,!0).attr(\"x\",-n.overdrag).attr(\"y\",-n.uplift).attr(\"fill\",\"none\"),I.attr(\"width\",(function(t){return t.width+2*n.overdrag})).attr(\"height\",(function(t){return t.height+n.uplift})),k.selectAll(\".\"+n.cn.columnBoundary).data(o.repeat,o.keyFun).enter().append(\"g\").classed(n.cn.columnBoundary,!0);var D=k.selectAll(\".\"+n.cn.columnBoundaryClippath).data(o.repeat,o.keyFun);D.enter().append(\"clipPath\").classed(n.cn.columnBoundaryClippath,!0),D.attr(\"id\",(function(e){return m(t,e)}));var z=D.selectAll(\".\"+n.cn.columnBoundaryRect).data(o.repeat,o.keyFun);z.enter().append(\"rect\").classed(n.cn.columnBoundaryRect,!0).attr(\"fill\",\"none\"),z.attr(\"width\",(function(t){return t.columnWidth+2*g(t)})).attr(\"height\",(function(t){return t.calcdata.height+2*g(t)+n.uplift})).attr(\"x\",(function(t){return-g(t)})).attr(\"y\",(function(t){return-g(t)})),E(null,P,l)}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/gup\":512,\"../../lib/svg_text_utils\":541,\"./constants\":1078,\"./data_preparation_helper\":1079,\"./data_split_helpers\":1080,\"@plotly/d3\":58}],1084:[function(t,e,r){\"use strict\";var n=t(\"../../plots/template_attributes\").hovertemplateAttrs,i=t(\"../../plots/template_attributes\").texttemplateAttrs,a=t(\"../../components/colorscale/attributes\"),o=t(\"../../plots/domain\").attributes,s=t(\"../pie/attributes\"),l=t(\"../sunburst/attributes\"),u=t(\"./constants\"),c=t(\"../../lib/extend\").extendFlat;e.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{packing:{valType:\"enumerated\",values:[\"squarify\",\"binary\",\"dice\",\"slice\",\"slice-dice\",\"dice-slice\"],dflt:\"squarify\",editType:\"plot\"},squarifyratio:{valType:\"number\",min:1,dflt:1,editType:\"plot\"},flip:{valType:\"flaglist\",flags:[\"x\",\"y\"],dflt:\"\",editType:\"plot\"},pad:{valType:\"number\",min:0,dflt:3,editType:\"plot\"},editType:\"calc\"},marker:c({pad:{t:{valType:\"number\",min:0,editType:\"plot\"},l:{valType:\"number\",min:0,editType:\"plot\"},r:{valType:\"number\",min:0,editType:\"plot\"},b:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\"},colors:l.marker.colors,depthfade:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],editType:\"style\"},line:l.marker.line,editType:\"calc\"},a(\"marker\",{colorAttr:\"colors\",anim:!1})),pathbar:{visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},edgeshape:{valType:\"enumerated\",values:[\">\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:c({},s.textfont,{}),editType:\"calc\"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:\"plot\"},{keys:u.eventDataKeys.concat([\"label\",\"value\"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:u.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c({},s.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:s.sort,root:l.root,domain:o({name:\"treemap\",trace:!0,editType:\"calc\"})}},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plots/domain\":593,\"../../plots/template_attributes\":642,\"../pie/attributes\":910,\"../sunburst/attributes\":1058,\"./constants\":1087}],1085:[function(t,e,r){\"use strict\";var n=t(\"../../plots/plots\");r.name=\"treemap\",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{\"../../plots/plots\":628}],1086:[function(t,e,r){\"use strict\";var n=t(\"../sunburst/calc\");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc(\"treemap\",t)}},{\"../sunburst/calc\":1060}],1087:[function(t,e,r){\"use strict\";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}},{}],1088:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"../../plots/domain\").defaults,s=t(\"../bar/defaults\").handleText,l=t(\"../bar/constants\").TEXTPAD,u=t(\"../../components/colorscale\"),c=u.hasColorscale,f=u.handleDefaults;e.exports=function(t,e,r,u){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h(\"labels\"),d=h(\"parents\");if(p&&p.length&&d&&d.length){var g=h(\"values\");g&&g.length?h(\"branchvalues\"):h(\"count\"),h(\"level\"),h(\"maxdepth\"),\"squarify\"===h(\"tiling.packing\")&&h(\"tiling.squarifyratio\"),h(\"tiling.flip\"),h(\"tiling.pad\");var v=h(\"text\");h(\"texttemplate\"),e.texttemplate||h(\"textinfo\",Array.isArray(v)?\"text+label\":\"label\"),h(\"hovertext\"),h(\"hovertemplate\");var m=h(\"pathbar.visible\");s(t,e,u,h,\"auto\",{hasPathbar:m,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h(\"textposition\");var y=-1!==e.textposition.indexOf(\"bottom\");h(\"marker.line.width\")&&h(\"marker.line.color\",u.paper_bgcolor);var x=h(\"marker.colors\");(e._hasColorscale=c(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis)?f(t,e,u,h,{prefix:\"marker.\",cLetter:\"c\"}):h(\"marker.depthfade\",!(x||[]).length);var b=2*e.textfont.size;h(\"marker.pad.t\",y?b/4:b),h(\"marker.pad.l\",b/4),h(\"marker.pad.r\",b/4),h(\"marker.pad.b\",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(u.paper_bgcolor)}}},m&&(h(\"pathbar.thickness\",e.pathbar.textfont.size+2*l),h(\"pathbar.side\"),h(\"pathbar.edgeshape\")),h(\"sort\"),h(\"root.color\"),o(e,u,h),e._length=null}else e.visible=!1}},{\"../../components/color\":367,\"../../components/colorscale\":379,\"../../lib\":515,\"../../plots/domain\":593,\"../bar/constants\":659,\"../bar/defaults\":661,\"./attributes\":1084}],1089:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../sunburst/helpers\"),a=t(\"../bar/uniform_text\").clearMinTextSize,o=t(\"../bar/style\").resizeText,s=t(\"./plot_one\");e.exports=function(t,e,r,l,u){var c,f,h=u.type,p=u.drawDescendants,d=t._fullLayout,g=d[\"_\"+h+\"layer\"],v=!r;a(h,d),(c=g.selectAll(\"g.trace.\"+h).data(e,(function(t){return t[0].trace.uid}))).enter().append(\"g\").classed(\"trace\",!0).classed(h,!0),c.order(),!d.uniformtext.mode&&i.hasTransition(r)?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each(\"end\",(function(){f&&f()})).each(\"interrupt\",(function(){f&&f()})).each((function(){g.selectAll(\"g.trace\").each((function(e){s(t,e,this,r,p)}))}))):(c.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,g.selectAll(\".trace\"),h)),v&&c.exit().remove()}},{\"../bar/style\":671,\"../bar/uniform_text\":673,\"../sunburst/helpers\":1064,\"./plot_one\":1098,\"@plotly/d3\":58}],1090:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,u=t(\"./constants\"),c=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=!0;e.exports=function(t,e,r,p,d){var g=d.barDifY,v=d.width,m=d.height,y=d.viewX,x=d.viewY,b=d.pathSlice,_=d.toMoveInsideSlice,w=d.strTransform,k=d.hasTransition,T=d.handleSlicesExit,M=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,S={},E=t._context.staticPlot,C=t._fullLayout,L=e[0],P=L.trace,O=L.hierarchy,I=v/P._entryDepth,D=c.listPath(r.data,\"id\"),z=s(O.copy(),[v,m],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(z=z.filter((function(t){var e=D.indexOf(t.data.id);return-1!==e&&(t.x0=I*e,t.x1=I*(e+1),t.y0=g,t.y1=g+m,t.onPathbar=!0,!0)}))).reverse(),(p=p.data(z,c.getPtId)).enter().append(\"g\").classed(\"pathbar\",!0),T(p,h,S,[v,m],b),p.order();var R=p;k&&(R=R.transition().each(\"end\",(function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),R.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-Math.min(v,m)/2),s._hoverY=x(s.y1-m/2);var p=n.select(this),d=i.ensureSingle(p,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",E?\"none\":\"all\")}));k?d.transition().attrTween(\"d\",(function(t){var e=M(t,h,S,[v,m]);return function(t){return b(e(t))}})):d.attr(\"d\",b),p.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),d.call(l,s,P,{hovered:!1}),s._text=(c.getPtLabel(s)||\"\").split(\"<br>\").join(\" \")||\"\";var g=i.ensureSingle(p,\"g\",\"slicetext\"),T=i.ensureSingle(g,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),L=i.ensureUniformFontSize(t,c.determineTextFont(P,s,C.font,{onPathbar:!0}));T.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(a.font,L).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=_(s,{fontSize:L.size,onPathbar:!0}),s.transform.fontSize=L.size,k?T.transition().attrTween(\"transform\",(function(t){var e=A(t,h,S,[v,m]);return function(t){return w(e(t))}})):T.attr(\"transform\",w(s))}))}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../sunburst/fx\":1063,\"../sunburst/helpers\":1064,\"./constants\":1087,\"./partition\":1096,\"./style\":1099,\"@plotly/d3\":58}],1091:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../lib/svg_text_utils\"),s=t(\"./partition\"),l=t(\"./style\").styleOne,u=t(\"./constants\"),c=t(\"../sunburst/helpers\"),f=t(\"../sunburst/fx\"),h=t(\"../sunburst/plot\").formatSliceLabel,p=!1;e.exports=function(t,e,r,d,g){var v=g.width,m=g.height,y=g.viewX,x=g.viewY,b=g.pathSlice,_=g.toMoveInsideSlice,w=g.strTransform,k=g.hasTransition,T=g.handleSlicesExit,M=g.makeUpdateSliceInterpolator,A=g.makeUpdateTextInterpolator,S=g.prevEntry,E=t._context.staticPlot,C=t._fullLayout,L=e[0].trace,P=-1!==L.textposition.indexOf(\"left\"),O=-1!==L.textposition.indexOf(\"right\"),I=-1!==L.textposition.indexOf(\"bottom\"),D=!I&&!L.marker.pad.t||I&&!L.marker.pad.b,z=s(r,[v,m],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf(\"x\")>-1,flipY:L.tiling.flip.indexOf(\"y\")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),R=1/0,F=-1/0;z.forEach((function(t){var e=t.depth;e>=L._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(R=Math.min(R,e),F=Math.max(F,e))})),d=d.data(z,c.getPtId),L._maxVisibleLayers=isFinite(F)?F-R+1:0,d.enter().append(\"g\").classed(\"slice\",!0),T(d,p,{},[v,m],b),d.order();var N=null;if(k&&S){var B=c.getPtId(S);d.each((function(t){null===N&&c.getPtId(t)===B&&(N={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var j=function(){return N||{x0:0,x1:v,y0:0,y1:m}},U=d;return k&&(U=U.transition().each(\"end\",(function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(s){var d=c.isHeader(s,L);s._x0=y(s.x0),s._x1=y(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=y(s.x1-L.marker.pad.r),s._hoverY=x(I?s.y1-L.marker.pad.b/2:s.y0+L.marker.pad.t/2);var g=n.select(this),T=i.ensureSingle(g,\"path\",\"surface\",(function(t){t.style(\"pointer-events\",E?\"none\":\"all\")}));k?T.transition().attrTween(\"d\",(function(t){var e=M(t,p,j(),[v,m]);return function(t){return b(e(t))}})):T.attr(\"d\",b),g.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,L,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text=\"\":s._text=d?D?\"\":c.getPtLabel(s)||\"\":h(s,r,L,e,C)||\"\";var S=i.ensureSingle(g,\"g\",\"slicetext\"),z=i.ensureSingle(S,\"text\",\"\",(function(t){t.attr(\"data-notex\",1)})),R=i.ensureUniformFontSize(t,c.determineTextFont(L,s,C.font));z.text(s._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",O?\"end\":P||d?\"start\":\"middle\").call(a.font,R).call(o.convertToTspans,t),s.textBB=a.bBox(z.node()),s.transform=_(s,{fontSize:R.size,isHeader:d}),s.transform.fontSize=R.size,k?z.transition().attrTween(\"transform\",(function(t){var e=A(t,p,j(),[v,m]);return function(t){return w(e(t))}})):z.attr(\"transform\",w(s))})),N}},{\"../../components/drawing\":389,\"../../lib\":515,\"../../lib/svg_text_utils\":541,\"../sunburst/fx\":1063,\"../sunburst/helpers\":1064,\"../sunburst/plot\":1068,\"./constants\":1087,\"./partition\":1096,\"./style\":1099,\"@plotly/d3\":58}],1092:[function(t,e,r){\"use strict\";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o<a.length;o++)t(a[o],r,n)}},{}],1093:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"treemap\",basePlotModule:t(\"./base_plot\"),categories:[],animatable:!0,attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\").calc,crossTraceCalc:t(\"./calc\").crossTraceCalc,plot:t(\"./plot\"),style:t(\"./style\").style,colorbar:t(\"../scatter/marker_colorbar\"),meta:{}}},{\"../scatter/marker_colorbar\":954,\"./attributes\":1084,\"./base_plot\":1085,\"./calc\":1086,\"./defaults\":1088,\"./layout_attributes\":1094,\"./layout_defaults\":1095,\"./plot\":1097,\"./style\":1099}],1094:[function(t,e,r){\"use strict\";e.exports={treemapcolorway:{valType:\"colorlist\",editType:\"calc\"},extendtreemapcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],1095:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r(\"treemapcolorway\",e.colorway),r(\"extendtreemapcolors\")}},{\"../../lib\":515,\"./layout_attributes\":1094}],1096:[function(t,e,r){\"use strict\";var n=t(\"d3-hierarchy\"),i=t(\"./flip_tree\");e.exports=function(t,e,r){var a,o=r.flipX,s=r.flipY,l=\"dice-slice\"===r.packing,u=r.pad[s?\"bottom\":\"top\"],c=r.pad[o?\"right\":\"left\"],f=r.pad[o?\"left\":\"right\"],h=r.pad[s?\"top\":\"bottom\"];l&&(a=c,c=u,u=a,a=f,f=h,h=a);var p=n.treemap().tile(function(t,e){switch(t){case\"squarify\":return n.treemapSquarify.ratio(e);case\"binary\":return n.treemapBinary;case\"dice\":return n.treemapDice;case\"slice\":return n.treemapSlice;default:return n.treemapSliceDice}}(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(c).paddingRight(f).paddingTop(u).paddingBottom(h).size(l?[e[1],e[0]]:e)(t);return(l||o||s)&&i(p,e,{swapXY:l,flipX:o,flipY:s}),p}},{\"./flip_tree\":1092,\"d3-hierarchy\":115}],1097:[function(t,e,r){\"use strict\";var n=t(\"./draw\"),i=t(\"./draw_descendants\");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:\"treemap\",drawDescendants:i})}},{\"./draw\":1089,\"./draw_descendants\":1091}],1098:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"d3-interpolate\").interpolate,a=t(\"../sunburst/helpers\"),o=t(\"../../lib\"),s=t(\"../bar/constants\").TEXTPAD,l=t(\"../bar/plot\").toMoveInsideBar,u=t(\"../bar/uniform_text\").recordMinTextSize,c=t(\"./constants\"),f=t(\"./draw_ancestors\");function h(t){return a.isHierarchyRoot(t)?\"\":a.getPtId(t)}e.exports=function(t,e,r,p,d){var g=t._fullLayout,v=e[0],m=v.trace,y=\"icicle\"===m.type,x=v.hierarchy,b=a.findEntryWithLevel(x,m.level),_=n.select(r),w=_.selectAll(\"g.pathbar\"),k=_.selectAll(\"g.slice\");if(!b)return w.remove(),void k.remove();var T=a.isHierarchyRoot(b),M=!g.uniformtext.mode&&a.hasTransition(p),A=a.getMaxDepth(m),S=g._size,E=m.domain,C=S.w*(E.x[1]-E.x[0]),L=S.h*(E.y[1]-E.y[0]),P=C,O=m.pathbar.thickness,I=m.marker.line.width+c.gapWithPathbar,D=m.pathbar.visible?m.pathbar.side.indexOf(\"bottom\")>-1?L+I:-(O+I):0,z={x0:P,x1:P,y0:D,y1:D+O},R=function(t,e,r){var n=m.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,N={},B={},j=null,U=function(t,e){return e?N[h(t)]:B[h(t)]},V=function(t,e,r,n){if(e)return N[h(x)]||z;var i=B[m.level]||r;return function(t){return t.data.depth-b.data.depth<A}(t)?R(t,i,n):{}};v.hasMultipleRoots&&T&&A++,m._maxDepth=A,m._backgroundColor=g.paper_bgcolor,m._entryDepth=b.data.depth,m._atRootLevel=T;var H=-C/2+S.l+S.w*(E.x[1]+E.x[0])/2,q=-L/2+S.t+S.h*(1-(E.y[1]+E.y[0])/2),G=function(t){return H+t},Y=function(t){return q+t},W=Y(0),X=G(0),Z=function(t){return X+t},K=function(t){return W+t};function J(t,e){return t+\",\"+e}var $=Z(0),Q=function(t){t.x=Math.max($,t.x)},tt=m.pathbar.edgeshape,et=function(t,e){var r=t.x0,n=t.x1,i=t.y0,a=t.y1,o=t.textBB,c=function(t){return-1!==m.textposition.indexOf(t)},f=c(\"bottom\"),h=c(\"top\")||e.isHeader&&!f?\"start\":f?\"end\":\"middle\",p=c(\"right\"),d=c(\"left\")||e.onPathbar?-1:p?1:0,v=m[y?\"tiling\":\"marker\"].pad;if(e.isHeader){if((r+=(y?v:v.l)-s)>=(n-=(y?v:v.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?v:v.b))&&b<a&&(i=b):i<(b=i+(y?v:v.t))&&b<a&&(a=b)}var _=l(r,n,i,a,o,{isHorizontal:!1,constrained:!0,angle:0,anchor:h,leftToRight:d});return _.fontSize=e.fontSize,_.targetX=G(_.targetX),_.targetY=Y(_.targetY),isNaN(_.targetX)||isNaN(_.targetY)?{}:(r!==n&&i!==a&&u(m.type,_,g),{scale:_.scale,rotate:_.rotate,textX:_.textX,textY:_.textY,anchorX:_.anchorX,anchorY:_.anchorY,targetX:_.targetX,targetY:_.targetY})},rt=function(t,e){for(var r,n=0,i=t;!r&&n<A;)n++,(i=i.parent)?r=U(i,e):n=A;return r||{}},nt=function(t,e,r,n,a){var s,l=U(t,e);if(l)s=l;else if(e)s=z;else if(F)if(t.parent){var u=j||r;u&&!e?s=R(t,u,n):(s={},o.extendFlat(s,rt(t,e)))}else s=o.extendFlat({},t),y&&(\"h\"===a.orientation?a.flipX?s.x0=t.x1:s.x1=0:a.flipY?s.y0=t.y1:s.y1=0);else s={};return i(s,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})},it=function(t,e,r,n){var s=U(t,e),l={},c=V(t,e,r,n);o.extendFlat(l,{transform:et({x0:c.x0,x1:c.x1,y0:c.y0,y1:c.y1,textBB:t.textBB,_text:t._text},{isHeader:a.isHeader(t,m)})}),s?l=s:t.parent&&o.extendFlat(l,rt(t,e));var f=t.transform;return t.x0!==t.x1&&t.y0!==t.y1&&u(m.type,f,g),i(l,{transform:{scale:f.scale,rotate:f.rotate,textX:f.textX,textY:f.textY,anchorX:f.anchorX,anchorY:f.anchorY,targetX:f.targetX,targetY:f.targetY}})},at=function(t,e,r,a,o){var s=a[0],l=a[1];M?t.exit().transition().each((function(){var t=n.select(this);t.select(\"path.surface\").transition().attrTween(\"d\",(function(t){var r=function(t,e,r,n){var a,o=U(t,e);if(e)a=z;else{var s=U(b,e);a=s?R(t,s,n):{}}return i(o,a)}(t,e,0,[s,l]);return function(t){return o(r(t))}})),t.select(\"g.slicetext\").attr(\"opacity\",0)})).remove():t.exit().remove()},ot=function(t){var e=t.transform;return t.x0!==t.x1&&t.y0!==t.y1&&u(m.type,e,g),o.getTextTransform({textX:e.textX,textY:e.textY,anchorX:e.anchorX,anchorY:e.anchorY,targetX:e.targetX,targetY:e.targetY,scale:e.scale,rotate:e.rotate})};M&&(w.each((function(t){N[h(t)]={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1},t.transform&&(N[h(t)].transform={textX:t.transform.textX,textY:t.transform.textY,anchorX:t.transform.anchorX,anchorY:t.transform.anchorY,targetX:t.transform.targetX,targetY:t.transform.targetY,scale:t.transform.scale,rotate:t.transform.rotate})})),k.each((function(t){B[h(t)]={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1},t.transform&&(B[h(t)].transform={textX:t.transform.textX,textY:t.transform.textY,anchorX:t.transform.anchorX,anchorY:t.transform.anchorY,targetX:t.transform.targetX,targetY:t.transform.targetY,scale:t.transform.scale,rotate:t.transform.rotate}),!F&&a.isEntry(t)&&(F=t)}))),j=d(t,e,b,k,{width:C,height:L,viewX:G,viewY:Y,pathSlice:function(t){var e=G(t.x0),r=G(t.x1),n=Y(t.y0),i=Y(t.y1),a=r-e,o=i-n;return a&&o?\"M\"+J(e,n+0)+\"L\"+J(r-0,n)+\"L\"+J(r,i-0)+\"L\"+J(e+0,i)+\"Z\":\"\"},toMoveInsideSlice:et,prevEntry:F,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:M,strTransform:ot}),m.pathbar.visible?f(t,e,b,w,{barDifY:D,width:P,height:O,viewX:Z,viewY:K,pathSlice:function(t){var e=Z(Math.max(Math.min(t.x0,t.x0),0)),r=Z(Math.min(Math.max(t.x1,t.x1),P)),n=K(t.y0),i=K(t.y1),a=O/2,o={},s={};o.x=e,s.x=r,o.y=s.y=(n+i)/2;var l={x:e,y:n},u={x:r,y:n},c={x:r,y:i},f={x:e,y:i};return\">\"===tt?(l.x-=a,u.x-=a,c.x-=a,f.x-=a):\"/\"===tt?(c.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):\"\\\\\"===tt?(l.x-=a,u.x-=a,o.x-=a/2,s.x-=a/2):\"<\"===tt&&(o.x-=a,s.x-=a),Q(l),Q(f),Q(o),Q(u),Q(c),Q(s),\"M\"+J(l.x,l.y)+\"L\"+J(u.x,u.y)+\"L\"+J(s.x,s.y)+\"L\"+J(c.x,c.y)+\"L\"+J(f.x,f.y)+\"L\"+J(o.x,o.y)+\"Z\"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:M,strTransform:ot}):w.remove()}},{\"../../lib\":515,\"../bar/constants\":659,\"../bar/plot\":668,\"../bar/uniform_text\":673,\"../sunburst/helpers\":1064,\"./constants\":1087,\"./draw_ancestors\":1090,\"@plotly/d3\":58,\"d3-interpolate\":116}],1099:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../../lib\"),o=t(\"../sunburst/helpers\"),s=t(\"../bar/uniform_text\").resizeText;function l(t,e,r,n){var s,l,u=(n||{}).hovered,c=e.data.data,f=c.i,h=c.color,p=o.isHierarchyRoot(e),d=1;if(u)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s=\"rgba(0,0,0,0)\",l=0;else if(s=a.castOption(r,f,\"marker.line.color\")||i.defaultLine,l=a.castOption(r,f,\"marker.line.width\")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var v,m=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);v=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else v=e.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var x=0;x<v;x++){var b=.5*x/v;h=i.combine(i.addOpacity(m,b),h)}}}t.style(\"stroke-width\",l).call(i.fill,h).call(i.stroke,s).style(\"opacity\",d)}e.exports={style:function(t){var e=t._fullLayout._treemaplayer.selectAll(\".trace\");s(t,e,\"treemap\"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style(\"opacity\",r.opacity),e.selectAll(\"path.surface\").each((function(t){n.select(this).call(l,t,r,{hovered:!1})}))}))},styleOne:l}},{\"../../components/color\":367,\"../../lib\":515,\"../bar/uniform_text\":673,\"../sunburst/helpers\":1064,\"@plotly/d3\":58}],1100:[function(t,e,r){\"use strict\";var n=t(\"../box/attributes\"),i=t(\"../../lib/extend\").extendFlat,a=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,xhoverformat:a(\"x\"),yhoverformat:a(\"y\"),name:i({},n.name,{}),orientation:i({},n.orientation,{}),bandwidth:{valType:\"number\",min:0,editType:\"calc\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},scalemode:{valType:\"enumerated\",values:[\"width\",\"count\"],dflt:\"width\",editType:\"calc\"},spanmode:{valType:\"enumerated\",values:[\"soft\",\"hard\",\"manual\"],dflt:\"soft\",editType:\"calc\"},span:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:n.fillcolor,points:i({},n.boxpoints,{}),jitter:i({},n.jitter,{}),pointpos:i({},n.pointpos,{}),width:i({},n.width,{}),marker:n.marker,text:n.text,hovertext:n.hovertext,hovertemplate:n.hovertemplate,quartilemethod:n.quartilemethod,box:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},width:{valType:\"number\",min:0,max:1,dflt:.25,editType:\"plot\"},fillcolor:{valType:\"color\",editType:\"style\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},editType:\"plot\"},meanline:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"plot\"},side:{valType:\"enumerated\",values:[\"both\",\"positive\",\"negative\"],dflt:\"both\",editType:\"calc\"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,hoveron:{valType:\"flaglist\",flags:[\"violins\",\"points\",\"kde\"],dflt:\"violins+points+kde\",extras:[\"all\"],editType:\"style\"}}},{\"../../lib/extend\":505,\"../../plots/cartesian/axis_format_attributes\":569,\"../box/attributes\":682}],1101:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../box/calc\"),o=t(\"./helpers\"),s=t(\"../../constants/numerical\").BADNUM;function l(t,e,r){var i=e.max-e.min;if(!i)return t.bandwidth?t.bandwidth:0;if(t.bandwidth)return Math.max(t.bandwidth,i/1e4);var a=r.length,o=n.stdev(r,a-1,e.mean);return Math.max(function(t,e,r){return 1.059*Math.min(e,r/1.349)*Math.pow(t,-.2)}(a,o,e.q3-e.q1),i/100)}function u(t,e,r,n){var a,o=t.spanmode,l=t.span||[],u=[e.min,e.max],c=[e.min-2*n,e.max+2*n];function f(n){var i=l[n],a=\"multicategory\"===r.type?r.r2c(i):r.d2c(i,0,t[e.valLetter+\"calendar\"]);return a===s?c[n]:a}var h={type:\"linear\",range:a=\"soft\"===o?c:\"hard\"===o?u:[f(0),f(1)]};return i.setConvert(h),h.cleanRange(),a}e.exports=function(t,e){var r=a(t,e);if(r[0].t.empty)return r;for(var s=t._fullLayout,c=i.getFromId(t,e[\"h\"===e.orientation?\"xaxis\":\"yaxis\"]),f=1/0,h=-1/0,p=0,d=0,g=0;g<r.length;g++){var v=r[g],m=v.pts.map(o.extractVal),y=v.bandwidth=l(e,v,m),x=v.span=u(e,v,c,y);if(v.min===v.max&&0===y)x=v.span=[v.min,v.max],v.density=[{v:1,t:x[0]}],v.bandwidth=y,p=Math.max(p,1);else{var b=x[1]-x[0],_=Math.ceil(b/(y/3)),w=b/_;if(!isFinite(w)||!isFinite(_))return n.error(\"Something went wrong with computing the violin span\"),r[0].t.empty=!0,r;var k=o.makeKDE(v,e,m);v.density=new Array(_);for(var T=0,M=x[0];M<x[1]+w/2;T++,M+=w){var A=k(M);v.density[T]={v:A,t:M},p=Math.max(p,A)}}d=Math.max(d,m.length),f=Math.min(f,x[0]),h=Math.max(h,x[1])}var S=i.findExtremes(c,[f,h],{padded:!0});if(e._extremes[c._id]=S,e.width)r[0].t.maxKDE=p;else{var E=s._violinScaleGroupStats,C=e.scalegroup,L=E[C];L?(L.maxKDE=Math.max(L.maxKDE,p),L.maxCount=Math.max(L.maxCount,d)):E[C]={maxKDE:p,maxCount:d}}return r[0].t.labels.kde=n._(t,\"kde:\"),r}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../box/calc\":683,\"./helpers\":1104}],1102:[function(t,e,r){\"use strict\";var n=t(\"../box/cross_trace_calc\").setPositionOffset,i=[\"v\",\"h\"];e.exports=function(t,e){for(var r=t.calcdata,a=e.xaxis,o=e.yaxis,s=0;s<i.length;s++){for(var l=i[s],u=\"h\"===l?o:a,c=[],f=0;f<r.length;f++){var h=r[f],p=h[0].t,d=h[0].trace;!0!==d.visible||\"violin\"!==d.type||p.empty||d.orientation!==l||d.xaxis!==a._id||d.yaxis!==o._id||c.push(f)}n(\"violin\",t,c,u)}}},{\"../box/cross_trace_calc\":684}],1103:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../box/defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}function u(r,i){return n.coerce2(t,e,o,r,i)}if(a.handleSampleDefaults(t,e,l,s),!1!==e.visible){l(\"bandwidth\"),l(\"side\"),l(\"width\")||(l(\"scalegroup\",e.name),l(\"scalemode\"));var c,f=l(\"span\");Array.isArray(f)&&(c=\"manual\"),l(\"spanmode\",c);var h=l(\"line.color\",(t.marker||{}).color||r),p=l(\"line.width\"),d=l(\"fillcolor\",i.addOpacity(e.line.color,.5));a.handlePointsDefaults(t,e,l,{prefix:\"\"});var g=u(\"box.width\"),v=u(\"box.fillcolor\",d),m=u(\"box.line.color\",h),y=u(\"box.line.width\",p);l(\"box.visible\",Boolean(g||v||m||y))||(e.box={visible:!1});var x=u(\"meanline.color\",h),b=u(\"meanline.width\",p);l(\"meanline.visible\",Boolean(x||b))||(e.meanline={visible:!1}),l(\"quartilemethod\")}}},{\"../../components/color\":367,\"../../lib\":515,\"../box/defaults\":685,\"./attributes\":1100}],1104:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*t*t)};r.makeKDE=function(t,e,r){var n=r.length,a=i,o=t.bandwidth,s=1/(n*o);return function(t){for(var e=0,i=0;i<n;i++)e+=a((t-r[i])/o);return s*e}},r.getPositionOnKdePath=function(t,e,r){var i,a;\"h\"===e.orientation?(i=\"y\",a=\"x\"):(i=\"x\",a=\"y\");var o=n.findPointOnPath(t.path,r,a,{pathLength:t.pathLength}),s=t.posCenterPx,l=o[i];return[l,\"both\"===e.side?2*s-l:s]},r.getKdeValue=function(t,e,n){var i=t.pts.map(r.extractVal);return r.makeKDE(t,e,i)(n)/t.posDensityScale},r.extractVal=function(t){return t.v}},{\"../../lib\":515}],1105:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../box/hover\"),s=t(\"./helpers\");e.exports=function(t,e,r,l,u){u||(u={});var c,f,h=u.hoverLayer,p=t.cd,d=p[0].trace,g=d.hoveron,v=-1!==g.indexOf(\"violins\"),m=-1!==g.indexOf(\"kde\"),y=[];if(v||m){var x=o.hoverOnBoxes(t,e,r,l);if(m&&x.length>0){var b,_,w,k,T,M=t.xa,A=t.ya;\"h\"===d.orientation?(T=e,b=\"y\",w=A,_=\"x\",k=M):(T=r,b=\"x\",w=M,_=\"y\",k=A);var S=p[t.index];if(T>=S.span[0]&&T<=S.span[1]){var E=i.extendFlat({},t),C=k.c2p(T,!0),L=s.getKdeValue(S,d,T),P=s.getPositionOnKdePath(S,d,C),O=w._offset,I=w._length;E[b+\"0\"]=P[0],E[b+\"1\"]=P[1],E[_+\"0\"]=E[_+\"1\"]=C,E[_+\"Label\"]=_+\": \"+a.hoverLabelText(k,T,d[_+\"hoverformat\"])+\", \"+p[0].t.labels.kde+\" \"+L.toFixed(3);for(var D=0,z=0;z<x.length;z++)if(\"med\"===x[z].attr){D=z;break}E.spikeDistance=x[D].spikeDistance;var R=b+\"Spike\";E[R]=x[D][R],x[D].spikeDistance=void 0,x[D][R]=void 0,E.hovertemplate=!1,y.push(E),(f={})[b+\"1\"]=i.constrain(O+P[0],O,O+I),f[b+\"2\"]=i.constrain(O+P[1],O,O+I),f[_+\"1\"]=f[_+\"2\"]=k._offset+C}}v&&(y=y.concat(x))}-1!==g.indexOf(\"points\")&&(c=o.hoverOnPoints(t,e,r));var F=h.selectAll(\".violinline-\"+d.uid).data(f?[0]:[]);return F.enter().append(\"line\").classed(\"violinline-\"+d.uid,!0).attr(\"stroke-width\",1.5),F.exit().remove(),F.attr(f).call(n.stroke,t.color),\"closest\"===l?c?[c]:y:c?(y.push(c),y):y}},{\"../../components/color\":367,\"../../lib\":515,\"../../plots/cartesian/axes\":566,\"../box/hover\":687,\"./helpers\":1104}],1106:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),crossTraceDefaults:t(\"../box/defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\"),styleOnSelect:t(\"../scatter/style\").styleOnSelect,hoverPoints:t(\"./hover\"),selectPoints:t(\"../box/select\"),moduleType:\"trace\",name:\"violin\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"svg\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\",\"violinLayout\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":578,\"../box/defaults\":685,\"../box/select\":692,\"../scatter/style\":960,\"./attributes\":1100,\"./calc\":1101,\"./cross_trace_calc\":1102,\"./defaults\":1103,\"./hover\":1105,\"./layout_attributes\":1107,\"./layout_defaults\":1108,\"./plot\":1109,\"./style\":1110}],1107:[function(t,e,r){\"use strict\";var n=t(\"../box/layout_attributes\"),i=t(\"../../lib\").extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{\"../../lib\":515,\"../box/layout_attributes\":689}],1108:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"../box/layout_defaults\");e.exports=function(t,e,r){a._supply(t,e,r,(function(r,a){return n.coerce(t,e,i,r,a)}),\"violin\")}},{\"../../lib\":515,\"../box/layout_defaults\":690,\"./layout_attributes\":1107}],1109:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../box/plot\"),s=t(\"../scatter/line_points\"),l=t(\"./helpers\");e.exports=function(t,e,r,u){var c=t._fullLayout,f=e.xaxis,h=e.yaxis;function p(t,e){var r=s(t,{xaxis:f,yaxis:h,trace:e,connectGaps:!0,baseTolerance:.75,shape:\"spline\",simplify:!0,linearized:!0});return a.smoothopen(r[0],1)}i.makeTraceGroups(u,r,\"trace violins\").each((function(t){var r=n.select(this),a=t[0],s=a.t,u=a.trace;if(!0!==u.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,v=e[s.valLetter+\"axis\"],m=e[s.posLetter+\"axis\"],y=\"both\"===u.side,x=y||\"positive\"===u.side,b=y||\"negative\"===u.side,_=r.selectAll(\"path.violin\").data(i.identity);_.enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,k=w.length,T=m.c2l(t.pos+d,!0),M=m.l2p(T);if(u.width)e=s.maxKDE/g;else{var A=c._violinScaleGroupStats[u.scalegroup];e=\"count\"===u.scalemode?A.maxKDE/g*(A.maxCount/t.pts.length):A.maxKDE/g}if(x){for(f=new Array(k),o=0;o<k;o++)(h=f[o]={})[s.posLetter]=T+w[o].v/e,h[s.valLetter]=v.c2l(w[o].t,!0);r=p(f,u)}if(b){for(f=new Array(k),l=0,o=k-1;l<k;l++,o--)(h=f[l]={})[s.posLetter]=T-w[o].v/e,h[s.valLetter]=v.c2l(w[o].t,!0);i=p(f,u)}if(y)a=r+\"L\"+i.substr(1)+\"Z\";else{var S=[M,v.c2p(w[0].t)],E=[M,v.c2p(w[k-1].t)];\"h\"===u.orientation&&(S.reverse(),E.reverse()),a=x?\"M\"+S+\"L\"+r.substr(1)+\"L\"+E:\"M\"+E+\"L\"+i.substr(1)+\"L\"+S}_.attr(\"d\",a),t.posCenterPx=M,t.posDensityScale=e*g,t.path=_.node(),t.pathLength=t.path.getTotalLength()/(y?2:1)}));var w,k,T,M=u.box,A=M.width,S=(M.line||{}).width;y?(w=g*A,k=0):x?(w=[0,g*A/2],k=S*{x:1,y:-1}[s.posLetter]):(w=[g*A/2,0],k=S*{x:-1,y:1}[s.posLetter]),o.plotBoxAndWhiskers(r,{pos:m,val:v},u,{bPos:d,bdPos:w,bPosPxOffset:k}),o.plotBoxMean(r,{pos:m,val:v},u,{bPos:d,bdPos:w,bPosPxOffset:k}),!u.box.visible&&u.meanline.visible&&(T=i.identity);var E=r.selectAll(\"path.meanline\").data(T||[]);E.enter().append(\"path\").attr(\"class\",\"meanline\").style(\"fill\",\"none\").style(\"vector-effect\",\"non-scaling-stroke\"),E.exit().remove(),E.each((function(t){var e=v.c2p(t.mean,!0),r=l.getPositionOnKdePath(t,u,e);n.select(this).attr(\"d\",\"h\"===u.orientation?\"M\"+e+\",\"+r[0]+\"V\"+r[1]:\"M\"+r[0]+\",\"+e+\"H\"+r[1])})),o.plotPoints(r,{x:f,y:h},u,s)}}))}},{\"../../components/drawing\":389,\"../../lib\":515,\"../box/plot\":691,\"../scatter/line_points\":950,\"./helpers\":1104,\"@plotly/d3\":58}],1110:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/color\"),a=t(\"../scatter/style\").stylePoints;e.exports=function(t){var e=n.select(t).selectAll(\"g.trace.violins\");e.style(\"opacity\",(function(t){return t[0].trace.opacity})),e.each((function(e){var r=e[0].trace,o=n.select(this),s=r.box||{},l=s.line||{},u=r.meanline||{},c=u.width;o.selectAll(\"path.violin\").style(\"stroke-width\",r.line.width+\"px\").call(i.stroke,r.line.color).call(i.fill,r.fillcolor),o.selectAll(\"path.box\").style(\"stroke-width\",l.width+\"px\").call(i.stroke,l.color).call(i.fill,s.fillcolor);var f={\"stroke-width\":c+\"px\",\"stroke-dasharray\":2*c+\"px,\"+c+\"px\"};o.selectAll(\"path.mean\").style(f).call(i.stroke,u.color),o.selectAll(\"path.meanline\").style(f).call(i.stroke,u.color),a(o,r,t)}))}},{\"../../components/color\":367,\"../scatter/style\":960,\"@plotly/d3\":58}],1111:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/attributes\"),i=t(\"../isosurface/attributes\"),a=t(\"../surface/attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/edit_types\").overrideAll,u=e.exports=l(s({x:i.x,y:i.y,z:i.z,value:i.value,isomin:i.isomin,isomax:i.isomax,surface:i.surface,spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:1}},slices:i.slices,caps:i.caps,text:i.text,hovertext:i.hovertext,xhoverformat:i.xhoverformat,yhoverformat:i.yhoverformat,zhoverformat:i.zhoverformat,valuehoverformat:i.valuehoverformat,hovertemplate:i.hovertemplate},n(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{colorbar:i.colorbar,opacity:i.opacity,opacityscale:a.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},o.hoverinfo),showlegend:s({},o.showlegend,{dflt:!1})}),\"calc\",\"nested\");u.x.editType=u.y.editType=u.z.editType=u.value.editType=\"calc+clearAxisTypes\",u.transforms=void 0},{\"../../components/colorscale/attributes\":374,\"../../lib/extend\":505,\"../../plot_api/edit_types\":548,\"../../plots/attributes\":562,\"../isosurface/attributes\":871,\"../surface/attributes\":1070}],1112:[function(t,e,r){\"use strict\";var n=t(\"../../../stackgl_modules\").gl_mesh3d,i=t(\"../../lib/gl_format_color\").parseColorScale,a=t(\"../../lib/str2rgbarray\"),o=t(\"../../components/colorscale\").extractOpts,s=t(\"../../plots/gl3d/zip3\"),l=t(\"../isosurface/convert\").findNearestOnAxis,u=t(\"../isosurface/convert\").generateIsoMeshes;function c(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.data=null,this.showContour=!1}var f=c.prototype;f.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._meshX[e],n=this.data._meshY[e],i=this.data._meshZ[e],a=this.data._Ys.length,o=this.data._Zs.length,s=l(r,this.data._Xs).id,u=l(n,this.data._Ys).id,c=l(i,this.data._Zs).id,f=t.index=c+o*u+o*a*s;t.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var h=this.data.hovertext||this.data.text;return Array.isArray(h)&&void 0!==h[f]?t.textLabel=h[f]:h&&(t.textLabel=h),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map((function(e){return t.d2l(e,0,n)*r}))}this.data=u(t);var l={positions:s(n(r.xaxis,t._meshX,e.dataScale[0],t.xcalendar),n(r.yaxis,t._meshY,e.dataScale[1],t.ycalendar),n(r.zaxis,t._meshZ,e.dataScale[2],t.zcalendar)),cells:s(t._meshI,t._meshJ,t._meshK),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,opacityscale:t.opacityscale,contourEnable:t.contour.show,contourColor:a(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},c=o(t);l.vertexIntensity=t._meshIntensity,l.vertexIntensityBounds=[c.min,c.max],l.colormap=i(t),this.mesh.update(l)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\"../../../stackgl_modules\":1133,\"../../components/colorscale\":379,\"../../lib/gl_format_color\":511,\"../../lib/str2rgbarray\":540,\"../../plots/gl3d/zip3\":618,\"../isosurface/convert\":873}],1113:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../isosurface/defaults\").supplyIsoDefaults,o=t(\"../surface/defaults\").opacityscaleDefaults;e.exports=function(t,e,r,s){function l(r,a){return n.coerce(t,e,i,r,a)}a(t,e,r,s,l),o(t,e,s,l)}},{\"../../lib\":515,\"../isosurface/defaults\":874,\"../surface/defaults\":1073,\"./attributes\":1111}],1114:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"../isosurface/calc\"),colorbar:{min:\"cmin\",max:\"cmax\"},plot:t(\"./convert\"),moduleType:\"trace\",name:\"volume\",basePlotModule:t(\"../../plots/gl3d\"),categories:[\"gl3d\",\"showLegend\"],meta:{}}},{\"../../plots/gl3d\":607,\"../isosurface/calc\":872,\"./attributes\":1111,\"./convert\":1112,\"./defaults\":1113}],1115:[function(t,e,r){\"use strict\";var n=t(\"../bar/attributes\"),i=t(\"../scatter/attributes\").line,a=t(\"../../plots/attributes\"),o=t(\"../../plots/cartesian/axis_format_attributes\").axisHoverFormat,s=t(\"../../plots/template_attributes\").hovertemplateAttrs,l=t(\"../../plots/template_attributes\").texttemplateAttrs,u=t(\"./constants\"),c=t(\"../../lib/extend\").extendFlat,f=t(\"../../components/color\");function h(t){return{marker:{color:c({},n.marker.color,{arrayOk:!1,editType:\"style\"}),line:{color:c({},n.marker.line.color,{arrayOk:!1,editType:\"style\"}),width:c({},n.marker.line.width,{arrayOk:!1,editType:\"style\"}),editType:\"style\"},editType:\"style\"},editType:\"style\"}}e.exports={measure:{valType:\"data_array\",dflt:[],editType:\"calc\"},base:{valType:\"number\",dflt:null,arrayOk:!1,editType:\"calc\"},x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o(\"x\"),yhoverformat:o(\"y\"),hovertext:n.hovertext,hovertemplate:s({},{keys:u.eventDataKeys}),hoverinfo:c({},a.hoverinfo,{flags:[\"name\",\"x\",\"y\",\"text\",\"initial\",\"delta\",\"final\"]}),textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"initial\",\"delta\",\"final\"],extras:[\"none\"],editType:\"plot\",arrayOk:!1},texttemplate:l({editType:\"plot\"},{keys:u.eventDataKeys.concat([\"label\"])}),text:n.text,textposition:n.textposition,insidetextanchor:n.insidetextanchor,textangle:n.textangle,textfont:n.textfont,insidetextfont:n.insidetextfont,outsidetextfont:n.outsidetextfont,constraintext:n.constraintext,cliponaxis:n.cliponaxis,orientation:n.orientation,offset:n.offset,width:n.width,increasing:h(),decreasing:h(),totals:h(),connector:{line:{color:c({},i.color,{dflt:f.defaultLine}),width:c({},i.width,{editType:\"plot\"}),dash:i.dash,editType:\"plot\"},mode:{valType:\"enumerated\",values:[\"spanning\",\"between\"],dflt:\"between\",editType:\"plot\"},visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup}},{\"../../components/color\":367,\"../../lib/extend\":505,\"../../plots/attributes\":562,\"../../plots/cartesian/axis_format_attributes\":569,\"../../plots/template_attributes\":642,\"../bar/attributes\":657,\"../scatter/attributes\":936,\"./constants\":1117}],1116:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"../../plots/cartesian/align_period\"),a=t(\"../../lib\").mergeArray,o=t(\"../scatter/calc_selection\"),s=t(\"../../constants/numerical\").BADNUM;function l(t){return\"a\"===t||\"absolute\"===t}function u(t){return\"t\"===t||\"total\"===t}e.exports=function(t,e){var r,c,f,h,p,d,g=n.getFromId(t,e.xaxis||\"x\"),v=n.getFromId(t,e.yaxis||\"y\");\"h\"===e.orientation?(r=g.makeCalcdata(e,\"x\"),f=v.makeCalcdata(e,\"y\"),h=i(e,v,\"y\",f),p=!!e.yperiodalignment,d=\"y\"):(r=v.makeCalcdata(e,\"y\"),f=g.makeCalcdata(e,\"x\"),h=i(e,g,\"x\",f),p=!!e.xperiodalignment,d=\"x\"),c=h.vals;for(var m,y=Math.min(c.length,r.length),x=new Array(y),b=0,_=!1,w=0;w<y;w++){var k=r[w]||0,T=!1;(r[w]!==s||u(e.measure[w])||l(e.measure[w]))&&w+1<y&&(r[w+1]!==s||u(e.measure[w+1])||l(e.measure[w+1]))&&(T=!0);var M=x[w]={i:w,p:c[w],s:k,rawS:k,cNext:T};l(e.measure[w])?(b=M.s,M.isSum=!0,M.dir=\"totals\",M.s=b):u(e.measure[w])?(M.isSum=!0,M.dir=\"totals\",M.s=b):(M.isSum=!1,M.dir=M.rawS<0?\"decreasing\":\"increasing\",m=M.s,M.s=b+m,b+=m),\"totals\"===M.dir&&(_=!0),p&&(x[w].orig_p=f[w],x[w][d+\"End\"]=h.ends[w],x[w][d+\"Start\"]=h.starts[w]),e.ids&&(M.id=String(e.ids[w])),M.v=(e.base||0)+b}return x.length&&(x[0].hasTotals=_),a(e.text,x,\"tx\"),a(e.hovertext,x,\"htx\"),o(x,e),x}},{\"../../constants/numerical\":491,\"../../lib\":515,\"../../plots/cartesian/align_period\":563,\"../../plots/cartesian/axes\":566,\"../scatter/calc_selection\":938}],1117:[function(t,e,r){\"use strict\";e.exports={eventDataKeys:[\"initial\",\"delta\",\"final\"]}},{}],1118:[function(t,e,r){\"use strict\";var n=t(\"../bar/cross_trace_calc\").setGroupPositions;e.exports=function(t,e){var r,i,a=t._fullLayout,o=t._fullData,s=t.calcdata,l=e.xaxis,u=e.yaxis,c=[],f=[],h=[];for(i=0;i<o.length;i++){var p=o[i];!0===p.visible&&p.xaxis===l._id&&p.yaxis===u._id&&\"waterfall\"===p.type&&(r=s[i],\"h\"===p.orientation?h.push(r):f.push(r),c.push(r))}var d={mode:a.waterfallmode,norm:a.waterfallnorm,gap:a.waterfallgap,groupgap:a.waterfallgroupgap};for(n(t,l,u,f,d),n(t,u,l,h,d),i=0;i<c.length;i++){r=c[i];for(var g=0;g<r.length;g++){var v=r[g];!1===v.isSum&&(v.s0+=0===g?0:r[g-1].s),g+1<r.length&&(r[g].nextP0=r[g+1].p0,r[g].nextS0=r[g+1].s0)}}}},{\"../bar/cross_trace_calc\":660}],1119:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../bar/defaults\").handleGroupingDefaults,a=t(\"../bar/defaults\").handleText,o=t(\"../scatter/xy_defaults\"),s=t(\"../scatter/period_defaults\"),l=t(\"./attributes\"),u=t(\"../../components/color\"),c=t(\"../../constants/delta.js\"),f=c.INCREASING.COLOR,h=c.DECREASING.COLOR;function p(t,e,r){t(e+\".marker.color\",r),t(e+\".marker.line.color\",u.defaultLine),t(e+\".marker.line.width\")}e.exports={supplyDefaults:function(t,e,r,i){function u(r,i){return n.coerce(t,e,l,r,i)}if(o(t,e,i,u)){s(t,e,i,u),u(\"xhoverformat\"),u(\"yhoverformat\"),u(\"measure\"),u(\"orientation\",e.x&&!e.y?\"h\":\"v\"),u(\"base\"),u(\"offset\"),u(\"width\"),u(\"text\"),u(\"hovertext\"),u(\"hovertemplate\");var c=u(\"textposition\");a(t,e,i,u,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),\"none\"!==e.textposition&&(u(\"texttemplate\"),e.texttemplate||u(\"textinfo\")),p(u,\"increasing\",f),p(u,\"decreasing\",h),p(u,\"totals\",\"#4499FF\"),u(\"connector.visible\")&&(u(\"connector.mode\"),u(\"connector.line.width\")&&(u(\"connector.line.color\"),u(\"connector.line.dash\")))}else e.visible=!1},crossTraceDefaults:function(t,e){var r,a;function o(t){return n.coerce(a._input,a,l,t)}if(\"group\"===e.waterfallmode)for(var s=0;s<t.length;s++)r=(a=t[s])._input,i(r,a,e,o)}}},{\"../../components/color\":367,\"../../constants/delta.js\":485,\"../../lib\":515,\"../bar/defaults\":661,\"../scatter/period_defaults\":956,\"../scatter/xy_defaults\":963,\"./attributes\":1115}],1120:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.x=\"xVal\"in e?e.xVal:e.x,t.y=\"yVal\"in e?e.yVal:e.y,\"initial\"in e&&(t.initial=e.initial),\"delta\"in e&&(t.delta=e.delta),\"final\"in e&&(t.final=e.final),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),t}},{}],1121:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\").hoverLabelText,i=t(\"../../components/color\").opacity,a=t(\"../bar/hover\").hoverOnBars,o=t(\"../../constants/delta.js\"),s=o.INCREASING.SYMBOL,l=o.DECREASING.SYMBOL;e.exports=function(t,e,r,o,u){var c=a(t,e,r,o,u);if(c){var f=c.cd,h=f[0].trace,p=\"h\"===h.orientation,d=p?\"x\":\"y\",g=p?t.xa:t.ya,v=f[c.index],m=v.isSum?v.b+v.s:v.rawS;if(!v.isSum){c.initial=v.b+v.s-m,c.delta=m,c.final=c.initial+c.delta;var y=T(Math.abs(c.delta));c.deltaLabel=m<0?\"(\"+y+\")\":y,c.finalLabel=T(c.final),c.initialLabel=T(c.initial)}var x=v.hi||h.hoverinfo,b=[];if(x&&\"none\"!==x&&\"skip\"!==x){var _=\"all\"===x,w=x.split(\"+\"),k=function(t){return _||-1!==w.indexOf(t)};v.isSum||(!k(\"final\")||k(p?\"x\":\"y\")||b.push(c.finalLabel),k(\"delta\")&&(m<0?b.push(c.deltaLabel+\" \"+l):b.push(c.deltaLabel+\" \"+s)),k(\"initial\")&&b.push(\"Initial: \"+c.initialLabel))}return b.length&&(c.extraText=b.join(\"<br>\")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;return i(n)?n:i(a)&&o?a:void 0}(h,v),[c]}function T(t){return n(g,t,h[d+\"hoverformat\"])}}},{\"../../components/color\":367,\"../../constants/delta.js\":485,\"../../plots/cartesian/axes\":566,\"../bar/hover\":664}],1122:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\").supplyDefaults,crossTraceDefaults:t(\"./defaults\").crossTraceDefaults,supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),crossTraceCalc:t(\"./cross_trace_calc\"),plot:t(\"./plot\"),style:t(\"./style\").style,hoverPoints:t(\"./hover\"),eventData:t(\"./event_data\"),selectPoints:t(\"../bar/select\"),moduleType:\"trace\",name:\"waterfall\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}},{\"../../plots/cartesian\":578,\"../bar/select\":669,\"./attributes\":1115,\"./calc\":1116,\"./cross_trace_calc\":1118,\"./defaults\":1119,\"./event_data\":1120,\"./hover\":1121,\"./layout_attributes\":1123,\"./layout_defaults\":1124,\"./plot\":1125,\"./style\":1126}],1123:[function(t,e,r){\"use strict\";e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],1124:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s<r.length;s++){var l=r[s];if(l.visible&&\"waterfall\"===l.type){a=!0;break}}a&&(o(\"waterfallmode\"),o(\"waterfallgap\",.2),o(\"waterfallgroupgap\"))}},{\"../../lib\":515,\"./layout_attributes\":1123}],1125:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../../constants/numerical\").BADNUM,s=t(\"../bar/plot\"),l=t(\"../bar/uniform_text\").clearMinTextSize;e.exports=function(t,e,r,u){var c=t._fullLayout;l(\"waterfall\",c),s.plot(t,e,r,u,{mode:c.waterfallmode,norm:c.waterfallmode,gap:c.waterfallgap,groupgap:c.waterfallgroupgap}),function(t,e,r,s){var l=e.xaxis,u=e.yaxis;i.makeTraceGroups(s,r,\"trace bars\").each((function(r){var s=n.select(this),c=r[0].trace,f=i.ensureSingle(s,\"g\",\"lines\");if(c.connector&&c.connector.visible){var h=\"h\"===c.orientation,p=c.connector.mode,d=f.selectAll(\"g.line\").data(i.identity);d.enter().append(\"g\").classed(\"line\",!0),d.exit().remove();var g=d.size();d.each((function(r,s){if(s===g-1||r.cNext){var c=function(t,e,r,n){var i=[],a=[],o=n?e:r,s=n?r:e;return i[0]=o.c2p(t.s0,!0),a[0]=s.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),a[1]=s.c2p(t.p1,!0),i[2]=o.c2p(t.nextS0,!0),a[2]=s.c2p(t.nextP0,!0),n?[i,a]:[a,i]}(r,l,u,h),f=c[0],d=c[1],v=\"\";f[0]!==o&&d[0]!==o&&f[1]!==o&&d[1]!==o&&(\"spanning\"===p&&!r.isSum&&s>0&&(v+=h?\"M\"+f[0]+\",\"+d[1]+\"V\"+d[0]:\"M\"+f[1]+\",\"+d[0]+\"H\"+f[0]),\"between\"!==p&&(r.isSum||s<g-1)&&(v+=h?\"M\"+f[1]+\",\"+d[0]+\"V\"+d[1]:\"M\"+f[0]+\",\"+d[1]+\"H\"+f[1]),f[2]!==o&&d[2]!==o&&(v+=h?\"M\"+f[1]+\",\"+d[1]+\"V\"+d[2]:\"M\"+f[1]+\",\"+d[1]+\"H\"+f[2])),\"\"===v&&(v=\"M0,0Z\"),i.ensureSingle(n.select(this),\"path\").attr(\"d\",v).call(a.setClipUrl,e.layerClipId,t)}}))}else f.remove()}))}(t,e,r,u)}},{\"../../components/drawing\":389,\"../../constants/numerical\":491,\"../../lib\":515,\"../bar/plot\":668,\"../bar/uniform_text\":673,\"@plotly/d3\":58}],1126:[function(t,e,r){\"use strict\";var n=t(\"@plotly/d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/color\"),o=t(\"../../constants/interactions\").DESELECTDIM,s=t(\"../bar/style\"),l=t(\"../bar/uniform_text\").resizeText,u=s.styleTextPoints;e.exports={style:function(t,e,r){var s=r||n.select(t).selectAll(\"g.waterfalllayer\").selectAll(\"g.trace\");l(t,s,\"waterfall\"),s.style(\"opacity\",(function(t){return t[0].trace.opacity})),s.each((function(e){var r=n.select(this),s=e[0].trace;r.selectAll(\".point > path\").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style(\"opacity\",s.selectedpoints&&!t.selected?o:1)}})),u(r,s,t),r.selectAll(\".lines\").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll(\"path\"),t.width,t.color,t.dash)}))}))}}},{\"../../components/color\":367,\"../../components/drawing\":389,\"../../constants/interactions\":490,\"../bar/style\":671,\"../bar/uniform_text\":673,\"@plotly/d3\":58}],1127:[function(t,e,r){\"use strict\";var n=t(\"../plots/cartesian/axes\"),i=t(\"../lib\"),a=t(\"../plot_api/plot_schema\"),o=t(\"./helpers\").pointsAccessorFunction,s=t(\"../constants/numerical\").BADNUM;r.moduleType=\"transform\",r.name=\"aggregate\";var l=r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},groups:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},aggregations:{_isLinkedToArray:\"aggregation\",target:{valType:\"string\",editType:\"calc\"},func:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"median\",\"mode\",\"rms\",\"stddev\",\"min\",\"max\",\"first\",\"last\",\"change\",\"range\"],dflt:\"first\",editType:\"calc\"},funcmode:{valType:\"enumerated\",values:[\"sample\",\"population\"],dflt:\"sample\",editType:\"calc\"},enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},u=l.aggregations;function c(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),u=l.get(),c=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case\"count\":return f;case\"first\":return h;case\"last\":return p;case\"sum\":return function(t,e){for(var r=0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r+=o)}return a(r)};case\"avg\":return function(t,e){for(var r=0,i=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l,i++)}return i?a(r/i):s};case\"min\":return function(t,e){for(var r=1/0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r=Math.min(r,o))}return r===1/0?s:a(r)};case\"max\":return function(t,e){for(var r=-1/0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r=Math.max(r,o))}return r===-1/0?s:a(r)};case\"range\":return function(t,e){for(var r=1/0,i=-1/0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r=Math.min(r,l),i=Math.max(i,l))}return i===-1/0||r===1/0?s:a(i-r)};case\"change\":return function(t,e){var r=n(t[e[0]]),i=n(t[e[e.length-1]]);return r===s||i===s?s:a(i-r)};case\"median\":return function(t,e){for(var r=[],o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&r.push(l)}if(!r.length)return s;r.sort(i.sorterAsc);var u=(r.length-1)/2;return a((r[Math.floor(u)]+r[Math.ceil(u)])/2)};case\"mode\":return function(t,e){for(var r={},i=0,o=s,l=0;l<e.length;l++){var u=n(t[e[l]]);if(u!==s){var c=r[u]=(r[u]||0)+1;c>i&&(i=c,o=u)}}return i?a(o):s};case\"rms\":return function(t,e){for(var r=0,i=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l*l,i++)}return i?a(Math.sqrt(r/i)):s};case\"stddev\":return function(e,r){var i,a=0,o=0,l=1,u=s;for(i=0;i<r.length&&u===s;i++)u=n(e[r[i]]);if(u===s)return s;for(;i<r.length;i++){var c=n(e[r[i]]);if(c!==s){var f=c-u;a+=f,o+=f*f,l++}}var h=\"sample\"===t.funcmode?l-1:l;return h?Math.sqrt((o-a*a/l)/h):0}}}(a,n.getDataConversions(t,e,o,u)),d=new Array(r.length),g=0;g<r.length;g++)d[g]=c(u,r[g]);l.set(d),\"count\"===a.func&&i.pushUnique(e._arrayAttrs,o)}}function f(t,e){return e.length}function h(t,e){return t[e[0]]}function p(t,e){return t[e[e.length-1]]}r.supplyDefaults=function(t,e){var r,n={};function o(e,r){return i.coerce(t,n,l,e,r)}if(!o(\"enabled\"))return n;var s=a.findArrayAttributes(e),c={};for(r=0;r<s.length;r++)c[s[r]]=1;var f=o(\"groups\");if(!Array.isArray(f)){if(!c[f])return n.enabled=!1,n;c[f]=0}var h,p=t.aggregations||[],d=n.aggregations=new Array(p.length);function g(t,e){return i.coerce(p[r],h,u,t,e)}for(r=0;r<p.length;r++){h={_index:r};var v=g(\"target\"),m=g(\"func\");g(\"enabled\")&&v&&(c[v]||\"count\"===m&&void 0===c[v])?(\"stddev\"===m&&g(\"funcmode\"),c[v]=0,d[r]=h):d[r]={enabled:!1,_index:r}}for(r=0;r<s.length;r++)c[s[r]]&&d.push({target:s[r],func:u.func.dflt,enabled:!0,_index:-1});return n},r.calcTransform=function(t,e,r){if(r.enabled){var n=r.groups,a=i.getTargetArray(e,{target:n});if(a){var s,l,u,f,h={},p={},d=[],g=o(e.transforms,r),v=a.length;for(e._length&&(v=Math.min(v,e._length)),s=0;s<v;s++)void 0===(u=h[l=a[s]])?(h[l]=d.length,f=[s],d.push(f),p[h[l]]=g(s)):(d[u].push(s),p[h[l]]=(p[h[l]]||[]).concat(g(s)));r._indexToPoints=p;var m=r.aggregations;for(s=0;s<m.length;s++)c(t,e,d,m[s]);\"string\"==typeof n&&c(t,e,d,{target:n,func:\"first\",enabled:!0}),e._length=d.length}}}},{\"../constants/numerical\":491,\"../lib\":515,\"../plot_api/plot_schema\":554,\"../plots/cartesian/axes\":566,\"./helpers\":1130}],1128:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../registry\"),a=t(\"../plots/cartesian/axes\"),o=t(\"./helpers\").pointsAccessorFunction,s=t(\"../constants/filter_ops\"),l=s.COMPARISON_OPS,u=s.INTERVAL_OPS,c=s.SET_OPS;r.moduleType=\"transform\",r.name=\"filter\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},target:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},operation:{valType:\"enumerated\",values:[].concat(l).concat(u).concat(c),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},preservegaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t){var e={};function a(i,a){return n.coerce(t,e,r.attributes,i,a)}if(a(\"enabled\")){var o=a(\"target\");if(n.isArrayOrTypedArray(o)&&0===o.length)return e.enabled=!1,e;a(\"preservegaps\"),a(\"operation\"),a(\"value\");var s=i.getComponentMethod(\"calendars\",\"handleDefaults\");s(t,e,\"valuecalendar\",null),s(t,e,\"targetcalendar\",null)}return e},r.calcTransform=function(t,e,r){if(r.enabled){var i=n.getTargetArray(e,r);if(i){var s=r.target,f=i.length;e._length&&(f=Math.min(f,e._length));var h=r.targetcalendar,p=e._arrayAttrs,d=r.preservegaps;if(\"string\"==typeof s){var g=n.nestedProperty(e,s+\"calendar\").get();g&&(h=g)}var v,m,y=function(t,e,r){var n=t.operation,i=t.value,a=Array.isArray(i);function o(t){return-1!==t.indexOf(n)}var s,f=function(r){return e(r,0,t.valuecalendar)},h=function(t){return e(t,0,r)};switch(o(l)?s=f(a?i[0]:i):o(u)?s=a?[f(i[0]),f(i[1])]:[f(i),f(i)]:o(c)&&(s=a?i.map(f):[f(i)]),n){case\"=\":return function(t){return h(t)===s};case\"!=\":return function(t){return h(t)!==s};case\"<\":return function(t){return h(t)<s};case\"<=\":return function(t){return h(t)<=s};case\">\":return function(t){return h(t)>s};case\">=\":return function(t){return h(t)>=s};case\"[]\":return function(t){var e=h(t);return e>=s[0]&&e<=s[1]};case\"()\":return function(t){var e=h(t);return e>s[0]&&e<s[1]};case\"[)\":return function(t){var e=h(t);return e>=s[0]&&e<s[1]};case\"(]\":return function(t){var e=h(t);return e>s[0]&&e<=s[1]};case\"][\":return function(t){var e=h(t);return e<=s[0]||e>=s[1]};case\")(\":return function(t){var e=h(t);return e<s[0]||e>s[1]};case\"](\":return function(t){var e=h(t);return e<=s[0]||e>s[1]};case\")[\":return function(t){var e=h(t);return e<s[0]||e>=s[1]};case\"{}\":return function(t){return-1!==s.indexOf(h(t))};case\"}{\":return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(v=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(v);for(var w=o(e.transforms,r),k=0;k<f;k++)y(i[k])?(T(m,k),b[_++]=w(k)):d&&_++;r._indexToPoints=b,e._length=_}}function T(t,r){for(var i=0;i<p.length;i++)t(n.nestedProperty(e,p[i]),r)}}},{\"../constants/filter_ops\":487,\"../lib\":515,\"../plots/cartesian/axes\":566,\"../registry\":647,\"./helpers\":1130}],1129:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_schema\"),a=t(\"../plots/plots\"),o=t(\"./helpers\").pointsAccessorFunction;function s(t,e){var r,s,l,u,c,f,h,p,d,g,v=e.transform,m=e.transformIndex,y=t.transforms[m].groups,x=o(t.transforms,v);if(!n.isArrayOrTypedArray(y)||0===y.length)return[t];var b=n.filterUnique(y),_=new Array(b.length),w=y.length,k=i.findArrayAttributes(t),T=v.styles||[],M={};for(r=0;r<T.length;r++)M[T[r].target]=T[r].value;v.styles&&(g=n.keyedContainer(v,\"styles\",\"target\",\"value.name\"));var A={},S={};for(r=0;r<b.length;r++){A[f=b[r]]=r,S[f]=0,(h=_[r]=n.extendDeepNoArrays({},t))._group=f,h.transforms[m]._indexToPoints={};var E=null;for(g&&(E=g.get(f)),h.name=E||\"\"===E?E:n.templateString(v.nameformat,{trace:t.name,group:f}),p=h.transforms,h.transforms=[],s=0;s<p.length;s++)h.transforms[s]=n.extendDeepNoArrays({},p[s]);for(s=0;s<k.length;s++)n.nestedProperty(h,k[s]).set([])}for(l=0;l<k.length;l++){for(u=k[l],s=0,d=[];s<b.length;s++)d[s]=n.nestedProperty(_[s],u).get();for(c=n.nestedProperty(t,u).get(),s=0;s<w;s++)d[A[y[s]]].push(c[s])}for(s=0;s<w;s++)(h=_[A[y[s]]]).transforms[m]._indexToPoints[S[y[s]]]=x(s),S[y[s]]++;for(r=0;r<b.length;r++)f=b[r],h=_[r],a.clearExpandedTraceDefaultColors(h),h=n.extendDeepNoArrays(h,M[f]||{});return _}r.moduleType=\"transform\",r.name=\"groupby\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},groups:{valType:\"data_array\",dflt:[],editType:\"calc\"},nameformat:{valType:\"string\",editType:\"calc\"},styles:{_isLinkedToArray:\"style\",target:{valType:\"string\",editType:\"calc\"},value:{valType:\"any\",dflt:{},editType:\"calc\",_compareAsJSON:!0},editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t,e,i){var a,o={};function s(e,i){return n.coerce(t,o,r.attributes,e,i)}if(!s(\"enabled\"))return o;s(\"groups\"),s(\"nameformat\",i._dataLength>1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,u=o.styles=[];if(l)for(a=0;a<l.length;a++){var c=u[a]={};n.coerce(l[a],u[a],r.attributes.styles,\"target\");var f=n.coerce(l[a],u[a],r.attributes.styles,\"value\");n.isPlainObject(f)?c.value=n.extendDeep({},f):f&&delete c.value}return o},r.transform=function(t,e){var r,n,i,a=[];for(n=0;n<t.length;n++)for(r=s(t[n],e),i=0;i<r.length;i++)a.push(r[i]);return a}},{\"../lib\":515,\"../plot_api/plot_schema\":554,\"../plots/plots\":628,\"./helpers\":1130}],1130:[function(t,e,r){\"use strict\";r.pointsAccessorFunction=function(t,e){for(var r,n,i=0;i<t.length&&(r=t[i])!==e;i++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);var a=n?function(t){return n[t]}:function(t){return[t]};return a}},{}],1131:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/cartesian/axes\"),a=t(\"./helpers\").pointsAccessorFunction,o=t(\"../constants/numerical\").BADNUM;function s(t,e,r,n){var i,a=new Array(n),s=new Array(n);for(i=0;i<n;i++)a[i]={v:e[i],i};for(a.sort(function(t,e){switch(t.order){case\"ascending\":return function(t,r){var n=e(t.v),i=e(r.v);return n===o?1:i===o?-1:n-i};case\"descending\":return function(t,r){var n=e(t.v),i=e(r.v);return n===o?1:i===o?-1:i-n}}}(t,r)),i=0;i<n;i++)s[i]=a[i].i;return s}r.moduleType=\"transform\",r.name=\"sort\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},target:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},order:{valType:\"enumerated\",values:[\"ascending\",\"descending\"],dflt:\"ascending\",editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t){var e={};function i(i,a){return n.coerce(t,e,r.attributes,i,a)}return i(\"enabled\")&&(i(\"target\"),i(\"order\")),e},r.calcTransform=function(t,e,r){if(r.enabled){var o=n.getTargetArray(e,r);if(o){var l=r.target,u=o.length;e._length&&(u=Math.min(u,e._length));var c,f,h=e._arrayAttrs,p=s(r,o,i.getDataToCoordFunc(t,e,l,o),u),d=a(e.transforms,r),g={};for(c=0;c<h.length;c++){var v=n.nestedProperty(e,h[c]),m=v.get(),y=new Array(u);for(f=0;f<u;f++)y[f]=m[p[f]];v.set(y)}for(f=0;f<u;f++)g[f]=d(p[f]);r._indexToPoints=g,e._length=u}}}},{\"../constants/numerical\":491,\"../lib\":515,\"../plots/cartesian/axes\":566,\"./helpers\":1130}],1132:[function(t,e,r){\"use strict\";r.version=\"2.16.3\"},{}],1133:[function(t,e,n){(function(r){(function(){!function(t){\"object\"==typeof n&&void 0!==e?e.exports=t():(\"undefined\"!=typeof window?window:void 0!==r?r:\"undefined\"!=typeof self?self:this).stackgl=t()}((function(){return function e(r,n,i){function a(s,l){if(!n[s]){if(!r[s]){var u=\"function\"==typeof t&&t;if(!l&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error(\"Cannot find module '\"+s+\"'\");throw c.code=\"MODULE_NOT_FOUND\",c}var f=n[s]={exports:{}};r[s][0].call(f.exports,(function(t){return a(r[s][1][t]||t)}),f,f.exports,e,r,n,i)}return n[s].exports}for(var o=\"function\"==typeof t&&t,s=0;s<i.length;s++)a(i[s]);return a}({1:[function(t,e,r){\"use strict\";r.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=u(t),o=n[0],s=n[1],l=new a(function(t,e,r){return 3*(e+r)/4-r}(0,o,s)),c=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],l[c++]=e>>16&255,l[c++]=e>>8&255,l[c++]=255&e;return 2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[c++]=255&e),1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[c++]=e>>8&255,l[c++]=255&e),l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=16383,s=0,l=r-i;s<l;s+=o)a.push(c(t,s,s+o>l?l:s+o));return 1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+\"==\")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+\"=\")),a.join(\"\")};for(var n=[],i=[],a=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",s=0,l=o.length;s<l;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var i,a=[],o=e;o<r;o+=3)i=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),a.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);var s;return a.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){\"use strict\";var e=t(\"base64-js\"),n=t(\"ieee754\");r.Buffer=o,r.SlowBuffer=function(t){return+t!=t&&(t=0),o.alloc(+t)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function a(t){if(t>i)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var e=new Uint8Array(t);return e.__proto__=o.prototype,e}function o(t,e,r){if(\"number\"==typeof t){if(\"string\"==typeof e)throw new TypeError('The \"string\" argument must be of type string. Received type number');return u(t)}return s(t,e,r)}function s(t,e,r){if(\"string\"==typeof t)return function(t,e){if(\"string\"==typeof e&&\"\"!==e||(e=\"utf8\"),!o.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);var r=0|h(t,e),n=a(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return c(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(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('\"offset\" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');var n;return(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r)).__proto__=o.prototype,n}(t,e,r);if(\"number\"==typeof t)throw new TypeError('The \"value\" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return o.from(n,e,r);var i=function(t){if(o.isBuffer(t)){var e=0|f(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?\"number\"!=typeof t.length||j(t.length)?a(0):c(t):\"Buffer\"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof t[Symbol.toPrimitive])return o.from(t[Symbol.toPrimitive](\"string\"),e,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 l(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 u(t){return l(t),a(t<0?0:0|f(t))}function c(t){for(var e=t.length<0?0:0|f(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t){if(t>=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return 0|t}function h(t,e){if(o.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(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,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){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 F(t).length;default:if(i)return n?-1:R(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function p(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return E(this,e,r);case\"utf8\":case\"utf-8\":return T(this,e,r);case\"ascii\":return A(this,e,r);case\"latin1\":case\"binary\":return S(this,e,r);case\"base64\":return k(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return C(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function v(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;a<s;a++)if(u(t,a)===u(e,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(r+l>s&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;h<l;h++)if(u(t,a+h)!==u(e,h)){f=!1;break}if(f)return a}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(j(s))return o;t[r+o]=s}return o}function y(t,e,r,n){return N(R(e,t.length-r),t,r,n)}function x(t,e,r,n){return N(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function b(t,e,r,n){return x(t,e,r,n)}function _(t,e,r,n){return N(F(e),t,r,n)}function w(t,e,r,n){return N(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function k(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,o,s,l,u=t[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);for(var r=\"\",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=M));return r}(n)}r.kMaxLength=i,o.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}}(),o.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(o.prototype,\"parent\",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,\"offset\",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),\"undefined\"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(t,e,r){return s(t,e,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?a(t):void 0!==e?\"string\"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},o.allocUnsafe=function(t){return u(t)},o.allocUnsafeSlow=function(t){return u(t)},o.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==o.prototype},o.compare=function(t,e){if(B(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),B(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},o.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}},o.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=o.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(B(a,Uint8Array)&&(a=o.from(a)),!o.isBuffer(a))throw new TypeError('\"list\" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},o.byteLength=h,o.prototype._isBuffer=!0,o.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},o.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},o.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},o.prototype.toString=function(){var t=this.length;return 0===t?\"\":0===arguments.length?T(this,0,t):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t=\"\",e=r.INSPECT_MAX_BYTES;return t=this.toString(\"hex\",0,e).replace(/(.{2})/g,\"$1 \").trim(),this.length>e&&(t+=\" ... \"),\"<Buffer \"+t+\">\"},o.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(a,s),u=this.slice(n,i),c=t.slice(e,r),f=0;f<l;++f)if(u[f]!==c[f]){a=u[f],s=c[f];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},o.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},o.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},o.prototype.write=function(t,e,r,n){if(void 0===e)n=\"utf8\",r=this.length,e=0;else if(void 0===r&&\"string\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var a=!1;;)switch(n){case\"hex\":return m(this,t,e,r);case\"utf8\":case\"utf-8\":return y(this,t,e,r);case\"ascii\":return x(this,t,e,r);case\"latin1\":case\"binary\":return b(this,t,e,r);case\"base64\":return _(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return w(this,t,e,r);default:if(a)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function A(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function S(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function E(t,e,r){var n,i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var a=\"\",o=e;o<r;++o)a+=(n=t[o])<16?\"0\"+n.toString(16):n.toString(16);return a}function C(t,e,r){for(var n=t.slice(e,r),i=\"\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(t+e>r)throw new RangeError(\"Trying to access beyond buffer length\")}function P(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('\"value\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\"Index out of range\")}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function I(t,e,r,i,a){return e=+e,r>>>=0,a||O(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function D(t,e,r,i,a){return e=+e,r>>>=0,a||O(t,0,r,8),n.write(t,e,r,i,52,8),r+8}o.prototype.slice=function(t,e){var r=this.length;(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);var n=this.subarray(t,e);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},o.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},o.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),n.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),n.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),n.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),n.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},o.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},o.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(!o.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&\"function\"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var a=i-1;a>=0;--a)t[a+e]=this[a+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},o.prototype.fill=function(t,e,r,n){if(\"string\"==typeof t){if(\"string\"==typeof e?(n=e,e=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!o.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===t.length){var i=t.charCodeAt(0);(\"utf8\"===n&&i<128||\"latin1\"===n)&&(t=i)}}else\"number\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError(\"Out of range index\");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var s=o.isBuffer(t)?t:o.from(t,n),l=s.length;if(0===l)throw new TypeError('The value \"'+t+'\" is invalid for argument \"value\"');for(a=0;a<r-e;++a)this[a+e]=s[a%l]}return this};var z=/[^+/0-9A-Za-z-_]/g;function R(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function F(t){return e.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(z,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function N(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}}).call(this)}).call(this,t(\"buffer\").Buffer)},{\"base64-js\":1,buffer:3,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*g}},{}],5:[function(t,e,r){var n,i,a=e.exports={};function o(){throw new Error(\"setTimeout has not been defined\")}function s(){throw new Error(\"clearTimeout has not been defined\")}function l(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{i=\"function\"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,c=[],f=!1,h=-1;function p(){f&&u&&(f=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!f){var t=l(p);f=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function v(){}a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new g(t,e)),1!==c.length||f||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title=\"browser\",a.browser=!0,a.env={},a.argv=[],a.version=\"\",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(t){return[]},a.binding=function(t){throw new Error(\"process.binding is not supported\")},a.cwd=function(){return\"/\"},a.chdir=function(t){throw new Error(\"process.chdir is not supported\")},a.umask=function(){return 0}},{}],6:[function(t,e,r){e.exports={alpha_shape:t(\"alpha-shape\"),convex_hull:t(\"convex-hull\"),delaunay_triangulate:t(\"delaunay-triangulate\"),gl_cone3d:t(\"gl-cone3d\"),gl_error3d:t(\"gl-error3d\"),gl_heatmap2d:t(\"gl-heatmap2d\"),gl_line3d:t(\"gl-line3d\"),gl_mesh3d:t(\"gl-mesh3d\"),gl_plot2d:t(\"gl-plot2d\"),gl_plot3d:t(\"gl-plot3d\"),gl_pointcloud2d:t(\"gl-pointcloud2d\"),gl_scatter3d:t(\"gl-scatter3d\"),gl_select_box:t(\"gl-select-box\"),gl_spikes2d:t(\"gl-spikes2d\"),gl_streamtube3d:t(\"gl-streamtube3d\"),gl_surface3d:t(\"gl-surface3d\"),ndarray:t(\"ndarray\"),ndarray_linear_interpolate:t(\"ndarray-linear-interpolate\")}},{\"alpha-shape\":12,\"convex-hull\":58,\"delaunay-triangulate\":63,\"gl-cone3d\":79,\"gl-error3d\":84,\"gl-heatmap2d\":88,\"gl-line3d\":91,\"gl-mesh3d\":112,\"gl-plot2d\":118,\"gl-plot3d\":121,\"gl-pointcloud2d\":123,\"gl-scatter3d\":128,\"gl-select-box\":130,\"gl-spikes2d\":139,\"gl-streamtube3d\":143,\"gl-surface3d\":145,ndarray:259,\"ndarray-linear-interpolate\":253}],7:[function(t,e,r){\"use strict\";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||\"turntable\",c=n(),f=i(),h=a();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:c,orbit:f,matrix:h},u)};var n=t(\"turntable-camera-controller\"),i=t(\"orbit-camera-controller\"),a=t(\"matrix-camera-controller\");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode=\"turntable\",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r<e.length;++r)e[r].flush(t)},s.idle=function(t){for(var e=this._controllerList,r=0;r<e.length;++r)e[r].idle(t)},s.lookAt=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].lookAt(t,e,r,n)},s.rotate=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].rotate(t,e,r,n)},s.pan=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].pan(t,e,r,n)},s.translate=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].translate(t,e,r,n)},s.setMatrix=function(t,e){for(var r=this._controllerList,n=0;n<r.length;++n)r[n].setMatrix(t,e)},s.setDistanceLimits=function(t,e){for(var r=this._controllerList,n=0;n<r.length;++n)r[n].setDistanceLimits(t,e)},s.setDistance=function(t,e){for(var r=this._controllerList,n=0;n<r.length;++n)r[n].setDistance(t,e)},s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e<0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},{\"matrix-camera-controller\":245,\"orbit-camera-controller\":263,\"turntable-camera-controller\":305}],8:[function(t,e,r){\"use strict\";var n=\"undefined\"==typeof WeakMap?t(\"weak-map\"):WeakMap,i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=new n;e.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{\"gl-buffer\":78,\"gl-vao\":150,\"weak-map\":313}],9:[function(t,e,r){var n=t(\"pad-left\");e.exports=function(t,e,r){e=\"number\"==typeof e?e:1,r=r||\": \";var i=t.split(/\\r?\\n/),a=String(i.length+e-1).length;return i.map((function(t,i){var o=i+e,s=String(o).length;return n(o,a-s)+r+t})).join(\"\\n\")}},{\"pad-left\":264}],10:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,n=[t[0]],a=[0],o=1;o<e;++o)if(n.push(t[o]),i(n,r)){if(a.push(o),a.length===r+1)return a}else n.pop();return a};var n=t(\"robust-orientation\");function i(t,e){for(var r=new Array(e+1),i=0;i<t.length;++i)r[i]=t[i];for(i=0;i<=t.length;++i){for(var a=t.length;a<=e;++a){for(var o=new Array(e),s=0;s<e;++s)o[s]=Math.pow(a+1-i,s);r[a]=o}if(n.apply(void 0,r))return!0}return!1}},{\"robust-orientation\":284}],11:[function(t,e,r){\"use strict\";e.exports=function(t,e){return n(e).filter((function(r){for(var n=new Array(r.length),a=0;a<r.length;++a)n[a]=e[r[a]];return i(n)*t<1}))};var n=t(\"delaunay-triangulate\"),i=t(\"circumradius\")},{circumradius:49,\"delaunay-triangulate\":63}],12:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t(\"alpha-complex\"),i=t(\"simplicial-complex-boundary\")},{\"alpha-complex\":11,\"simplicial-complex-boundary\":290}],13:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],14:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o<r;++o){for(var s=new Array(r+1),l=0;l<=r;++l)s[l]=t[l][o];a[o]=s}for(a[r]=new Array(r+1),o=0;o<=r;++o)a[r][o]=1;var u=new Array(r+1);for(o=0;o<r;++o)u[o]=e[o];u[r]=1;var c=n(a,u),f=i(c[r+1]);0===f&&(f=1);var h=new Array(r+1);for(o=0;o<=r;++o)h[o]=i(c[o])/f;return h};var n=t(\"robust-linear-solve\");function i(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return e}},{\"robust-linear-solve\":283}],15:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{\"./lib/rationalize\":25}],16:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],17:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{\"./lib/rationalize\":25}],18:[function(t,e,r){\"use strict\";var n=t(\"./is-rat\"),i=t(\"./lib/is-bn\"),a=t(\"./lib/num-to-bn\"),o=t(\"./lib/str-to-bn\"),s=t(\"./lib/rationalize\"),l=t(\"./div\");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var u,c,f=0;if(i(e))u=e.clone();else if(\"string\"==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),f-=256;u=a(e)}}if(n(r))u.mul(r[1]),c=r[0].clone();else if(i(r))c=r.clone();else if(\"string\"==typeof r)c=o(r);else if(r)if(r===Math.floor(r))c=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),f+=256;c=a(r)}else c=a(1);return f>0?u=u.ushln(f):f<0&&(c=c.ushln(-f)),s(u,c)}},{\"./div\":17,\"./is-rat\":19,\"./lib/is-bn\":23,\"./lib/num-to-bn\":24,\"./lib/rationalize\":25,\"./lib/str-to-bn\":26}],19:[function(t,e,r){\"use strict\";var n=t(\"./lib/is-bn\");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{\"./lib/is-bn\":23}],20:[function(t,e,r){\"use strict\";var n=t(\"bn.js\");e.exports=function(t){return t.cmp(new n(0))}},{\"bn.js\":33}],21:[function(t,e,r){\"use strict\";var n=t(\"./bn-sign\");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a<e;a++)i+=r[a]*Math.pow(67108864,a);return n(t)*i}},{\"./bn-sign\":20}],22:[function(t,e,r){\"use strict\";var n=t(\"double-bits\"),i=t(\"bit-twiddle\").countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e<32)return e;var r=i(n.hi(t));return r>20?52:r+32}},{\"bit-twiddle\":32,\"double-bits\":64}],23:[function(t,e,r){\"use strict\";t(\"bn.js\"),e.exports=function(t){return t&&\"object\"==typeof t&&Boolean(t.words)}},{\"bn.js\":33}],24:[function(t,e,r){\"use strict\";var n=t(\"bn.js\"),i=t(\"double-bits\");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{\"bn.js\":33,\"double-bits\":64}],25:[function(t,e,r){\"use strict\";var n=t(\"./num-to-bn\"),i=t(\"./bn-sign\");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}},{\"./bn-sign\":20,\"./num-to-bn\":24}],26:[function(t,e,r){\"use strict\";var n=t(\"bn.js\");e.exports=function(t){return new n(t)}},{\"bn.js\":33}],27:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{\"./lib/rationalize\":25}],28:[function(t,e,r){\"use strict\";var n=t(\"./lib/bn-sign\");e.exports=function(t){return n(t[0])*n(t[1])}},{\"./lib/bn-sign\":20}],29:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{\"./lib/rationalize\":25}],30:[function(t,e,r){\"use strict\";var n=t(\"./lib/bn-to-num\"),i=t(\"./lib/ctz\");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=i(s)+4;return u*(s+(h=n(l.ushln(c).divRound(r)))*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):u*(h*=Math.pow(2,-1023))*Math.pow(2,1023-f)}},{\"./lib/bn-to-num\":21,\"./lib/ctz\":22}],31:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function i(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function a(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function o(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function s(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function l(t,e,r,n,i,a){return\"function\"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}e.exports={ge:function(t,e,r,i,a){return l(t,e,r,i,a,n)},gt:function(t,e,r,n,a){return l(t,e,r,n,a,i)},lt:function(t,e,r,n,i){return l(t,e,r,n,i,a)},le:function(t,e,r,n,i){return l(t,e,r,n,i,o)},eq:function(t,e,r,n,i){return l(t,e,r,n,i,s)}}},{}],32:[function(t,e,r){\"use strict\";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,1+((t|=t>>>8)|t>>>16)},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=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},r.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},r.interleave3=function(t,e,r){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)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.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},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],33:[function(t,e,r){!function(e,r){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var o;\"object\"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(\"buffer\").Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function u(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o<a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if(\"be\"===r)for(i=t.length-1,a=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if(\"le\"===r)for(i=0,a=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){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 i,a=0,o=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=l(t,e,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=l(t,e,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,c=r;c<s;c+=n)l=u(t,c,c+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var f=1;for(l=u(t,c,t.length,e),c=0;c<o;c++)f*=e;this.imuln(f),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var 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],h=[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 p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var c=l>>>26,f=67108863&l,h=Math.min(u,e.length-1),p=Math.max(0,u-t.length+1);p<=h;p++){var d=u-p|0;c+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],l=(16777215&(s<<i|a)).toString(16);r=0!=(a=s>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=f[t],p=h[t];r=\"\";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[u-g.length]+g+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,\"byte array longer than desired length\"),n(a>0,\"Requested array length <= 0\"),this.strip();var o,s,l=\"le\"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s<a;s++)u[s]=0}else{for(s=0;s<a-i;s++)u[s]=0;for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[a-s-1]=o}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(t){var e,r,n;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?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o<n.length;o++)a=(e=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<r.length;o++)a=(e=(0|r.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,u=0,c=0|o[0],f=8191&c,h=c>>>13,p=0|o[1],d=8191&p,g=p>>>13,v=0|o[2],m=8191&v,y=v>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],k=8191&w,T=w>>>13,M=0|o[5],A=8191&M,S=M>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],O=8191&P,I=P>>>13,D=0|o[8],z=8191&D,R=D>>>13,F=0|o[9],N=8191&F,B=F>>>13,j=0|s[0],U=8191&j,V=j>>>13,H=0|s[1],q=8191&H,G=H>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],K=8191&Z,J=Z>>>13,$=0|s[4],Q=8191&$,tt=$>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;u=((a=Math.imul(h,V))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(g,U)|0,a=Math.imul(g,V);var mt=(u+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;u=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(d,q)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,q)|0,a=a+Math.imul(g,G)|0;var yt=(u+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,W)|0))<<13)|0;u=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,q)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0;var xt=(u+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,K)|0))<<13)|0;u=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,V))+Math.imul(T,U)|0,a=Math.imul(T,V),n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,q)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,J)|0;var bt=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;u=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,U),i=(i=Math.imul(A,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,q)|0,a=a+Math.imul(T,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(y,K)|0,a=a+Math.imul(y,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var _t=(u+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;u=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),n=n+Math.imul(A,q)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(S,q)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(u+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;u=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,q)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(T,K)|0,a=a+Math.imul(T,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var kt=(u+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ut)|0)+Math.imul(h,lt)|0))<<13)|0;u=((a=a+Math.imul(h,ut)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(z,U),i=(i=Math.imul(z,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(I,q)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,W)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(m,at)|0,i=(i=i+Math.imul(m,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ut)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ut)|0;var Tt=(u+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;u=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,V))+Math.imul(B,U)|0,a=Math.imul(B,V),n=n+Math.imul(z,q)|0,i=(i=i+Math.imul(z,G)|0)+Math.imul(R,q)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(L,K)|0,a=a+Math.imul(L,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ut)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ft)|0,a=a+Math.imul(g,ht)|0;var Mt=(u+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,dt)|0))<<13)|0;u=((a=a+Math.imul(h,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,G))+Math.imul(B,q)|0,a=Math.imul(B,G),n=n+Math.imul(z,W)|0,i=(i=i+Math.imul(z,X)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(I,K)|0,a=a+Math.imul(I,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ut)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(m,ft)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var At=(u+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;u=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,X))+Math.imul(B,W)|0,a=Math.imul(B,X),n=n+Math.imul(z,K)|0,i=(i=i+Math.imul(z,J)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ut)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(u+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(y,dt)|0))<<13)|0;u=((a=a+Math.imul(y,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,J))+Math.imul(B,K)|0,a=Math.imul(B,J),n=n+Math.imul(z,Q)|0,i=(i=i+Math.imul(z,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(C,at)|0,i=(i=i+Math.imul(C,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ut)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(T,ft)|0,a=a+Math.imul(T,ht)|0;var Et=(u+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;u=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(B,Q)|0,a=Math.imul(B,tt),n=n+Math.imul(z,rt)|0,i=(i=i+Math.imul(z,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ut)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Ct=(u+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(T,dt)|0))<<13)|0;u=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(B,rt)|0,a=Math.imul(B,nt),n=n+Math.imul(z,at)|0,i=(i=i+Math.imul(z,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Lt=(u+(n=n+Math.imul(A,dt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(S,dt)|0))<<13)|0;u=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(N,at),i=(i=Math.imul(N,ot))+Math.imul(B,at)|0,a=Math.imul(B,ot),n=n+Math.imul(z,lt)|0,i=(i=i+Math.imul(z,ut)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ut)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(I,ft)|0,a=a+Math.imul(I,ht)|0;var Pt=(u+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))<<13)|0;u=((a=a+Math.imul(L,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,lt),i=(i=Math.imul(N,ut))+Math.imul(B,lt)|0,a=Math.imul(B,ut),n=n+Math.imul(z,ft)|0,i=(i=i+Math.imul(z,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var Ot=(u+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(I,dt)|0))<<13)|0;u=((a=a+Math.imul(I,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(B,ft)|0,a=Math.imul(B,ht);var It=(u+(n=n+Math.imul(z,dt)|0)|0)+((8191&(i=(i=i+Math.imul(z,gt)|0)+Math.imul(R,dt)|0))<<13)|0;u=((a=a+Math.imul(R,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Dt=(u+(n=Math.imul(N,dt))|0)+((8191&(i=(i=Math.imul(N,gt))+Math.imul(B,dt)|0))<<13)|0;return u=((a=Math.imul(B,gt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,l[0]=vt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=kt,l[8]=Tt,l[9]=Mt,l[10]=At,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=Pt,l[16]=Ot,l[17]=It,l[18]=Dt,0!==u&&(l[19]=u,r.length++),r};function g(t,e,r){return(new v).mulp(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?p(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,l=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=l;u++){var c=a-u,f=(0|t.words[c])*(0|e.words[u]),h=67108863&f;s=67108863&(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):g(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o<a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},v.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var f=l,h=u,p=0;p<o;p++){var d=r[c+p],g=n[c+p],v=r[c+p+o],m=n[c+p+o],y=f*v-h*m;m=f*m+h*v,v=y,r[c+p]=d+v,n[c+p]=g+m,r[c+p+o]=d-v,n[c+p+o]=g-m,p!==s&&(y=l*f-u*h,h=l*h+u*f,f=y)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o<e;o++)a+=0|t[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,u,n),this.transform(o,a,s,l,n,i),this.transform(u,a,c,f,n,i);for(var p=0;p<n;p++){var d=s[p]*c[p]-l[p]*f[p];l[p]=s[p]*f[p]+l[p]*c[p],s[p]=d}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),g(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,a=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&a,l=(0|this.words[e])-s<<r;this.words[e]=l|o,o=s>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<<a,l=r;if(i-=o,i=Math.max(0,i),l){for(var u=0;u<o;u++)l.words[u]=this.words[u];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-a|f>>>a,c=f&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},a.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a,o=t.length+r;this._expand(o);var s=0;for(i=0;i<t.length;i++){a=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((a-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)s=(a=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if(\"mod\"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var c=n.clone()._ishlnsubmul(i,1,l);0===c.negative&&(n=c,s&&(s.words[l]=1));for(var f=l-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),\"mod\"!==e&&(i=s.div.neg()),\"div\"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),\"mod\"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),\"div\"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},a.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},a.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(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},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new k(t)},a.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){y.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function b(){y.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function _(){y.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function w(){y.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function k(t){if(\"string\"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function T(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(x,y),x.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,i=10;i<t.length;i++){var o=0|t.words[i];t.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},x.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,y),i(_,y),i(w,y),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(m[t])return m[t];var e;if(\"k256\"===t)e=new x;else if(\"p224\"===t)e=new b;else if(\"p192\"===t)e=new _;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new w}return m[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,v=0;0!==g.cmp(s);v++)g=g.redSqr();n(v<d);var m=this.pow(f,new a(1).iushln(d-v-1));h=h.redMul(m),f=m.redSqr(),p=p.redMul(f),d=v}return h},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&&(l=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new T(t)},i(T,k),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:2}],34:[function(t,e,r){\"use strict\";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e<i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e<i;++e){var l=t[e],u=l.length;for(r=0;r<u;++r){var c=o[s++]=new Array(u-1),f=0;for(n=0;n<u;++n)n!==r&&(c[f++]=l[n]);if(1&r){var h=c[1];c[1]=c[0],c[0]=h}}}return o}},{}],35:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){switch(arguments.length){case 1:return f(t);case 2:return\"function\"==typeof e?u(t,t,e,!0):h(t,e);case 3:return u(t,e,r,!1);default:throw new Error(\"box-intersect: Invalid arguments\")}};var n,i=t(\"typedarray-pool\"),a=t(\"./lib/sweep\"),o=t(\"./lib/intersect\");function s(t,e){for(var r=0;r<t;++r)if(!(e[r]<=e[r+t]))return!0;return!1}function l(t,e,r,n){for(var i=0,a=0,o=0,l=t.length;o<l;++o){var u=t[o];if(!s(e,u)){for(var c=0;c<2*e;++c)r[i++]=u[c];n[a++]=o}}return a}function u(t,e,r,n){var s=t.length,u=e.length;if(!(s<=0||u<=0)){var c=t[0].length>>>1;if(!(c<=0)){var f,h=i.mallocDouble(2*c*s),p=i.mallocInt32(s);if((s=l(t,c,h,p))>0){if(1===c&&n)a.init(s),f=a.sweepComplete(c,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*c*u),g=i.mallocInt32(u);(u=l(e,c,d,g))>0&&(a.init(s+u),f=1===c?a.sweepBipartite(c,r,0,s,h,p,0,u,d,g):o(c,r,n,s,h,p,u,d,g),i.free(d),i.free(g))}i.free(h),i.free(p)}return f}}}function c(t,e){n.push([t,e])}function f(t){return n=[],u(t,t,c,!0),n}function h(t,e){return n=[],u(t,e,c,!1),n}},{\"./lib/intersect\":37,\"./lib/sweep\":41,\"typedarray-pool\":308}],36:[function(t,e,r){\"use strict\";function n(t){return t?function(t,e,r,n,i,a,o,s,l,u,c){return i-n>l-s?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,p=f*n;h<i;++h,p+=f){var d=a[e+p],g=a[e+p+t],v=o[h];t:for(var m=s,y=f*s;m<l;++m,y+=f){var x=u[e+y],b=u[e+y+t],_=c[m];if(!(b<d||g<x)){for(var w=e+1;w<t;++w){var k=a[w+p],T=a[w+t+p],M=u[w+y],A=u[w+t+y];if(T<M||A<k)continue t}var S=r(v,_);if(void 0!==S)return S}}}}(t,e,r,n,i,a,o,s,l,u,c):function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=s,p=f*s;h<l;++h,p+=f){var d=u[e+p],g=u[e+p+t],v=c[h];t:for(var m=n,y=f*n;m<i;++m,y+=f){var x=a[e+y],b=a[e+y+t],_=o[m];if(!(g<x||b<d)){for(var w=e+1;w<t;++w){var k=a[w+y],T=a[w+t+y],M=u[w+p],A=u[w+t+p];if(T<M||A<k)continue t}var S=r(_,v);if(void 0!==S)return S}}}}(t,e,r,n,i,a,o,s,l,u,c)}:function(t,e,r,n,i,a,o,s,l,u,c,f){return a-i>u-l?n?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,p=f*n;h<i;++h,p+=f){var d=a[e+p],g=a[e+p+t],v=o[h];t:for(var m=s,y=f*s;m<l;++m,y+=f){var x=u[e+y],b=c[m];if(!(x<=d||g<x)){for(var _=e+1;_<t;++_){var w=a[_+p],k=a[_+t+p],T=u[_+y],M=u[_+t+y];if(k<T||M<w)continue t}var A=r(b,v);if(void 0!==A)return A}}}}(t,e,r,i,a,o,s,l,u,c,f):function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,p=f*n;h<i;++h,p+=f){var d=a[e+p],g=a[e+p+t],v=o[h];t:for(var m=s,y=f*s;m<l;++m,y+=f){var x=u[e+y],b=c[m];if(!(x<d||g<x)){for(var _=e+1;_<t;++_){var w=a[_+p],k=a[_+t+p],T=u[_+y],M=u[_+t+y];if(k<T||M<w)continue t}var A=r(v,b);if(void 0!==A)return A}}}}(t,e,r,i,a,o,s,l,u,c,f):n?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=s,p=f*s;h<l;++h,p+=f){var d=u[e+p],g=c[h];t:for(var v=n,m=f*n;v<i;++v,m+=f){var y=a[e+m],x=a[e+m+t],b=o[v];if(!(d<=y||x<d)){for(var _=e+1;_<t;++_){var w=a[_+m],k=a[_+t+m],T=u[_+p],M=u[_+t+p];if(k<T||M<w)continue t}var A=r(g,b);if(void 0!==A)return A}}}}(t,e,r,i,a,o,s,l,u,c,f):function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=s,p=f*s;h<l;++h,p+=f){var d=u[e+p],g=c[h];t:for(var v=n,m=f*n;v<i;++v,m+=f){var y=a[e+m],x=a[e+m+t],b=o[v];if(!(d<y||x<d)){for(var _=e+1;_<t;++_){var w=a[_+m],k=a[_+t+m],T=u[_+p],M=u[_+t+p];if(k<T||M<w)continue t}var A=r(b,g);if(void 0!==A)return A}}}}(t,e,r,i,a,o,s,l,u,c,f)}}r.partial=n(!1),r.full=n(!0)},{}],37:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,a,c,w,k,T,M){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(6*r);m.length<a&&(n.free(m),m=n.mallocInt32(a));var o=i.nextPow2(2*r);y.length<o&&(n.free(y),y=n.mallocDouble(o))}(t,a+k);var A,S=0,E=2*t;for(x(S++,0,0,a,0,k,r?16:0,-1/0,1/0),r||x(S++,0,0,k,0,a,1,-1/0,1/0);S>0;){var C=6*(S-=1),L=m[C],P=m[C+1],O=m[C+2],I=m[C+3],D=m[C+4],z=m[C+5],R=2*S,F=y[R],N=y[R+1],B=1&z,j=!!(16&z),U=c,V=w,H=T,q=M;if(B&&(U=T,V=M,H=c,q=w),!(2&z&&P>=(O=p(t,L,P,O,U,V,N))||4&z&&(P=d(t,L,P,O,U,V,F))>=O)){var G=O-P,Y=D-I;if(j){if(t*G*(G+Y)<4194304){if(void 0!==(A=l.scanComplete(t,L,e,P,O,U,V,I,D,H,q)))return A;continue}}else{if(t*Math.min(G,Y)<128){if(void 0!==(A=o(t,L,e,B,P,O,U,V,I,D,H,q)))return A;continue}if(t*G*Y<4194304){if(void 0!==(A=l.scanBipartite(t,L,e,B,P,O,U,V,I,D,H,q)))return A;continue}}var W=f(t,L,P,O,U,V,F,N);if(P<W)if(t*(W-P)<128){if(void 0!==(A=s(t,L+1,e,P,W,U,V,I,D,H,q)))return A}else if(L===t-2){if(void 0!==(A=B?l.sweepBipartite(t,e,I,D,H,q,P,W,U,V):l.sweepBipartite(t,e,P,W,U,V,I,D,H,q)))return A}else x(S++,L+1,P,W,I,D,B,-1/0,1/0),x(S++,L+1,I,D,P,W,1^B,-1/0,1/0);if(W<O){var X=u(t,L,I,D,H,q),Z=H[E*X+L],K=h(t,L,X,D,H,q,Z);if(K<D&&x(S++,L,W,O,K,D,(4|B)+(j?16:0),Z,N),I<X&&x(S++,L,W,O,I,X,(2|B)+(j?16:0),F,Z),X+1===K){if(void 0!==(A=j?_(t,L,e,W,O,U,V,X,H,q[X]):b(t,L,e,B,W,O,U,V,X,H,q[X])))return A}else if(X<K){var J;if(j){if(W<(J=g(t,L,W,O,U,V,Z))){var $=h(t,L,W,J,U,V,Z);if(L===t-2){if(W<$&&void 0!==(A=l.sweepComplete(t,e,W,$,U,V,X,K,H,q)))return A;if($<J&&void 0!==(A=l.sweepBipartite(t,e,$,J,U,V,X,K,H,q)))return A}else W<$&&x(S++,L+1,W,$,X,K,16,-1/0,1/0),$<J&&(x(S++,L+1,$,J,X,K,0,-1/0,1/0),x(S++,L+1,X,K,$,J,1,-1/0,1/0))}}else W<(J=B?v(t,L,W,O,U,V,Z):g(t,L,W,O,U,V,Z))&&(L===t-2?A=B?l.sweepBipartite(t,e,X,K,H,q,W,J,U,V):l.sweepBipartite(t,e,W,J,U,V,X,K,H,q):(x(S++,L+1,W,J,X,K,B,-1/0,1/0),x(S++,L+1,X,K,W,J,1^B,-1/0,1/0)))}}}}};var n=t(\"typedarray-pool\"),i=t(\"bit-twiddle\"),a=t(\"./brute\"),o=a.partial,s=a.full,l=t(\"./sweep\"),u=t(\"./median\"),c=t(\"./partition\"),f=c(\"!(lo>=p0)&&!(p1>=hi)\"),h=c(\"lo===p0\"),p=c(\"lo<p0\"),d=c(\"hi<=p0\"),g=c(\"lo<=p0&&p0<=hi\"),v=c(\"lo<p0&&p0<=hi\"),m=n.mallocInt32(1024),y=n.mallocDouble(1024);function x(t,e,r,n,i,a,o,s,l){var u=6*t;m[u]=e,m[u+1]=r,m[u+2]=n,m[u+3]=i,m[u+4]=a,m[u+5]=o;var c=2*t;y[c]=s,y[c+1]=l}function b(t,e,r,n,i,a,o,s,l,u,c){var f=2*t,h=l*f,p=u[h+e];t:for(var d=i,g=i*f;d<a;++d,g+=f){var v=o[g+e],m=o[g+e+t];if(!(p<v||m<p||n&&p===v)){for(var y,x=s[d],b=e+1;b<t;++b){v=o[g+b],m=o[g+b+t];var _=u[h+b],w=u[h+b+t];if(m<_||w<v)continue t}if(void 0!==(y=n?r(c,x):r(x,c)))return y}}}function _(t,e,r,n,i,a,o,s,l,u){var c=2*t,f=s*c,h=l[f+e];t:for(var p=n,d=n*c;p<i;++p,d+=c){var g=o[p];if(g!==u){var v=a[d+e],m=a[d+e+t];if(!(h<v||m<h)){for(var y=e+1;y<t;++y){v=a[d+y],m=a[d+y+t];var x=l[f+y],b=l[f+y+t];if(m<x||b<v)continue t}var _=r(g,u);if(void 0!==_)return _}}}}},{\"./brute\":36,\"./median\":38,\"./partition\":39,\"./sweep\":41,\"bit-twiddle\":32,\"typedarray-pool\":308}],38:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,a,o,s){if(a<=r+1)return r;for(var l=r,u=a,c=a+r>>>1,f=2*t,h=c,p=o[f*c+e];l<u;){if(u-l<8){i(t,e,l,u,o,s),p=o[f*c+e];break}var d=u-l,g=Math.random()*d+l|0,v=o[f*g+e],m=Math.random()*d+l|0,y=o[f*m+e],x=Math.random()*d+l|0,b=o[f*x+e];v<=y?b>=y?(h=m,p=y):v>=b?(h=g,p=v):(h=x,p=b):y>=b?(h=m,p=y):b>=v?(h=g,p=v):(h=x,p=b);for(var _=f*(u-1),w=f*h,k=0;k<f;++k,++_,++w){var T=o[_];o[_]=o[w],o[w]=T}var M=s[u-1];for(s[u-1]=s[h],s[h]=M,_=f*(u-1),w=f*(h=n(t,e,l,u-1,o,s,p)),k=0;k<f;++k,++_,++w)T=o[_],o[_]=o[w],o[w]=T;if(M=s[u-1],s[u-1]=s[h],s[h]=M,c<h){for(u=h-1;l<u&&o[f*(u-1)+e]===p;)u-=1;u+=1}else{if(!(h<c))break;for(l=h+1;l<u&&o[f*l+e]===p;)l+=1}}return n(t,e,r,c,o,s,o[f*c+e])};var n=t(\"./partition\")(\"lo<p0\");function i(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l<n;++l,s+=o)for(var u=i[s],c=l,f=o*(l-1);c>r&&i[f+e]>u;--c,f-=o){for(var h=f,p=f+o,d=0;d<o;++d,++h,++p){var g=i[h];i[h]=i[p],i[p]=g}var v=a[c];a[c]=a[c-1],a[c-1]=v}}},{\"./partition\":39}],39:[function(t,e,r){\"use strict\";e.exports=function(t){return n[t]};var n={\"lo===p0\":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=r;n>h;++h,l+=s)if(i[l+f]===o)if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var g=a[h];a[h]=a[c],a[c++]=g}return c},\"lo<p0\":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=r;n>h;++h,l+=s)if(i[l+f]<o)if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var g=a[h];a[h]=a[c],a[c++]=g}return c},\"lo<=p0\":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o)if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var g=a[h];a[h]=a[c],a[c++]=g}return c},\"hi<=p0\":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o)if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var g=a[h];a[h]=a[c],a[c++]=g}return c},\"lo<p0&&p0<=hi\":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=t+e,p=r;n>p;++p,l+=s){var d=i[l+f],g=i[l+h];if(d<o&&o<=g)if(c===p)c+=1,u+=s;else{for(var v=0;s>v;++v){var m=i[l+v];i[l+v]=i[u],i[u++]=m}var y=a[p];a[p]=a[c],a[c++]=y}}return c},\"lo<=p0&&p0<=hi\":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=t+e,p=r;n>p;++p,l+=s){var d=i[l+f],g=i[l+h];if(d<=o&&o<=g)if(c===p)c+=1,u+=s;else{for(var v=0;s>v;++v){var m=i[l+v];i[l+v]=i[u],i[u++]=m}var y=a[p];a[p]=a[c],a[c++]=y}}return c},\"!(lo>=p0)&&!(p1>=hi)\":function(t,e,r,n,i,a,o,s){for(var l=2*t,u=l*r,c=u,f=r,h=e,p=t+e,d=r;n>d;++d,u+=l){var g=i[u+h],v=i[u+p];if(!(g>=o||s>=v))if(f===d)f+=1,c+=l;else{for(var m=0;l>m;++m){var y=i[u+m];i[u+m]=i[c],i[c++]=y}var x=a[d];a[d]=a[f],a[f++]=x}}return f}}},{}],40:[function(t,e,r){\"use strict\";function n(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(u<a)break;if(u===a&&c<o)break;r[l]=u,r[l+1]=c,l-=2}r[l]=a,r[l+1]=o}}function i(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function a(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function o(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function s(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function l(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n<i)&&(n!==i||r[t+1]>r[e+1])}function u(t,e,r,n){var i=n[t*=2];return i<e||i===e&&n[t+1]<r}function c(t,e,r){var f=(e-t+1)/6|0,h=t+f,p=e-f,d=t+e>>1,g=d-f,v=d+f,m=h,y=g,x=d,b=v,_=p,w=t+1,k=e-1,T=0;l(m,y,r)&&(T=m,m=y,y=T),l(b,_,r)&&(T=b,b=_,_=T),l(m,x,r)&&(T=m,m=x,x=T),l(y,x,r)&&(T=y,y=x,x=T),l(m,b,r)&&(T=m,m=b,b=T),l(x,b,r)&&(T=x,x=b,b=T),l(y,_,r)&&(T=y,y=_,_=T),l(y,x,r)&&(T=y,y=x,x=T),l(b,_,r)&&(T=b,b=_,_=T);for(var M=r[2*y],A=r[2*y+1],S=r[2*b],E=r[2*b+1],C=2*m,L=2*x,P=2*_,O=2*h,I=2*d,D=2*p,z=0;z<2;++z){var R=r[C+z],F=r[L+z],N=r[P+z];r[O+z]=R,r[I+z]=F,r[D+z]=N}a(g,t,r),a(v,e,r);for(var B=w;B<=k;++B)if(u(B,M,A,r))B!==w&&i(B,w,r),++w;else if(!u(B,S,E,r))for(;;){if(u(k,S,E,r)){u(k,M,A,r)?(o(B,w,k,r),++w,--k):(i(B,k,r),--k);break}if(--k<B)break}s(t,w-1,M,A,r),s(e,k+1,S,E,r),w-2-t<=32?n(t,w-2,r):c(t,w-2,r),e-(k+2)<=32?n(k+2,e,r):c(k+2,e,r),k-w<=32?n(w,k,r):c(w,k,r)}e.exports=function(t,e){e<=128?n(0,e-1,t):c(0,e-1,t)}},{}],41:[function(t,e,r){\"use strict\";e.exports={init:function(t){var e=i.nextPow2(t);l.length<e&&(n.free(l),l=n.mallocInt32(e)),u.length<e&&(n.free(u),u=n.mallocInt32(e)),c.length<e&&(n.free(c),c=n.mallocInt32(e)),f.length<e&&(n.free(f),f=n.mallocInt32(e)),h.length<e&&(n.free(h),h=n.mallocInt32(e)),p.length<e&&(n.free(p),p=n.mallocInt32(e));var r=8*e;d.length<r&&(n.free(d),d=n.mallocDouble(r))},sweepBipartite:function(t,e,r,n,i,s,h,p,m,y){for(var x=0,b=2*t,_=t-1,w=b-1,k=r;k<n;++k){var T=s[k],M=b*k;d[x++]=i[M+_],d[x++]=-(T+1),d[x++]=i[M+w],d[x++]=T}for(k=h;k<p;++k){T=y[k]+o;var A=b*k;d[x++]=m[A+_],d[x++]=-T,d[x++]=m[A+w],d[x++]=T}var S=x>>>1;a(d,S);var E=0,C=0;for(k=0;k<S;++k){var L=0|d[2*k+1];if(L>=o)g(c,f,C--,L=L-o|0);else if(L>=0)g(l,u,E--,L);else if(L<=-268435456){L=-L-o|0;for(var P=0;P<E;++P)if(void 0!==(O=e(l[P],L)))return O;v(c,f,C++,L)}else{for(L=-L-1|0,P=0;P<C;++P){var O;if(void 0!==(O=e(L,c[P])))return O}v(l,u,E++,L)}}},sweepComplete:function(t,e,r,n,i,o,s,m,y,x){for(var b=0,_=2*t,w=t-1,k=_-1,T=r;T<n;++T){var M=o[T]+1<<1,A=_*T;d[b++]=i[A+w],d[b++]=-M,d[b++]=i[A+k],d[b++]=M}for(T=s;T<m;++T){M=x[T]+1<<1;var S=_*T;d[b++]=y[S+w],d[b++]=1|-M,d[b++]=y[S+k],d[b++]=1|M}var E=b>>>1;a(d,E);var C=0,L=0,P=0;for(T=0;T<E;++T){var O=0|d[2*T+1],I=1&O;if(T<E-1&&O>>1==d[2*T+3]>>1&&(I=2,T+=1),O<0){for(var D=-(O>>1)-1,z=0;z<P;++z)if(void 0!==(R=e(h[z],D)))return R;if(0!==I)for(z=0;z<C;++z)if(void 0!==(R=e(l[z],D)))return R;if(1!==I)for(z=0;z<L;++z){var R;if(void 0!==(R=e(c[z],D)))return R}0===I?v(l,u,C++,D):1===I?v(c,f,L++,D):2===I&&v(h,p,P++,D)}else D=(O>>1)-1,0===I?g(l,u,C--,D):1===I?g(c,f,L--,D):2===I&&g(h,p,P--,D)}},scanBipartite:function(t,e,r,n,i,s,c,f,h,p,m,y){var x=0,b=2*t,_=e,w=e+t,k=1,T=1;n?T=o:k=o;for(var M=i;M<s;++M){var A=M+k,S=b*M;d[x++]=c[S+_],d[x++]=-A,d[x++]=c[S+w],d[x++]=A}for(M=h;M<p;++M){A=M+T;var E=b*M;d[x++]=m[E+_],d[x++]=-A}var C=x>>>1;a(d,C);var L=0;for(M=0;M<C;++M){var P=0|d[2*M+1];if(P<0){var O=!1;if((A=-P)>=o?(O=!n,A-=o):(O=!!n,A-=1),O)v(l,u,L++,A);else{var I=y[A],D=b*A,z=m[D+e+1],R=m[D+e+1+t];t:for(var F=0;F<L;++F){var N=l[F],B=b*N;if(!(R<c[B+e+1]||c[B+e+1+t]<z)){for(var j=e+2;j<t;++j)if(m[D+j+t]<c[B+j]||c[B+j+t]<m[D+j])continue t;var U,V=f[N];if(void 0!==(U=n?r(I,V):r(V,I)))return U}}}}else g(l,u,L--,P-k)}},scanComplete:function(t,e,r,n,i,s,u,c,f,h,p){for(var g=0,v=2*t,m=e,y=e+t,x=n;x<i;++x){var b=x+o,_=v*x;d[g++]=s[_+m],d[g++]=-b,d[g++]=s[_+y],d[g++]=b}for(x=c;x<f;++x){b=x+1;var w=v*x;d[g++]=h[w+m],d[g++]=-b}var k=g>>>1;a(d,k);var T=0;for(x=0;x<k;++x){var M=0|d[2*x+1];if(M<0)if((b=-M)>=o)l[T++]=b-o;else{var A=p[b-=1],S=v*b,E=h[S+e+1],C=h[S+e+1+t];t:for(var L=0;L<T;++L){var P=l[L],O=u[P];if(O===A)break;var I=v*P;if(!(C<s[I+e+1]||s[I+e+1+t]<E)){for(var D=e+2;D<t;++D)if(h[S+D+t]<s[I+D]||s[I+D+t]<h[S+D])continue t;var z=r(O,A);if(void 0!==z)return z}}}else{for(b=M-o,L=T-1;L>=0;--L)if(l[L]===b){for(D=L+1;D<T;++D)l[D-1]=l[D];break}--T}}}};var n=t(\"typedarray-pool\"),i=t(\"bit-twiddle\"),a=t(\"./sort\"),o=1<<28,s=1024,l=n.mallocInt32(s),u=n.mallocInt32(s),c=n.mallocInt32(s),f=n.mallocInt32(s),h=n.mallocInt32(s),p=n.mallocInt32(s),d=n.mallocDouble(8192);function g(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function v(t,e,r,n){t[r]=n,e[n]=r}},{\"./sort\":40,\"bit-twiddle\":32,\"typedarray-pool\":308}],42:[function(t,e,r){\"use strict\";var n=t(\"./lib/monotone\"),i=t(\"./lib/triangulation\"),a=t(\"./lib/delaunay\"),o=t(\"./lib/filter\");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function u(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var c=!!u(r,\"delaunay\",!0),f=!!u(r,\"interior\",!0),h=!!u(r,\"exterior\",!0),p=!!u(r,\"infinity\",!1);if(!f&&!h||0===t.length)return[];var d=n(t,e);if(c||f!==h||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),v=0;v<d.length;++v){var m=d[v];g.addTriangle(m[0],m[1],m[2])}return c&&a(t,g),h?f?p?o(g,0,p):g.cells():o(g,1,p):o(g,-1)}return d}},{\"./lib/delaunay\":43,\"./lib/filter\":44,\"./lib/monotone\":45,\"./lib/triangulation\":46}],43:[function(t,e,r){\"use strict\";var n=t(\"robust-in-sphere\")[4];function i(t,e,r,i,a,o){var s=e.opposite(i,a);if(!(s<0)){if(a<i){var l=i;i=a,a=l,l=o,o=s,s=l}e.isConstraint(i,a)||n(t[i],t[a],t[o],t[s])<0&&r.push(i,a)}}t(\"binary-search-bounds\"),e.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s<a;++s)for(var l=o[s],u=1;u<l.length;u+=2)if(!((p=l[u])<s||e.isConstraint(s,p))){for(var c=l[u-1],f=-1,h=1;h<l.length;h+=2)if(l[h-1]===p){f=l[h];break}f<0||n(t[s],t[p],t[c],t[f])<0&&r.push(s,p)}for(;r.length>0;){for(var p=r.pop(),d=(c=-1,f=-1,l=o[s=r.pop()],1);d<l.length;d+=2){var g=l[d-1],v=l[d];g===p?f=v:v===p&&(c=g)}c<0||f<0||n(t[s],t[p],t[c],t[f])>=0||(e.flip(s,p),i(t,e,r,c,s,f),i(t,e,r,s,f,c),i(t,e,r,f,p,c),i(t,e,r,p,c,f))}}},{\"binary-search-bounds\":31,\"robust-in-sphere\":282}],44:[function(t,e,r){\"use strict\";var n,i=t(\"binary-search-bounds\");function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i<n;++i){var s=(m=r[i])[0],l=m[1],u=m[2];l<u?l<s&&(m[0]=l,m[1]=u,m[2]=s):u<s&&(m[0]=u,m[1]=s,m[2]=l)}r.sort(o);var c=new Array(n);for(i=0;i<c.length;++i)c[i]=0;var f=[],h=[],p=new Array(3*n),d=new Array(3*n),g=null;e&&(g=[]);var v=new a(r,p,d,c,f,h,g);for(i=0;i<n;++i)for(var m=r[i],y=0;y<3;++y){s=m[y],l=m[(y+1)%3];var x=p[3*i+y]=v.locate(l,s,t.opposite(l,s)),b=d[3*i+y]=t.isConstraint(s,l);x<0&&(b?h.push(i):(f.push(i),c[i]=1),e&&g.push([l,s,-1]))}return v}(t,r);if(0===e)return r?n.cells.concat(n.boundary):n.cells;for(var i=1,s=n.active,l=n.next,u=n.flags,c=n.cells,f=n.constraint,h=n.neighbor;s.length>0||l.length>0;){for(;s.length>0;){var p=s.pop();if(u[p]!==-i){u[p]=i,c[p];for(var d=0;d<3;++d){var g=h[3*p+d];g>=0&&0===u[g]&&(f[3*p+d]?l.push(g):(s.push(g),u[g]=i))}}}var v=l;l=s,s=v,l.length=0,i=-i}var m=function(t,e,r){for(var n=0,i=0;i<t.length;++i)e[i]===r&&(t[n++]=t[i]);return t.length=n,t}(c,u,e);return r?m.concat(n.boundary):m},a.prototype.locate=(n=[0,0,0],function(t,e,r){var a=t,s=e,l=r;return e<r?e<t&&(a=e,s=r,l=t):r<t&&(a=r,s=t,l=e),a<0?-1:(n[0]=a,n[1]=s,n[2]=l,i.eq(this.cells,n,o))})},{\"binary-search-bounds\":31}],45:[function(t,e,r){\"use strict\";var n=t(\"binary-search-bounds\"),i=t(\"robust-orientation\")[3];function a(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function o(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function s(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(0!==t.type&&(r=i(t.a,t.b,e.b))?r:t.idx-e.idx)}function l(t,e){return i(t.a,t.b,e)}function u(t,e,r,a,o){for(var s=n.lt(e,a,l),u=n.gt(e,a,l),c=s;c<u;++c){for(var f=e[c],h=f.lowerIds,p=h.length;p>1&&i(r[h[p-2]],r[h[p-1]],a)>0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=f.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function c(t,e){var r;return(r=t.a[0]<e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?r:(r=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 f(t,e,r){var i=n.le(t,r,c),o=t[i],s=o.upperIds,l=s[s.length-1];o.upperIds=[l],t.splice(i+1,0,new a(r.a,r.b,r.idx,[l],s))}function h(t,e,r){var i=r.a;r.a=r.b,r.b=i;var a=n.eq(t,r,c),o=t[a];t[a-1].upperIds=o.upperIds,t.splice(a,1)}e.exports=function(t,e){for(var r=t.length,n=e.length,i=[],l=0;l<r;++l)i.push(new o(t[l],null,0,l));for(l=0;l<n;++l){var c=e[l],p=t[c[0]],d=t[c[1]];p[0]<d[0]?i.push(new o(p,d,2,l),new o(d,p,1,l)):p[0]>d[0]&&i.push(new o(d,p,2,l),new o(p,d,1,l))}i.sort(s);for(var g=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),v=[new a([g,1],[g,0],-1,[],[],[],[])],m=[],y=(l=0,i.length);l<y;++l){var x=i[l],b=x.type;0===b?u(m,v,t,x.a,x.idx):2===b?f(v,0,x):h(v,0,x)}return m}},{\"binary-search-bounds\":31,\"robust-orientation\":284}],46:[function(t,e,r){\"use strict\";var n=t(\"binary-search-bounds\");function i(t,e){this.stars=t,this.edges=e}e.exports=function(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=[];return new i(r,e)};var a=i.prototype;function o(t,e,r){for(var n=1,i=t.length;n<i;n+=2)if(t[n-1]===e&&t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}a.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(r,i){return t[0]=Math.min(r,i),t[1]=Math.max(r,i),n.eq(this.edges,t,e)>=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n<i;n+=2)if(r[n]===t)return r[n-1];return-1},a.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},a.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2)e.push([i[a],i[a+1]]);return e},a.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2){var s=i[a],l=i[a+1];r<Math.min(s,l)&&e.push([r,s,l])}return e}},{\"binary-search-bounds\":31}],47:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=1,r=1;r<t.length;++r)for(var n=0;n<r;++n)if(t[r]<t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],48:[function(t,e,r){\"use strict\";var n=t(\"dup\"),i=t(\"robust-linear-solve\");function a(t,e){for(var r=0,n=t.length,i=0;i<n;++i)r+=t[i]*e[i];return r}function o(t){var e=t.length;if(0===e)return[];t[0].length;var r=n([t.length+1,t.length+1],1),o=n([t.length+1],1);r[e][e]=0;for(var s=0;s<e;++s){for(var l=0;l<=s;++l)r[l][s]=r[s][l]=2*a(t[s],t[l]);o[s]=a(t[s],t[s])}var u=i(r,o),c=0,f=u[e+1];for(s=0;s<f.length;++s)c+=f[s];var h=new Array(e);for(s=0;s<e;++s){f=u[s];var p=0;for(l=0;l<f.length;++l)p+=f[l];h[s]=p/c}return h}function s(t){if(0===t.length)return[];for(var e=t[0].length,r=n([e]),i=o(t),a=0;a<t.length;++a)for(var s=0;s<e;++s)r[s]+=t[a][s]*i[a];return r}s.barycenetric=o,e.exports=s},{dup:65,\"robust-linear-solve\":283}],49:[function(t,e,r){e.exports=function(t){for(var e=n(t),r=0,i=0;i<t.length;++i)for(var a=t[i],o=0;o<e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=t(\"circumcenter\")},{circumcenter:48}],50:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a<e.length;++a){var o=e[a];i[a]=[o[0],o[1],r[a]]}e=i}for(var s=function(t,e,r){var n=d(t,[],p(t));return m(e,n,r),!!n}(t,e,!!r);y(t,e,!!r);)s=!0;if(r&&s)for(n.length=0,r.length=0,a=0;a<e.length;++a)o=e[a],n.push([o[0],o[1]]),r.push(o[2]);return s};var n=t(\"union-find\"),i=t(\"box-intersect\"),a=t(\"robust-segment-intersect\"),o=t(\"big-rat\"),s=t(\"big-rat/cmp\"),l=t(\"big-rat/to-float\"),u=t(\"rat-vec\"),c=t(\"nextafter\"),f=t(\"./lib/rat-seg-intersect\");function h(t){var e=l(t);return[c(e,-1/0),c(e,1/0)]}function p(t){for(var e=new Array(t.length),r=0;r<t.length;++r){var n=t[r];e[r]=[c(n[0],-1/0),c(n[1],-1/0),c(n[0],1/0),c(n[1],1/0)]}return e}function d(t,e,r){for(var a=e.length,o=new n(a),s=[],l=0;l<e.length;++l){var u=e[l],f=h(u[0]),p=h(u[1]);s.push([c(f[0],-1/0),c(p[0],-1/0),c(f[1],1/0),c(p[1],1/0)])}i(s,(function(t,e){o.link(t,e)}));var d=!0,g=new Array(a);for(l=0;l<a;++l)(m=o.find(l))!==l&&(d=!1,t[m]=[Math.min(t[l][0],t[m][0]),Math.min(t[l][1],t[m][1])]);if(d)return null;var v=0;for(l=0;l<a;++l){var m;(m=o.find(l))===l?(g[l]=v,t[v++]=t[l]):g[l]=-1}for(t.length=v,l=0;l<a;++l)g[l]<0&&(g[l]=g[o.find(l)]);return g}function g(t,e){return t[0]-e[0]||t[1]-e[1]}function v(t,e){return t[0]-e[0]||t[1]-e[1]||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n<t.length;++n){var i=e[(o=t[n])[0]],a=e[o[1]];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}else for(n=0;n<t.length;++n){var o;i=(o=t[n])[0],a=o[1],o[0]=Math.min(i,a),o[1]=Math.max(i,a)}r?t.sort(v):t.sort(g);var s=1;for(n=1;n<t.length;++n){var l=t[n-1],u=t[n];(u[0]!==l[0]||u[1]!==l[1]||r&&u[2]!==l[2])&&(t[s++]=u)}t.length=s}}function y(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[c(Math.min(a[0],o[0]),-1/0),c(Math.min(a[1],o[1]),-1/0),c(Math.max(a[0],o[0]),1/0),c(Math.max(a[1],o[1]),1/0)]}return r}(t,e),h=function(t,e,r){var n=[];return i(r,(function(r,i){var o=e[r],s=e[i];if(o[0]!==s[0]&&o[0]!==s[1]&&o[1]!==s[0]&&o[1]!==s[1]){var l=t[o[0]],u=t[o[1]],c=t[s[0]],f=t[s[1]];a(l,u,c,f)&&n.push([r,i])}})),n}(t,e,n),g=p(t),v=function(t,e,r,n){var o=[];return i(r,n,(function(r,n){var i=e[r];if(i[0]!==n&&i[1]!==n){var s=t[n],l=t[i[0]],u=t[i[1]];a(l,u,s,s)&&o.push([r,n])}})),o}(t,e,n,g),y=d(t,function(t,e,r,n,i){var a,c,h=t.map((function(t){return[o(t[0]),o(t[1])]}));for(a=0;a<r.length;++a){var p=r[a];c=p[0];var d=p[1],g=e[c],v=e[d],m=f(u(t[g[0]]),u(t[g[1]]),u(t[v[0]]),u(t[v[1]]));if(m){var y=t.length;t.push([l(m[0]),l(m[1])]),h.push(m),n.push([c,y],[d,y])}}for(n.sort((function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=h[t[1]],n=h[e[1]];return s(r[0],n[0])||s(r[1],n[1])})),a=n.length-1;a>=0;--a){var x=e[c=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],k=t[_];if((w[0]-k[0]||w[1]-k[1])<0){var T=b;b=_,_=T}x[0]=b;var M,A=x[1]=S[1];for(i&&(M=x[2]);a>0&&n[a-1][0]===c;){var S,E=(S=n[--a])[1];i?e.push([A,E,M]):e.push([A,E]),A=E}i?e.push([A,_,M]):e.push([A,_])}return h}(t,e,h,v,r));return m(e,y,r),!!y||h.length>0||v.length>0}},{\"./lib/rat-seg-intersect\":51,\"big-rat\":18,\"big-rat/cmp\":16,\"big-rat/to-float\":30,\"box-intersect\":35,nextafter:260,\"rat-vec\":273,\"robust-segment-intersect\":287,\"union-find\":309}],51:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=c(a,f);if(0===o(h))return null;var p=c(f,s(t,r)),d=i(p,h),g=u(a,d);return l(t,g)};var n=t(\"big-rat/mul\"),i=t(\"big-rat/div\"),a=t(\"big-rat/sub\"),o=t(\"big-rat/sign\"),s=t(\"rat-vec/sub\"),l=t(\"rat-vec/add\"),u=t(\"rat-vec/muls\");function c(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{\"big-rat/div\":17,\"big-rat/mul\":27,\"big-rat/sign\":28,\"big-rat/sub\":29,\"rat-vec/add\":272,\"rat-vec/muls\":274,\"rat-vec/sub\":275}],52:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],\"rainbow-soft\":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],\"freesurface-blue\":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],\"freesurface-red\":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],\"velocity-blue\":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],\"velocity-green\":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],53:[function(t,e,r){\"use strict\";var n=t(\"./colorScale\"),i=t(\"lerp\");function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r=\"#\",n=0;n<3;++n)r+=(\"00\"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return\"rgba(\"+t.join(\",\")+\")\"}e.exports=function(t){var e,r,l,u,c,f,h,p,d,g;if(t||(t={}),p=(t.nshades||72)-1,h=t.format||\"hex\",(f=t.colormap)||(f=\"jet\"),\"string\"==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+\" not a supported colorscale\");c=n[f]}else{if(!Array.isArray(f))throw Error(\"unsupported colormap option\",f);c=f.slice()}if(c.length>p+1)throw new Error(f+\" map requires nshades to be at least size \"+c.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():\"number\"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=c.map((function(t){return Math.round(t.index*p)})),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var v=c.map((function(t,e){var r=c[e].index,n=c[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=d[0]+(d[1]-d[0])*r),n})),m=[];for(g=0;g<e.length-1;++g){u=e[g+1]-e[g],r=v[g],l=v[g+1];for(var y=0;y<u;y++){var x=y/u;m.push([Math.round(i(r[0],l[0],x)),Math.round(i(r[1],l[1],x)),Math.round(i(r[2],l[2],x)),i(r[3],l[3],x)])}}return m.push(c[c.length-1].rgb.concat(d[1])),\"hex\"===h?m=m.map(o):\"rgbaString\"===h?m=m.map(s):\"float\"===h&&(m=m.map(a)),m}},{\"./colorScale\":52,lerp:240}],54:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,a){var o=n(e,r,a);if(0===o){var s=i(n(t,e,r)),u=i(n(t,e,a));if(s===u){if(0===s){var c=l(t,e,r);return c===l(t,e,a)?0:c?1:-1}return 0}return 0===u?s>0||l(t,e,a)?-1:1:0===s?u>0||l(t,e,r)?1:-1:i(u-s)}var f=n(t,e,r);return f>0?o>0&&n(t,e,a)>0?1:-1:f<0?o>0||n(t,e,a)>0?1:-1:n(t,e,a)>0||l(t,e,r)?1:-1};var n=t(\"robust-orientation\"),i=t(\"signum\"),a=t(\"two-sum\"),o=t(\"robust-product\"),s=t(\"robust-sum\");function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),u=a(r[1],-e[1]),c=s(o(n,l),o(i,u));return c[c.length-1]>=0}},{\"robust-orientation\":284,\"robust-product\":285,\"robust-sum\":289,signum:55,\"two-sum\":307}],55:[function(t,e,r){\"use strict\";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],56:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),u=n(e[0],e[1]);return n(l,t[2])-n(u,e[2])||n(l+t[2],o)-n(u+e[2],s);case 4:var c=t[0],f=t[1],h=t[2],p=t[3],d=e[0],g=e[1],v=e[2],m=e[3];return c+f+h+p-(d+g+v+m)||n(c,f,h,p)-n(d,g,v,m,d)||n(c+f,c+h,c+p,f+h,f+p,h+p)-n(d+g,d+v,d+m,g+v,g+m,v+m)||n(c+f+h,c+f+p,c+h+p,f+h+p)-n(d+g+v,d+g+m,d+v+m,g+v+m);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;b<r;++b)if(a=y[b]-x[b])return a;return 0}};var n=Math.min;function i(t,e){return t-e}},{}],57:[function(t,e,r){\"use strict\";var n=t(\"compare-cell\"),i=t(\"cell-orientation\");e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{\"cell-orientation\":47,\"compare-cell\":56}],58:[function(t,e,r){\"use strict\";var n=t(\"./lib/ch1d\"),i=t(\"./lib/ch2d\"),a=t(\"./lib/chnd\");e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;return 0===r?[]:1===r?n(t):2===r?i(t):a(t,r)}},{\"./lib/ch1d\":59,\"./lib/ch2d\":60,\"./lib/chnd\":61}],59:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0,r=0,n=1;n<t.length;++n)t[n][0]<t[e][0]&&(e=n),t[n][0]>t[r][0]&&(r=n);return e<r?[[e],[r]]:e>r?[[r],[e]]:[[e]]}},{}],60:[function(t,e,r){\"use strict\";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o<r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=t(\"monotone-convex-hull-2d\")},{\"monotone-convex-hull-2d\":246}],61:[function(t,e,r){\"use strict\";e.exports=function(t,e){try{return n(t,!0)}catch(o){var r=i(t);if(r.length<=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i<e.length;++i)n[i]=t[e[i]];var a=e.length;for(i=0;i<r;++i)e.indexOf(i)<0&&(n[a++]=t[i]);return n}(t,r);return function(t,e){for(var r=t.length,n=e.length,i=0;i<r;++i)for(var a=t[i],o=0;o<a.length;++o){var s=a[o];if(s<n)a[o]=e[s];else{s-=n;for(var l=0;l<n;++l)s>=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=t(\"incremental-convex-hull\"),i=t(\"affine-hull\")},{\"affine-hull\":10,\"incremental-convex-hull\":233}],62:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;p>=0;--p)a[p]=u*t[p]+c*e[p]+f*r[p]+h*n[p];return a}return u*t+c*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}},{}],63:[function(t,e,r){\"use strict\";var n=t(\"incremental-convex-hull\"),i=t(\"uniq\");function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a<i;++a){var o=n[a]-r[a];if(o)return o}return 0}e.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s<1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map((function(t,e){return[t[0],e]}));n.sort((function(t,e){return t[0]-e[0]}));for(var i=new Array(t-1),a=1;a<t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}return r&&i.push([-1,i[0][1]],[i[t-1][1],-1]),i}(r,t,e);for(var l=new Array(r),u=1,c=0;c<r;++c){for(var f=t[c],h=new Array(s+1),p=0,d=0;d<s;++d){var g=f[d];h[d]=g,p+=g*g}h[s]=p,l[c]=new a(h,c),u=Math.max(p,u)}i(l,o),r=l.length;var v=new Array(r+s+1),m=new Array(r+s+1),y=(s+1)*(s+1)*u,x=new Array(s+1);for(c=0;c<=s;++c)x[c]=0;for(x[s]=y,v[0]=x.slice(),m[0]=-1,c=0;c<=s;++c)(h=x.slice())[c]=1,v[c+1]=h,m[c+1]=-1;for(c=0;c<r;++c){var b=l[c];v[c+s+1]=b.point,m[c+s+1]=b.index}var _=n(v,!1);if(_=e?_.filter((function(t){for(var e=0,r=0;r<=s;++r){var n=m[t[r]];if(n<0&&++e>=2)return!1;t[r]=n}return!0})):_.filter((function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0})),1&s)for(c=0;c<_.length;++c)h=(b=_[c])[0],b[0]=b[1],b[1]=h;return _}},{\"incremental-convex-hull\":233,uniq:310}],64:[function(t,e,r){(function(t){(function(){var r=!1;if(\"undefined\"!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);n[0]=1,r=!0,1072693248===i[1]?(e.exports=function(t){return n[0]=t,[i[0],i[1]]},e.exports.pack=function(t,e){return i[0]=t,i[1]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[0]},e.exports.hi=function(t){return n[0]=t,i[1]}):1072693248===i[0]?(e.exports=function(t){return n[0]=t,[i[1],i[0]]},e.exports.pack=function(t,e){return i[1]=t,i[0]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[1]},e.exports.hi=function(t){return n[0]=t,i[0]}):r=!1}if(!r){var a=new t(8);e.exports=function(t){return a.writeDoubleLE(t,0,!0),[a.readUInt32LE(0,!0),a.readUInt32LE(4,!0)]},e.exports.pack=function(t,e){return a.writeUInt32LE(t,0,!0),a.writeUInt32LE(e,4,!0),a.readDoubleLE(0,!0)},e.exports.lo=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(0,!0)},e.exports.hi=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this)}).call(this,t(\"buffer\").Buffer)},{buffer:3}],65:[function(t,e,r){\"use strict\";function n(t,e,r){var i=0|t[r];if(i<=0)return[];var a,o=new Array(i);if(r===t.length-1)for(a=0;a<i;++a)o[a]=e;else for(a=0;a<i;++a)o[a]=n(t,e,r+1);return o}e.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case\"number\":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}(0|t,e);break;case\"object\":if(\"number\"==typeof t.length)return n(t,e,0)}return[]}},{}],66:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t.length;if(\"number\"!=typeof e){e=0;for(var i=0;i<r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;var o=new Array(e);for(i=0;i<e;++i)o[i]=[];for(i=0;i<r;++i)o[(a=t[i])[0]].push(a[1]),o[a[1]].push(a[0]);for(var s=0;s<e;++s)n(o[s],(function(t,e){return t-e}));return o};var n=t(\"uniq\")},{uniq:310}],67:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}},{}],68:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:return\"number\"==typeof t?new o(n=l(t),n,0):new o(t,l(t.length),0);case 2:var n;if(\"number\"==typeof e)return new o(t,n=l(t.length),+e);r=0;case 3:if(t.length!==e.length)throw new Error(\"state and velocity lengths must match\");return new o(t,e,r)}};var n=t(\"cubic-hermite\"),i=t(\"binary-search-bounds\");function a(t,e,r){return Math.min(e,Math.max(t,r))}function o(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}var s=o.prototype;function l(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=0;return e}s.flush=function(t){var e=i.gt(this._time,t)-1;e<=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},s.curve=function(t){var e=this._time,r=e.length,o=i.le(e,t),s=this._scratch[0],l=this._state,u=this._velocity,c=this.dimension,f=this.bounds;if(o<0)for(var h=c-1,p=0;p<c;++p,--h)s[p]=l[h];else if(o>=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p<c;++p,--h)s[p]=l[h]+d*u[h]}else{h=c*(o+1)-1;var g=e[o],v=e[o+1]-g||1,m=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(p=0;p<c;++p,--h)m[p]=l[h],x[p]=u[h]*v,y[p]=l[h+c],b[p]=u[h+c]*v,_=_&&m[p]===y[p]&&x[p]===b[p]&&0===x[p];if(_)for(p=0;p<c;++p)s[p]=m[p];else n(m,x,y,b,(t-g)/v,s)}var w=f[0],k=f[1];for(p=0;p<c;++p)s[p]=a(w[p],k[p],s[p]);return s},s.dcurve=function(t){var e=this._time,r=e.length,a=i.le(e,t),o=this._scratch[0],s=this._state,l=this._velocity,u=this.dimension;if(a>=r-1)for(var c=s.length-1,f=(e[r-1],0);f<u;++f,--c)o[f]=l[c];else{c=u*(a+1)-1;var h=e[a],p=e[a+1]-h||1,d=this._scratch[1],g=this._scratch[2],v=this._scratch[3],m=this._scratch[4],y=!0;for(f=0;f<u;++f,--c)d[f]=s[c],v[f]=l[c]*p,g[f]=s[c+u],m[f]=l[c+u]*p,y=y&&d[f]===g[f]&&v[f]===m[f]&&0===v[f];if(y)for(f=0;f<u;++f)o[f]=0;else for(n.derivative(d,v,g,m,(t-h)/p,o),f=0;f<u;++f)o[f]/=p}return o},s.lastT=function(){var t=this._time;return t[t.length-1]},s.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r>=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1];this._time.push(e,t);for(var c=0;c<2;++c)for(var f=0;f<r;++f)n.push(n[o++]),i.push(0);for(this._time.push(t),f=r;f>0;--f)n.push(a(l[f-1],u[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=t-e,l=this.bounds,u=l[0],c=l[1],f=s>1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=a(u[h-1],c[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t<this.lastT()||arguments.length!==e+1)){var r=this._state,n=this._velocity,i=this.bounds,o=i[0],s=i[1];this._time.push(t);for(var l=e;l>0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,f=c>1e-6?1/c:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(a(l[h-1],u[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t<e)){var r=this.dimension,n=this._state,i=this._velocity,o=n.length-r,s=this.bounds,l=s[0],u=s[1],c=t-e;this._time.push(t);for(var f=r-1;f>=0;--f)n.push(a(l[f],u[f],n[o]+c*i[o])),i.push(0),o+=1}}},{\"binary-search-bounds\":31,\"cubic-hermite\":62}],69:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}e.exports=function(t){return new s(t||g,null)};var l=s.prototype;function u(t,e){var r;return e.left&&(r=u(t,e.left))?r:(r=t(e.key,e.value))||(e.right?u(t,e.right):void 0)}function c(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left&&(i=c(t,e,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return c(t,e,r,n.right)}function f(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=f(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return f(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}Object.defineProperty(l,\"keys\",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(l,\"values\",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(l,\"length\",{get:function(){return this.root?this.root._count:0}}),l.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],u=[];i;){var c=r(t,i.key);l.push(i),u.push(c),i=c<=0?i.left:i.right}l.push(new n(0,t,e,null,null,1));for(var f=l.length-2;f>=0;--f)i=l[f],u[f]<=0?l[f]=new n(i._color,i.key,i.value,l[f+1],i.right,i._count+1):l[f]=new n(i._color,i.key,i.value,i.left,l[f+1],i._count+1);for(f=l.length-1;f>1;--f){var h=l[f-1];if(i=l[f],1===h._color||1===i._color)break;var p=l[f-2];if(p.left===h)if(h.left===i){if(!(d=p.right)||0!==d._color){p._color=0,p.left=h.right,h._color=1,h.right=p,l[f-2]=h,l[f-1]=i,o(p),o(h),f>=3&&((g=l[f-3]).left===p?g.left=h:g.right=h);break}h._color=1,p.right=a(1,d),p._color=0,f-=1}else{if(!(d=p.right)||0!==d._color){h.right=i.left,p._color=0,p.left=i.right,i._color=1,i.left=h,i.right=p,l[f-2]=i,l[f-1]=h,o(p),o(h),o(i),f>=3&&((g=l[f-3]).left===p?g.left=i:g.right=i);break}h._color=1,p.right=a(1,d),p._color=0,f-=1}else if(h.right===i){if(!(d=p.left)||0!==d._color){p._color=0,p.right=h.left,h._color=1,h.left=p,l[f-2]=h,l[f-1]=i,o(p),o(h),f>=3&&((g=l[f-3]).right===p?g.right=h:g.left=h);break}h._color=1,p.left=a(1,d),p._color=0,f-=1}else{var d;if(!(d=p.left)||0!==d._color){var g;h.left=i.right,p._color=0,p.right=i.left,i._color=1,i.right=h,i.left=p,l[f-2]=i,l[f-1]=h,o(p),o(h),o(i),f>=3&&((g=l[f-3]).right===p?g.right=i:g.left=i);break}h._color=1,p.left=a(1,d),p._color=0,f-=1}}return l[0]._color=1,new s(r,l[0])},l.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return u(t,this.root);case 2:return c(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return f(e,r,this._compare,t,this.root)}},Object.defineProperty(l,\"begin\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(l,\"end\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),l.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new h(this,r);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new h(this,[])},l.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},l.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},l.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},l.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},l.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},l.remove=function(t){var e=this.find(t);return e?e.remove():this},l.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var p=h.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 g(t,e){return t<e?-1:t>e?1:0}Object.defineProperty(p,\"valid\",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,\"node\",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new h(this.tree,this._stack.slice())},p.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var l=t.length-2;l>=0;--l)(r=t[l]).left===t[l+1]?e[l]=new n(r._color,r.key,r.value,e[l+1],r.right,r._count):e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count);if((r=e[e.length-1]).left&&r.right){var u=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var c=e[u-1];for(e.push(new n(r._color,c.key,c.value,r.left,r.right,r._count)),e[u-1].key=r.key,e[u-1].value=r.value,l=e.length-2;l>=u;--l)r=e[l],e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count);e[u-1].left=e[u]}if(0===(r=e[e.length-1])._color){var f=e[e.length-2];for(f.left===r?f.left=null:f.right===r&&(f.right=null),e.pop(),l=0;l<e.length;++l)e[l]._count--;return new s(this.tree._compare,e[0])}if(r.left||r.right){for(r.left?d(r,r.left):r.right&&d(r,r.right),r._color=1,l=0;l<e.length-1;++l)e[l]._count--;return new s(this.tree._compare,e[0])}if(1===e.length)return new s(this.tree._compare,null);for(l=0;l<e.length;++l)e[l]._count--;var h=e[e.length-2];return function(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=1);if((r=t[l-1]).left===e){if((n=r.right).right&&0===n.right._color)return s=(n=r.right=i(n)).right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=1,r._color=1,s._color=1,o(r),o(n),l>1&&((u=t[l-2]).left===r?u.left=n:u.right=n),void(t[l-1]=n);if(n.left&&0===n.left._color)return s=(n=r.right=i(n)).left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=1,n._color=1,e._color=1,o(r),o(n),o(s),l>1&&((u=t[l-2]).left===r?u.left=s:u.right=s),void(t[l-1]=s);if(1===n._color){if(0===r._color)return r._color=1,void(r.right=a(0,n));r.right=a(0,n);continue}n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=0,o(r),o(n),l>1&&((u=t[l-2]).left===r?u.left=n:u.right=n),t[l-1]=n,t[l]=r,l+1<t.length?t[l+1]=e:t.push(e),l+=2}else{if((n=r.left).left&&0===n.left._color)return s=(n=r.left=i(n)).left=i(n.left),r.left=n.right,n.right=r,n.left=s,n._color=r._color,e._color=1,r._color=1,s._color=1,o(r),o(n),l>1&&((u=t[l-2]).right===r?u.right=n:u.left=n),void(t[l-1]=n);if(n.right&&0===n.right._color)return s=(n=r.left=i(n)).right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=1,n._color=1,e._color=1,o(r),o(n),o(s),l>1&&((u=t[l-2]).right===r?u.right=s:u.left=s),void(t[l-1]=s);if(1===n._color){if(0===r._color)return r._color=1,void(r.left=a(0,n));r.left=a(0,n);continue}var u;n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=0,o(r),o(n),l>1&&((u=t[l-2]).right===r?u.right=n:u.left=n),t[l-1]=n,t[l]=r,l+1<t.length?t[l+1]=e:t.push(e),l+=2}}}(e),h.left===r?h.left=null:h.right=null,new s(this.tree._compare,e[0])},Object.defineProperty(p,\"key\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,\"value\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,\"index\",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),p.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(p,\"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}}),p.update=function(t){var e=this._stack;if(0===e.length)throw new Error(\"Can't update empty node!\");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)(i=e[a]).left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},p.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(p,\"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}})},{}],70:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=new c(t);return r.update(e),r};var n=t(\"./lib/text.js\"),i=t(\"./lib/lines.js\"),a=t(\"./lib/background.js\"),o=t(\"./lib/cube.js\"),s=t(\"./lib/ticks.js\"),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function c(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=[\"auto\",\"auto\",\"auto\"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=\"sans-serif\",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=[\"auto\",\"auto\",\"auto\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=c.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),u=e.bind(this,!0,(function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),c=!1,f=!1;if(\"bounds\"in t)for(var h=t.bounds,p=0;p<2;++p)for(var d=0;d<3;++d)h[p][d]!==this.bounds[p][d]&&(f=!0),this.bounds[p][d]=h[p][d];if(\"ticks\"in t)for(r=t.ticks,c=!0,this.autoTicks=!1,p=0;p<3;++p)this.tickSpacing[p]=0;else a(\"tickSpacing\")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&(\"ticks\"in t||\"tickSpacing\"in t||(this.autoTicks=!0),f=!0,c=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),c=!0),c){for(p=0;p<3;++p)r[p].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?c=!1:this.ticks=r}o(\"tickEnable\"),l(\"tickFont\")&&(c=!0),a(\"tickSize\"),a(\"tickAngle\"),a(\"tickPad\"),u(\"tickColor\");var g=l(\"labels\");l(\"labelFont\")&&(g=!0),o(\"labelEnable\"),a(\"labelSize\"),a(\"labelPad\"),u(\"labelColor\"),o(\"lineEnable\"),o(\"lineMirror\"),a(\"lineWidth\"),u(\"lineColor\"),o(\"lineTickEnable\"),o(\"lineTickMirror\"),a(\"lineTickLength\"),a(\"lineTickWidth\"),u(\"lineTickColor\"),o(\"gridEnable\"),a(\"gridWidth\"),u(\"gridColor\"),o(\"zeroEnable\"),u(\"zeroLineColor\"),a(\"zeroLineWidth\"),o(\"backgroundEnable\"),u(\"backgroundColor\"),this._text?this._text&&(g||c)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&c&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h];function d(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,u=n[e],c=0;c<3;++c)if(e!==c){var f=a,h=s,p=o,d=l;u&1<<c&&(f=s,h=a,p=l,d=o),f[c]=r[0][c],h[c]=r[1][c],i[c]>0?(p[c]=-1,d[c]=0):(p[c]=0,d[c]=1)}}var g=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||v;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=t._ortho||!1,c=o(r,n,i,a,s),f=c.cubeEdges,h=c.axis,b=n[12],_=n[13],w=n[14],k=n[15],T=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*k)/e.drawingBufferHeight,M=0;M<3;++M)this.lastCubeProps.cubeEdges[M]=f[M],this.lastCubeProps.axis[M]=h[M];var A=p;for(M=0;M<3;++M)d(p[M],M,this.bounds,f,h);e=this.gl;var S,E,C,L=g;for(M=0;M<3;++M)this.backgroundEnable[M]?L[M]=h[M]:L[M]=0;for(this._background.draw(r,n,i,a,L,this.backgroundColor),this._lines.bind(r,n,i,this),M=0;M<3;++M){var P=[0,0,0];h[M]>0?P[M]=a[1][M]:P[M]=a[0][M];for(var O=0;O<2;++O){var I=(M+1+O)%3,D=(M+1+(1^O))%3;this.gridEnable[I]&&this._lines.drawGrid(I,D,this.bounds,P,this.gridColor[I],this.gridWidth[I]*this.pixelRatio)}for(O=0;O<2;++O)I=(M+1+O)%3,D=(M+1+(1^O))%3,this.zeroEnable[D]&&Math.min(a[0][D],a[1][D])<=0&&Math.max(a[0][D],a[1][D])>=0&&this._lines.drawZero(I,D,this.bounds,P,this.zeroLineColor[D],this.zeroLineWidth[D]*this.pixelRatio)}for(M=0;M<3;++M){this.lineEnable[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var z=u(m,A[M].primalMinor),R=u(y,A[M].mirrorMinor),F=this.lineTickLength;for(O=0;O<3;++O){var N=T/r[5*O];z[O]*=F[O]*N,R[O]*=F[O]*N}this.lineTickEnable[M]&&this._lines.drawAxisTicks(M,A[M].primalOffset,z,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&&this._lines.drawAxisTicks(M,A[M].mirrorOffset,R,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}function B(t){(C=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0||a>0&&l<0||a<0&&l>0||a<0&&l<0?B(n):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&B(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),M=0;M<3;++M){var U=A[M].primalMinor,V=A[M].mirrorMinor,H=u(x,A[M].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[M]&&(H[O]+=T*U[O]*Math.max(this.lineTickLength[O],0)/r[5*O]);var q=[0,0,0];if(q[M]=1,this.tickEnable[M]){for(-3600===this.tickAngle[M]?(this.tickAngle[M]=0,this.tickAlign[M]=\"auto\"):this.tickAlign[M]=-1,E=1,\"auto\"===(S=[this.tickAlign[M],.5,E])[0]?S[0]=0:S[0]=parseInt(\"\"+S[0]),C=[0,0,0],j(M,U,V),O=0;O<3;++O)H[O]+=T*U[O]*this.tickPad[O]/r[5*O];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],H,this.tickColor[M],q,C,S)}if(this.labelEnable[M]){for(E=0,C=[0,0,0],this.labels[M].length>4&&(B(M),E=1),\"auto\"===(S=[this.labelAlign[M],.5,E])[0]?S[0]=0:S[0]=parseInt(\"\"+S[0]),O=0;O<3;++O)H[O]+=T*U[O]*this.labelPad[O]/r[5*O];H[M]+=.5*(a[0][M]+a[1][M]),this._text.drawLabel(M,this.labelSize[M],this.labelAngle[M],H,this.labelColor[M],[0,0,0],C,S)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{\"./lib/background.js\":71,\"./lib/cube.js\":72,\"./lib/lines.js\":73,\"./lib/text.js\":75,\"./lib/ticks.js\":76}],71:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d<=1;d+=2){f[u]=d;for(var g=-1;g<=1;g+=2)f[c]=g,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var v=u;u=c,c=v}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=t(\"gl-buffer\"),i=t(\"gl-vao\"),a=t(\"./shaders\").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\"./shaders\":74,\"gl-buffer\":78,\"gl-vao\":150}],72:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,a,p){i(s,e,t),i(s,r,s);for(var y=0,x=0;x<2;++x){c[2]=a[x][2];for(var b=0;b<2;++b){c[1]=a[b][1];for(var _=0;_<2;++_)c[0]=a[_][0],h(l[y],c,s),y+=1}}var w=-1;for(x=0;x<8;++x){for(var k=l[x][3],T=0;T<3;++T)u[x][T]=l[x][T]/k;p&&(u[x][2]*=-1),k<0&&(w<0||u[x][2]<u[w][2])&&(w=x)}if(w<0){w=0;for(var M=0;M<3;++M){for(var A=(M+2)%3,S=(M+1)%3,E=-1,C=-1,L=0;L<2;++L){var P=(I=L<<M)+(L<<A)+(1-L<<S),O=I+(1-L<<A)+(L<<S);o(u[I],u[P],u[O],f)<0||(L?E=1:C=1)}if(E<0||C<0)C>E&&(w|=1<<M);else{for(L=0;L<2;++L){P=(I=L<<M)+(L<<A)+(1-L<<S),O=I+(1-L<<A)+(L<<S);var I,D=d([l[I],l[P],l[O],l[I+(1<<A)+(1<<S)]]);L?E=D:C=D}C>E&&(w|=1<<M)}}}var z=7^w,R=-1;for(x=0;x<8;++x)x!==w&&x!==z&&(R<0||u[R][1]>u[x][1])&&(R=x);var F=-1;for(x=0;x<3;++x)(B=R^1<<x)!==w&&B!==z&&(F<0&&(F=B),(S=u[B])[0]<u[F][0]&&(F=B));var N=-1;for(x=0;x<3;++x){var B;(B=R^1<<x)!==w&&B!==z&&B!==F&&(N<0&&(N=B),(S=u[B])[0]>u[N][0]&&(N=B))}var j=g;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^N)]=R&N;var U=7^N;U===w||U===z?(U=7^F,j[n.log2(N^U)]=U&N):j[n.log2(F^U)]=U&F;var V=v,H=w;for(M=0;M<3;++M)V[M]=H&1<<M?-1:1;return m};var n=t(\"bit-twiddle\"),i=t(\"gl-mat4/multiply\"),a=t(\"split-polygon\"),o=t(\"robust-orientation\"),s=new Array(16),l=new Array(8),u=new Array(8),c=new Array(3),f=[0,0,0];function h(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}!function(){for(var t=0;t<8;++t)l[t]=[1,1,1,1],u[t]=[1,1,1]}();var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(t){for(var e=0;e<p.length;++e)if((t=a.positive(t,p[e])).length<3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],o=0;for(e=1;e+1<t.length;++e){var s=t[e],l=t[e+1],u=s[0]/s[3]-n,c=s[1]/s[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;o+=Math.abs(u*h-c*f)}return o}var g=[1,1,1],v=[0,0,0],m={cubeEdges:g,axis:v}},{\"bit-twiddle\":32,\"gl-mat4/multiply\":100,\"robust-orientation\":284,\"split-polygon\":300}],73:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var o=[],s=[0,0,0],l=[0,0,0],u=[0,0,0],c=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var f=0;f<3;++f){for(var h=o.length/3|0,d=0;d<r[f].length;++d){var g=+r[f][d].x;o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var v=o.length/3|0;s[f]=h,l[f]=v-h,h=o.length/3|0;for(var m=0;m<r[f].length;++m)g=+r[f][m].x,o.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1);v=o.length/3|0,u[f]=h,c[f]=v-h}var y=n(t,new Float32Array(o)),x=i(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=a(t);return b.attributes.position.location=0,new p(t,y,x,b,l,s,c,u)};var n=t(\"gl-buffer\"),i=t(\"gl-vao\"),a=t(\"./shaders\").line,o=[0,0,0],s=[0,0,0],l=[0,0,0],u=[0,0,0],c=[1,1];function f(t){return t[0]=t[1]=t[2]=0,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function p(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}var d=p.prototype;d.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,c[0]=this.gl.drawingBufferWidth,c[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=c,this.vao.bind()},d.unbind=function(){this.vao.unbind()},d.drawAxisLine=function(t,e,r,n,i){var a=f(s);this.shader.uniforms.majorAxis=s,a[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=a;var o,c=h(u,r);c[t]+=e[0][t],this.shader.uniforms.offset=c,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=n,(o=f(l))[(t+2)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6),(o=f(l))[(t+1)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6)},d.drawAxisTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=f(o);a[t]=1,this.shader.uniforms.majorAxis=a,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=n,this.shader.uniforms.lineWidth=i;var s=f(l);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},d.drawGrid=function(t,e,r,n,i,a){if(this.gridCount[t]){var c=f(s);c[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=c;var p=h(u,n);p[e]+=r[0][e],this.shader.uniforms.offset=p;var d=f(o);d[t]=1,this.shader.uniforms.majorAxis=d;var g=f(l);g[t]=1,this.shader.uniforms.screenAxis=g,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},d.drawZero=function(t,e,r,n,i,a){var o=f(s);this.shader.uniforms.majorAxis=o,o[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=o;var c=h(u,n);c[t]+=r[0][t],this.shader.uniforms.offset=c;var p=f(l);p[e]=1,this.shader.uniforms.screenAxis=p,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,6)},d.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{\"./shaders\":74,\"gl-buffer\":78,\"gl-vao\":150}],74:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=t(\"gl-shader\"),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\\nuniform float lineWidth;\\nuniform vec2 screenShape;\\n\\nvec3 project(vec3 p) {\\n  vec4 pp = projection * view * model * vec4(p, 1.0);\\n  return pp.xyz / max(pp.w, 0.0001);\\n}\\n\\nvoid main() {\\n  vec3 major = position.x * majorAxis;\\n  vec3 minor = position.y * minorAxis;\\n\\n  vec3 vPosition = major + minor + offset;\\n  vec3 pPosition = project(vPosition);\\n  vec3 offset = project(vPosition + screenAxis * position.z);\\n\\n  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\\n\\n  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\\n}\\n\"]),o=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\nvoid main() {\\n  gl_FragColor = color;\\n}\"]);r.line=function(t){return i(t,a,o,null,[{name:\"position\",type:\"vec3\"}])};var s=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 offset, axis, alignDir, alignOpt;\\nuniform float scale, angle, pixelScale;\\nuniform vec2 resolution;\\n\\nvec3 project(vec3 p) {\\n  vec4 pp = projection * view * model * vec4(p, 1.0);\\n  return pp.xyz / max(pp.w, 0.0001);\\n}\\n\\nfloat computeViewAngle(vec3 a, vec3 b) {\\n  vec3 A = project(a);\\n  vec3 B = project(b);\\n\\n  return atan(\\n    (B.y - A.y) * resolution.y,\\n    (B.x - A.x) * resolution.x\\n  );\\n}\\n\\nconst float PI = 3.141592;\\nconst float TWO_PI = 2.0 * PI;\\nconst float HALF_PI = 0.5 * PI;\\nconst float ONE_AND_HALF_PI = 1.5 * PI;\\n\\nint option = int(floor(alignOpt.x + 0.001));\\nfloat hv_ratio =       alignOpt.y;\\nbool enableAlign =    (alignOpt.z != 0.0);\\n\\nfloat mod_angle(float a) {\\n  return mod(a, PI);\\n}\\n\\nfloat positive_angle(float a) {\\n  return mod_angle((a < 0.0) ?\\n    a + TWO_PI :\\n    a\\n  );\\n}\\n\\nfloat look_upwards(float a) {\\n  float b = positive_angle(a);\\n  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\\n    b - PI :\\n    b;\\n}\\n\\nfloat look_horizontal_or_vertical(float a, float ratio) {\\n  // ratio controls the ratio between being horizontal to (vertical + horizontal)\\n  // if ratio is set to 0.5 then it is 50%, 50%.\\n  // when using a higher ratio e.g. 0.75 the result would\\n  // likely be more horizontal than vertical.\\n\\n  float b = positive_angle(a);\\n\\n  return\\n    (b < (      ratio) * HALF_PI) ? 0.0 :\\n    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\\n    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\\n    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\\n                                    0.0;\\n}\\n\\nfloat roundTo(float a, float b) {\\n  return float(b * floor((a + 0.5 * b) / b));\\n}\\n\\nfloat look_round_n_directions(float a, int n) {\\n  float b = positive_angle(a);\\n  float div = TWO_PI / float(n);\\n  float c = roundTo(b, div);\\n  return look_upwards(c);\\n}\\n\\nfloat applyAlignOption(float rawAngle, float delta) {\\n  return\\n    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions\\n    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\\n    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis\\n    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\\n    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal\\n                    rawAngle;                // otherwise return back raw input angle\\n}\\n\\nbool isAxisTitle = (axis.x == 0.0) &&\\n                   (axis.y == 0.0) &&\\n                   (axis.z == 0.0);\\n\\nvoid main() {\\n  //Compute world offset\\n  float axisDistance = position.z;\\n  vec3 dataPosition = axisDistance * axis + offset;\\n\\n  float beta = angle; // i.e. user defined attributes for each tick\\n\\n  float axisAngle;\\n  float clipAngle;\\n  float flip;\\n\\n  if (enableAlign) {\\n    axisAngle = (isAxisTitle) ? HALF_PI :\\n                      computeViewAngle(dataPosition, dataPosition + axis);\\n    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\\n\\n    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\\n    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\\n\\n    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\\n                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\\n\\n    beta += applyAlignOption(clipAngle, flip * PI);\\n  }\\n\\n  //Compute plane offset\\n  vec2 planeCoord = position.xy * pixelScale;\\n\\n  mat2 planeXform = scale * mat2(\\n     cos(beta), sin(beta),\\n    -sin(beta), cos(beta)\\n  );\\n\\n  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\\n\\n  //Compute clip position\\n  vec3 clipPosition = project(dataPosition);\\n\\n  //Apply text offset in clip coordinates\\n  clipPosition += vec3(viewOffset, 0.0);\\n\\n  //Done\\n  gl_Position = vec4(clipPosition, 1.0);\\n}\"]),l=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\nvoid main() {\\n  gl_FragColor = color;\\n}\"]);r.text=function(t){return i(t,s,l,null,[{name:\"position\",type:\"vec3\"}])};var u=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec3 normal;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 enable;\\nuniform vec3 bounds[2];\\n\\nvarying vec3 colorChannel;\\n\\nvoid main() {\\n\\n  vec3 signAxis = sign(bounds[1] - bounds[0]);\\n\\n  vec3 realNormal = signAxis * normal;\\n\\n  if(dot(realNormal, enable) > 0.0) {\\n    vec3 minRange = min(bounds[0], bounds[1]);\\n    vec3 maxRange = max(bounds[0], bounds[1]);\\n    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\\n    gl_Position = projection * view * model * vec4(nPosition, 1.0);\\n  } else {\\n    gl_Position = vec4(0,0,0,0);\\n  }\\n\\n  colorChannel = abs(realNormal);\\n}\"]),c=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform vec4 colors[3];\\n\\nvarying vec3 colorChannel;\\n\\nvoid main() {\\n  gl_FragColor = colorChannel.x * colors[0] +\\n                 colorChannel.y * colors[1] +\\n                 colorChannel.z * colors[2];\\n}\"]);r.bg=function(t){return i(t,u,c,null,[{name:\"position\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}])}},{\"gl-shader\":132,glslify:231}],75:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function(t,e,r,a,s,l){var c=n(t),f=i(t,[{buffer:c,size:3}]),h=o(t);h.attributes.position.location=0;var p=new u(t,h,c,f);return p.update(e,r,a,s,l),p};var n=t(\"gl-buffer\"),i=t(\"gl-vao\"),a=t(\"vectorize-text\"),o=t(\"./shaders\").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};function u(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var c=u.prototype,f=[0,0];c.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},c.unbind=function(){this.vao.unbind()},c.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var u=l[r];u||(u=l[r]={});var c=u[e];c||(c=u[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:\"'+t+'\" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:\"center\",textBaseline:\"middle\",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,h=c.positions,p=c.cells,d=0,g=p.length;d<g;++d)for(var v=p[d],m=2;m>=0;--m){var y=h[v[m]];o.push(f*y[0],-f*y[1],t)}}for(var u=[0,0,0],c=[0,0,0],f=[0,0,0],h=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){f[d]=o.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),h[d]=(o.length/3|0)-f[d],u[d]=o.length/3|0;for(var g=0;g<n[d].length;++g)n[d][g].text&&s(n[d][g].x,n[d][g].text,n[d][g].font||i,n[d][g].fontSize||12,1.25,p);c[d]=(o.length/3|0)-u[d]}this.buffer.update(o),this.tickOffset=u,this.tickCount=c,this.labelOffset=f,this.labelCount=h},c.drawTicks=function(t,e,r,n,i,a,o,s){this.tickCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t]))},c.drawLabel=function(t,e,r,n,i,a,o,s){this.labelCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},c.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this)}).call(this,t(\"_process\"))},{\"./shaders\":74,_process:5,\"gl-buffer\":78,\"gl-vao\":150,\"vectorize-text\":311}],76:[function(t,e,r){\"use strict\";function n(t,e){var r=t+\"\",n=r.indexOf(\".\"),i=0;n>=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+\"\";if(s.indexOf(\"e\")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=\"\"+l;if(o<0&&(c=\"-\"+c),i){for(var f=\"\"+u;f.length<i;)f=\"0\"+f;return c+\".\"+f}return c}r.create=function(t,e){for(var r=[],i=0;i<3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]<=t[1][i];++o)a.push({x:o*e[i],text:n(e[i],o)});for(o=-1;o*e[i]>=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},{}],77:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,l,f){var h=e.model||u,p=e.view||u,m=e.projection||u,y=e._ortho||!1,x=t.bounds,b=(f=f||a(h,p,m,x,y)).axis;o(c,p,h),o(c,m,c);for(var _=g,w=0;w<3;++w)_[w].lo=1/0,_[w].hi=-1/0,_[w].pixelsPerDataUnit=1/0;var k=n(s(c,c));s(c,c);for(var T=0;T<3;++T){var M=(T+1)%3,A=(T+2)%3,S=v;t:for(w=0;w<2;++w){var E=[];if(b[T]<0!=!!w){S[T]=x[w][T];for(var C=0;C<2;++C){S[M]=x[C^w][M];for(var L=0;L<2;++L)S[A]=x[L^C^w][A],E.push(S.slice())}var P=y?5:4;for(C=P;C===P;++C){if(0===E.length)continue t;E=i.positive(E,k[C])}for(C=0;C<E.length;++C){A=E[C];var O=d(v,c,A,r,l);for(L=0;L<3;++L)_[L].lo=Math.min(_[L].lo,A[L]),_[L].hi=Math.max(_[L].hi,A[L]),L!==T&&(_[L].pixelsPerDataUnit=Math.min(_[L].pixelsPerDataUnit,Math.abs(O[L])))}}}}return _};var n=t(\"extract-frustum-planes\"),i=t(\"split-polygon\"),a=t(\"./lib/cube.js\"),o=t(\"gl-mat4/multiply\"),s=t(\"gl-mat4/transpose\"),l=t(\"gl-vec4/transformMat4\"),u=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=new Float32Array(16);function f(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}var h=[0,0,0,1],p=[0,0,0,1];function d(t,e,r,n,i){for(var a=0;a<3;++a){for(var o=h,s=p,u=0;u<3;++u)s[u]=o[u]=r[u];s[3]=o[3]=1,s[a]+=1,l(s,s,e),s[3]<0&&(t[a]=1/0),o[a]-=1,l(o,o,e),o[3]<0&&(t[a]=1/0);var c=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(c*c+f*f)}return t}var g=[new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0)],v=[0,0,0]},{\"./lib/cube.js\":72,\"extract-frustum-planes\":67,\"gl-mat4/multiply\":100,\"gl-mat4/transpose\":109,\"gl-vec4/transformMat4\":221,\"split-polygon\":300}],78:[function(t,e,r){\"use strict\";var n=t(\"typedarray-pool\"),i=t(\"ndarray-ops\"),a=t(\"ndarray\"),o=[\"uint8\",\"uint8_clamped\",\"uint16\",\"uint32\",\"int8\",\"int16\",\"int32\",\"float32\"];function s(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}var l=s.prototype;function u(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a<0)return t.bufferData(e,i,n),o;if(o+a>r)throw new Error(\"gl-buffer: If resizing buffer, must not specify offset\");return t.bufferSubData(e,a,i),r}function c(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a<i;++a)r[a]=t[a];return r}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(t,e){if(\"number\"!=typeof e&&(e=-1),this.bind(),\"object\"==typeof t&&void 0!==t.shape){var r=t.dtype;if(o.indexOf(r)<0&&(r=\"float32\"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(r=gl.getExtension(\"OES_element_index_uint\")&&\"uint16\"!==r?\"uint32\":\"uint16\"),r===t.dtype&&function(t,e){for(var r=1,n=e.length-1;n>=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=u(this.gl,this.type,this.length,this.usage,t.data,e):this.length=u(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=u(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(t,\"uint16\"):c(t,\"float32\"),this.length=u(this.gl,this.type,this.length,this.usage,e<0?f:f.subarray(0,t.length),e),n.free(f)}else if(\"object\"==typeof t&&\"number\"==typeof t.length)this.length=u(this.gl,this.type,this.length,this.usage,t,e);else{if(\"number\"!=typeof t&&void 0!==t)throw new Error(\"gl-buffer: Invalid data type\");if(e>=0)throw new Error(\"gl-buffer: Cannot specify offset when resizing buffer\");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error(\"gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER\");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error(\"gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:259,\"ndarray-ops\":254,\"typedarray-pool\":308}],79:[function(t,e,r){\"use strict\";var n=t(\"gl-vec3\");e.exports=function(t,e){var r=t.positions,i=t.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,p=null,d=null,g=[],v=1/0,m=!1,y=0;y<r.length;y++){var x=r[y];s=Math.min(x[0],s),l=Math.max(x[0],l),u=Math.min(x[1],u),c=Math.max(x[1],c),f=Math.min(x[2],f),h=Math.max(x[2],h);var b=i[y];if(n.length(b)>o&&(o=n.length(b)),y){var _=2*n.distance(p,x)/(n.length(d)+n.length(b));_?(v=Math.min(v,_),m=!1):m=!0}m||(p=x,d=b),g.push(b)}var w=[s,u,f],k=[l,c,h];e&&(e[0]=w,e[1]=k),0===o&&(o=1);var T=1/o;isFinite(v)||(v=1),a.vectorScale=v;var M=t.coneSize||.5;t.absoluteConeSize&&(M=t.absoluteConeSize*T),a.coneScale=M,y=0;for(var A=0;y<r.length;y++)for(var S=(x=r[y])[0],E=x[1],C=x[2],L=g[y],P=n.length(L)*T,O=0;O<8;O++){a.positions.push([S,E,C,A++]),a.positions.push([S,E,C,A++]),a.positions.push([S,E,C,A++]),a.positions.push([S,E,C,A++]),a.positions.push([S,E,C,A++]),a.positions.push([S,E,C,A++]),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vertexIntensity.push(P,P,P),a.vertexIntensity.push(P,P,P);var I=a.positions.length;a.cells.push([I-6,I-5,I-4],[I-3,I-2,I-1])}return a};var i=t(\"./lib/shaders\");e.exports.createMesh=t(\"./create_mesh\"),e.exports.createConeMesh=function(t,r){return e.exports.createMesh(t,r,{shaders:i,traceType:\"cone\"})}},{\"./create_mesh\":80,\"./lib/shaders\":81,\"gl-vec3\":169}],80:[function(t,e,r){\"use strict\";var n=t(\"gl-shader\"),i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"gl-texture2d\"),s=t(\"gl-mat4/multiply\"),l=t(\"gl-mat4/invert\"),u=t(\"ndarray\"),c=t(\"colormap\"),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e,r,n,i,a,o,s,l,u,c){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.pickShader=n,this.trianglePositions=i,this.triangleVectors=a,this.triangleColors=s,this.triangleUVs=l,this.triangleIds=o,this.triangleVAO=u,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=c,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=f,this._view=f,this._projection=f,this._resolution=[1,1]}var p=h.prototype;function d(t,e){var r=n(t,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}function g(t,e){var r=n(t,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}p.isOpaque=function(){return this.opacity>=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(t){this.pickId=t},p.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\"lightPosition\"in t&&(this.lightPosition=t.lightPosition),\"opacity\"in t&&(this.opacity=t.opacity),\"ambient\"in t&&(this.ambientLight=t.ambient),\"diffuse\"in t&&(this.diffuseLight=t.diffuse),\"specular\"in t&&(this.specularLight=t.specular),\"roughness\"in t&&(this.roughness=t.roughness),\"fresnel\"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=c({colormap:t,nshades:256,format:\"rgba\"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],f=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],p=t.vertexIntensity,d=1/0,g=-1/0;if(p)if(t.vertexIntensityBounds)d=+t.vertexIntensityBounds[0],g=+t.vertexIntensityBounds[1];else for(var v=0;v<p.length;++v){var m=p[v];d=Math.min(d,m),g=Math.max(g,m)}else for(v=0;v<n.length;++v)m=n[v][2],d=Math.min(d,m),g=Math.max(g,m);for(this.intensity=p||function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],v=0;v<n.length;++v)for(var y=n[v],x=0;x<3;++x)!isNaN(y[x])&&isFinite(y[x])&&(this.bounds[0][x]=Math.min(this.bounds[0][x],y[x]),this.bounds[1][x]=Math.max(this.bounds[1][x],y[x]));var b=0;t:for(v=0;v<r.length;++v){var _=r[v];if(3===_.length){for(x=0;x<3;++x){y=n[k=_[x]];for(var w=0;w<3;++w)if(isNaN(y[w])||!isFinite(y[w]))continue t}for(x=0;x<3;++x){var k;y=n[k=_[2-x]],a.push(y[0],y[1],y[2],y[3]);var T=i[k];o.push(T[0],T[1],T[2],T[3]||0);var M,A=h;3===A.length?s.push(A[0],A[1],A[2],1):s.push(A[0],A[1],A[2],A[3]),M=p?[(p[k]-d)/(g-d),0]:[(y[2]-d)/(g-d),0],l.push(M[0],M[1]),f.push(v)}b+=1}}this.triangleCount=b,this.trianglePositions.update(a),this.triangleVectors.update(o),this.triangleColors.update(s),this.triangleUVs.update(l),this.triangleIds.update(new Uint32Array(f))}},p.drawTransparent=p.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var u={model:r,view:n,projection:i,inverseModel:f.slice(),clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};u.inverseModel=l(u.inverseModel,u.model),e.disable(e.CULL_FACE),this.texture.bind(0);var c=new Array(16);for(s(c,u.view,u.model),s(c,u.projection,c),l(c,c),o=0;o<3;++o)u.eyePosition[o]=c[12+o]/c[15];var h=c[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*c[4*o+3];for(o=0;o<3;++o){for(var p=c[12+o],d=0;d<3;++d)p+=c[4*d+o]*this.lightPosition[d];u.lightPosition[o]=p/h}if(this.triangleCount>0){var g=this.triShader;g.bind(),g.uniforms=u,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return\"cone\"===this.traceType?i.index=Math.floor(r[1]/48):\"streamtube\"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(t,e,r){var n=r.shaders;1===arguments.length&&(t=(e=t).gl);var s=d(t,n),l=g(t,n),c=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));c.generateMipmap(),c.minFilter=t.LINEAR_MIPMAP_LINEAR,c.magFilter=t.LINEAR;var f=i(t),p=i(t),v=i(t),m=i(t),y=i(t),x=new h(t,c,s,l,f,p,y,v,m,a(t,[{buffer:f,type:t.FLOAT,size:4},{buffer:y,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:v,type:t.FLOAT,size:4},{buffer:m,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),r.traceType||\"cone\");return x.update(e),x}},{colormap:53,\"gl-buffer\":78,\"gl-mat4/invert\":98,\"gl-mat4/multiply\":100,\"gl-shader\":132,\"gl-texture2d\":146,\"gl-vao\":150,ndarray:259}],81:[function(t,e,r){var n=t(\"glslify\"),i=n([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the cone vertex and normal at the given index.\\n//\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\n// pointing in the direction of the vector attribute.\\n//\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\n// These vertices are used to make up the triangles of the cone by the following:\\n//   segment + 0 top vertex\\n//   segment + 1 perimeter vertex a+1\\n//   segment + 2 perimeter vertex a\\n//   segment + 3 center base vertex\\n//   segment + 4 perimeter vertex a\\n//   segment + 5 perimeter vertex a+1\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\n// To go from index to segment, floor(index / 6)\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\n// To go from index to segment index, index - (segment*6)\\n//\\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\\n\\n  const float segmentCount = 8.0;\\n\\n  float index = rawIndex - floor(rawIndex /\\n    (segmentCount * 6.0)) *\\n    (segmentCount * 6.0);\\n\\n  float segment = floor(0.001 + index/6.0);\\n  float segmentIndex = index - (segment*6.0);\\n\\n  normal = -normalize(d);\\n\\n  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\\n    return mix(vec3(0.0), -d, coneOffset);\\n  }\\n\\n  float nextAngle = (\\n    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\\n    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\\n  ) ? 1.0 : 0.0;\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\n\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\n  vec3 v2 = v1 - d;\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\n  vec3 v3 = v2 + x + y;\\n  if (segmentIndex < 3.0) {\\n    vec3 tx = u * sin(angle);\\n    vec3 ty = v * -cos(angle);\\n    vec3 tangent = tx + ty;\\n    normal = normalize(cross(v3 - v1, tangent));\\n  }\\n\\n  if (segmentIndex == 0.0) {\\n    return mix(d, vec3(0.0), coneOffset);\\n  }\\n  return v3;\\n}\\n\\nattribute vec3 vector;\\nattribute vec4 color, position;\\nattribute vec2 uv;\\n\\nuniform float vectorScale, coneScale, coneOffset;\\nuniform mat4 model, view, projection, inverseModel;\\nuniform vec3 eyePosition, lightPosition;\\n\\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  // Scale the vector magnitude to stay constant with\\n  // model & view changes.\\n  vec3 normal;\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n\\n  //Lighting geometry parameters\\n  vec4 cameraCoordinate = view * conePosition;\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\\n  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\\n\\n  // vec4 m_position  = model * vec4(conePosition, 1.0);\\n  vec4 t_position  = view * conePosition;\\n  gl_Position      = projection * t_position;\\n\\n  f_color          = color;\\n  f_data           = conePosition.xyz;\\n  f_position       = position.xyz;\\n  f_uv             = uv;\\n}\\n\"]),a=n([\"#extension GL_OES_standard_derivatives : enable\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(float x, float roughness) {\\n  float NdotH = max(x, 0.0001);\\n  float cos2Alpha = NdotH * NdotH;\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\n  float roughness2 = roughness * roughness;\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\n  return exp(tan2Alpha / roughness2) / denom;\\n}\\n\\nfloat cookTorranceSpecular(\\n  vec3 lightDirection,\\n  vec3 viewDirection,\\n  vec3 surfaceNormal,\\n  float roughness,\\n  float fresnel) {\\n\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\n\\n  //Half angle vector\\n  vec3 H = normalize(lightDirection + viewDirection);\\n\\n  //Geometric term\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\n  float G = min(1.0, min(G1, G2));\\n  \\n  //Distribution term\\n  float D = beckmannDistribution(NdotH, roughness);\\n\\n  //Fresnel term\\n  float F = pow(1.0 - VdotN, fresnel);\\n\\n  //Multiply terms and done\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\n}\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 clipBounds[2];\\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\\nuniform sampler2D texture;\\n\\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n  vec3 N = normalize(f_normal);\\n  vec3 L = normalize(f_lightDirection);\\n  vec3 V = normalize(f_eyeDirection);\\n\\n  if(gl_FrontFacing) {\\n    N = -N;\\n  }\\n\\n  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\n\\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\n\\n  gl_FragColor = litColor * opacity;\\n}\\n\"]),o=n([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the cone vertex and normal at the given index.\\n//\\n// The returned vertex is for a cone with its top at origin and height of 1.0,\\n// pointing in the direction of the vector attribute.\\n//\\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\\n// These vertices are used to make up the triangles of the cone by the following:\\n//   segment + 0 top vertex\\n//   segment + 1 perimeter vertex a+1\\n//   segment + 2 perimeter vertex a\\n//   segment + 3 center base vertex\\n//   segment + 4 perimeter vertex a\\n//   segment + 5 perimeter vertex a+1\\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\\n// To go from index to segment, floor(index / 6)\\n// To go from segment to angle, 2*pi * (segment/segmentCount)\\n// To go from index to segment index, index - (segment*6)\\n//\\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\\n\\n  const float segmentCount = 8.0;\\n\\n  float index = rawIndex - floor(rawIndex /\\n    (segmentCount * 6.0)) *\\n    (segmentCount * 6.0);\\n\\n  float segment = floor(0.001 + index/6.0);\\n  float segmentIndex = index - (segment*6.0);\\n\\n  normal = -normalize(d);\\n\\n  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\\n    return mix(vec3(0.0), -d, coneOffset);\\n  }\\n\\n  float nextAngle = (\\n    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\\n    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\\n  ) ? 1.0 : 0.0;\\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\\n\\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\\n  vec3 v2 = v1 - d;\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d)*0.25;\\n  vec3 y = v * sin(angle) * length(d)*0.25;\\n  vec3 v3 = v2 + x + y;\\n  if (segmentIndex < 3.0) {\\n    vec3 tx = u * sin(angle);\\n    vec3 ty = v * -cos(angle);\\n    vec3 tangent = tx + ty;\\n    normal = normalize(cross(v3 - v1, tangent));\\n  }\\n\\n  if (segmentIndex == 0.0) {\\n    return mix(d, vec3(0.0), coneOffset);\\n  }\\n  return v3;\\n}\\n\\nattribute vec4 vector;\\nattribute vec4 position;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\nuniform float vectorScale, coneScale, coneOffset;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  vec3 normal;\\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n  gl_Position = projection * view * conePosition;\\n  f_id        = id;\\n  f_position  = position.xyz;\\n}\\n\"]),s=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3  clipBounds[2];\\nuniform float pickId;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\n}\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\"position\",type:\"vec4\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"vector\",type:\"vec3\"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:\"position\",type:\"vec4\"},{name:\"id\",type:\"vec4\"},{name:\"vector\",type:\"vec3\"}]}},{glslify:231}],82:[function(t,e,r){e.exports={0:\"NONE\",1:\"ONE\",2:\"LINE_LOOP\",3:\"LINE_STRIP\",4:\"TRIANGLES\",5:\"TRIANGLE_STRIP\",6:\"TRIANGLE_FAN\",256:\"DEPTH_BUFFER_BIT\",512:\"NEVER\",513:\"LESS\",514:\"EQUAL\",515:\"LEQUAL\",516:\"GREATER\",517:\"NOTEQUAL\",518:\"GEQUAL\",519:\"ALWAYS\",768:\"SRC_COLOR\",769:\"ONE_MINUS_SRC_COLOR\",770:\"SRC_ALPHA\",771:\"ONE_MINUS_SRC_ALPHA\",772:\"DST_ALPHA\",773:\"ONE_MINUS_DST_ALPHA\",774:\"DST_COLOR\",775:\"ONE_MINUS_DST_COLOR\",776:\"SRC_ALPHA_SATURATE\",1024:\"STENCIL_BUFFER_BIT\",1028:\"FRONT\",1029:\"BACK\",1032:\"FRONT_AND_BACK\",1280:\"INVALID_ENUM\",1281:\"INVALID_VALUE\",1282:\"INVALID_OPERATION\",1285:\"OUT_OF_MEMORY\",1286:\"INVALID_FRAMEBUFFER_OPERATION\",2304:\"CW\",2305:\"CCW\",2849:\"LINE_WIDTH\",2884:\"CULL_FACE\",2885:\"CULL_FACE_MODE\",2886:\"FRONT_FACE\",2928:\"DEPTH_RANGE\",2929:\"DEPTH_TEST\",2930:\"DEPTH_WRITEMASK\",2931:\"DEPTH_CLEAR_VALUE\",2932:\"DEPTH_FUNC\",2960:\"STENCIL_TEST\",2961:\"STENCIL_CLEAR_VALUE\",2962:\"STENCIL_FUNC\",2963:\"STENCIL_VALUE_MASK\",2964:\"STENCIL_FAIL\",2965:\"STENCIL_PASS_DEPTH_FAIL\",2966:\"STENCIL_PASS_DEPTH_PASS\",2967:\"STENCIL_REF\",2968:\"STENCIL_WRITEMASK\",2978:\"VIEWPORT\",3024:\"DITHER\",3042:\"BLEND\",3088:\"SCISSOR_BOX\",3089:\"SCISSOR_TEST\",3106:\"COLOR_CLEAR_VALUE\",3107:\"COLOR_WRITEMASK\",3317:\"UNPACK_ALIGNMENT\",3333:\"PACK_ALIGNMENT\",3379:\"MAX_TEXTURE_SIZE\",3386:\"MAX_VIEWPORT_DIMS\",3408:\"SUBPIXEL_BITS\",3410:\"RED_BITS\",3411:\"GREEN_BITS\",3412:\"BLUE_BITS\",3413:\"ALPHA_BITS\",3414:\"DEPTH_BITS\",3415:\"STENCIL_BITS\",3553:\"TEXTURE_2D\",4352:\"DONT_CARE\",4353:\"FASTEST\",4354:\"NICEST\",5120:\"BYTE\",5121:\"UNSIGNED_BYTE\",5122:\"SHORT\",5123:\"UNSIGNED_SHORT\",5124:\"INT\",5125:\"UNSIGNED_INT\",5126:\"FLOAT\",5386:\"INVERT\",5890:\"TEXTURE\",6401:\"STENCIL_INDEX\",6402:\"DEPTH_COMPONENT\",6406:\"ALPHA\",6407:\"RGB\",6408:\"RGBA\",6409:\"LUMINANCE\",6410:\"LUMINANCE_ALPHA\",7680:\"KEEP\",7681:\"REPLACE\",7682:\"INCR\",7683:\"DECR\",7936:\"VENDOR\",7937:\"RENDERER\",7938:\"VERSION\",9728:\"NEAREST\",9729:\"LINEAR\",9984:\"NEAREST_MIPMAP_NEAREST\",9985:\"LINEAR_MIPMAP_NEAREST\",9986:\"NEAREST_MIPMAP_LINEAR\",9987:\"LINEAR_MIPMAP_LINEAR\",10240:\"TEXTURE_MAG_FILTER\",10241:\"TEXTURE_MIN_FILTER\",10242:\"TEXTURE_WRAP_S\",10243:\"TEXTURE_WRAP_T\",10497:\"REPEAT\",10752:\"POLYGON_OFFSET_UNITS\",16384:\"COLOR_BUFFER_BIT\",32769:\"CONSTANT_COLOR\",32770:\"ONE_MINUS_CONSTANT_COLOR\",32771:\"CONSTANT_ALPHA\",32772:\"ONE_MINUS_CONSTANT_ALPHA\",32773:\"BLEND_COLOR\",32774:\"FUNC_ADD\",32777:\"BLEND_EQUATION_RGB\",32778:\"FUNC_SUBTRACT\",32779:\"FUNC_REVERSE_SUBTRACT\",32819:\"UNSIGNED_SHORT_4_4_4_4\",32820:\"UNSIGNED_SHORT_5_5_5_1\",32823:\"POLYGON_OFFSET_FILL\",32824:\"POLYGON_OFFSET_FACTOR\",32854:\"RGBA4\",32855:\"RGB5_A1\",32873:\"TEXTURE_BINDING_2D\",32926:\"SAMPLE_ALPHA_TO_COVERAGE\",32928:\"SAMPLE_COVERAGE\",32936:\"SAMPLE_BUFFERS\",32937:\"SAMPLES\",32938:\"SAMPLE_COVERAGE_VALUE\",32939:\"SAMPLE_COVERAGE_INVERT\",32968:\"BLEND_DST_RGB\",32969:\"BLEND_SRC_RGB\",32970:\"BLEND_DST_ALPHA\",32971:\"BLEND_SRC_ALPHA\",33071:\"CLAMP_TO_EDGE\",33170:\"GENERATE_MIPMAP_HINT\",33189:\"DEPTH_COMPONENT16\",33306:\"DEPTH_STENCIL_ATTACHMENT\",33635:\"UNSIGNED_SHORT_5_6_5\",33648:\"MIRRORED_REPEAT\",33901:\"ALIASED_POINT_SIZE_RANGE\",33902:\"ALIASED_LINE_WIDTH_RANGE\",33984:\"TEXTURE0\",33985:\"TEXTURE1\",33986:\"TEXTURE2\",33987:\"TEXTURE3\",33988:\"TEXTURE4\",33989:\"TEXTURE5\",33990:\"TEXTURE6\",33991:\"TEXTURE7\",33992:\"TEXTURE8\",33993:\"TEXTURE9\",33994:\"TEXTURE10\",33995:\"TEXTURE11\",33996:\"TEXTURE12\",33997:\"TEXTURE13\",33998:\"TEXTURE14\",33999:\"TEXTURE15\",34e3:\"TEXTURE16\",34001:\"TEXTURE17\",34002:\"TEXTURE18\",34003:\"TEXTURE19\",34004:\"TEXTURE20\",34005:\"TEXTURE21\",34006:\"TEXTURE22\",34007:\"TEXTURE23\",34008:\"TEXTURE24\",34009:\"TEXTURE25\",34010:\"TEXTURE26\",34011:\"TEXTURE27\",34012:\"TEXTURE28\",34013:\"TEXTURE29\",34014:\"TEXTURE30\",34015:\"TEXTURE31\",34016:\"ACTIVE_TEXTURE\",34024:\"MAX_RENDERBUFFER_SIZE\",34041:\"DEPTH_STENCIL\",34055:\"INCR_WRAP\",34056:\"DECR_WRAP\",34067:\"TEXTURE_CUBE_MAP\",34068:\"TEXTURE_BINDING_CUBE_MAP\",34069:\"TEXTURE_CUBE_MAP_POSITIVE_X\",34070:\"TEXTURE_CUBE_MAP_NEGATIVE_X\",34071:\"TEXTURE_CUBE_MAP_POSITIVE_Y\",34072:\"TEXTURE_CUBE_MAP_NEGATIVE_Y\",34073:\"TEXTURE_CUBE_MAP_POSITIVE_Z\",34074:\"TEXTURE_CUBE_MAP_NEGATIVE_Z\",34076:\"MAX_CUBE_MAP_TEXTURE_SIZE\",34338:\"VERTEX_ATTRIB_ARRAY_ENABLED\",34339:\"VERTEX_ATTRIB_ARRAY_SIZE\",34340:\"VERTEX_ATTRIB_ARRAY_STRIDE\",34341:\"VERTEX_ATTRIB_ARRAY_TYPE\",34342:\"CURRENT_VERTEX_ATTRIB\",34373:\"VERTEX_ATTRIB_ARRAY_POINTER\",34466:\"NUM_COMPRESSED_TEXTURE_FORMATS\",34467:\"COMPRESSED_TEXTURE_FORMATS\",34660:\"BUFFER_SIZE\",34661:\"BUFFER_USAGE\",34816:\"STENCIL_BACK_FUNC\",34817:\"STENCIL_BACK_FAIL\",34818:\"STENCIL_BACK_PASS_DEPTH_FAIL\",34819:\"STENCIL_BACK_PASS_DEPTH_PASS\",34877:\"BLEND_EQUATION_ALPHA\",34921:\"MAX_VERTEX_ATTRIBS\",34922:\"VERTEX_ATTRIB_ARRAY_NORMALIZED\",34930:\"MAX_TEXTURE_IMAGE_UNITS\",34962:\"ARRAY_BUFFER\",34963:\"ELEMENT_ARRAY_BUFFER\",34964:\"ARRAY_BUFFER_BINDING\",34965:\"ELEMENT_ARRAY_BUFFER_BINDING\",34975:\"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\",35040:\"STREAM_DRAW\",35044:\"STATIC_DRAW\",35048:\"DYNAMIC_DRAW\",35632:\"FRAGMENT_SHADER\",35633:\"VERTEX_SHADER\",35660:\"MAX_VERTEX_TEXTURE_IMAGE_UNITS\",35661:\"MAX_COMBINED_TEXTURE_IMAGE_UNITS\",35663:\"SHADER_TYPE\",35664:\"FLOAT_VEC2\",35665:\"FLOAT_VEC3\",35666:\"FLOAT_VEC4\",35667:\"INT_VEC2\",35668:\"INT_VEC3\",35669:\"INT_VEC4\",35670:\"BOOL\",35671:\"BOOL_VEC2\",35672:\"BOOL_VEC3\",35673:\"BOOL_VEC4\",35674:\"FLOAT_MAT2\",35675:\"FLOAT_MAT3\",35676:\"FLOAT_MAT4\",35678:\"SAMPLER_2D\",35680:\"SAMPLER_CUBE\",35712:\"DELETE_STATUS\",35713:\"COMPILE_STATUS\",35714:\"LINK_STATUS\",35715:\"VALIDATE_STATUS\",35716:\"INFO_LOG_LENGTH\",35717:\"ATTACHED_SHADERS\",35718:\"ACTIVE_UNIFORMS\",35719:\"ACTIVE_UNIFORM_MAX_LENGTH\",35720:\"SHADER_SOURCE_LENGTH\",35721:\"ACTIVE_ATTRIBUTES\",35722:\"ACTIVE_ATTRIBUTE_MAX_LENGTH\",35724:\"SHADING_LANGUAGE_VERSION\",35725:\"CURRENT_PROGRAM\",36003:\"STENCIL_BACK_REF\",36004:\"STENCIL_BACK_VALUE_MASK\",36005:\"STENCIL_BACK_WRITEMASK\",36006:\"FRAMEBUFFER_BINDING\",36007:\"RENDERBUFFER_BINDING\",36048:\"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\",36049:\"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\",36050:\"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\",36051:\"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\",36053:\"FRAMEBUFFER_COMPLETE\",36054:\"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\",36055:\"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\",36057:\"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\",36061:\"FRAMEBUFFER_UNSUPPORTED\",36064:\"COLOR_ATTACHMENT0\",36096:\"DEPTH_ATTACHMENT\",36128:\"STENCIL_ATTACHMENT\",36160:\"FRAMEBUFFER\",36161:\"RENDERBUFFER\",36162:\"RENDERBUFFER_WIDTH\",36163:\"RENDERBUFFER_HEIGHT\",36164:\"RENDERBUFFER_INTERNAL_FORMAT\",36168:\"STENCIL_INDEX8\",36176:\"RENDERBUFFER_RED_SIZE\",36177:\"RENDERBUFFER_GREEN_SIZE\",36178:\"RENDERBUFFER_BLUE_SIZE\",36179:\"RENDERBUFFER_ALPHA_SIZE\",36180:\"RENDERBUFFER_DEPTH_SIZE\",36181:\"RENDERBUFFER_STENCIL_SIZE\",36194:\"RGB565\",36336:\"LOW_FLOAT\",36337:\"MEDIUM_FLOAT\",36338:\"HIGH_FLOAT\",36339:\"LOW_INT\",36340:\"MEDIUM_INT\",36341:\"HIGH_INT\",36346:\"SHADER_COMPILER\",36347:\"MAX_VERTEX_UNIFORM_VECTORS\",36348:\"MAX_VARYING_VECTORS\",36349:\"MAX_FRAGMENT_UNIFORM_VECTORS\",37440:\"UNPACK_FLIP_Y_WEBGL\",37441:\"UNPACK_PREMULTIPLY_ALPHA_WEBGL\",37442:\"CONTEXT_LOST_WEBGL\",37443:\"UNPACK_COLORSPACE_CONVERSION_WEBGL\",37444:\"BROWSER_DEFAULT_WEBGL\"}},{}],83:[function(t,e,r){var n=t(\"./1.0/numbers\");e.exports=function(t){return n[t]}},{\"./1.0/numbers\":82}],84:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var u=new s(e,r,o,l);return u.update(t),u};var n=t(\"gl-buffer\"),i=t(\"gl-vao\"),a=t(\"./shaders/index\"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function u(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],u=n[15],c=(t._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*u)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]*this.pixelRatio),r.capSize=this.capSize[f]*c,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var c=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=c[n],a=0;a<i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}l.update=function(t){\"lineWidth\"in(t=t||{})&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),\"capSize\"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,\"opacity\"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var i=[],a=r.length,o=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s<3;++s){this.lineOffset[s]=o;t:for(var l=0;l<a;++l){for(var c=r[l],h=0;h<3;++h)if(isNaN(c[h])||!isFinite(c[h]))continue t;var p,d=n[l],g=e[s];Array.isArray(g[0])&&(g=e[l]),3===g.length?g=[g[0],g[1],g[2],1]:4===g.length&&(g=[g[0],g[1],g[2],g[3]],!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0)),isNaN(d[0][s])||isNaN(d[1][s])||(d[0][s]<0&&((p=c.slice())[s]+=d[0][s],i.push(c[0],c[1],c[2],g[0],g[1],g[2],g[3],0,0,0,p[0],p[1],p[2],g[0],g[1],g[2],g[3],0,0,0),u(this.bounds,p),o+=2+f(i,p,g,s)),d[1][s]>0&&((p=c.slice())[s]+=d[1][s],i.push(c[0],c[1],c[2],g[0],g[1],g[2],g[3],0,0,0,p[0],p[1],p[2],g[0],g[1],g[2],g[3],0,0,0),u(this.bounds,p),o+=2+f(i,p,g,s)))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{\"./shaders/index\":85,\"gl-buffer\":78,\"gl-vao\":150}],85:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=t(\"gl-shader\"),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position, offset;\\nattribute vec4 color;\\nuniform mat4 model, view, projection;\\nuniform float capSize;\\nvarying vec4 fragColor;\\nvarying vec3 fragPosition;\\n\\nvoid main() {\\n  vec4 worldPosition  = model * vec4(position, 1.0);\\n  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\\n  gl_Position         = projection * view * worldPosition;\\n  fragColor           = color;\\n  fragPosition        = position;\\n}\"]),o=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 clipBounds[2];\\nuniform float opacity;\\nvarying vec3 fragPosition;\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  if (\\n    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\\n    fragColor.a * opacity == 0.\\n  ) discard;\\n\\n  gl_FragColor = opacity * fragColor;\\n}\"]);e.exports=function(t){return i(t,a,o,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"offset\",type:\"vec3\"}])}},{\"gl-shader\":132,glslify:231}],86:[function(t,e,r){\"use strict\";var n=t(\"gl-texture2d\");e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var u=t.getExtension(\"WEBGL_draw_buffers\");if(!l&&u&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a<n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(a=n;a<r;++a)i[a]=t.NONE;l[n]=i}}(t,u),Array.isArray(e)&&(n=r,r=0|e[1],e=0|e[0]),\"number\"!=typeof e)throw new Error(\"gl-fbo: Missing shape parameter\");var c=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e<0||e>c||r<0||r>c)throw new Error(\"gl-fbo: Parameters are too large for FBO\");var f=1;if(\"color\"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error(\"gl-fbo: Must specify a nonnegative number of colors\");if(f>1){if(!u)throw new Error(\"gl-fbo: Multiple draw buffer extension not supported\");if(f>t.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(\"gl-fbo: Context does not support \"+f+\" draw buffers\")}}var h=t.UNSIGNED_BYTE,p=t.getExtension(\"OES_texture_float\");if(n.float&&f>0){if(!p)throw new Error(\"gl-fbo: Context does not support floating point textures\");h=t.FLOAT}else n.preferFloat&&f>0&&p&&(h=t.FLOAT);var g=!0;\"depth\"in n&&(g=!!n.depth);var v=!1;return\"stencil\"in n&&(v=!!n.stencil),new d(t,e,r,h,f,g,v,u)};var i,a,o,s,l=null;function u(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function c(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error(\"gl-fbo: Framebuffer unsupported\");case a:throw new Error(\"gl-fbo: Framebuffer incomplete attachment\");case o:throw new Error(\"gl-fbo: Framebuffer incomplete dimensions\");case s:throw new Error(\"gl-fbo: Framebuffer incomplete missing attachment\");default:throw new Error(\"gl-fbo: Framebuffer failed for unspecified reason\")}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d<i;++d)this.color[d]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=n,this._useDepth=a,this._useStencil=o;var g=this,v=[0|e,0|r];Object.defineProperties(v,{0:{get:function(){return g._shape[0]},set:function(t){return g.width=t}},1:{get:function(){return g._shape[1]},set:function(t){return g.height=t}}}),this._shapeVector=v,function(t){var e=u(t.gl),r=t.gl,n=t.handle=r.createFramebuffer(),i=t._shape[0],a=t._shape[1],o=t.color.length,s=t._ext,d=t._useStencil,g=t._useDepth,v=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,n);for(var m=0;m<o;++m)t.color[m]=h(r,i,a,v,r.RGBA,r.COLOR_ATTACHMENT0+m);0===o?(t._color_rb=p(r,i,a,r.RGBA4,r.COLOR_ATTACHMENT0),s&&s.drawBuffersWEBGL(l[0])):o>1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension(\"WEBGL_depth_texture\");y?d?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;m<t.color.length;++m)t.color[m].dispose(),t.color[m]=null;t._color_rb&&(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),c(r,e),f(x)}c(r,e)}(this)}var g=d.prototype;function v(t,e,r){if(t._destroyed)throw new Error(\"gl-fbo: Can't resize destroyed FBO\");if(t._shape[0]!==e||t._shape[1]!==r){var n=t.gl,i=n.getParameter(n.MAX_RENDERBUFFER_SIZE);if(e<0||e>i||r<0||r>i)throw new Error(\"gl-fbo: Can't resize FBO, invalid dimensions\");t._shape[0]=e,t._shape[1]=r;for(var a=u(n),o=0;o<t.color.length;++o)t.color[o].shape=t._shape;t._color_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._color_rb),n.renderbufferStorage(n.RENDERBUFFER,n.RGBA4,t._shape[0],t._shape[1])),t.depth&&(t.depth.shape=t._shape),t._depth_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._depth_rb),t._useDepth&&t._useStencil?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&&n.renderbufferStorage(n.RENDERBUFFER,n.STENCIL_INDEX,t._shape[0],t._shape[1])),n.bindFramebuffer(n.FRAMEBUFFER,t.handle);var s=n.checkFramebufferStatus(n.FRAMEBUFFER);s!==n.FRAMEBUFFER_COMPLETE&&(t.dispose(),c(n,a),f(s)),c(n,a)}}Object.defineProperties(g,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error(\"gl-fbo: Shape vector must be length 2\");var e=0|t[0],r=0|t[1];return v(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return v(this,t|=0,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,v(this,this._shape[0],t),t},enumerable:!1}}),g.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},g.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e<this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&&(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{\"gl-texture2d\":146}],87:[function(t,e,r){var n=t(\"sprintf-js\").sprintf,i=t(\"gl-constants/lookup\"),a=t(\"glsl-shader-name\"),o=t(\"add-line-numbers\");e.exports=function(t,e,r){\"use strict\";var s=a(e)||\"of unknown name (see npm glsl-shader-name)\",l=\"unknown type\";void 0!==r&&(l=r===i.FRAGMENT_SHADER?\"fragment\":\"vertex\");for(var u=n(\"Error compiling %s shader %s:\\n\",l,s),c=n(\"%s%s\",u,t),f=t.split(\"\\n\"),h={},p=0;p<f.length;p++){var d=f[p];if(\"\"!==d&&\"\\0\"!==d){var g=parseInt(d.split(\":\")[2]);if(isNaN(g))throw new Error(n(\"Could not parse error: %s\",d));h[g]=d}}var v=o(e).split(\"\\n\");for(p=0;p<v.length;p++)if((h[p+3]||h[p+2]||h[p+1])&&(u+=v[p]+\"\\n\",h[p+1])){var m=h[p+1];m=m.substr(m.split(\":\",3).join(\":\").length+1).trim(),u+=n(\"^^^ %s\\n\\n\",m)}return{long:u.trim(),short:c.trim()}}},{\"add-line-numbers\":9,\"gl-constants/lookup\":83,\"glsl-shader-name\":223,\"sprintf-js\":301}],88:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t.gl,n=new u(t,o(r,l.vertex,l.fragment),o(r,l.pickVertex,l.pickFragment),s(r),s(r),s(r),s(r));return n.update(e),t.addObject(n),n};var n=t(\"binary-search-bounds\"),i=t(\"iota-array\"),a=t(\"typedarray-pool\"),o=t(\"gl-shader\"),s=t(\"gl-buffer\"),l=t(\"./lib/shaders\");function u(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var c,f=u.prototype,h=[0,0,1,0,0,1,1,0,1,1,0,1];f.draw=(c=[1,0,0,0,1,0,0,0,1],function(){var t=this.plot,e=this.shader,r=this.bounds,n=this.numVertices;if(!(n<=0)){var i=t.gl,a=t.dataBox,o=r[2]-r[0],s=r[3]-r[1],l=a[2]-a[0],u=a[3]-a[1];c[0]=2*o/l,c[4]=2*s/u,c[6]=2*(r[0]-a[0])/l-1,c[7]=2*(r[1]-a[1])/u-1,e.bind();var f=e.uniforms;f.viewTransform=c,f.shape=this.shape;var h=e.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(i.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(i.UNSIGNED_BYTE,!0),i.drawArrays(i.TRIANGLES,0,n)}}),f.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o<=0)){var s=n.gl,l=n.dataBox,u=a[2]-a[0],c=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*u/f,t[4]=2*c/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var p=0;p<4;++p)e[p]=r>>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r<n||r>=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=o;var u,c,f,p,d=t.colorLevels||[0],g=t.colorValues||[0,0,0,1],v=d.length,m=this.bounds;l?(u=m[0]=r[0],c=m[1]=o[0],f=m[2]=r[r.length-1],p=m[3]=o[o.length-1]):(u=m[0]=r[0]+(r[1]-r[0])/2,c=m[1]=o[0]+(o[1]-o[0])/2,f=m[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,p=m[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var y=1/(f-u),x=1/(p-c),b=e[0],_=e[1];this.shape=[b,_];var w=(l?(b-1)*(_-1):b*_)*(h.length>>>1);this.numVertices=w;for(var k=a.mallocUint8(4*w),T=a.mallocFloat32(2*w),M=a.mallocUint8(2*w),A=a.mallocUint32(w),S=0,E=l?b-1:b,C=l?_-1:_,L=0;L<C;++L){var P,O;l?(P=x*(o[L]-c),O=x*(o[L+1]-c)):(P=L<_-1?x*(o[L]-(o[L+1]-o[L])/2-c):x*(o[L]-(o[L]-o[L-1])/2-c),O=L<_-1?x*(o[L]+(o[L+1]-o[L])/2-c):x*(o[L]+(o[L]-o[L-1])/2-c));for(var I=0;I<E;++I){var D,z;l?(D=y*(r[I]-u),z=y*(r[I+1]-u)):(D=I<b-1?y*(r[I]-(r[I+1]-r[I])/2-u):y*(r[I]-(r[I]-r[I-1])/2-u),z=I<b-1?y*(r[I]+(r[I+1]-r[I])/2-u):y*(r[I]+(r[I]-r[I-1])/2-u));for(var R=0;R<h.length;R+=2){var F,N,B,j,U=h[R],V=h[R+1],H=s[l?(L+V)*b+(I+U):L*b+I],q=n.le(d,H);if(q<0)F=g[0],N=g[1],B=g[2],j=g[3];else if(q===v-1)F=g[4*v-4],N=g[4*v-3],B=g[4*v-2],j=g[4*v-1];else{var G=(H-d[q])/(d[q+1]-d[q]),Y=1-G,W=4*q,X=4*(q+1);F=Y*g[W]+G*g[X],N=Y*g[W+1]+G*g[X+1],B=Y*g[W+2]+G*g[X+2],j=Y*g[W+3]+G*g[X+3]}k[4*S]=255*F,k[4*S+1]=255*N,k[4*S+2]=255*B,k[4*S+3]=255*j,T[2*S]=.5*D+.5*z,T[2*S+1]=.5*P+.5*O,M[2*S]=U,M[2*S+1]=V,A[S]=L*b+I,S+=1}}}this.positionBuffer.update(T),this.weightBuffer.update(M),this.colorBuffer.update(k),this.idBuffer.update(A),a.free(T),a.free(k),a.free(M),a.free(A)},f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{\"./lib/shaders\":89,\"binary-search-bounds\":31,\"gl-buffer\":78,\"gl-shader\":132,\"iota-array\":235,\"typedarray-pool\":308}],89:[function(t,e,r){\"use strict\";var n=t(\"glslify\");e.exports={fragment:n([\"precision lowp float;\\n#define GLSLIFY 1\\nvarying vec4 fragColor;\\nvoid main() {\\n  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\\n}\\n\"]),vertex:n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position;\\nattribute vec4 color;\\nattribute vec2 weight;\\n\\nuniform vec2 shape;\\nuniform mat3 viewTransform;\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\n  fragColor = color;\\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\n}\\n\"]),pickFragment:n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragId;\\nvarying vec2 vWeight;\\n\\nuniform vec2 shape;\\nuniform vec4 pickOffset;\\n\\nvoid main() {\\n  vec2 d = step(.5, vWeight);\\n  vec4 id = fragId + pickOffset;\\n  id.x += d.x + d.y*shape.x;\\n\\n  id.y += floor(id.x / 256.0);\\n  id.x -= floor(id.x / 256.0) * 256.0;\\n\\n  id.z += floor(id.y / 256.0);\\n  id.y -= floor(id.y / 256.0) * 256.0;\\n\\n  id.w += floor(id.z / 256.0);\\n  id.z -= floor(id.z / 256.0) * 256.0;\\n\\n  gl_FragColor = id/255.;\\n}\\n\"]),pickVertex:n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position;\\nattribute vec4 pickId;\\nattribute vec2 weight;\\n\\nuniform vec2 shape;\\nuniform mat3 viewTransform;\\n\\nvarying vec4 fragId;\\nvarying vec2 vWeight;\\n\\nvoid main() {\\n  vWeight = weight;\\n\\n  fragId = pickId;\\n\\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\n}\\n\"])}},{glslify:231}],90:[function(t,e,r){var n=t(\"glslify\"),i=t(\"gl-shader\"),a=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position, nextPosition;\\nattribute float arcLength, lineWidth;\\nattribute vec4 color;\\n\\nuniform vec2 screenShape;\\nuniform float pixelRatio;\\nuniform mat4 model, view, projection;\\n\\nvarying vec4 fragColor;\\nvarying vec3 worldPosition;\\nvarying float pixelArcLength;\\n\\nvec4 project(vec3 p) {\\n  return projection * view * model * vec4(p, 1.0);\\n}\\n\\nvoid main() {\\n  vec4 startPoint = project(position);\\n  vec4 endPoint   = project(nextPosition);\\n\\n  vec2 A = startPoint.xy / startPoint.w;\\n  vec2 B =   endPoint.xy /   endPoint.w;\\n\\n  float clipAngle = atan(\\n    (B.y - A.y) * screenShape.y,\\n    (B.x - A.x) * screenShape.x\\n  );\\n\\n  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\\n    sin(clipAngle),\\n    -cos(clipAngle)\\n  ) / screenShape;\\n\\n  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\\n\\n  worldPosition = position;\\n  pixelArcLength = arcLength;\\n  fragColor = color;\\n}\\n\"]),o=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3      clipBounds[2];\\nuniform sampler2D dashTexture;\\nuniform float     dashScale;\\nuniform float     opacity;\\n\\nvarying vec3    worldPosition;\\nvarying float   pixelArcLength;\\nvarying vec4    fragColor;\\n\\nvoid main() {\\n  if (\\n    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\\n    fragColor.a * opacity == 0.\\n  ) discard;\\n\\n  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\\n  if(dashWeight < 0.5) {\\n    discard;\\n  }\\n  gl_FragColor = fragColor * opacity;\\n}\\n\"]),s=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\n#define FLOAT_MAX  1.70141184e38\\n#define FLOAT_MIN  1.17549435e-38\\n\\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\\nvec4 packFloat(float v) {\\n  float av = abs(v);\\n\\n  //Handle special cases\\n  if(av < FLOAT_MIN) {\\n    return vec4(0.0, 0.0, 0.0, 0.0);\\n  } else if(v > FLOAT_MAX) {\\n    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\\n  } else if(v < -FLOAT_MAX) {\\n    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\\n  }\\n\\n  vec4 c = vec4(0,0,0,0);\\n\\n  //Compute exponent and mantissa\\n  float e = floor(log2(av));\\n  float m = av * pow(2.0, -e) - 1.0;\\n\\n  //Unpack mantissa\\n  c[1] = floor(128.0 * m);\\n  m -= c[1] / 128.0;\\n  c[2] = floor(32768.0 * m);\\n  m -= c[2] / 32768.0;\\n  c[3] = floor(8388608.0 * m);\\n\\n  //Unpack exponent\\n  float ebias = e + 127.0;\\n  c[0] = floor(ebias / 2.0);\\n  ebias -= c[0] * 2.0;\\n  c[1] += floor(ebias) * 128.0;\\n\\n  //Unpack sign bit\\n  c[0] += 128.0 * step(0.0, -v);\\n\\n  //Scale back to range\\n  return c / 255.0;\\n}\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform float pickId;\\nuniform vec3 clipBounds[2];\\n\\nvarying vec3 worldPosition;\\nvarying float pixelArcLength;\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\\n\\n  gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\\n}\"]),l=[{name:\"position\",type:\"vec3\"},{name:\"nextPosition\",type:\"vec3\"},{name:\"arcLength\",type:\"float\"},{name:\"lineWidth\",type:\"float\"},{name:\"color\",type:\"vec4\"}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{\"gl-shader\":132,glslify:231}],91:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=f(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),c=u(new Array(1024),[256,1,4]),p=0;p<1024;++p)c.data[p]=255;var d=a(e,c);d.wrap=e.REPEAT;var g=new m(e,r,o,s,l,d);return g.update(t),g};var n=t(\"gl-buffer\"),i=t(\"gl-vao\"),a=t(\"gl-texture2d\"),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=t(\"binary-search-bounds\"),u=t(\"ndarray\"),c=t(\"./lib/shaders\"),f=c.createShader,h=c.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function g(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function v(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function m(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=m.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,clipBounds:g(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,pickId:this.pickId,clipBounds:g(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;\"dashScale\"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,\"opacity\"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,c=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var p=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,v=!1;t:for(e=1;e<h.length;++e){var m,y,x,b=h[e-1],_=h[e];for(a.push(s),o.push(b.slice()),r=0;r<3;++r){if(isNaN(b[r])||isNaN(_[r])||!isFinite(b[r])||!isFinite(_[r])){if(!n&&i.length>0){for(var w=0;w<24;++w)i.push(i[i.length-12]);c+=2,v=!0}continue t}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(p[0])?(m=p.length>e-1?p[e-1]:p.length>0?p[p.length-1]:[0,0,0,1],y=p.length>e?p[e]:p.length>0?p[p.length-1]:[0,0,0,1]):m=y=p,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&m[3]<1&&(this.hasAlpha=!0),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var k=s;if(s+=d(b,_),v){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3]);c+=2,v=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],k,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],k,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),c+=4}}if(this.buffer.update(i),a.push(s),o.push(h[h.length-1].slice()),this.bounds=f,this.vertexCount=c,this.points=o,this.arcLength=a,\"dashes\"in t){var T=t.dashes.slice();for(T.unshift(0),e=1;e<T.length;++e)T[e]=T[e-1]+T[e];var M=u(new Array(1024),[256,1,4]);for(e=0;e<256;++e){for(r=0;r<4;++r)M.set(e,0,r,0);1&l.le(T,T[T.length-1]*e/255)?M.set(e,0,0,0):M.set(e,0,0,255)}this.texture.setPixels(M)}},y.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},y.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=function(t,e,r,n){return o[0]=n,o[1]=r,o[2]=e,o[3]=t,s[0]}(t.value[0],t.value[1],t.value[2],0),r=l.le(this.arcLength,e);if(r<0)return null;if(r===this.arcLength.length-1)return new v(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],a=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),u=1-a,c=[0,0,0],f=0;f<3;++f)c[f]=u*n[f]+a*i[f];var h=Math.min(a<.5?r:r+1,this.points.length-1);return new v(e,c,h,this.points[h])}},{\"./lib/shaders\":90,\"binary-search-bounds\":31,\"gl-buffer\":78,\"gl-texture2d\":146,\"gl-vao\":150,ndarray:259}],92:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],93:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],94:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11],p=t[12],d=t[13],g=t[14],v=t[15];return(e*o-r*a)*(f*v-h*g)-(e*s-n*a)*(c*v-h*d)+(e*l-i*a)*(c*g-f*d)+(r*s-n*o)*(u*v-h*p)-(r*l-i*o)*(u*g-f*p)+(n*l-i*s)*(u*d-c*p)}},{}],95:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,p=i*s,d=i*l,g=a*o,v=a*s,m=a*l;return t[0]=1-f-d,t[1]=c+m,t[2]=h-v,t[3]=0,t[4]=c-m,t[5]=1-u-d,t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],96:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,p=i*l,d=i*u,g=a*u,v=o*s,m=o*l,y=o*u;return t[0]=1-(p+g),t[1]=f+y,t[2]=h-m,t[3]=0,t[4]=f-y,t[5]=1-(c+g),t[6]=d+v,t[7]=0,t[8]=h+m,t[9]=d-v,t[10]=1-(c+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],97:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],98:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],v=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,k=i*u-a*l,T=c*g-f*d,M=c*v-h*d,A=c*m-p*d,S=f*v-h*g,E=f*m-p*g,C=h*m-p*v,L=y*C-x*E+b*S+_*A-w*M+k*T;return L?(L=1/L,t[0]=(s*C-l*E+u*S)*L,t[1]=(i*E-n*C-a*S)*L,t[2]=(g*k-v*w+m*_)*L,t[3]=(h*w-f*k-p*_)*L,t[4]=(l*A-o*C-u*M)*L,t[5]=(r*C-i*A+a*M)*L,t[6]=(v*b-d*k-m*x)*L,t[7]=(c*k-h*b+p*x)*L,t[8]=(o*E-s*A+u*T)*L,t[9]=(n*A-r*E-a*T)*L,t[10]=(d*w-g*b+m*y)*L,t[11]=(f*b-c*w-p*y)*L,t[12]=(s*M-o*S-l*T)*L,t[13]=(r*S-n*M+i*T)*L,t[14]=(g*x-d*_-v*y)*L,t[15]=(c*_-f*x+h*y)*L,t):null}},{}],99:[function(t,e,r){var n=t(\"./identity\");e.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,p,d,g=e[0],v=e[1],m=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],k=r[2];return Math.abs(g-_)<1e-6&&Math.abs(v-w)<1e-6&&Math.abs(m-k)<1e-6?n(t):(f=g-_,h=v-w,p=m-k,a=x*(p*=d=1/Math.sqrt(f*f+h*h+p*p))-b*(h*=d),o=b*(f*=d)-y*p,s=y*h-x*f,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0),l=h*s-p*o,u=p*a-f*s,c=f*o-h*a,(d=Math.sqrt(l*l+u*u+c*c))?(l*=d=1/d,u*=d,c*=d):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=p,t[11]=0,t[12]=-(a*g+o*v+s*m),t[13]=-(l*g+u*v+c*m),t[14]=-(f*g+h*v+p*m),t[15]=1,t)}},{\"./identity\":97}],100:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*v,t[2]=x*a+b*u+_*p+w*m,t[3]=x*o+b*c+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*g,t[5]=x*i+b*l+_*h+w*v,t[6]=x*a+b*u+_*p+w*m,t[7]=x*o+b*c+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*g,t[9]=x*i+b*l+_*h+w*v,t[10]=x*a+b*u+_*p+w*m,t[11]=x*o+b*c+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*g,t[13]=x*i+b*l+_*h+w*v,t[14]=x*a+b*u+_*p+w*m,t[15]=x*o+b*c+_*d+w*y,t}},{}],101:[function(t,e,r){e.exports=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t}},{}],102:[function(t,e,r){e.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},{}],103:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,p,d,g,v,m,y,x,b,_,w,k,T,M,A,S,E=n[0],C=n[1],L=n[2],P=Math.sqrt(E*E+C*C+L*L);return Math.abs(P)<1e-6?null:(E*=P=1/P,C*=P,L*=P,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],p=e[6],d=e[7],g=e[8],v=e[9],m=e[10],y=e[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,T=L*C*o+E*i,M=E*L*o+C*i,A=C*L*o-E*i,S=L*L*o+a,t[0]=s*x+f*b+g*_,t[1]=l*x+h*b+v*_,t[2]=u*x+p*b+m*_,t[3]=c*x+d*b+y*_,t[4]=s*w+f*k+g*T,t[5]=l*w+h*k+v*T,t[6]=u*w+p*k+m*T,t[7]=c*w+d*k+y*T,t[8]=s*M+f*A+g*S,t[9]=l*M+h*A+v*S,t[10]=u*M+p*A+m*S,t[11]=c*M+d*A+y*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},{}],104:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],105:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-u*n,t[1]=o*i-c*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],106:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],107:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],108:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,p,d,g=r[0],v=r[1],m=r[2];return e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*g+s*v+f*m+e[12],t[13]=i*g+l*v+h*m+e[13],t[14]=a*g+u*v+p*m+e[14],t[15]=o*g+c*v+d*m+e[15]),t}},{}],109:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],110:[function(t,e,r){\"use strict\";var n=t(\"barycentric\"),i=t(\"polytope-closest-point/lib/closest_point_2d.js\");function a(t,e){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s<3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}function s(t,e){for(var r=[0,0,0],n=0;n<t.length;++n)for(var i=t[n],a=e[n],o=0;o<3;++o)r[o]+=a*i[o];return r}e.exports=function(t,e,r,a,l,u){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),f=0;f<t.length;++f)c[f]=o(t[f],r,a,l,u);var h=0,p=1/0;for(f=0;f<c.length;++f){for(var d=0,g=0;g<2;++g)d+=Math.pow(c[f][g]-e[g],2);d<p&&(p=d,h=f)}var v=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o<2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return(r=Math.sqrt(r))+(a=Math.sqrt(a))<1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),m=0;for(f=0;f<3;++f){if(v[f]<-.001||v[f]>1.0001)return null;m+=v[f]}return Math.abs(m-1)>.001?null:[h,s(t,v),v]}},{barycentric:14,\"polytope-closest-point/lib/closest_point_2d.js\":270}],111:[function(t,e,r){var n=t(\"glslify\"),i=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position, normal;\\nattribute vec4 color;\\nattribute vec2 uv;\\n\\nuniform mat4 model\\n           , view\\n           , projection\\n           , inverseModel;\\nuniform vec3 eyePosition\\n           , lightPosition;\\n\\nvarying vec3 f_normal\\n           , f_lightDirection\\n           , f_eyeDirection\\n           , f_data;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvec4 project(vec3 p) {\\n  return projection * view * model * vec4(p, 1.0);\\n}\\n\\nvoid main() {\\n  gl_Position      = project(position);\\n\\n  //Lighting geometry parameters\\n  vec4 cameraCoordinate = view * vec4(position , 1.0);\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\\n  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);\\n\\n  f_color          = color;\\n  f_data           = position;\\n  f_uv             = uv;\\n}\\n\"]),a=n([\"#extension GL_OES_standard_derivatives : enable\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(float x, float roughness) {\\n  float NdotH = max(x, 0.0001);\\n  float cos2Alpha = NdotH * NdotH;\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\n  float roughness2 = roughness * roughness;\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\n  return exp(tan2Alpha / roughness2) / denom;\\n}\\n\\nfloat cookTorranceSpecular(\\n  vec3 lightDirection,\\n  vec3 viewDirection,\\n  vec3 surfaceNormal,\\n  float roughness,\\n  float fresnel) {\\n\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\n\\n  //Half angle vector\\n  vec3 H = normalize(lightDirection + viewDirection);\\n\\n  //Geometric term\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\n  float G = min(1.0, min(G1, G2));\\n  \\n  //Distribution term\\n  float D = beckmannDistribution(NdotH, roughness);\\n\\n  //Fresnel term\\n  float F = pow(1.0 - VdotN, fresnel);\\n\\n  //Multiply terms and done\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\n}\\n\\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 clipBounds[2];\\nuniform float roughness\\n            , fresnel\\n            , kambient\\n            , kdiffuse\\n            , kspecular;\\nuniform sampler2D texture;\\n\\nvarying vec3 f_normal\\n           , f_lightDirection\\n           , f_eyeDirection\\n           , f_data;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  if (f_color.a == 0.0 ||\\n    outOfRange(clipBounds[0], clipBounds[1], f_data)\\n  ) discard;\\n\\n  vec3 N = normalize(f_normal);\\n  vec3 L = normalize(f_lightDirection);\\n  vec3 V = normalize(f_eyeDirection);\\n\\n  if(gl_FrontFacing) {\\n    N = -N;\\n  }\\n\\n  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\\n  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\\n\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\n\\n  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\n\\n  gl_FragColor = litColor * f_color.a;\\n}\\n\"]),o=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 uv;\\n\\nuniform mat4 model, view, projection;\\n\\nvarying vec4 f_color;\\nvarying vec3 f_data;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\n  f_color = color;\\n  f_data  = position;\\n  f_uv    = uv;\\n}\"]),s=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 clipBounds[2];\\nuniform sampler2D texture;\\nuniform float opacity;\\n\\nvarying vec4 f_color;\\nvarying vec3 f_data;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\\n\\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\\n}\"]),l=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 uv;\\nattribute float pointSize;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 clipBounds[2];\\n\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\n    gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\\n  } else {\\n    gl_Position = projection * view * model * vec4(position, 1.0);\\n  }\\n  gl_PointSize = pointSize;\\n  f_color = color;\\n  f_uv = uv;\\n}\"]),u=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D texture;\\nuniform float opacity;\\n\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\\n  if(dot(pointR, pointR) > 0.25) {\\n    discard;\\n  }\\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\\n}\"]),c=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\n  f_id        = id;\\n  f_position  = position;\\n}\"]),f=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3  clipBounds[2];\\nuniform float pickId;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\n}\"]),h=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nattribute vec3  position;\\nattribute float pointSize;\\nattribute vec4  id;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 clipBounds[2];\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\n    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\\n  } else {\\n    gl_Position  = projection * view * model * vec4(position, 1.0);\\n    gl_PointSize = pointSize;\\n  }\\n  f_id         = id;\\n  f_position   = position;\\n}\"]),p=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\n\\nvoid main() {\\n  gl_Position = projection * view * model * vec4(position, 1.0);\\n}\"]),d=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform vec3 contourColor;\\n\\nvoid main() {\\n  gl_FragColor = vec4(contourColor, 1.0);\\n}\\n\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\"position\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"}]},r.pointShader={vertex:l,fragment:u,attributes:[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"pointSize\",type:\"float\"}]},r.pickShader={vertex:c,fragment:f,attributes:[{name:\"position\",type:\"vec3\"},{name:\"id\",type:\"vec4\"}]},r.pointPickShader={vertex:h,fragment:f,attributes:[{name:\"position\",type:\"vec3\"},{name:\"pointSize\",type:\"float\"},{name:\"id\",type:\"vec4\"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:\"position\",type:\"vec3\"}]}},{glslify:231}],112:[function(t,e,r){\"use strict\";var n=t(\"gl-shader\"),i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"gl-texture2d\"),s=t(\"normals\"),l=t(\"gl-mat4/multiply\"),u=t(\"gl-mat4/invert\"),c=t(\"ndarray\"),f=t(\"colormap\"),h=t(\"simplicial-complex-contour\"),p=t(\"typedarray-pool\"),d=t(\"./lib/shaders\"),g=t(\"./lib/closest-point\"),v=d.meshShader,m=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,g,v,m,y,x,b,_,k,T,M,A,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=u,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=v,this.edgeUVs=m,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=k,this.pointSizes=T,this.pointIds=b,this.pointVAO=M,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var T=k.prototype;function M(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;r<e.length;++r){if(e.length<2)return 1;if(e[r][0]===t)return e[r][1];if(e[r][0]>t&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function A(t){var e=n(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}function S(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}function E(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function L(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function P(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(t){this.pickId=t},T.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var u=r[l],c=0;c<2;++c){var f=u[0];2===u.length&&(f=u[c]);for(var d=n[f][0],g=n[f][1],v=i[f],m=1-v,y=this.positions[d],x=this.positions[g],b=0;b<3;++b)o[s++]=v*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},T.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\"contourEnable\"in t&&(this.contourEnable=t.contourEnable),\"contourColor\"in t&&(this.contourColor=t.contourColor),\"lineWidth\"in t&&(this.lineWidth=t.lineWidth),\"lightPosition\"in t&&(this.lightPosition=t.lightPosition),this.hasAlpha=!1,\"opacity\"in t&&(this.opacity=t.opacity,this.opacity<1&&(this.hasAlpha=!0)),\"opacityscale\"in t&&(this.opacityscale=t.opacityscale,this.hasAlpha=!0),\"ambient\"in t&&(this.ambientLight=t.ambient),\"diffuse\"in t&&(this.diffuseLight=t.diffuse),\"specular\"in t&&(this.specularLight=t.specular),\"roughness\"in t&&(this.roughness=t.roughness),\"fresnel\"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t,e){for(var r=f({colormap:t,nshades:256,format:\"rgba\"}),n=new Uint8Array(1024),i=0;i<256;++i){for(var a=r[i],o=0;o<3;++o)n[4*i+o]=a[o];n[4*i+3]=e?255*M(i/255,e):255*a[3]}return c(n,[256,256,4],[4,0,1])}(t.colormap,this.opacityscale)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&&r){var i=[],a=[],l=[],u=[],h=[],p=[],d=[],g=[],v=[],m=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,k=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,A=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!k&&(k=s.faceNormals(r,n,A)),k||w||(w=s.vertexNormals(r,n,T));var S=t.vertexColors,E=t.cellColors,C=t.meshColor||[1,1,1,1],L=t.vertexUVs,P=t.vertexIntensity,O=t.cellUVs,I=t.cellIntensity,D=1/0,z=-1/0;if(!L&&!O)if(P)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],z=+t.vertexIntensityBounds[1];else for(var R=0;R<P.length;++R){var F=P[R];D=Math.min(D,F),z=Math.max(z,F)}else if(I)if(t.cellIntensityBounds)D=+t.cellIntensityBounds[0],z=+t.cellIntensityBounds[1];else for(R=0;R<I.length;++R)F=I[R],D=Math.min(D,F),z=Math.max(z,F);else for(R=0;R<n.length;++R)F=n[R][2],D=Math.min(D,F),z=Math.max(z,F);this.intensity=P||I||function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n),this.pickVertex=!(I||E);var N=t.pointSizes,B=t.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],R=0;R<n.length;++R)for(var j=n[R],U=0;U<3;++U)!isNaN(j[U])&&isFinite(j[U])&&(this.bounds[0][U]=Math.min(this.bounds[0][U],j[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],j[U]));var V=0,H=0,q=0;t:for(R=0;R<r.length;++R){var G=r[R];switch(G.length){case 1:for(j=n[W=G[0]],U=0;U<3;++U)if(isNaN(j[U])||!isFinite(j[U]))continue t;m.push(j[0],j[1],j[2]),X=S?S[W]:E?E[R]:C,this.opacityscale&&P?a.push(X[0],X[1],X[2],this.opacity*M((P[W]-D)/(z-D),this.opacityscale)):3===X.length?y.push(X[0],X[1],X[2],this.opacity):(y.push(X[0],X[1],X[2],X[3]*this.opacity),X[3]<1&&(this.hasAlpha=!0)),Z=L?L[W]:P?[(P[W]-D)/(z-D),0]:O?O[R]:I?[(I[R]-D)/(z-D),0]:[(j[2]-D)/(z-D),0],x.push(Z[0],Z[1]),N?b.push(N[W]):b.push(B),_.push(R),q+=1;break;case 2:for(U=0;U<2;++U){j=n[W=G[U]];for(var Y=0;Y<3;++Y)if(isNaN(j[Y])||!isFinite(j[Y]))continue t}for(U=0;U<2;++U)j=n[W=G[U]],p.push(j[0],j[1],j[2]),X=S?S[W]:E?E[R]:C,this.opacityscale&&P?a.push(X[0],X[1],X[2],this.opacity*M((P[W]-D)/(z-D),this.opacityscale)):3===X.length?d.push(X[0],X[1],X[2],this.opacity):(d.push(X[0],X[1],X[2],X[3]*this.opacity),X[3]<1&&(this.hasAlpha=!0)),Z=L?L[W]:P?[(P[W]-D)/(z-D),0]:O?O[R]:I?[(I[R]-D)/(z-D),0]:[(j[2]-D)/(z-D),0],g.push(Z[0],Z[1]),v.push(R);H+=1;break;case 3:for(U=0;U<3;++U)for(j=n[W=G[U]],Y=0;Y<3;++Y)if(isNaN(j[Y])||!isFinite(j[Y]))continue t;for(U=0;U<3;++U){var W,X,Z,K;j=n[W=G[2-U]],i.push(j[0],j[1],j[2]),(X=S?S[W]:E?E[R]:C)?this.opacityscale&&P?a.push(X[0],X[1],X[2],this.opacity*M((P[W]-D)/(z-D),this.opacityscale)):3===X.length?a.push(X[0],X[1],X[2],this.opacity):(a.push(X[0],X[1],X[2],X[3]*this.opacity),X[3]<1&&(this.hasAlpha=!0)):a.push(.5,.5,.5,1),Z=L?L[W]:P?[(P[W]-D)/(z-D),0]:O?O[R]:I?[(I[R]-D)/(z-D),0]:[(j[2]-D)/(z-D),0],u.push(Z[0],Z[1]),K=w?w[W]:k[R],l.push(K[0],K[1],K[2]),h.push(R)}V+=1}}this.pointCount=q,this.edgeCount=H,this.triangleCount=V,this.pointPositions.update(m),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(p),this.edgeColors.update(d),this.edgeUVs.update(g),this.edgeIds.update(new Uint32Array(v)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(u),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(h))}},T.drawTransparent=T.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,inverseModel:w.slice(),clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};s.inverseModel=u(s.inverseModel,s.model),e.disable(e.CULL_FACE),this.texture.bind(0);var c=new Array(16);for(l(c,s.view,s.model),l(c,s.projection,c),u(c,c),o=0;o<3;++o)s.eyePosition[o]=c[12+o]/c[15];var f,h=c[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*c[4*o+3];for(o=0;o<3;++o){for(var p=c[12+o],d=0;d<3;++d)p+=c[4*d+o]*this.lightPosition[d];s.lightPosition[o]=p/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},T.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},T.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;a<r.length;++a)i[a]=n[r[a]];var o=t.coord[0],s=t.coord[1];if(!this.pickVertex){var l=this.positions[r[0]],u=this.positions[r[1]],c=this.positions[r[2]],f=[(l[0]+u[0]+c[0])/3,(l[1]+u[1]+c[1])/3,(l[2]+u[2]+c[2])/3];return{_cellCenter:!0,position:[o,s],index:e,cell:r,cellId:e,intensity:this.intensity[e],dataCoordinate:f}}var h=g(i,[o*this.pixelRatio,this._resolution[1]-s*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!h)return null;var p=h[2],d=0;for(a=0;a<r.length;++a)d+=p[a]*this.intensity[r[a]];return{position:h[1],index:r[h[0]],cell:r,cellId:e,intensity:d,dataCoordinate:this.positions[r[h[0]]]}},T.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},e.exports=function(t,e){if(1===arguments.length&&(t=(e=t).gl),!(t.getExtension(\"OES_standard_derivatives\")||t.getExtension(\"MOZ_OES_standard_derivatives\")||t.getExtension(\"WEBKIT_OES_standard_derivatives\")))throw new Error(\"derivatives not supported\");var r=A(t),n=S(t),s=E(t),l=C(t),u=L(t),f=P(t),h=o(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));h.generateMipmap(),h.minFilter=t.LINEAR_MIPMAP_LINEAR,h.magFilter=t.LINEAR;var p=i(t),d=i(t),g=i(t),v=i(t),m=i(t),y=a(t,[{buffer:p,type:t.FLOAT,size:3},{buffer:m,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:d,type:t.FLOAT,size:4},{buffer:g,type:t.FLOAT,size:2},{buffer:v,type:t.FLOAT,size:3}]),x=i(t),b=i(t),_=i(t),w=i(t),T=a(t,[{buffer:x,type:t.FLOAT,size:3},{buffer:w,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:b,type:t.FLOAT,size:4},{buffer:_,type:t.FLOAT,size:2}]),M=i(t),O=i(t),I=i(t),D=i(t),z=i(t),R=a(t,[{buffer:M,type:t.FLOAT,size:3},{buffer:z,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:O,type:t.FLOAT,size:4},{buffer:I,type:t.FLOAT,size:2},{buffer:D,type:t.FLOAT,size:1}]),F=i(t),N=new k(t,h,r,n,s,l,u,f,p,m,d,g,v,y,x,w,b,_,T,M,z,O,I,D,R,F,a(t,[{buffer:F,type:t.FLOAT,size:3}]));return N.update(e),N}},{\"./lib/closest-point\":110,\"./lib/shaders\":111,colormap:53,\"gl-buffer\":78,\"gl-mat4/invert\":98,\"gl-mat4/multiply\":100,\"gl-shader\":132,\"gl-texture2d\":146,\"gl-vao\":150,ndarray:259,normals:261,\"simplicial-complex-contour\":291,\"typedarray-pool\":308}],113:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl;return new o(t,n(e,[0,0,0,1,1,0,1,1]),i(e,a.boxVert,a.lineFrag))};var n=t(\"gl-buffer\"),i=t(\"gl-shader\"),a=t(\"./shaders\");function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,u=o.prototype;u.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},u.drawBox=(s=[0,0],l=[0,0],function(t,e,r,n,i){var a=this.plot,o=this.shader,u=a.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,o.uniforms.lo=s,o.uniforms.hi=l,o.uniforms.color=i,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),u.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":116,\"gl-buffer\":78,\"gl-shader\":132}],114:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl;return new s(t,n(e),i(e,o.gridVert,o.gridFrag),i(e,o.tickVert,o.gridFrag))};var n=t(\"gl-buffer\"),i=t(\"gl-shader\"),a=t(\"binary-search-bounds\"),o=t(\"./shaders\");function s(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function l(t,e){return t-e}var u,c,f,h,p,d=s.prototype;d.draw=(u=[0,0],c=[0,0],f=[0,0],function(){for(var t=this.plot,e=this.vbo,r=this.shader,n=this.ticks,i=t.gl,a=t._tickBounds,o=t.dataBox,s=t.viewBox,l=t.gridLineWidth,h=t.gridLineColor,p=t.gridLineEnable,d=t.pixelRatio,g=0;g<2;++g){var v=a[g],m=a[g+2]-v,y=.5*(o[g+2]+o[g]),x=o[g+2]-o[g];c[g]=2*m/x,u[g]=2*(v-y)/x}r.bind(),e.bind(),r.attributes.dataCoord.pointer(),r.uniforms.dataShift=u,r.uniforms.dataScale=c;var b=0;for(g=0;g<2;++g){f[0]=f[1]=0,f[g]=1,r.uniforms.dataAxis=f,r.uniforms.lineWidth=l[g]/(s[g+2]-s[g])*d,r.uniforms.color=h[g];var _=6*n[g].length;p[g]&&_&&i.drawArrays(i.TRIANGLES,b,_),b+=_}}),d.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],i=[0,0],o=[0,0];return function(){for(var s=this.plot,u=this.vbo,c=this.tickShader,f=this.ticks,h=s.gl,p=s._tickBounds,d=s.dataBox,g=s.viewBox,v=s.pixelRatio,m=s.screenBox,y=m[2]-m[0],x=m[3]-m[1],b=g[2]-g[0],_=g[3]-g[1],w=0;w<2;++w){var k=p[w],T=p[w+2]-k,M=.5*(d[w+2]+d[w]),A=d[w+2]-d[w];e[w]=2*T/A,t[w]=2*(k-M)/A}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,c.bind(),u.bind(),c.attributes.dataCoord.pointer();var S=c.uniforms;S.dataShift=t,S.dataScale=e;var E=s.tickMarkLength,C=s.tickMarkWidth,L=s.tickMarkColor,P=6*f[0].length,O=Math.min(a.ge(f[0],(d[0]-p[0])/(p[2]-p[0]),l),f[0].length),I=Math.min(a.gt(f[0],(d[2]-p[0])/(p[2]-p[0]),l),f[0].length),D=0+6*O,z=6*Math.max(0,I-O),R=Math.min(a.ge(f[1],(d[1]-p[1])/(p[3]-p[1]),l),f[1].length),F=Math.min(a.gt(f[1],(d[3]-p[1])/(p[3]-p[1]),l),f[1].length),N=P+6*R,B=6*Math.max(0,F-R);i[0]=2*(g[0]-E[1])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=E[1]*v/y,o[1]=C[1]*v/x,B&&(S.color=L[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,N,B)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[1]-E[0])/x-1,o[0]=C[0]*v/y,o[1]=E[0]*v/x,z&&(S.color=L[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,D,z)),i[0]=2*(g[2]+E[3])/y-1,i[1]=(g[3]+g[1])/x-1,o[0]=E[3]*v/y,o[1]=C[3]*v/x,B&&(S.color=L[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,N,B)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[3]+E[2])/x-1,o[0]=C[2]*v/y,o[1]=E[2]*v/x,z&&(S.color=L[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,D,z))}}(),d.update=(h=[1,1,-1,-1,1,-1],p=[1,-1,1,1,-1,-1],function(t){for(var e=t.ticks,r=t.bounds,n=new Float32Array(18*(e[0].length+e[1].length)),i=(this.plot.zeroLineEnable,0),a=[[],[]],o=0;o<2;++o)for(var s=a[o],l=e[o],u=r[o],c=r[o+2],f=0;f<l.length;++f){var d=(l[f].x-u)/(c-u);s.push(d);for(var g=0;g<6;++g)n[i++]=d,n[i++]=h[g],n[i++]=p[g]}this.ticks=a,this.vbo.update(n)}),d.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{\"./shaders\":116,\"binary-search-bounds\":31,\"gl-buffer\":78,\"gl-shader\":132}],115:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl;return new o(t,n(e,[-1,-1,-1,1,1,-1,1,1]),i(e,a.lineVert,a.lineFrag))};var n=t(\"gl-buffer\"),i=t(\"gl-shader\"),a=t(\"./shaders\");function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,u=o.prototype;u.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},u.drawLine=(s=[0,0],l=[0,0],function(t,e,r,n,i,a){var o=this.plot,u=this.shader,c=o.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,u.uniforms.start=s,u.uniforms.end=l,u.uniforms.width=i*o.pixelRatio,u.uniforms.color=a,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),u.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":116,\"gl-buffer\":78,\"gl-shader\":132}],116:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=n([\"precision lowp float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\\n}\\n\"]);e.exports={lineVert:n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 coord;\\n\\nuniform vec4 screenBox;\\nuniform vec2 start, end;\\nuniform float width;\\n\\nvec2 perp(vec2 v) {\\n  return vec2(v.y, -v.x);\\n}\\n\\nvec2 screen(vec2 v) {\\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\n}\\n\\nvoid main() {\\n  vec2 delta = normalize(perp(start - end));\\n  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\\n  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\\n}\\n\"]),lineFrag:i,textVert:n([\"#define GLSLIFY 1\\nattribute vec3 textCoordinate;\\n\\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\\nuniform float angle;\\n\\nvoid main() {\\n  float dataOffset  = textCoordinate.z;\\n  vec2 glyphOffset  = textCoordinate.xy;\\n  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\\n  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\\n    glyphMatrix * glyphOffset * textScale + screenOffset;\\n  gl_Position = vec4(screenCoordinate, 0, 1);\\n}\\n\"]),textFrag:i,gridVert:n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 dataCoord;\\n\\nuniform vec2 dataAxis, dataShift, dataScale;\\nuniform float lineWidth;\\n\\nvoid main() {\\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\n  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\\n  gl_Position = vec4(pos, 0, 1);\\n}\\n\"]),gridFrag:i,boxVert:n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 coord;\\n\\nuniform vec4 screenBox;\\nuniform vec2 lo, hi;\\n\\nvec2 screen(vec2 v) {\\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\n}\\n\\nvoid main() {\\n  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\\n}\\n\"]),tickVert:n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 dataCoord;\\n\\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\\n\\nvoid main() {\\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\n  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\\n}\\n\"])}},{glslify:231}],117:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl;return new l(t,n(e),i(e,s.textVert,s.textFrag))};var n=t(\"gl-buffer\"),i=t(\"gl-shader\"),a=t(\"text-cache\"),o=t(\"binary-search-bounds\"),s=t(\"./shaders\");function l(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var u,c,f,h,p,d,g=l.prototype;g.drawTicks=(u=[0,0],c=[0,0],f=[0,0],function(t){var e=this.plot,r=this.shader,n=this.tickX[t],i=this.tickOffset[t],a=e.gl,s=e.viewBox,l=e.dataBox,h=e.screenBox,p=e.pixelRatio,d=e.tickEnable,g=e.tickPad,v=e.tickColor,m=e.tickAngle,y=e.labelEnable,x=e.labelPad,b=e.labelColor,_=e.labelAngle,w=this.labelOffset[t],k=this.labelCount[t],T=o.lt(n,l[t]),M=o.le(n,l[t+2]);u[0]=u[1]=0,u[t]=1,c[t]=(s[2+t]+s[t])/(h[2+t]-h[t])-1;var A=2/h[2+(1^t)]-h[1^t];c[1^t]=A*s[1^t]-1,d[t]&&(c[1^t]-=A*p*g[t],T<M&&i[M]>i[T]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=v[t],r.uniforms.angle=m[t],a.drawArrays(a.TRIANGLES,i[T],i[M]-i[T]))),y[t]&&k&&(c[1^t]-=A*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=c,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,k)),c[1^t]=A*s[2+(1^t)]-1,d[t+2]&&(c[1^t]+=A*p*g[t+2],T<M&&i[M]>i[T]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=v[t+2],r.uniforms.angle=m[t+2],a.drawArrays(a.TRIANGLES,i[T],i[M]-i[T]))),y[t+2]&&k&&(c[1^t]+=A*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=c,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,k))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,u=.5*(n[o+2]+n[o]),c=n[o+2]-n[o],f=a[o],g=a[o+2]-f,v=i[o],m=i[o+2]-v;p[o]=2*l/c*g/m,h[o]=2*(s-u)/c*g/m}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,u=t.bounds;for(o=0;o<2;++o){var c=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e<h.length;++e){var p=h[e],d=p.x,g=p.text,v=p.font||\"sans-serif\";i=p.fontSize||12;for(var m=1/(u[o+2]-u[o]),y=u[o],x=g.split(\"\\n\"),b=0;b<x.length;b++)for(n=a(v,x[b]).data,r=0;r<n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(d-y)*m);c.push(Math.floor(s.length/3)),f.push(d)}this.tickOffset[o]=c,this.tickX[o]=f}for(o=0;o<2;++o){for(this.labelOffset[o]=Math.floor(s.length/3),n=a(t.labelFont[o],t.labels[o],{textAlign:\"center\"}).data,i=t.labelSize[o],e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[o]=Math.floor(s.length/3)-this.labelOffset[o]}for(this.titleOffset=Math.floor(s.length/3),n=a(t.titleFont,t.title).data,i=t.titleSize,e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},g.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":116,\"binary-search-bounds\":31,\"gl-buffer\":78,\"gl-shader\":132,\"text-cache\":303}],118:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl,r=new l(e,n(e,[e.drawingBufferWidth,e.drawingBufferHeight]));return r.grid=i(r),r.text=a(r),r.line=o(r),r.box=s(r),r.update(t),r};var n=t(\"gl-select-static\"),i=t(\"./lib/grid\"),a=t(\"./lib/text\"),o=t(\"./lib/line\"),s=t(\"./lib/box\");function l(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var u=l.prototype;function c(t){for(var e=t.slice(),r=0;r<e.length;++r)e[r]=e[r].slice();return e}function f(t,e){return t.x-e.x}u.setDirty=function(){this.dirty=this.pickDirty=!0},u.setOverlayDirty=function(){this.dirty=!0},u.nextDepthValue=function(){return this._depthCounter++/65536},u.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var u=this.borderColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var c=this.backgroundColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,p=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var d=0;d<2;++d)if(f[d]&&n[d]<=0&&n[d+2]>=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],h[d]):o.drawLine(e[0],g,e[2],g,p[d],h[d])}}for(d=0;d<l.length;++d)l[d].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var v=this.borderLineEnable,m=this.borderLineWidth,y=this.borderLineColor;for(v[1]&&o.drawLine(r[0],r[1]-.5*m[1]*i,r[0],r[3]+.5*m[3]*i,m[1],y[1]),v[0]&&o.drawLine(r[0]-.5*m[0]*i,r[1],r[2]+.5*m[2]*i,r[1],m[0],y[0]),v[3]&&o.drawLine(r[2],r[1]-.5*m[1]*i,r[2],r[3]+.5*m[3]*i,m[3],y[3]),v[2]&&o.drawLine(r[0]-.5*m[0]*i,r[3],r[2]+.5*m[2]*i,r[3],m[2],y[2]),s.bind(),d=0;d<2;++d)s.drawTicks(d);this.titleEnable&&s.drawTitle();var x=this.overlays;for(d=0;d<x.length;++d)x[d].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},u.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl,this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n<r.length;++n)e=r[n].drawPick(e);t.end()}},u.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),u=this.objects,c=0;c<u.length;++c){var f=u[c].pick(a,o,l);if(f)return f}return null}},u.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},u.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},u.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},u.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]),this.screenBox,this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,i=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/i,10,10/i]),this.borderColor=!1!==t.borderColor&&(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=c(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=c(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=c(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!(\"titleEnable\"in t)||!!t.titleEnable,this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=c(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=c(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=c(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var a=t.ticks||[[],[]],o=this._tickBounds;o[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(var s=0;s<2;++s){var l=a[s].slice(0);0!==l.length&&(l.sort(f),o[s]=Math.min(o[s],l[0].x),o[s+2]=Math.max(o[s+2],l[l.length-1].x))}this.grid.update({bounds:o,ticks:a}),this.text.update({bounds:o,ticks:a,labels:t.labels||[\"x\",\"y\"],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||[\"sans-serif\",\"sans-serif\"],title:t.title||\"\",titleSize:t.titleSize||18,titleFont:t.titleFont||\"sans-serif\"}),this.static=!!t.static,this.setDirty()},u.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t>=0;--t)this.objects[t].dispose();for(this.objects.length=0,t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},u.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},u.removeObject=function(t){for(var e=this.objects,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},u.addOverlay=function(t){this.overlays.indexOf(t)<0&&(this.overlays.push(t),this.setOverlayDirty())},u.removeOverlay=function(t){for(var e=this.overlays,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},{\"./lib/box\":113,\"./lib/grid\":114,\"./lib/line\":115,\"./lib/text\":117,\"gl-select-static\":131}],119:[function(t,e,r){\"use strict\";e.exports=function(t,e){t=t||document.body;var r=[.01,1/0];\"distanceLimits\"in(e=e||{})&&(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]),\"zoomMin\"in e&&(r[0]=e.zoomMin),\"zoomMax\"in e&&(r[1]=e.zoomMax);var u=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\"orbit\",distanceLimits:r}),c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,p=t.clientHeight,d={keyBindingMode:\"rotate\",enableWheel:!0,view:u,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:u.modes,_ortho:e._ortho||e.projection&&\"orthographic\"===e.projection.type||!1,tick:function(){var e=n(),r=this.delay,i=e-2*r;u.idle(e-r),u.recalcMatrix(i),u.flush(e-(100+2*r));for(var a=!0,o=u.computedMatrix,s=0;s<16;++s)a=a&&c[s]===o[s],c[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===p;return h=t.clientWidth,p=t.clientHeight,a?!l:(f=Math.exp(u.computedRadius[0]),!0)},lookAt:function(t,e,r){u.lookAt(u.lastT(),t,e,r)},rotate:function(t,e,r){u.rotate(u.lastT(),t,e,r)},pan:function(t,e,r){u.pan(u.lastT(),t,e,r)},translate:function(t,e,r){u.translate(u.lastT(),t,e,r)}};return Object.defineProperties(d,{matrix:{get:function(){return u.computedMatrix},set:function(t){return u.setMatrix(u.lastT(),t),u.computedMatrix},enumerable:!0},mode:{get:function(){return u.getMode()},set:function(t){var e=u.computedUp.slice(),r=u.computedEye.slice(),i=u.computedCenter.slice();if(u.setMode(t),\"turntable\"===t){var a=n();u._active.lookAt(a,r,i,e),u._active.lookAt(a+500,r,i,[0,0,1]),u._active.flush(a)}return u.getMode()},enumerable:!0},center:{get:function(){return u.computedCenter},set:function(t){return u.lookAt(u.lastT(),null,t),u.computedCenter},enumerable:!0},eye:{get:function(){return u.computedEye},set:function(t){return u.lookAt(u.lastT(),t),u.computedEye},enumerable:!0},up:{get:function(){return u.computedUp},set:function(t){return u.lookAt(u.lastT(),null,null,t),u.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return u.setDistance(u.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return u.getDistanceLimits(r)},set:function(t){return u.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\"contextmenu\",(function(t){return t.preventDefault(),!1})),d._lastX=-1,d._lastY=-1,d._lastMods={shift:!1,control:!1,alt:!1,meta:!1},d.enableMouseListeners=function(){function e(e,r,i,a){var o=d.keyBindingMode;if(!1!==o){var s=\"rotate\"===o,l=\"pan\"===o,c=\"zoom\"===o,h=!!a.control,p=!!a.alt,g=!!a.shift,v=!!(1&e),m=!!(2&e),y=!!(4&e),x=1/t.clientHeight,b=x*(r-d._lastX),_=x*(i-d._lastY),w=d.flipX?1:-1,k=d.flipY?1:-1,T=Math.PI*d.rotateSpeed,M=n();if(-1!==d._lastX&&-1!==d._lastY&&((s&&v&&!h&&!p&&!g||v&&!h&&!p&&g)&&u.rotate(M,w*T*b,-k*T*_,0),(l&&v&&!h&&!p&&!g||m||v&&h&&!p&&!g)&&u.pan(M,-d.translateSpeed*b*f,d.translateSpeed*_*f,0),c&&v&&!h&&!p&&!g||y||v&&!h&&p&&!g)){var A=-d.zoomSpeed*_/window.innerHeight*(M-u.lastT())*100;u.pan(M,0,0,f*(Math.exp(A)-1))}return d._lastX=r,d._lastY=i,d._lastMods=a,!0}}d.mouseListener=a(t,e),t.addEventListener(\"touchstart\",(function(r){var n=s(r.changedTouches[0],t);e(0,n[0],n[1],d._lastMods),e(1,n[0],n[1],d._lastMods)}),!!l&&{passive:!0}),t.addEventListener(\"touchmove\",(function(r){var n=s(r.changedTouches[0],t);e(1,n[0],n[1],d._lastMods),r.preventDefault()}),!!l&&{passive:!1}),t.addEventListener(\"touchend\",(function(t){e(0,d._lastX,d._lastY,d._lastMods)}),!!l&&{passive:!0}),d.wheelListener=o(t,(function(t,e){if(!1!==d.keyBindingMode&&d.enableWheel){var r=d.flipX?1:-1,i=d.flipY?1:-1,a=n();if(Math.abs(t)>Math.abs(e))u.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*e/window.innerHeight*(a-u.lastT())/20;u.pan(a,0,0,f*(Math.exp(o)-1))}}}),!0)},d.enableMouseListeners(),d};var n=t(\"right-now\"),i=t(\"3d-view\"),a=t(\"mouse-change\"),o=t(\"mouse-wheel\"),s=t(\"mouse-event-offset\"),l=t(\"has-passive-events\")},{\"3d-view\":7,\"has-passive-events\":232,\"mouse-change\":247,\"mouse-event-offset\":248,\"mouse-wheel\":250,\"right-now\":278}],120:[function(t,e,r){var n=t(\"glslify\"),i=t(\"gl-shader\"),a=n([\"precision mediump float;\\n#define GLSLIFY 1\\nattribute vec2 position;\\nvarying vec2 uv;\\nvoid main() {\\n  uv = position;\\n  gl_Position = vec4(position, 0, 1);\\n}\"]),o=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D accumBuffer;\\nvarying vec2 uv;\\n\\nvoid main() {\\n  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\\n  gl_FragColor = min(vec4(1,1,1,1), accum);\\n}\"]);e.exports=function(t){return i(t,a,o,null,[{name:\"position\",type:\"vec2\"}])}},{\"gl-shader\":132,glslify:231}],121:[function(t,e,r){\"use strict\";var n=t(\"./camera.js\"),i=t(\"gl-axes3d\"),a=t(\"gl-axes3d/properties\"),o=t(\"gl-spikes3d\"),s=t(\"gl-select-static\"),l=t(\"gl-fbo\"),u=t(\"a-big-triangle\"),c=t(\"mouse-change\"),f=t(\"gl-mat4/perspective\"),h=t(\"gl-mat4/ortho\"),p=t(\"./lib/shader\"),d=t(\"is-mobile\")({tablet:!0,featureDetect:!0});function g(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function v(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}return e>0?(r=Math.round(Math.pow(10,e)),Math.ceil(t/r)*r):Math.ceil(t)}function m(t){return\"boolean\"!=typeof t||t}e.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement(\"canvas\"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(d=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext(\"webgl\",e))||(r=t.getContext(\"experimental-webgl\",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!r)throw new Error(\"webgl not supported\");var y=t.bounds||[[-10,-10,-10],[10,10,10]],x=new g,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!d}),_=p(r),w=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&\"orthographic\"===t.camera.projection.type||!1,k={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||\"turntable\",_ortho:w},T=t.axes||{},M=i(r,T);M.enable=!T.disable;var A=t.spikes||{},S=o(r,A),E=[],C=[],L=[],P=[],O=!0,I=!0,D={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},z=(I=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),R=t.cameraObject||n(e,k),F={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:x,camera:R,axes:M,axesPixels:null,spikes:S,bounds:y,objects:E,shape:z,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:m(t.autoResize),autoBounds:m(t.autoBounds),autoScale:!!t.autoScale,autoCenter:m(t.autoCenter),clipToBounds:m(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:D,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,I=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},N=[r.drawingBufferWidth/F.pixelRatio|0,r.drawingBufferHeight/F.pixelRatio|0];function B(){if(!F._stopped&&F.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*F.pixelRatio),a=0|Math.ceil(n*F.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||\"absolute\",o.left=\"0px\",o.top=\"0px\",o.width=r+\"px\",o.height=n+\"px\",O=!0}}}function j(){for(var t=E.length,e=P.length,n=0;n<e;++n)L[n]=0;t:for(n=0;n<t;++n){var i=E[n],a=i.pickSlots;if(a){for(var o=0;o<e;++o)if(L[o]+a<255){C[n]=o,i.setPickBase(L[o]+1),L[o]+=a;continue t}var l=s(r,z);C[n]=e,P.push(l),L.push(a),i.setPickBase(1),e+=1}else C[n]=-1}for(;e>0&&0===L[e-1];)L.pop(),P.pop().dispose()}function U(){if(F.contextLost)return!0;r.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.autoResize&&B(),window.addEventListener(\"resize\",B),F.update=function(t){F._stopped||(t=t||{},O=!0,I=!0)},F.add=function(t){F._stopped||(t.axes=M,E.push(t),C.push(-1),O=!0,I=!0,j())},F.remove=function(t){if(!F._stopped){var e=E.indexOf(t);e<0||(E.splice(e,1),C.pop(),O=!0,I=!0,j())}},F.dispose=function(){if(!F._stopped&&(F._stopped=!0,window.removeEventListener(\"resize\",B),e.removeEventListener(\"webglcontextlost\",U),F.mouseListener.enabled=!1,!F.contextLost)){M.dispose(),S.dispose();for(var t=0;t<E.length;++t)E[t].dispose();for(b.dispose(),t=0;t<P.length;++t)P[t].dispose();_.dispose(),r=null,M=null,S=null,E=[]}},F._mouseRotating=!1,F._prevButtons=0,F.enableMouseListeners=function(){F.mouseListener=c(e,(function(t,e,r){if(!F._stopped){var n=P.length,i=E.length,a=x.object;x.distance=1/0,x.mouse[0]=e,x.mouse[1]=r,x.object=null,x.screen=null,x.dataCoordinate=x.dataPosition=null;var o=!1;if(t&&F._prevButtons)F._mouseRotating=!0;else{F._mouseRotating&&(I=!0),F._mouseRotating=!1;for(var s=0;s<n;++s){var l=P[s].query(e,N[1]-r-1,F.pickRadius);if(l){if(l.distance>x.distance)continue;for(var u=0;u<i;++u){var c=E[u];if(C[u]===s){var f=c.pick(l);f&&(x.buttons=t,x.screen=l.coord,x.distance=l.distance,x.object=c,x.index=f.distance,x.dataPosition=f.position,x.dataCoordinate=f.dataCoordinate,x.data=f,o=!0)}}}}}a&&a!==x.object&&(a.highlight&&a.highlight(null),O=!0),x.object&&(x.object.highlight&&x.object.highlight(x.data),O=!0),(o=o||x.object!==a)&&F.onselect&&F.onselect(x),1&t&&!(1&F._prevButtons)&&F.onclick&&F.onclick(x),F._prevButtons=t}}))},e.addEventListener(\"webglcontextlost\",U);var V=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=[V[0].slice(),V[1].slice()];function q(){if(!U()){B();var t=F.camera.tick();D.view=F.camera.matrix,O=O||t,I=I||t,M.pixelRatio=F.pixelRatio,S.pixelRatio=F.pixelRatio;var e=E.length,n=V[0],i=V[1];n[0]=n[1]=n[2]=1/0,i[0]=i[1]=i[2]=-1/0;for(var o=0;o<e;++o){(L=E[o]).pixelRatio=F.pixelRatio,L.axes=F.axes,O=O||!!L.dirty,I=I||!!L.dirty;var s=L.bounds;if(s)for(var l=s[0],c=s[1],p=0;p<3;++p)n[p]=Math.min(n[p],l[p]),i[p]=Math.max(i[p],c[p])}var d=F.bounds;if(F.autoBounds)for(p=0;p<3;++p){if(i[p]<n[p])n[p]=-1,i[p]=1;else{n[p]===i[p]&&(n[p]-=1,i[p]+=1);var g=.05*(i[p]-n[p]);n[p]=n[p]-g,i[p]=i[p]+g}d[0][p]=n[p],d[1][p]=i[p]}var m=!1;for(p=0;p<3;++p)m=m||H[0][p]!==d[0][p]||H[1][p]!==d[1][p],H[0][p]=d[0][p],H[1][p]=d[1][p];if(I=I||m,O=O||m){if(m){var y=[0,0,0];for(o=0;o<3;++o)y[o]=v((d[1][o]-d[0][o])/10);M.autoTicks?M.update({bounds:d,tickSpacing:y}):M.update({bounds:d})}var k=r.drawingBufferWidth,T=r.drawingBufferHeight;for(z[0]=k,z[1]=T,N[0]=0|Math.max(k/F.pixelRatio,1),N[1]=0|Math.max(T/F.pixelRatio,1),function(t,e){var r=t.bounds,n=t.cameraParams,i=n.projection,a=n.model,o=t.gl.drawingBufferWidth,s=t.gl.drawingBufferHeight,l=t.zNear,u=t.zFar,c=t.fovy,p=o/s;e?(h(i,-p,p,-1,1,l,u),n._ortho=!0):(f(i,c,p,l,u),n._ortho=!1);for(var d=0;d<16;++d)a[d]=0;a[15]=1;var g=0;for(d=0;d<3;++d)g=Math.max(g,r[1][d]-r[0][d]);for(d=0;d<3;++d)t.autoScale?a[5*d]=t.aspect[d]/(r[1][d]-r[0][d]):a[5*d]=1/g,t.autoCenter&&(a[12+d]=.5*-a[5*d]*(r[0][d]+r[1][d]))}(F,w),o=0;o<e;++o)(L=E[o]).axesBounds=d,F.clipToBounds&&(L.clipBounds=d);x.object&&(F.snapToData?S.position=x.dataCoordinate:S.position=x.dataPosition,S.bounds=d),I&&(I=!1,function(){if(!U()){r.colorMask(!0,!0,!0,!0),r.depthMask(!0),r.disable(r.BLEND),r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL);for(var t=E.length,e=P.length,n=0;n<e;++n){var i=P[n];i.shape=N,i.begin();for(var a=0;a<t;++a)if(C[a]===n){var o=E[a];o.drawPick&&(o.pixelRatio=1,o.drawPick(D))}i.end()}}}()),F.axesPixels=a(F.axes,D,k,T),F.onrender&&F.onrender(),r.bindFramebuffer(r.FRAMEBUFFER,null),r.viewport(0,0,k,T),F.clearRGBA(),r.depthMask(!0),r.colorMask(!0,!0,!0,!0),r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL),r.disable(r.BLEND),r.disable(r.CULL_FACE);var A=!1;for(M.enable&&(A=A||M.isTransparent(),M.draw(D)),S.axes=M,x.object&&S.draw(D),r.disable(r.CULL_FACE),o=0;o<e;++o)(L=E[o]).axes=M,L.pixelRatio=F.pixelRatio,L.isOpaque&&L.isOpaque()&&L.draw(D),L.isTransparent&&L.isTransparent()&&(A=!0);if(A){for(b.shape=z,b.bind(),r.clear(r.DEPTH_BUFFER_BIT),r.colorMask(!1,!1,!1,!1),r.depthMask(!0),r.depthFunc(r.LESS),M.enable&&M.isTransparent()&&M.drawTransparent(D),o=0;o<e;++o)(L=E[o]).isOpaque&&L.isOpaque()&&L.draw(D);for(r.enable(r.BLEND),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.colorMask(!0,!0,!0,!0),r.depthMask(!1),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),M.isTransparent()&&M.drawTransparent(D),o=0;o<e;++o){var L;(L=E[o]).isTransparent&&L.isTransparent()&&L.drawTransparent(D)}r.bindFramebuffer(r.FRAMEBUFFER,null),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.disable(r.DEPTH_TEST),_.bind(),b.color[0].bind(0),_.uniforms.accumBuffer=0,u(r),r.disable(r.BLEND)}for(O=!1,o=0;o<e;++o)E[o].dirty=!1}}}return F.enableMouseListeners(),function t(){F._stopped||F.contextLost||(q(),requestAnimationFrame(t))}(),F.redraw=function(){F._stopped||(O=!0,q())},F},createCamera:n}},{\"./camera.js\":119,\"./lib/shader\":120,\"a-big-triangle\":8,\"gl-axes3d\":70,\"gl-axes3d/properties\":77,\"gl-fbo\":86,\"gl-mat4/ortho\":101,\"gl-mat4/perspective\":102,\"gl-select-static\":131,\"gl-spikes3d\":141,\"is-mobile\":238,\"mouse-change\":247}],122:[function(t,e,r){var n=t(\"glslify\");r.pointVertex=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position;\\n\\nuniform mat3 matrix;\\nuniform float pointSize;\\nuniform float pointCloud;\\n\\nhighp float rand(vec2 co) {\\n  highp float a = 12.9898;\\n  highp float b = 78.233;\\n  highp float c = 43758.5453;\\n  highp float d = dot(co.xy, vec2(a, b));\\n  highp float e = mod(d, 3.14);\\n  return fract(sin(e) * c);\\n}\\n\\nvoid main() {\\n  vec3 hgPosition = matrix * vec3(position, 1);\\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\\n    // if we don't jitter the point size a bit, overall point cloud\\n    // saturation 'jumps' on zooming, which is disturbing and confusing\\n  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\\n  if(pointCloud != 0.0) { // pointCloud is truthy\\n    // get the same square surface as circle would be\\n    gl_PointSize *= 0.886;\\n  }\\n}\"]),r.pointFragment=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color, borderColor;\\nuniform float centerFraction;\\nuniform float pointCloud;\\n\\nvoid main() {\\n  float radius;\\n  vec4 baseColor;\\n  if(pointCloud != 0.0) { // pointCloud is truthy\\n    if(centerFraction == 1.0) {\\n      gl_FragColor = color;\\n    } else {\\n      gl_FragColor = mix(borderColor, color, centerFraction);\\n    }\\n  } else {\\n    radius = length(2.0 * gl_PointCoord.xy - 1.0);\\n    if(radius > 1.0) {\\n      discard;\\n    }\\n    baseColor = mix(borderColor, color, step(radius, centerFraction));\\n    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\\n  }\\n}\\n\"]),r.pickVertex=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position;\\nattribute vec4 pickId;\\n\\nuniform mat3 matrix;\\nuniform float pointSize;\\nuniform vec4 pickOffset;\\n\\nvarying vec4 fragId;\\n\\nvoid main() {\\n  vec3 hgPosition = matrix * vec3(position, 1);\\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\\n  gl_PointSize = pointSize;\\n\\n  vec4 id = pickId + pickOffset;\\n  id.y += floor(id.x / 256.0);\\n  id.x -= floor(id.x / 256.0) * 256.0;\\n\\n  id.z += floor(id.y / 256.0);\\n  id.y -= floor(id.y / 256.0) * 256.0;\\n\\n  id.w += floor(id.z / 256.0);\\n  id.z -= floor(id.z / 256.0) * 256.0;\\n\\n  fragId = id;\\n}\\n\"]),r.pickFragment=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragId;\\n\\nvoid main() {\\n  float radius = length(2.0 * gl_PointCoord.xy - 1.0);\\n  if(radius > 1.0) {\\n    discard;\\n  }\\n  gl_FragColor = fragId / 255.0;\\n}\\n\"])},{glslify:231}],123:[function(t,e,r){\"use strict\";var n=t(\"gl-shader\"),i=t(\"gl-buffer\"),a=t(\"typedarray-pool\"),o=t(\"./lib/shader\");function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=new s(t,i(r),i(r),n(r,o.pointVertex,o.pointFragment),n(r,o.pickVertex,o.pickFragment));return a.update(e),t.addObject(a),a};var l,u,c=s.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r(\"sizeMin\",.5),this.sizeMax=r(\"sizeMax\",20),this.color=r(\"color\",[1,0,0,1]).slice(),this.areaRatio=r(\"areaRatio\",1),this.borderColor=r(\"borderColor\",[0,0,0,1]).slice(),this.blend=r(\"blend\",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),u=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e<n;e++)u[e]=e;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(u),i||a.free(l),o||a.free(u),this.pointCount=n,this.pickOffset=0},c.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],u=[0,0,0,0],function(t){var e=void 0!==t,r=e?this.pickShader:this.shader,n=this.plot.gl,i=this.plot.dataBox;if(0===this.pointCount)return t;var a=i[2]-i[0],o=i[3]-i[1],s=function(t,e){var r,n=0,i=t.length>>>1;for(r=0;r<i;r++){var a=t[2*r],o=t[2*r+1];a>=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),c=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=c<5,r.uniforms.pointSize=c,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(u[0]=255&t,u[1]=t>>8&255,u[2]=t>>16&255,u[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=u,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r<n||r>=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{\"./lib/shader\":122,\"gl-buffer\":78,\"gl-shader\":132,\"typedarray-pool\":308}],124:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],f=e[2],h=e[3],p=r[0],d=r[1],g=r[2],v=r[3];return(a=u*p+c*d+f*g+h*v)<0&&(a=-a,p=-p,d=-d,g=-g,v=-v),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*p,t[1]=s*c+l*d,t[2]=s*f+l*g,t[3]=s*h+l*v,t}},{}],125:[function(t,e,r){\"use strict\";e.exports=function(t){return t||0===t?t.toString():\"\"}},{}],126:[function(t,e,r){\"use strict\";var n=t(\"vectorize-text\");e.exports=function(t,e,r){var a=i[e];if(a||(a=i[e]={}),t in a)return a[t];var o={textAlign:\"center\",textBaseline:\"middle\",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,u,c=n(t,o);if(r&&1!==r){for(l=0;l<s.positions.length;++l)for(u=0;u<s.positions[l].length;++u)s.positions[l][u]/=r;for(l=0;l<c.positions.length;++l)for(u=0;u<c.positions[l].length;++u)c.positions[l][u]/=r}var f=[[1/0,1/0],[-1/0,-1/0]],h=c.positions.length;for(l=0;l<h;++l){var p=c.positions[l];for(u=0;u<2;++u)f[0][u]=Math.min(f[0][u],p[u]),f[1][u]=Math.max(f[1][u],p[u])}return a[t]=[s,c,f]};var i={}},{\"vectorize-text\":311}],127:[function(t,e,r){var n=t(\"gl-shader\"),i=t(\"glslify\"),a=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\nuniform vec4 highlightId;\\nuniform float highlightScale;\\nuniform mat4 model, view, projection;\\nuniform vec3 clipBounds[2];\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\n    gl_Position = vec4(0,0,0,0);\\n  } else {\\n    float scale = 1.0;\\n    if(distance(highlightId, id) < 0.0001) {\\n      scale = highlightScale;\\n    }\\n\\n    vec4 worldPosition = model * vec4(position, 1);\\n    vec4 viewPosition = view * worldPosition;\\n    viewPosition = viewPosition / viewPosition.w;\\n    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\\n\\n    gl_Position = clipPosition;\\n    interpColor = color;\\n    pickId = id;\\n    dataCoordinate = position;\\n  }\\n}\"]),o=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\nuniform vec2 screenSize;\\nuniform vec3 clipBounds[2];\\nuniform float highlightScale, pixelRatio;\\nuniform vec4 highlightId;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\n    gl_Position = vec4(0,0,0,0);\\n  } else {\\n    float scale = pixelRatio;\\n    if(distance(highlightId.bgr, id.bgr) < 0.001) {\\n      scale *= highlightScale;\\n    }\\n\\n    vec4 worldPosition = model * vec4(position, 1.0);\\n    vec4 viewPosition = view * worldPosition;\\n    vec4 clipPosition = projection * viewPosition;\\n    clipPosition /= clipPosition.w;\\n\\n    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\\n    interpColor = color;\\n    pickId = id;\\n    dataCoordinate = position;\\n  }\\n}\"]),s=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\nuniform float highlightScale;\\nuniform vec4 highlightId;\\nuniform vec3 axes[2];\\nuniform mat4 model, view, projection;\\nuniform vec2 screenSize;\\nuniform vec3 clipBounds[2];\\nuniform float scale, pixelRatio;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\\n\\n    gl_Position = vec4(0,0,0,0);\\n  } else {\\n    float lscale = pixelRatio * scale;\\n    if(distance(highlightId, id) < 0.0001) {\\n      lscale *= highlightScale;\\n    }\\n\\n    vec4 clipCenter   = projection * view * model * vec4(position, 1);\\n    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\\n    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\\n\\n    gl_Position = clipPosition;\\n    interpColor = color;\\n    pickId = id;\\n    dataCoordinate = dataPosition;\\n  }\\n}\\n\"]),l=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float opacity;\\n\\nvarying vec4 interpColor;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n  if (\\n    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\\n    interpColor.a * opacity == 0.\\n  ) discard;\\n  gl_FragColor = interpColor * opacity;\\n}\\n\"]),u=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float pickGroup;\\n\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\\n\\n  gl_FragColor = vec4(pickGroup, pickId.bgr);\\n}\"]),c=[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"glyph\",type:\"vec2\"},{name:\"id\",type:\"vec4\"}],f={vertex:a,fragment:l,attributes:c},h={vertex:o,fragment:l,attributes:c},p={vertex:s,fragment:l,attributes:c},d={vertex:a,fragment:u,attributes:c},g={vertex:o,fragment:u,attributes:c},v={vertex:s,fragment:u,attributes:c};function m(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return m(t,f)},r.createOrtho=function(t){return m(t,h)},r.createProject=function(t){return m(t,p)},r.createPickPerspective=function(t){return m(t,d)},r.createPickOrtho=function(t){return m(t,g)},r.createPickProject=function(t){return m(t,v)}},{\"gl-shader\":132,glslify:231}],128:[function(t,e,r){\"use strict\";var n=t(\"is-string-blank\"),i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"typedarray-pool\"),s=t(\"gl-mat4/multiply\"),l=t(\"./lib/shaders\"),u=t(\"./lib/glyphs\"),c=t(\"./lib/get-simple-string\"),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t){return!0===t||t>1?1:t}function v(t,e,r,n,i,a,o,s,l,u,c,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=u,this.pickOrthoShader=c,this.pickProjectShader=f,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),u=l.createPickOrtho(e),c=l.createPickProject(e),f=i(e),h=i(e),p=i(e),d=i(e),g=new v(e,r,n,o,f,h,p,d,a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),s,u,c);return g.update(t),g};var m=v.prototype;m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],k=f.slice(),T=[0,0,0],M=[[0,0,0],[0,0,0]];function A(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,u=r.model||f,c=r.view||f,h=r.projection||f,d=e.axesBounds,g=function(t){for(var e=M,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=c,l.projection=h,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=g,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var v=0;v<3;++v)if(a[v]){l.scale=e.projectScale[v],l.opacity=e.projectOpacity[v];for(var m=k,C=0;C<16;++C)m[C]=0;for(C=0;C<4;++C)m[5*C]=1;m[5*v]=0,i[v]<0?m[12+v]=d[0][v]:m[12+v]=d[1][v],s(m,u,m),l.model=m;var L=(v+1)%3,P=(v+2)%3,O=A(x),I=A(b);O[L]=1,I[P]=1;var D=p(0,0,0,S(_,O)),z=p(0,0,0,S(w,I));if(Math.abs(D[1])>Math.abs(z[1])){var R=D;D=z,z=R,R=O,O=I,I=R;var F=L;L=P,P=F}D[0]<0&&(O[L]=-1),z[1]>0&&(I[P]=-1);var N=0,B=0;for(C=0;C<4;++C)N+=Math.pow(u[4*L+C],2),B+=Math.pow(u[4*P+C],2);O[L]/=Math.sqrt(N),I[P]/=Math.sqrt(B),l.axes[0]=O,l.axes[1]=I,l.fragClipBounds[0]=E(T,g[0],v,-1e8),l.fragClipBounds[1]=E(T,g[1],v,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function P(t,e,r,n,i,a,o){var s=r.gl;if((a===r.projectHasAlpha||o)&&C(e,r,n,i),a===r.hasAlpha||o){t.bind();var l=t.uniforms;l.model=n.model||f,l.view=n.view||f,l.projection=n.projection||f,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=L,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=i,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*i),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function O(t,e,r,i){var a;a=Array.isArray(t)?e<t.length?t[e]:void 0:t,a=c(a);var o=!0;n(a)&&(a=\"▼\",o=!1);var s=u(a,r,i);return{mesh:s[0],lines:s[1],bounds:s[2],visible:o}}m.draw=function(t){P(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,this.pixelRatio,!1,!1)},m.drawTransparent=function(t){P(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,this.pixelRatio,!0,!1)},m.drawPick=function(t){P(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,1,!0,!0)},m.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},m.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},m.update=function(t){if(\"perspective\"in(t=t||{})&&(this.useOrtho=!t.perspective),\"orthographic\"in t&&(this.useOrtho=!!t.orthographic),\"lineWidth\"in t&&(this.lineWidth=t.lineWidth),\"project\"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if(\"projectScale\"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,\"projectOpacity\"in t){Array.isArray(t.projectOpacity)?this.projectOpacity=t.projectOpacity.slice():(r=+t.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=g(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,\"opacity\"in t&&(this.opacity=g(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=t.position,l=t.font||\"normal\",u=t.alignment||[0,0];if(2===u.length)i=u[0],a=u[1];else for(i=[],a=[],n=0;n<u.length;++n)i[n]=u[n][0],a[n]=u[n][1];var c=[1/0,1/0,1/0],f=[-1/0,-1/0,-1/0],h=t.glyph,p=t.color,d=t.size,v=t.angle,m=t.lineColor,y=-1,x=0,b=0,_=0;if(s.length){_=s.length;t:for(n=0;n<_;++n){for(var w=s[n],k=0;k<3;++k)if(isNaN(w[k])||!isFinite(w[k]))continue t;var T=(B=O(h,n,l,this.pixelRatio)).mesh,M=B.lines,A=B.bounds;x+=3*T.cells.length,b+=2*M.edges.length}}var S=x+b,E=o.mallocFloat(3*S),C=o.mallocFloat(4*S),L=o.mallocFloat(2*S),P=o.mallocUint32(S);if(S>0){var I=0,D=x,z=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),N=Array.isArray(m)&&Array.isArray(m[0]);t:for(n=0;n<_;++n){for(y+=1,w=s[n],k=0;k<3;++k){if(isNaN(w[k])||!isFinite(w[k]))continue t;f[k]=Math.max(f[k],w[k]),c[k]=Math.min(c[k],w[k])}T=(B=O(h,n,l,this.pixelRatio)).mesh,M=B.lines,A=B.bounds;var B,j=B.visible;if(j)if(Array.isArray(p)){if(3===(U=F?n<p.length?p[n]:[0,0,0,0]:p).length){for(k=0;k<3;++k)z[k]=U[k];z[3]=1}else if(4===U.length){for(k=0;k<4;++k)z[k]=U[k];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else z[0]=z[1]=z[2]=0,z[3]=1;else z=[1,1,1,0];if(j)if(Array.isArray(m)){var U;if(3===(U=N?n<m.length?m[n]:[0,0,0,0]:m).length){for(k=0;k<3;++k)R[k]=U[k];R[k]=1}else if(4===U.length){for(k=0;k<4;++k)R[k]=U[k];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else R[0]=R[1]=R[2]=0,R[3]=1;else R=[1,1,1,0];var V=.5;j?Array.isArray(d)?V=n<d.length?+d[n]:12:d?V=+d:this.useOrtho&&(V=12):V=0;var H=0;Array.isArray(v)?H=n<v.length?+v[n]:0:v&&(H=+v);var q=Math.cos(H),G=Math.sin(H);for(w=s[n],k=0;k<3;++k)f[k]=Math.max(f[k],w[k]),c[k]=Math.min(c[k],w[k]);var Y=i,W=a;Y=0,Array.isArray(i)?Y=n<i.length?i[n]:0:i&&(Y=i),W=0,Array.isArray(a)?W=n<a.length?a[n]:0:a&&(W=a);var X=[Y*=Y>0?1-A[0][0]:Y<0?1+A[1][0]:1,W*=W>0?1-A[0][1]:W<0?1+A[1][1]:1],Z=T.cells||[],K=T.positions||[];for(k=0;k<Z.length;++k)for(var J=Z[k],$=0;$<3;++$){for(var Q=0;Q<3;++Q)E[3*I+Q]=w[Q];for(Q=0;Q<4;++Q)C[4*I+Q]=z[Q];P[I]=y;var tt=K[J[$]];L[2*I]=V*(q*tt[0]-G*tt[1]+X[0]),L[2*I+1]=V*(G*tt[0]+q*tt[1]+X[1]),I+=1}for(Z=M.edges,K=M.positions,k=0;k<Z.length;++k)for(J=Z[k],$=0;$<2;++$){for(Q=0;Q<3;++Q)E[3*D+Q]=w[Q];for(Q=0;Q<4;++Q)C[4*D+Q]=R[Q];P[D]=y,tt=K[J[$]],L[2*D]=V*(q*tt[0]-G*tt[1]+X[0]),L[2*D+1]=V*(G*tt[0]+q*tt[1]+X[1]),D+=1}}}this.bounds=[c,f],this.points=s,this.pointCount=s.length,this.vertexCount=x,this.lineVertexCount=b,this.pointBuffer.update(E),this.colorBuffer.update(C),this.glyphBuffer.update(L),this.idBuffer.update(P),o.free(E),o.free(C),o.free(L),o.free(P)},m.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{\"./lib/get-simple-string\":125,\"./lib/glyphs\":126,\"./lib/shaders\":127,\"gl-buffer\":78,\"gl-mat4/multiply\":100,\"gl-vao\":150,\"is-string-blank\":239,\"typedarray-pool\":308}],129:[function(t,e,r){\"use strict\";var n=t(\"glslify\");r.boxVertex=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 vertex;\\n\\nuniform vec2 cornerA, cornerB;\\n\\nvoid main() {\\n  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\\n}\\n\"]),r.boxFragment=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\n\\nvoid main() {\\n  gl_FragColor = color;\\n}\\n\"])},{glslify:231}],130:[function(t,e,r){\"use strict\";var n=t(\"gl-shader\"),i=t(\"gl-buffer\"),a=t(\"./lib/shaders\");function o(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}e.exports=function(t,e){var r=t.gl,s=new o(t,i(r,[0,0,0,1,1,0,1,1]),n(r,a.boxVertex,a.boxFragment));return s.update(e),t.addOverlay(s),s};var s=o.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,u=t.viewBox,c=t.pixelRatio,f=(e[0]-l[0])*(u[2]-u[0])/(l[2]-l[0])+u[0],h=(e[1]-l[1])*(u[3]-u[1])/(l[3]-l[1])+u[1],p=(e[2]-l[0])*(u[2]-u[0])/(l[2]-l[0])+u[0],d=(e[3]-l[1])*(u[3]-u[1])/(l[3]-l[1])+u[1];if(f=Math.max(f,u[0]),h=Math.max(h,u[1]),p=Math.min(p,u[2]),d=Math.min(d,u[3]),!(p<f||d<h)){o.bind();var g=s[2]-s[0],v=s[3]-s[1];if(this.outerFill&&(o.drawBox(0,0,g,h,i),o.drawBox(0,h,f,d,i),o.drawBox(0,d,g,v,i),o.drawBox(p,h,g,d,i)),this.innerFill&&o.drawBox(f,h,p,d,n),r>0){var m=r*c;o.drawBox(f-m,h-m,p+m,h+m,a),o.drawBox(f-m,d-m,p+m,d+m,a),o.drawBox(f-m,h-m,f+m,d+m,a),o.drawBox(p-m,h-m,p+m,d+m,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{\"./lib/shaders\":129,\"gl-buffer\":78,\"gl-shader\":132}],131:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=e[0],a=e[1];return new l(t,n(t,r,a,{}),i.mallocUint8(r*a*4))};var n=t(\"gl-fbo\"),i=t(\"typedarray-pool\"),a=t(\"ndarray\"),o=t(\"bit-twiddle\").nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=l.prototype;Object.defineProperty(u,\"shape\",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;a<r*e*4;++a)n[a]=255}return t}}}),u.begin=function(){var t=this.gl;this.shape,t&&(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},u.end=function(){var t=this.gl;t&&(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},u.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,\"number\"!=typeof r&&(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),o=0|Math.min(Math.max(t+r,0),n[0]),l=0|Math.min(Math.max(e-r,0),n[1]),u=0|Math.min(Math.max(e+r,0),n[1]);if(o<=i||u<=l)return null;var c=[o-i,u-l],f=a(this.buffer,[c[0],c[1],4],[4,4*n[0],1],4*(i+n[0]*l)),h=function(t,e,r){for(var n=1e8,i=-1,a=-1,o=t.shape[0],s=t.shape[1],l=0;l<o;l++)for(var u=0;u<s;u++){var c=t.get(l,u,0),f=t.get(l,u,1),h=t.get(l,u,2),p=t.get(l,u,3);if(c<255||f<255||h<255||p<255){var d=e-l,g=r-u,v=d*d+g*g;v<n&&(n=v,i=l,a=u)}}return[i,a,n]}(f.hi(c[0],c[1],1),r,r),p=h[0],d=h[1];return p<0||Math.pow(this.radius,2)<h[2]?null:new s(p+i|0,d+l|0,f.get(p,d,0),[f.get(p,d,1),f.get(p,d,2),f.get(p,d,3)],Math.sqrt(h[2]))},u.dispose=function(){this.gl&&(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{\"bit-twiddle\":32,\"gl-fbo\":86,ndarray:259,\"typedarray-pool\":308}],132:[function(t,e,r){\"use strict\";var n=t(\"./lib/create-uniforms\"),i=t(\"./lib/create-attributes\"),a=t(\"./lib/reflect\"),o=t(\"./lib/shader-cache\"),s=t(\"./lib/runtime-reflect\"),l=t(\"./lib/GLError\");function u(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var c=u.prototype;function f(t,e){return t.name<e.name?-1:1}c.bind=function(){var t;this.program||this._relink();var e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e>r)for(t=r;t<e;t++)this.gl.enableVertexAttribArray(t);else if(r>e)for(t=e;t<r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},c.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e<t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},c.update=function(t,e,r,u){if(!e||1===arguments.length){var c=t;t=c.vertex,e=c.fragment,r=c.uniforms,u=c.attributes}var h=this,p=h.gl,d=h._vref;h._vref=o.shader(p,p.VERTEX_SHADER,t),d&&d.dispose(),h.vertShader=h._vref.shader;var g=this._fref;if(h._fref=o.shader(p,p.FRAGMENT_SHADER,e),g&&g.dispose(),h.fragShader=h._fref.shader,!r||!u){var v=p.createProgram();if(p.attachShader(v,h.fragShader),p.attachShader(v,h.vertShader),p.linkProgram(v),!p.getProgramParameter(v,p.LINK_STATUS)){var m=p.getProgramInfoLog(v);throw new l(m,\"Error linking program:\"+m)}r=r||s.uniforms(p,v),u=u||s.attributes(p,v),p.deleteProgram(v)}(u=u.slice()).sort(f);var y,x=[],b=[],_=[];for(y=0;y<u.length;++y){var w=u[y];if(w.type.indexOf(\"mat\")>=0){for(var k=0|w.type.charAt(w.type.length-1),T=new Array(k),M=0;M<k;++M)T[M]=_.length,b.push(w.name+\"[\"+M+\"]\"),\"number\"==typeof w.location?_.push(w.location+M):Array.isArray(w.location)&&w.location.length===k&&\"number\"==typeof w.location[M]?_.push(0|w.location[M]):_.push(-1);x.push({name:w.name,type:w.type,locations:T})}else x.push({name:w.name,type:w.type,locations:[_.length]}),b.push(w.name),\"number\"==typeof w.location?_.push(0|w.location):_.push(-1)}var A=0;for(y=0;y<_.length;++y)if(_[y]<0){for(;_.indexOf(A)>=0;)A+=1;_[y]=A}var S=new Array(r.length);function E(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t<r.length;++t)S[t]=p.getUniformLocation(h.program,r[t].name)}E(),h._relink=E,h.types={uniforms:a(r),attributes:a(u)},h.attributes=i(p,h,x,_),Object.defineProperty(h,\"uniforms\",n(p,h,r,S))},e.exports=function(t,e,r,n,i){var a=new u(t);return a.update(e,r,n,i),a}},{\"./lib/GLError\":133,\"./lib/create-attributes\":134,\"./lib/create-uniforms\":135,\"./lib/reflect\":136,\"./lib/runtime-reflect\":137,\"./lib/shader-cache\":138}],133:[function(t,e,r){function n(t,e,r){this.shortMessage=e||\"\",this.longMessage=r||\"\",this.rawError=t||\"\",this.message=\"gl-shader: \"+(e||t||\"\")+(r?\"\\n\"+r:\"\"),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name=\"GLError\",n.prototype.constructor=n,e.exports=n},{}],134:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,i){for(var a={},o=0,u=r.length;o<u;++o){var c=r[o],f=c.name,h=c.type,p=c.locations;switch(h){case\"bool\":case\"int\":case\"float\":s(t,e,p[0],i,1,a,f);break;default:if(h.indexOf(\"vec\")>=0){if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n(\"\",\"Invalid data type for attribute \"+f+\": \"+h);s(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf(\"mat\")>=0))throw new n(\"\",\"Unknown data type for attribute \"+f+\": \"+h);var d;if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n(\"\",\"Invalid data type for attribute \"+f+\": \"+h);l(t,e,p,i,d,a,f)}}}return a};var n=t(\"./GLError\");function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,\"location\",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var o=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,a){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,a):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,a,s,l){var u=o[a],c=new i(t,e,r,n,a,u);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),u(t,n[r],e),e},get:function(){return c},enumerable:!0})}function l(t,e,r,n,i,a,o){for(var l=new Array(i),u=new Array(i),c=0;c<i;++c)s(t,e,r[c],n,i,l,c),u[c]=l[c];Object.defineProperty(l,\"location\",{set:function(t){if(Array.isArray(t))for(var e=0;e<i;++e)u[e].location=t[e];else for(e=0;e<i;++e)u[e].location=t+e;return t},get:function(){for(var t=new Array(i),e=0;e<i;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,a,o,s){e=e||t.FLOAT,a=!!a,o=o||i*i,s=s||0;for(var l=0;l<i;++l){var u=n[r[l]];t.vertexAttribPointer(u,i,e,a,o,s+l*i),t.enableVertexAttribArray(u)}};var f=new Array(i),h=t[\"vertexAttrib\"+i+\"fv\"];Object.defineProperty(a,o,{set:function(e){for(var a=0;a<i;++a){var o=n[r[a]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[a]);else{for(var s=0;s<i;++s)f[s]=e[i*a+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}},{\"./GLError\":133}],135:[function(t,e,r){\"use strict\";var n=t(\"./reflect\"),i=t(\"./GLError\");function a(t){return function(){return t}}function o(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}e.exports=function(t,e,r,s){function l(e){return function(n){for(var a=u(\"\",e),o=0;o<a.length;++o){var l=a[o],c=l[0],f=l[1];if(s[f]){var h=n;if(\"string\"==typeof c&&(0===c.indexOf(\".\")||0===c.indexOf(\"[\"))){var p=c;if(0===c.indexOf(\".\")&&(p=c.slice(1)),p.indexOf(\"]\")===p.length-1){var d=p.indexOf(\"[\"),g=p.slice(0,d),v=p.slice(d+1,p.length-1);h=g?n[g][v]:n[v]}else h=n[p]}var m,y=r[f].type;switch(y){case\"bool\":case\"int\":case\"sampler2D\":case\"samplerCube\":t.uniform1i(s[f],h);break;case\"float\":t.uniform1f(s[f],h);break;default:var x=y.indexOf(\"vec\");if(!(0<=x&&x<=1&&y.length===4+x)){if(0===y.indexOf(\"mat\")&&4===y.length){if((m=y.charCodeAt(y.length-1)-48)<2||m>4)throw new i(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+y);t[\"uniformMatrix\"+m+\"fv\"](s[f],!1,h);break}throw new i(\"\",\"Unknown uniform data type for \"+name+\": \"+y)}if((m=y.charCodeAt(y.length-1)-48)<2||m>4)throw new i(\"\",\"Invalid data type\");switch(y.charAt(0)){case\"b\":case\"i\":t[\"uniform\"+m+\"iv\"](s[f],h);break;case\"v\":t[\"uniform\"+m+\"fv\"](s[f],h);break;default:throw new i(\"\",\"Unrecognized data type for vector \"+name+\": \"+y)}}}}}}function u(t,e){if(\"object\"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+\"\"===n?a+=\"[\"+n+\"]\":a+=\".\"+n,\"object\"==typeof i?r.push.apply(r,u(a,i)):r.push([a,i])}return r}function c(t,e,n){if(\"object\"==typeof n){var u=f(n);Object.defineProperty(t,e,{get:a(u),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(c=n,function(t,e,r){return t.getUniform(e.program,r[c])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case\"bool\":return!1;case\"int\":case\"sampler2D\":case\"samplerCube\":case\"float\":return 0;default:var e=t.indexOf(\"vec\");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i(\"\",\"Invalid data type\");return\"b\"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf(\"mat\")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+t);return o(r*r,0)}throw new i(\"\",\"Unknown uniform data type for \"+name+\": \"+t)}}(r[n].type);var c}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r<t.length;++r)c(e,r,t[r])}else for(var n in e={},t)c(e,n,t[n]);return e}var h=n(r,!0);return{get:a(f(h)),set:l(h),enumerable:!0,configurable:!0}}},{\"./GLError\":133,\"./reflect\":136}],136:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r={},n=0;n<t.length;++n)for(var i=t[n].name.split(\".\"),a=r,o=0;o<i.length;++o){var s=i[o].split(\"[\");if(s.length>1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l<s.length;++l){var u=parseInt(s[l]);l<s.length-1||o<i.length-1?(u in a||(l<s.length-1?a[u]=[]:a[u]={}),a=a[u]):a[u]=e?n:t[n].type}}else o<i.length-1?(s[0]in a||(a[s[0]]={}),a=a[s[0]]):a[s[0]]=e?n:t[n].type}return r}},{}],137:[function(t,e,r){\"use strict\";r.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),n=[],i=0;i<r;++i){var o=t.getActiveUniform(e,i);if(o){var s=a(t,o.type);if(o.size>1)for(var l=0;l<o.size;++l)n.push({name:o.name.replace(\"[0]\",\"[\"+l+\"]\"),type:s});else n.push({name:o.name,type:s})}}return n},r.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),n=[],i=0;i<r;++i){var o=t.getActiveAttrib(e,i);o&&n.push({name:o.name,type:a(t,o.type)})}return n};var n={FLOAT:\"float\",FLOAT_VEC2:\"vec2\",FLOAT_VEC3:\"vec3\",FLOAT_VEC4:\"vec4\",INT:\"int\",INT_VEC2:\"ivec2\",INT_VEC3:\"ivec3\",INT_VEC4:\"ivec4\",BOOL:\"bool\",BOOL_VEC2:\"bvec2\",BOOL_VEC3:\"bvec3\",BOOL_VEC4:\"bvec4\",FLOAT_MAT2:\"mat2\",FLOAT_MAT3:\"mat3\",FLOAT_MAT4:\"mat4\",SAMPLER_2D:\"sampler2D\",SAMPLER_CUBE:\"samplerCube\"},i=null;function a(t,e){if(!i){var r=Object.keys(n);i={};for(var a=0;a<r.length;++a){var o=r[a];i[t[o]]=n[o]}}return i[e]}},{}],138:[function(t,e,r){\"use strict\";r.shader=function(t,e,r){return c(t).getShaderReference(e,r)},r.program=function(t,e,r,n,i){return c(t).getProgram(e,r,n,i)};var n=t(\"./GLError\"),i=t(\"gl-format-compiler-error\"),a=new(\"undefined\"==typeof WeakMap?t(\"weakmap-shim\"):WeakMap),o=0;function s(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(t){this.gl=t,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n<i;++n){var a=t.programs[r[n]];a&&(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var u=l.prototype;function c(t){var e=a.get(t);return e||(e=new l(t),a.set(t,e)),e}u.getShaderReference=function(t,e){var r=this.gl,a=this.shaders[t===r.FRAGMENT_SHADER|0],l=a[e];if(l&&r.isShader(l.shader))l.count+=1;else{var u=function(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(a);try{var s=i(o,r,e)}catch(t){throw console.warn(\"Failed to format compiler error: \"+t),new n(o,\"Error compiling shader:\\n\"+o)}throw new n(o,s.short,s.long)}return a}(r,t,e);l=a[e]=new s(o++,e,t,u,[],1,this)}return l},u.getProgram=function(t,e,r,i){var a=[t.id,e.id,r.join(\":\"),i.join(\":\")].join(\"@\"),o=this.programs[a];return o&&this.gl.isProgram(o)||(this.programs[a]=o=function(t,e,r,i,a){var o=t.createProgram();t.attachShader(o,e),t.attachShader(o,r);for(var s=0;s<i.length;++s)t.bindAttribLocation(o,a[s],i[s]);if(t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS)){var l=t.getProgramInfoLog(o);throw new n(l,\"Error linking program: \"+l)}return o}(this.gl,t.shader,e.shader,r,i),t.programs.push(a),e.programs.push(a)),o}},{\"./GLError\":133,\"gl-format-compiler-error\":87,\"weakmap-shim\":316}],139:[function(t,e,r){\"use strict\";function n(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}e.exports=function(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r};var i=n.prototype;i.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map((function(t){return t.slice()})),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},i.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],140:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=t(\"gl-shader\"),a=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position, color;\\nattribute float weight;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 coordinates[3];\\nuniform vec4 colors[3];\\nuniform vec2 screenShape;\\nuniform float lineWidth;\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  vec3 vertexPosition = mix(coordinates[0],\\n    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\\n\\n  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\\n  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\\n  vec2 delta = weight * clipOffset * screenShape;\\n  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\\n\\n  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\\n  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\\n}\\n\"]),o=n([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n  gl_FragColor = fragColor;\\n}\"]);e.exports=function(t){return i(t,a,o,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec3\"},{name:\"weight\",type:\"float\"}])}},{\"gl-shader\":132,glslify:231}],141:[function(t,e,r){\"use strict\";var n=t(\"gl-buffer\"),i=t(\"gl-vao\"),a=t(\"./shaders/index\");e.exports=function(t,e){var r=[];function o(t,e,n,i,a,o){var s=[t,e,n,0,0,0,1];s[i+3]=1,s[i]=a,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[i]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[i]=a,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(t,r),u=i(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=a(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var f=new s(t,l,u,c);return f.update(e),f};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,u=[0,0,0],c=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||o,s=t.view||o,l=t.projection||o;this.axes&&(i=this.axes.lastCubeProps.axis);for(var h=u,p=c,d=0;d<3;++d)i&&i[d]<0?(h[d]=this.bounds[0][d],p[d]=this.bounds[1][d]):(h[d]=this.bounds[1][d],p[d]=this.bounds[0][d]);for(f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,h,p],n.uniforms.colors=this.colors,n.uniforms.screenShape=f,d=0;d<3;++d)n.uniforms.lineWidth=this.lineWidth[d]*this.pixelRatio,this.enabled[d]&&(r.draw(e.TRIANGLES,6,6*d),this.drawSides[d]&&r.draw(e.TRIANGLES,12,18+12*d));r.unbind()},l.update=function(t){t&&(\"bounds\"in t&&(this.bounds=t.bounds),\"position\"in t&&(this.position=t.position),\"lineWidth\"in t&&(this.lineWidth=t.lineWidth),\"colors\"in t&&(this.colors=t.colors),\"enabled\"in t&&(this.enabled=t.enabled),\"drawSides\"in t&&(this.drawSides=t.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\"./shaders/index\":140,\"gl-buffer\":78,\"gl-vao\":150}],142:[function(t,e,r){var n=t(\"glslify\"),i=n([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the tube vertex and normal at the given index.\\n//\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\n//\\n// Each tube segment is made up of a ring of vertices.\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\n// The indexes of tube segments run from 0 to 8.\\n//\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\n  float segmentCount = 8.0;\\n\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d);\\n  vec3 y = v * sin(angle) * length(d);\\n  vec3 v3 = x + y;\\n\\n  normal = normalize(v3);\\n\\n  return v3;\\n}\\n\\nattribute vec4 vector;\\nattribute vec4 color, position;\\nattribute vec2 uv;\\n\\nuniform float vectorScale, tubeScale;\\nuniform mat4 model, view, projection, inverseModel;\\nuniform vec3 eyePosition, lightPosition;\\n\\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  // Scale the vector magnitude to stay constant with\\n  // model & view changes.\\n  vec3 normal;\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n\\n  //Lighting geometry parameters\\n  vec4 cameraCoordinate = view * tubePosition;\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\\n  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\\n\\n  // vec4 m_position  = model * vec4(tubePosition, 1.0);\\n  vec4 t_position  = view * tubePosition;\\n  gl_Position      = projection * t_position;\\n\\n  f_color          = color;\\n  f_data           = tubePosition.xyz;\\n  f_position       = position.xyz;\\n  f_uv             = uv;\\n}\\n\"]),a=n([\"#extension GL_OES_standard_derivatives : enable\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(float x, float roughness) {\\n  float NdotH = max(x, 0.0001);\\n  float cos2Alpha = NdotH * NdotH;\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\n  float roughness2 = roughness * roughness;\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\n  return exp(tan2Alpha / roughness2) / denom;\\n}\\n\\nfloat cookTorranceSpecular(\\n  vec3 lightDirection,\\n  vec3 viewDirection,\\n  vec3 surfaceNormal,\\n  float roughness,\\n  float fresnel) {\\n\\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\\n\\n  //Half angle vector\\n  vec3 H = normalize(lightDirection + viewDirection);\\n\\n  //Geometric term\\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\\n  float VdotH = max(dot(viewDirection, H), 0.000001);\\n  float LdotH = max(dot(lightDirection, H), 0.000001);\\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\\n  float G = min(1.0, min(G1, G2));\\n  \\n  //Distribution term\\n  float D = beckmannDistribution(NdotH, roughness);\\n\\n  //Fresnel term\\n  float F = pow(1.0 - VdotN, fresnel);\\n\\n  //Multiply terms and done\\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\\n}\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 clipBounds[2];\\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\\nuniform sampler2D texture;\\n\\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\\nvarying vec4 f_color;\\nvarying vec2 f_uv;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n  vec3 N = normalize(f_normal);\\n  vec3 L = normalize(f_lightDirection);\\n  vec3 V = normalize(f_eyeDirection);\\n\\n  if(gl_FrontFacing) {\\n    N = -N;\\n  }\\n\\n  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\n\\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\n\\n  gl_FragColor = litColor * opacity;\\n}\\n\"]),o=n([\"precision highp float;\\n\\nprecision highp float;\\n#define GLSLIFY 1\\n\\nvec3 getOrthogonalVector(vec3 v) {\\n  // Return up-vector for only-z vector.\\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\\n  // Assign z = 0, x = -b, y = a:\\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\\n    return normalize(vec3(-v.y, v.x, 0.0));\\n  } else {\\n    return normalize(vec3(0.0, v.z, -v.y));\\n  }\\n}\\n\\n// Calculate the tube vertex and normal at the given index.\\n//\\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\\n//\\n// Each tube segment is made up of a ring of vertices.\\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\\n// The indexes of tube segments run from 0 to 8.\\n//\\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\\n  float segmentCount = 8.0;\\n\\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\\n\\n  vec3 u = getOrthogonalVector(d);\\n  vec3 v = normalize(cross(u, d));\\n\\n  vec3 x = u * cos(angle) * length(d);\\n  vec3 y = v * sin(angle) * length(d);\\n  vec3 v3 = x + y;\\n\\n  normal = normalize(v3);\\n\\n  return v3;\\n}\\n\\nattribute vec4 vector;\\nattribute vec4 position;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\nuniform float tubeScale;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  vec3 normal;\\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\\n\\n  gl_Position = projection * view * tubePosition;\\n  f_id        = id;\\n  f_position  = position.xyz;\\n}\\n\"]),s=n([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3  clipBounds[2];\\nuniform float pickId;\\n\\nvarying vec3 f_position;\\nvarying vec4 f_id;\\n\\nvoid main() {\\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\\n\\n  gl_FragColor = vec4(pickId, f_id.xyz);\\n}\"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:\"position\",type:\"vec4\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"vector\",type:\"vec4\"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:\"position\",type:\"vec4\"},{name:\"id\",type:\"vec4\"},{name:\"vector\",type:\"vec4\"}]}},{glslify:231}],143:[function(t,e,r){\"use strict\";var n=t(\"gl-vec3\"),i=t(\"gl-vec4\"),a=[\"xyz\",\"xzy\",\"yxz\",\"yzx\",\"zxy\",\"zyx\"],o=function(t,e,r,a){for(var o=0,s=0;s<t.length;s++)for(var l=t[s].velocities,u=0;u<l.length;u++)o=Math.max(o,n.length(l[u]));var c=t.map((function(t){return function(t,e,r,a){for(var o=t.points,s=t.velocities,l=t.divergences,u=[],c=[],f=[],h=[],p=[],d=[],g=0,v=0,m=i.create(),y=i.create(),x=0;x<o.length;x++){var b=o[x],_=s[x],w=l[x];0===e&&(w=.05*r),v=n.length(_)/a,m=i.create(),n.copy(m,_),m[3]=w;for(var k=0;k<8;k++)p[k]=[b[0],b[1],b[2],k];if(h.length>0)for(k=0;k<8;k++){var T=(k+1)%8;u.push(h[k],p[k],p[T],p[T],h[T],h[k]),f.push(y,m,m,m,y,y),d.push(g,v,v,v,g,g);var M=u.length;c.push([M-6,M-5,M-4],[M-3,M-2,M-1])}var A=h;h=p,p=A;var S=y;y=m,m=S;var E=g;g=v,v=E}return{positions:u,cells:c,vectors:f,vertexIntensity:d}}(t,r,a,o)})),f=[],h=[],p=[],d=[];for(s=0;s<c.length;s++){var g=c[s],v=f.length;for(f=f.concat(g.positions),p=p.concat(g.vectors),d=d.concat(g.vertexIntensity),u=0;u<g.cells.length;u++){var m=g.cells[u],y=[];h.push(y);for(var x=0;x<m.length;x++)y.push(m[x]+v)}}return{positions:f,cells:h,vectors:p,vertexIntensity:d,colormap:e}},s=function(t,e){var r,n=t.length;for(r=0;r<n;r++){var i=t[r];if(i===e)return r;if(i>e)return r-1}return r},l=function(t,e,r){return t<e?e:t>r?r:t},u=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;n<r;n++){var i=Math.abs(t[n]-t[n-1]);i<e&&(e=i)}return e};e.exports=function(t,e){var r=t.startingPositions,i=t.maxLength||1e3,c=t.tubeSize||1,f=t.absoluteTubeSize,h=t.gridFill||\"+x+y+z\",p={};-1!==h.indexOf(\"-x\")&&(p.reversedX=!0),-1!==h.indexOf(\"-y\")&&(p.reversedY=!0),-1!==h.indexOf(\"-z\")&&(p.reversedZ=!0),p.filled=a.indexOf(h.replace(/-/g,\"\").replace(/\\+/g,\"\"));var d=t.getVelocity||function(e){return function(t,e,r){var i=e.vectors,a=e.meshgrid,o=t[0],u=t[1],c=t[2],f=a[0].length,h=a[1].length,p=a[2].length,d=s(a[0],o),g=s(a[1],u),v=s(a[2],c),m=d+1,y=g+1,x=v+1;if(d=l(d,0,f-1),m=l(m,0,f-1),g=l(g,0,h-1),y=l(y,0,h-1),v=l(v,0,p-1),x=l(x,0,p-1),d<0||g<0||v<0||m>f-1||y>h-1||x>p-1)return n.create();var b,_,w,k,T,M,A=a[0][d],S=a[0][m],E=a[1][g],C=a[1][y],L=a[2][v],P=(o-A)/(S-A),O=(u-E)/(C-E),I=(c-L)/(a[2][x]-L);switch(isFinite(P)||(P=.5),isFinite(O)||(O=.5),isFinite(I)||(I=.5),r.reversedX&&(d=f-1-d,m=f-1-m),r.reversedY&&(g=h-1-g,y=h-1-y),r.reversedZ&&(v=p-1-v,x=p-1-x),r.filled){case 5:T=v,M=x,w=g*p,k=y*p,b=d*p*h,_=m*p*h;break;case 4:T=v,M=x,b=d*p,_=m*p,w=g*p*f,k=y*p*f;break;case 3:w=g,k=y,T=v*h,M=x*h,b=d*h*p,_=m*h*p;break;case 2:w=g,k=y,b=d*h,_=m*h,T=v*h*f,M=x*h*f;break;case 1:b=d,_=m,T=v*f,M=x*f,w=g*f*p,k=y*f*p;break;default:b=d,_=m,w=g*f,k=y*f,T=v*f*h,M=x*f*h}var D=i[b+w+T],z=i[b+w+M],R=i[b+k+T],F=i[b+k+M],N=i[_+w+T],B=i[_+w+M],j=i[_+k+T],U=i[_+k+M],V=n.create(),H=n.create(),q=n.create(),G=n.create();n.lerp(V,D,N,P),n.lerp(H,z,B,P),n.lerp(q,R,j,P),n.lerp(G,F,U,P);var Y=n.create(),W=n.create();n.lerp(Y,V,q,O),n.lerp(W,H,G,O);var X=n.create();return n.lerp(X,Y,W,I),X}(e,t,p)},g=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=d(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,i,0]);var o=d(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,0,i]);var s=d(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},v=[],m=e[0][0],y=e[0][1],x=e[0][2],b=e[1][0],_=e[1][1],w=e[1][2],k=function(t){var e=t[0],r=t[1],n=t[2];return!(e<m||e>b||r<y||r>_||n<x||n>w)},T=10*n.distance(e[0],e[1])/i,M=T*T,A=1,S=0,E=r.length;E>1&&(A=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=t.length,l=0;l<s;l++){var c=t[l],f=c[0],h=c[1],p=c[2];i[f]||(e.push(f),i[f]=!0),a[h]||(r.push(h),a[h]=!0),o[p]||(n.push(p),o[p]=!0)}var d=u(e),g=u(r),v=u(n),m=Math.min(d,g,v);return isFinite(m)?m:1}(r));for(var C=0;C<E;C++){var L=n.create();n.copy(L,r[C]);var P=[L],O=[],I=d(L),D=L;O.push(I);var z=[],R=g(L,I),F=n.length(R);isFinite(F)&&F>S&&(S=F),z.push(F),v.push({points:P,velocities:O,divergences:z});for(var N=0;N<100*i&&P.length<i&&k(L);){N++;var B=n.clone(I),j=n.squaredLength(B);if(0===j)break;j>M&&n.scale(B,B,T/Math.sqrt(j)),n.add(B,B,L),I=d(B),n.squaredDistance(D,B)-M>-1e-4*M&&(P.push(B),D=B,O.push(I),R=g(B,I),F=n.length(R),isFinite(F)&&F>S&&(S=F),z.push(F)),L=B}}var U=o(v,t.colormap,S,A);return f?U.tubeScale=f:(0===S&&(S=1),U.tubeScale=.5*c*A/S),U};var c=t(\"./lib/shaders\"),f=t(\"gl-cone3d\").createMesh;e.exports.createTubeMesh=function(t,e){return f(t,e,{shaders:c,traceType:\"streamtube\"})}},{\"./lib/shaders\":142,\"gl-cone3d\":79,\"gl-vec3\":169,\"gl-vec4\":205}],144:[function(t,e,r){var n=t(\"gl-shader\"),i=t(\"glslify\"),a=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 uv;\\nattribute vec3 f;\\nattribute vec3 normal;\\n\\nuniform vec3 objectOffset;\\nuniform mat4 model, view, projection, inverseModel;\\nuniform vec3 lightPosition, eyePosition;\\nuniform sampler2D colormap;\\n\\nvarying float value, kill;\\nvarying vec3 worldCoordinate;\\nvarying vec2 planeCoordinate;\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\nvarying vec4 vColor;\\n\\nvoid main() {\\n  vec3 localCoordinate = vec3(uv.zw, f.x);\\n  worldCoordinate = objectOffset + localCoordinate;\\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\\n  vec4 clipPosition = projection * view * worldPosition;\\n  gl_Position = clipPosition;\\n  kill = f.y;\\n  value = f.z;\\n  planeCoordinate = uv.xy;\\n\\n  vColor = texture2D(colormap, vec2(value, value));\\n\\n  //Lighting geometry parameters\\n  vec4 cameraCoordinate = view * worldPosition;\\n  cameraCoordinate.xyz /= cameraCoordinate.w;\\n  lightDirection = lightPosition - cameraCoordinate.xyz;\\n  eyeDirection   = eyePosition - cameraCoordinate.xyz;\\n  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);\\n}\\n\"]),o=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nfloat beckmannDistribution(float x, float roughness) {\\n  float NdotH = max(x, 0.0001);\\n  float cos2Alpha = NdotH * NdotH;\\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\\n  float roughness2 = roughness * roughness;\\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\\n  return exp(tan2Alpha / roughness2) / denom;\\n}\\n\\nfloat beckmannSpecular(\\n  vec3 lightDirection,\\n  vec3 viewDirection,\\n  vec3 surfaceNormal,\\n  float roughness) {\\n  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\\n}\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec3 lowerBound, upperBound;\\nuniform float contourTint;\\nuniform vec4 contourColor;\\nuniform sampler2D colormap;\\nuniform vec3 clipBounds[2];\\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\\nuniform float vertexColor;\\n\\nvarying float value, kill;\\nvarying vec3 worldCoordinate;\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\nvarying vec4 vColor;\\n\\nvoid main() {\\n  if (\\n    kill > 0.0 ||\\n    vColor.a == 0.0 ||\\n    outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\\n  ) discard;\\n\\n  vec3 N = normalize(surfaceNormal);\\n  vec3 V = normalize(eyeDirection);\\n  vec3 L = normalize(lightDirection);\\n\\n  if(gl_FrontFacing) {\\n    N = -N;\\n  }\\n\\n  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\\n\\n  //decide how to interpolate color — in vertex or in fragment\\n  vec4 surfaceColor =\\n    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\\n    step(.5, vertexColor) * vColor;\\n\\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\\n\\n  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\\n}\\n\"]),s=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 uv;\\nattribute float f;\\n\\nuniform vec3 objectOffset;\\nuniform mat3 permutation;\\nuniform mat4 model, view, projection;\\nuniform float height, zOffset;\\nuniform sampler2D colormap;\\n\\nvarying float value, kill;\\nvarying vec3 worldCoordinate;\\nvarying vec2 planeCoordinate;\\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\\nvarying vec4 vColor;\\n\\nvoid main() {\\n  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\\n  worldCoordinate = objectOffset + dataCoordinate;\\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\\n\\n  vec4 clipPosition = projection * view * worldPosition;\\n  clipPosition.z += zOffset;\\n\\n  gl_Position = clipPosition;\\n  value = f + objectOffset.z;\\n  kill = -1.0;\\n  planeCoordinate = uv.zw;\\n\\n  vColor = texture2D(colormap, vec2(value, value));\\n\\n  //Don't do lighting for contours\\n  surfaceNormal   = vec3(1,0,0);\\n  eyeDirection    = vec3(0,1,0);\\n  lightDirection  = vec3(0,0,1);\\n}\\n\"]),l=i([\"precision highp float;\\n#define GLSLIFY 1\\n\\nbool outOfRange(float a, float b, float p) {\\n  return ((p > max(a, b)) || \\n          (p < min(a, b)));\\n}\\n\\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y));\\n}\\n\\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\\n  return (outOfRange(a.x, b.x, p.x) ||\\n          outOfRange(a.y, b.y, p.y) ||\\n          outOfRange(a.z, b.z, p.z));\\n}\\n\\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\\n  return outOfRange(a.xyz, b.xyz, p.xyz);\\n}\\n\\nuniform vec2 shape;\\nuniform vec3 clipBounds[2];\\nuniform float pickId;\\n\\nvarying float value, kill;\\nvarying vec3 worldCoordinate;\\nvarying vec2 planeCoordinate;\\nvarying vec3 surfaceNormal;\\n\\nvec2 splitFloat(float v) {\\n  float vh = 255.0 * v;\\n  float upper = floor(vh);\\n  float lower = fract(vh);\\n  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\\n}\\n\\nvoid main() {\\n  if ((kill > 0.0) ||\\n      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\\n\\n  vec2 ux = splitFloat(planeCoordinate.x / shape.x);\\n  vec2 uy = splitFloat(planeCoordinate.y / shape.y);\\n  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\\n}\\n\"]);r.createShader=function(t){var e=n(t,a,o,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"float\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"float\"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{\"gl-shader\":132,glslify:231}],145:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),u=i(e),c=a(e,[{buffer:u,size:4,stride:40,offset:0},{buffer:u,size:3,stride:40,offset:16},{buffer:u,size:3,stride:40,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,256,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new A(e,[0,0],[[0,0,0],[0,0,0]],r,n,u,c,g,s,l,f,h,p,d,[0,0,0]),m={levels:[[],[],[]]};for(var w in t)m[w]=t[w];return m.colormap=m.colormap||\"jet\",v.update(m),v};var n=t(\"bit-twiddle\"),i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"gl-texture2d\"),s=t(\"typedarray-pool\"),l=t(\"colormap\"),u=t(\"ndarray-ops\"),c=t(\"ndarray-pack\"),f=t(\"ndarray\"),h=t(\"surface-nets\"),p=t(\"gl-mat4/multiply\"),d=t(\"gl-mat4/invert\"),g=t(\"binary-search-bounds\"),v=t(\"ndarray-gradient\"),m=t(\"./lib/shaders\"),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],T=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function A(t,e,r,n,i,a,o,l,u,c,h,p,d,g,v){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=v,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}!function(){for(var t=0;t<3;++t){var e=T[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=A.prototype;S.genColormap=function(t,e){var r=!1,n=c([l({colormap:t,nshades:256,format:\"rgba\"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;r<e.length;++r){if(e.length<2)return 1;if(e[r][0]===t)return e[r][1];if(e[r][0]>t&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return u.divseq(n,255),this.hasAlphaScale=r,n},S.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},S.isOpaque=function(){return!this.isTransparent()},S.pickSlots=1,S.setPickBase=function(t){this.pickId=t};var E=[0,0,0],C={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function L(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||E,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=C.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var u=C.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return C.showSurface=o,C.showContour=s,C}var P={model:w,view:w,projection:w,inverseModel:w.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},O=w.slice(),I=[1,0,0,0,1,0,0,0,1];function D(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=P;n.model=t.model||w,n.view=t.view||w,n.projection=t.projection||w,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=I,n.vertexColor=this.vertexColor;var s=O;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var u=s[12+i];for(o=0;o<3;++o)u+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=u/l}var c=L(n,this);if(c.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=c.projections[i],this._shader.uniforms.clipBounds=c.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(c.showContour){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(f.uniforms.permutation=T[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o<this.contourLevels[i].length;++o)o===this.highlightLevel[i]?(f.uniforms.contourColor=this.highlightColor[i],f.uniforms.contourTint=this.highlightTint[i]):0!==o&&o-1!==this.highlightLevel[i]||(f.uniforms.contourColor=this.contourColor[i],f.uniforms.contourTint=this.contourTint[i]),this._contourCounts[i][o]&&(f.uniforms.height=this.contourLevels[i][o],h.draw(r.LINES,this._contourCounts[i][o],this._contourOffsets[i][o]));for(i=0;i<3;++i)for(f.uniforms.model=c.projections[i],f.uniforms.clipBounds=c.clipBounds[i],o=0;o<3;++o)if(this.contourProject[i][o]){f.uniforms.permutation=T[o],r.lineWidth(this.contourWidth[o]*this.pixelRatio);for(var g=0;g<this.contourLevels[o].length;++g)g===this.highlightLevel[o]?(f.uniforms.contourColor=this.highlightColor[o],f.uniforms.contourTint=this.highlightTint[o]):0!==g&&g-1!==this.highlightLevel[o]||(f.uniforms.contourColor=this.contourColor[o],f.uniforms.contourTint=this.contourTint[o]),this._contourCounts[o][g]&&(f.uniforms.height=this.contourLevels[o][g],h.draw(r.LINES,this._contourCounts[o][g],this._contourOffsets[o][g]))}for(h.unbind(),(h=this._dynamicVAO).bind(),i=0;i<3;++i)if(0!==this._dynamicCounts[i])for(f.uniforms.model=n.model,f.uniforms.clipBounds=n.clipBounds,f.uniforms.permutation=T[i],r.lineWidth(this.dynamicWidth[i]*this.pixelRatio),f.uniforms.contourColor=this.dynamicColor[i],f.uniforms.contourTint=this.dynamicTint[i],f.uniforms.height=this.dynamicLevel[i],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]),o=0;o<3;++o)this.contourProject[o][i]&&(f.uniforms.model=c.projections[o],f.uniforms.clipBounds=c.clipBounds[o],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]));h.unbind()}}S.draw=function(t){return D.call(this,t,!1)},S.drawTransparent=function(t){return D.call(this,t,!0)};var z={model:w,view:w,projection:w,inverseModel:w,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function R(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function F(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function N(t){if(Array.isArray(t)){if(Array.isArray(t))return[F(t[0]),F(t[1]),F(t[2])];var e=F(t);return[e.slice(),e.slice(),e.slice()]}}S.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=z;r.model=t.model||w,r.view=t.view||w,r.projection=t.projection||w,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.objectOffset=this.objectOffset,r.permutation=I;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var o=L(r,this);if(o.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=o.projections[n],this._pickShader.uniforms.clipBounds=o.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(o.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=r;var l=this._contourVAO;for(l.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]*this.pixelRatio),s.uniforms.permutation=T[a],n=0;n<this.contourLevels[a].length;++n)this._contourCounts[a][n]&&(s.uniforms.height=this.contourLevels[a][n],l.draw(e.LINES,this._contourCounts[a][n],this._contourOffsets[a][n]));for(n=0;n<3;++n)for(s.uniforms.model=o.projections[n],s.uniforms.clipBounds=o.clipBounds[n],a=0;a<3;++a)if(this.contourProject[n][a]){s.uniforms.permutation=T[a],e.lineWidth(this.contourWidth[a]*this.pixelRatio);for(var u=0;u<this.contourLevels[a].length;++u)this._contourCounts[a][u]&&(s.uniforms.height=this.contourLevels[a][u],l.draw(e.LINES,this._contourCounts[a][u],this._contourOffsets[a][u]))}l.unbind()}},S.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]>>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var f=c?a:1-a,h=0;h<2;++h)for(var p=i+c,d=s+h,v=f*(h?l:1-l),m=0;m<3;++m)u[m]+=this._field[m].get(p,d)*v;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],u[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]<this.contourLevels[x].length-1){var b=this.contourLevels[x][y[x]],_=this.contourLevels[x][y[x]+1];Math.abs(b-u[x])>Math.abs(_-u[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},S.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();u.assign(t.lo(1,1).hi(r[0],r[1]),e),u.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),u.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),u.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),u.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},S.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,\"contourWidth\"in t&&(this.contourWidth=R(t.contourWidth,Number)),\"showContour\"in t&&(this.showContour=R(t.showContour,Boolean)),\"showSurface\"in t&&(this.showSurface=!!t.showSurface),\"contourTint\"in t&&(this.contourTint=R(t.contourTint,Boolean)),\"contourColor\"in t&&(this.contourColor=N(t.contourColor)),\"contourProject\"in t&&(this.contourProject=R(t.contourProject,(function(t){return R(t,Boolean)}))),\"surfaceProject\"in t&&(this.surfaceProject=t.surfaceProject),\"dynamicColor\"in t&&(this.dynamicColor=N(t.dynamicColor)),\"dynamicTint\"in t&&(this.dynamicTint=R(t.dynamicTint,Number)),\"dynamicWidth\"in t&&(this.dynamicWidth=R(t.dynamicWidth,Number)),\"opacity\"in t&&(this.opacity=t.opacity),\"opacityscale\"in t&&(this.opacityscale=t.opacityscale),\"colorBounds\"in t&&(this.colorBounds=t.colorBounds),\"vertexColor\"in t&&(this.vertexColor=t.vertexColor?1:0),\"colormap\"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),\"field\"in t||\"coords\"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error(\"gl-surface: invalid coordinates for x/y\");for(o=0;o<2;++o){var u=l[o];for(m=0;m<2;++m)if(u.shape[m]!==a[m])throw new Error(\"gl-surface: coords have incorrect shape\");this.padField(this._field[o],u)}}else if(t.ticks){var c=t.ticks;if(!Array.isArray(c)||2!==c.length)throw new Error(\"gl-surface: invalid ticks\");for(o=0;o<2;++o){var p=c[o];if((Array.isArray(p)||p.length)&&(p=f(p)),p.shape[0]!==a[o])throw new Error(\"gl-surface: invalid tick length\");var d=f(p.data,a);d.stride[o]=p.stride[0],d.stride[1^o]=0,this.padField(this._field[o],d)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var m=0;m<a[0];++m)this._field[0].set(m+1,0,m);for(this._field[0].set(a[0]+1,0,a[0]-1),this._field[1].set(0,0,0),m=0;m<a[1];++m)this._field[1].set(0,m+1,m);this._field[1].set(0,a[1]+1,a[1]-1)}var y=this._field,x=f(s.mallocFloat(3*y[2].size*2),[3,a[0]+2,a[1]+2,2]);for(o=0;o<3;++o)v(x.pick(o),y[o],\"mirror\");var b=f(s.mallocFloat(3*y[2].size),[a[0]+2,a[1]+2,3]);for(o=0;o<a[0]+2;++o)for(m=0;m<a[1]+2;++m){var _=x.get(0,o,m,0),w=x.get(0,o,m,1),T=x.get(1,o,m,0),M=x.get(1,o,m,1),A=x.get(2,o,m,0),S=x.get(2,o,m,1),E=T*S-M*A,C=A*w-S*_,L=_*M-w*T,P=Math.sqrt(E*E+C*C+L*L);P<1e-8?(P=Math.max(Math.abs(E),Math.abs(C),Math.abs(L)))<1e-8?(L=1,C=E=0,P=1):P=1/P:P=1/Math.sqrt(P),b.set(o,m,0,E*P),b.set(o,m,1,C*P),b.set(o,m,2,L*P)}s.free(x.data);var O=[1/0,1/0,1/0],I=[-1/0,-1/0,-1/0],D=1/0,z=-1/0,F=(a[0]-1)*(a[1]-1)*6,B=s.mallocFloat(n.nextPow2(10*F)),j=0,U=0;for(o=0;o<a[0]-1;++o)t:for(m=0;m<a[1]-1;++m){for(var V=0;V<2;++V)for(var H=0;H<2;++H)for(var q=0;q<3;++q){var G=this._field[q].get(1+o+V,1+m+H);if(isNaN(G)||!isFinite(G))continue t}for(q=0;q<6;++q){var Y=o+k[q][0],W=m+k[q][1],X=this._field[0].get(Y+1,W+1),Z=this._field[1].get(Y+1,W+1);G=this._field[2].get(Y+1,W+1),E=b.get(Y+1,W+1,0),C=b.get(Y+1,W+1,1),L=b.get(Y+1,W+1,2),t.intensity&&(K=t.intensity.get(Y,W));var K=t.intensity?t.intensity.get(Y,W):G+this.objectOffset[2];B[j++]=Y,B[j++]=W,B[j++]=X,B[j++]=Z,B[j++]=G,B[j++]=0,B[j++]=K,B[j++]=E,B[j++]=C,B[j++]=L,O[0]=Math.min(O[0],X+this.objectOffset[0]),O[1]=Math.min(O[1],Z+this.objectOffset[1]),O[2]=Math.min(O[2],G+this.objectOffset[2]),D=Math.min(D,K),I[0]=Math.max(I[0],X+this.objectOffset[0]),I[1]=Math.max(I[1],Z+this.objectOffset[1]),I[2]=Math.max(I[2],G+this.objectOffset[2]),z=Math.max(z,K),U+=1}}for(t.intensityBounds&&(D=+t.intensityBounds[0],z=+t.intensityBounds[1]),o=6;o<j;o+=10)B[o]=(B[o]-D)/(z-D);this._vertexCount=U,this._coordinateBuffer.update(B.subarray(0,j)),s.freeFloat(B),s.free(b.data),this.bounds=[O,I],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===D&&this.intensityBounds[1]===z||(r=!0),this.intensityBounds=[D,z]}if(\"levels\"in t){var J=t.levels;for(J=Array.isArray(J[0])?J.slice():[[],[],J],o=0;o<3;++o)J[o]=J[o].slice(),J[o].sort((function(t,e){return t-e}));for(o=0;o<3;++o)for(m=0;m<J[o].length;++m)J[o][m]-=this.objectOffset[o];t:for(o=0;o<3;++o){if(J[o].length!==this.contourLevels[o].length){r=!0;break}for(m=0;m<J[o].length;++m)if(J[o][m]!==this.contourLevels[o][m]){r=!0;break t}}this.contourLevels=J}if(r){y=this._field,a=this.shape;for(var $=[],Q=0;Q<3;++Q){var tt=this.contourLevels[Q],et=[],rt=[],nt=[0,0,0];for(o=0;o<tt.length;++o){var it=h(this._field[Q],tt[o]);et.push($.length/5|0),U=0;t:for(m=0;m<it.cells.length;++m){var at=it.cells[m];for(q=0;q<2;++q){var ot=it.positions[at[q]],st=ot[0],lt=0|Math.floor(st),ut=st-lt,ct=ot[1],ft=0|Math.floor(ct),ht=ct-ft,pt=!1;e:for(var dt=0;dt<3;++dt){nt[dt]=0;var gt=(Q+dt+1)%3;for(V=0;V<2;++V){var vt=V?ut:1-ut;for(Y=0|Math.min(Math.max(lt+V,0),a[0]),H=0;H<2;++H){var mt=H?ht:1-ht;if(W=0|Math.min(Math.max(ft+H,0),a[1]),G=dt<2?this._field[gt].get(Y,W):(this.intensity.get(Y,W)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(G)||isNaN(G)){pt=!0;break e}var yt=vt*mt;nt[dt]+=yt*G}}}if(pt){if(q>0){for(var xt=0;xt<5;++xt)$.pop();U-=1}continue t}$.push(nt[0],nt[1],ot[0],ot[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[Q]=et,this._contourCounts[Q]=rt}var bt=s.mallocFloat($.length);for(o=0;o<$.length;++o)bt[o]=$[o];this._contourBuffer.update(bt),s.freeFloat(bt)}},S.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)s.freeFloat(this._field[t].data)},S.highlight=function(t){var e,r;if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;for(r=this.snapToData?t.dataCoordinate:t.position,e=0;e<3;++e)r[e]-=this.objectOffset[e];if(this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,u=(o+2)%3,c=this._field[o],f=this._field[l],p=this._field[u],d=h(c,r[o]),g=d.cells,v=d.positions;for(this._dynamicOffsets[o]=n,e=0;e<g.length;++e)for(var m=g[e],y=0;y<2;++y){var x=v[m[y]],b=+x[0],_=0|b,w=0|Math.min(_+1,i[0]),k=b-_,T=1-k,M=+x[1],A=0|M,S=0|Math.min(A+1,i[1]),E=M-A,C=1-E,L=T*C,P=T*E,O=k*C,I=k*E,D=L*f.get(_,A)+P*f.get(_,S)+O*f.get(w,A)+I*f.get(w,S),z=L*p.get(_,A)+P*p.get(_,S)+O*p.get(w,A)+I*p.get(w,S);if(isNaN(D)||isNaN(z)){y&&(n-=1);break}a[2*n+0]=D,a[2*n+1]=z,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),s.freeFloat(a)}}},{\"./lib/shaders\":144,\"binary-search-bounds\":31,\"bit-twiddle\":32,colormap:53,\"gl-buffer\":78,\"gl-mat4/invert\":98,\"gl-mat4/multiply\":100,\"gl-texture2d\":146,\"gl-vao\":150,ndarray:259,\"ndarray-gradient\":252,\"ndarray-ops\":254,\"ndarray-pack\":255,\"surface-nets\":302,\"typedarray-pool\":308}],146:[function(t,e,r){\"use strict\";var n=t(\"ndarray\"),i=t(\"ndarray-ops\"),a=t(\"typedarray-pool\");e.exports=function(t){if(arguments.length<=1)throw new Error(\"gl-texture2d: Missing arguments for texture2d constructor\");if(o||u(t),\"number\"==typeof arguments[1])return m(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return m(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(\"object\"==typeof arguments[1]){var e=arguments[1],r=c(e)?e:e.raw;if(r)return y(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return x(t,e)}throw new Error(\"gl-texture2d: Invalid arguments for texture2d constructor\")};var o=null,s=null,l=null;function u(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}function c(t){return\"undefined\"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||\"undefined\"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||\"undefined\"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||\"undefined\"!=typeof ImageData&&t instanceof ImageData}var f=function(t,e){i.muls(t,e,255)};function h(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error(\"gl-texture2d: Invalid texture size\");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function p(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var d=p.prototype;function g(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function v(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function m(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error(\"gl-texture2d: Invalid texture shape\");if(i===t.FLOAT&&!t.getExtension(\"OES_texture_float\"))throw new Error(\"gl-texture2d: Floating point textures not supported on this platform\");var o=v(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new p(t,o,e,r,n,i)}function y(t,e,r,n,i,a){var o=v(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new p(t,o,r,n,i,a)}function x(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error(\"gl-texture2d: Invalid texture size\");var l=g(o,e.stride.slice()),u=0;\"float32\"===r?u=t.FLOAT:\"float64\"===r?(u=t.FLOAT,l=!1,r=\"float32\"):\"uint8\"===r?u=t.UNSIGNED_BYTE:(u=t.UNSIGNED_BYTE,l=!1,r=\"uint8\");var c,h,d=0;if(2===o.length)d=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error(\"gl-texture2d: Invalid shape for texture\");if(1===o[2])d=t.ALPHA;else if(2===o[2])d=t.LUMINANCE_ALPHA;else if(3===o[2])d=t.RGB;else{if(4!==o[2])throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");d=t.RGBA}}u!==t.FLOAT||t.getExtension(\"OES_texture_float\")||(u=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)c=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];h=a.malloc(m,r);var x=n(h,o,y,0);\"float32\"!==r&&\"float64\"!==r||u!==t.UNSIGNED_BYTE?i.assign(x,e):f(x,e),c=h.subarray(0,m)}var b=v(t);return t.texImage2D(t.TEXTURE_2D,0,d,o[0],o[1],0,d,u,c),l||a.free(h),new p(t,b,o[0],o[1],d,u)}Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension(\"OES_texture_float_linear\")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error(\"gl-texture2d: Unknown filter mode \"+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension(\"OES_texture_float_linear\")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error(\"gl-texture2d: Unknown filter mode \"+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension(\"EXT_texture_filter_anisotropic\");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error(\"gl-texture2d: Must specify wrap mode for rows and columns\");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error(\"gl-texture2d: Invalid texture shape\")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),d.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},d.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l);else{if(!(t.shape&&t.stride&&t.data))throw new Error(\"gl-texture2d: Unsupported data type\");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error(\"gl-texture2d: Texture dimensions are out of bounds\");!function(t,e,r,o,s,l,u,c){var h=c.dtype,p=c.shape.slice();if(p.length<2||p.length>3)throw new Error(\"gl-texture2d: Invalid ndarray, must be 2d or 3d\");var d=0,v=0,m=g(p,c.stride.slice());if(\"float32\"===h?d=t.FLOAT:\"float64\"===h?(d=t.FLOAT,m=!1,h=\"float32\"):\"uint8\"===h?d=t.UNSIGNED_BYTE:(d=t.UNSIGNED_BYTE,m=!1,h=\"uint8\"),2===p.length)v=t.LUMINANCE,p=[p[0],p[1],1],c=n(c.data,p,[c.stride[0],c.stride[1],1],c.offset);else{if(3!==p.length)throw new Error(\"gl-texture2d: Invalid shape for texture\");if(1===p[2])v=t.ALPHA;else if(2===p[2])v=t.LUMINANCE_ALPHA;else if(3===p[2])v=t.RGB;else{if(4!==p[2])throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");v=t.RGBA}p[2]}if(v!==t.LUMINANCE&&v!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(v=s),v!==s)throw new Error(\"gl-texture2d: Incompatible texture format for setPixels\");var y=c.size,x=u.indexOf(o)<0;if(x&&u.push(o),d===l&&m)0===c.offset&&c.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,c.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,c.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,c.data.subarray(c.offset,c.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,c.data.subarray(c.offset,c.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);d===t.FLOAT&&l===t.UNSIGNED_BYTE?f(_,c):i.assign(_,c),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:259,\"ndarray-ops\":254,\"typedarray-pool\":308}],147:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error(\"gl-vao: Too many vertex attributes\");for(var i=0;i<r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,u=!!a.normalized,c=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,u,c,f)}else{if(\"number\"==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error(\"gl-vao: Invalid vertex attribute\");t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i<n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i<n;++i)t.disableVertexAttribArray(i)}},{}],148:[function(t,e,r){\"use strict\";var n=t(\"./do-bind.js\");function i(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},i.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t){return new i(t)}},{\"./do-bind.js\":147}],149:[function(t,e,r){\"use strict\";var n=t(\"./do-bind.js\");function i(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function a(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},a.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t<this._attribs.length;++t)this._attribs[t].bind(this.gl)},a.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},a.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},a.prototype.update=function(t,e,r){if(this.bind(),n(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var a=0;a<t.length;++a){var o=t[a];\"number\"==typeof o?this._attribs.push(new i(a,1,o)):Array.isArray(o)&&this._attribs.push(new i(a,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},a.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t,e){return new a(t,e,e.createVertexArrayOES())}},{\"./do-bind.js\":147}],150:[function(t,e,r){\"use strict\";var n=t(\"./lib/vao-native.js\"),i=t(\"./lib/vao-emulated.js\");function a(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}e.exports=function(t,e,r,o){var s,l=t.createVertexArray?new a(t):t.getExtension(\"OES_vertex_array_object\");return(s=l?n(t,l):i(t)).update(e,r,o),s}},{\"./lib/vao-emulated.js\":148,\"./lib/vao-native.js\":149}],151:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}},{}],152:[function(t,e,r){e.exports=function(t,e){var r=n(t[0],t[1],t[2]),o=n(e[0],e[1],e[2]);i(r,r),i(o,o);var s=a(r,o);return s>1?0:Math.acos(s)};var n=t(\"./fromValues\"),i=t(\"./normalize\"),a=t(\"./dot\")},{\"./dot\":162,\"./fromValues\":168,\"./normalize\":179}],153:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],154:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],155:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],156:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],157:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],158:[function(t,e,r){e.exports=t(\"./distance\")},{\"./distance\":159}],159:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],160:[function(t,e,r){e.exports=t(\"./divide\")},{\"./divide\":161}],161:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],162:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],163:[function(t,e,r){e.exports=1e-6},{}],164:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t(\"./epsilon\")},{\"./epsilon\":163}],165:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],166:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],167:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s<l;s+=e)n[0]=t[s],n[1]=t[s+1],n[2]=t[s+2],a(n,n,o),t[s]=n[0],t[s+1]=n[1],t[s+2]=n[2];return t};var n=t(\"./create\")()},{\"./create\":156}],168:[function(t,e,r){e.exports=function(t,e,r){var n=new Float32Array(3);return n[0]=t,n[1]=e,n[2]=r,n}},{}],169:[function(t,e,r){e.exports={EPSILON:t(\"./epsilon\"),create:t(\"./create\"),clone:t(\"./clone\"),angle:t(\"./angle\"),fromValues:t(\"./fromValues\"),copy:t(\"./copy\"),set:t(\"./set\"),equals:t(\"./equals\"),exactEquals:t(\"./exactEquals\"),add:t(\"./add\"),subtract:t(\"./subtract\"),sub:t(\"./sub\"),multiply:t(\"./multiply\"),mul:t(\"./mul\"),divide:t(\"./divide\"),div:t(\"./div\"),min:t(\"./min\"),max:t(\"./max\"),floor:t(\"./floor\"),ceil:t(\"./ceil\"),round:t(\"./round\"),scale:t(\"./scale\"),scaleAndAdd:t(\"./scaleAndAdd\"),distance:t(\"./distance\"),dist:t(\"./dist\"),squaredDistance:t(\"./squaredDistance\"),sqrDist:t(\"./sqrDist\"),length:t(\"./length\"),len:t(\"./len\"),squaredLength:t(\"./squaredLength\"),sqrLen:t(\"./sqrLen\"),negate:t(\"./negate\"),inverse:t(\"./inverse\"),normalize:t(\"./normalize\"),dot:t(\"./dot\"),cross:t(\"./cross\"),lerp:t(\"./lerp\"),random:t(\"./random\"),transformMat4:t(\"./transformMat4\"),transformMat3:t(\"./transformMat3\"),transformQuat:t(\"./transformQuat\"),rotateX:t(\"./rotateX\"),rotateY:t(\"./rotateY\"),rotateZ:t(\"./rotateZ\"),forEach:t(\"./forEach\")}},{\"./add\":151,\"./angle\":152,\"./ceil\":153,\"./clone\":154,\"./copy\":155,\"./create\":156,\"./cross\":157,\"./dist\":158,\"./distance\":159,\"./div\":160,\"./divide\":161,\"./dot\":162,\"./epsilon\":163,\"./equals\":164,\"./exactEquals\":165,\"./floor\":166,\"./forEach\":167,\"./fromValues\":168,\"./inverse\":170,\"./len\":171,\"./length\":172,\"./lerp\":173,\"./max\":174,\"./min\":175,\"./mul\":176,\"./multiply\":177,\"./negate\":178,\"./normalize\":179,\"./random\":180,\"./rotateX\":181,\"./rotateY\":182,\"./rotateZ\":183,\"./round\":184,\"./scale\":185,\"./scaleAndAdd\":186,\"./set\":187,\"./sqrDist\":188,\"./sqrLen\":189,\"./squaredDistance\":190,\"./squaredLength\":191,\"./sub\":192,\"./subtract\":193,\"./transformMat3\":194,\"./transformMat4\":195,\"./transformQuat\":196}],170:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},{}],171:[function(t,e,r){e.exports=t(\"./length\")},{\"./length\":172}],172:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},{}],173:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t}},{}],174:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}},{}],175:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}},{}],176:[function(t,e,r){e.exports=t(\"./multiply\")},{\"./multiply\":177}],177:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}},{}],178:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},{}],179:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}},{}],180:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],181:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=e[0],t[1]=i+o*u-s*l,t[2]=a+o*l+s*u,t}},{}],182:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+s*l+o*u,t[1]=e[1],t[2]=a+s*u-o*l,t}},{}],183:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+o*u-s*l,t[1]=a+o*l+s*u,t[2]=e[2],t}},{}],184:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],185:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],186:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],187:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],188:[function(t,e,r){e.exports=t(\"./squaredDistance\")},{\"./squaredDistance\":190}],189:[function(t,e,r){e.exports=t(\"./squaredLength\")},{\"./squaredLength\":191}],190:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],191:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],192:[function(t,e,r){e.exports=t(\"./subtract\")},{\"./subtract\":193}],193:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],194:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],195:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],196:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=c*u+p*-o+f*-l-h*-s,t[1]=f*u+p*-s+h*-o-c*-l,t[2]=h*u+p*-l+c*-s-f*-o,t}},{}],197:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],198:[function(t,e,r){e.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}},{}],199:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],200:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],201:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],202:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],203:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],204:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],205:[function(t,e,r){e.exports={create:t(\"./create\"),clone:t(\"./clone\"),fromValues:t(\"./fromValues\"),copy:t(\"./copy\"),set:t(\"./set\"),add:t(\"./add\"),subtract:t(\"./subtract\"),multiply:t(\"./multiply\"),divide:t(\"./divide\"),min:t(\"./min\"),max:t(\"./max\"),scale:t(\"./scale\"),scaleAndAdd:t(\"./scaleAndAdd\"),distance:t(\"./distance\"),squaredDistance:t(\"./squaredDistance\"),length:t(\"./length\"),squaredLength:t(\"./squaredLength\"),negate:t(\"./negate\"),inverse:t(\"./inverse\"),normalize:t(\"./normalize\"),dot:t(\"./dot\"),lerp:t(\"./lerp\"),random:t(\"./random\"),transformMat4:t(\"./transformMat4\"),transformQuat:t(\"./transformQuat\")}},{\"./add\":197,\"./clone\":198,\"./copy\":199,\"./create\":200,\"./distance\":201,\"./divide\":202,\"./dot\":203,\"./fromValues\":204,\"./inverse\":206,\"./length\":207,\"./lerp\":208,\"./max\":209,\"./min\":210,\"./multiply\":211,\"./negate\":212,\"./normalize\":213,\"./random\":214,\"./scale\":215,\"./scaleAndAdd\":216,\"./set\":217,\"./squaredDistance\":218,\"./squaredLength\":219,\"./subtract\":220,\"./transformMat4\":221,\"./transformQuat\":222}],206:[function(t,e,r){e.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}},{}],207:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],208:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],209:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],210:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],211:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],212:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],213:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t}},{}],214:[function(t,e,r){var n=t(\"./normalize\"),i=t(\"./scale\");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{\"./normalize\":213,\"./scale\":215}],215:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],216:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],217:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],218:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],219:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],220:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],221:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],222:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=c*u+p*-o+f*-l-h*-s,t[1]=f*u+p*-s+h*-o-c*-l,t[2]=h*u+p*-l+c*-s-f*-o,t[3]=e[3],t}},{}],223:[function(t,e,r){var n=t(\"glsl-tokenizer\"),i=t(\"atob-lite\");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r<e.length;r++){var a=e[r];if(\"preprocessor\"===a.type){var o=a.data.match(/\\#define\\s+SHADER_NAME(_B64)?\\s+(.+)$/);if(o&&o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},{\"atob-lite\":13,\"glsl-tokenizer\":230}],224:[function(t,e,r){e.exports=function(t){var e,r,f,h=0,p=0,d=l,g=[],v=[],m=1,y=0,x=0,b=!1,_=!1,w=\"\",k=a,T=n;\"300 es\"===(t=t||{}).version&&(k=s,T=o);var M={},A={};for(h=0;h<k.length;h++)M[k[h]]=!0;for(h=0;h<T.length;h++)A[T[h]]=!0;return function(t){return v=[],null!==t?function(t){var r;for(h=0,t.toString&&(t=t.toString()),w+=t.replace(/\\r\\n/g,\"\\n\"),f=w.length;e=w[h],h<f;){switch(r=h,d){case 0:h=O();break;case 1:h=P();break;case 2:h=L();break;case 3:h=I();break;case 4:h=R();break;case 11:h=z();break;case 5:h=F();break;case u:h=N();break;case 9:h=C();break;case l:h=E()}r!==h&&(\"\\n\"===w[r]?(y=0,++m):++y)}return p+=h,w=w.slice(h),v}(t):(g.length&&S(g.join(\"\")),d=10,S(\"(eof)\"),v)};function S(t){t.length&&v.push({type:c[d],data:t,position:x,line:m,column:y})}function E(){return g=g.length?[]:g,\"/\"===r&&\"*\"===e?(x=p+h-1,d=0,r=e,h+1):\"/\"===r&&\"/\"===e?(x=p+h-1,d=1,r=e,h+1):\"#\"===e?(d=2,x=p+h,h):/\\s/.test(e)?(d=9,x=p+h,h):(b=/\\d/.test(e),_=/[^\\w_]/.test(e),x=p+h,d=b?4:_?3:u,h)}function C(){return/[^\\s]/g.test(e)?(S(g.join(\"\")),d=l,h):(g.push(e),r=e,h+1)}function L(){return\"\\r\"!==e&&\"\\n\"!==e||\"\\\\\"===r?(g.push(e),r=e,h+1):(S(g.join(\"\")),d=l,h)}function P(){return L()}function O(){return\"/\"===e&&\"*\"===r?(g.push(e),S(g.join(\"\")),d=l,h+1):(g.push(e),r=e,h+1)}function I(){if(\".\"===r&&/\\d/.test(e))return d=5,h;if(\"/\"===r&&\"*\"===e)return d=0,h;if(\"/\"===r&&\"/\"===e)return d=1,h;if(\".\"===e&&g.length){for(;D(g););return d=5,h}if(\";\"===e||\")\"===e||\"(\"===e){if(g.length)for(;D(g););return S(e),d=l,h+1}var t=2===g.length&&\"=\"!==e;if(/[\\w_\\d\\s]/.test(e)||t){for(;D(g););return d=l,h}return g.push(e),r=e,h+1}function D(t){for(var e,r,n=0;;){if(e=i.indexOf(t.slice(0,t.length+n).join(\"\")),r=i[e],-1===e){if(n--+t.length>0)continue;r=t.slice(0,1).join(\"\")}return S(r),x+=r.length,(g=g.slice(r.length)).length}}function z(){return/[^a-fA-F0-9]/.test(e)?(S(g.join(\"\")),d=l,h):(g.push(e),r=e,h+1)}function R(){return\".\"===e||/[eE]/.test(e)?(g.push(e),d=5,r=e,h+1):\"x\"===e&&1===g.length&&\"0\"===g[0]?(d=11,g.push(e),r=e,h+1):/[^\\d]/.test(e)?(S(g.join(\"\")),d=l,h):(g.push(e),r=e,h+1)}function F(){return\"f\"===e&&(g.push(e),r=e,h+=1),/[eE]/.test(e)?(g.push(e),r=e,h+1):(\"-\"!==e&&\"+\"!==e||!/[eE]/.test(r))&&/[^\\d]/.test(e)?(S(g.join(\"\")),d=l,h):(g.push(e),r=e,h+1)}function N(){if(/[^\\d\\w_]/.test(e)){var t=g.join(\"\");return d=A[t]?8:M[t]?7:6,S(g.join(\"\")),d=l,h}return g.push(e),r=e,h+1}};var n=t(\"./lib/literals\"),i=t(\"./lib/operators\"),a=t(\"./lib/builtins\"),o=t(\"./lib/literals-300es\"),s=t(\"./lib/builtins-300es\"),l=999,u=9999,c=[\"block-comment\",\"line-comment\",\"preprocessor\",\"operator\",\"integer\",\"float\",\"ident\",\"builtin\",\"keyword\",\"whitespace\",\"eof\",\"integer\"]},{\"./lib/builtins\":226,\"./lib/builtins-300es\":225,\"./lib/literals\":228,\"./lib/literals-300es\":227,\"./lib/operators\":229}],225:[function(t,e,r){var n=t(\"./builtins\");n=n.slice().filter((function(t){return!/^(gl\\_|texture)/.test(t)})),e.exports=n.concat([\"gl_VertexID\",\"gl_InstanceID\",\"gl_Position\",\"gl_PointSize\",\"gl_FragCoord\",\"gl_FrontFacing\",\"gl_FragDepth\",\"gl_PointCoord\",\"gl_MaxVertexAttribs\",\"gl_MaxVertexUniformVectors\",\"gl_MaxVertexOutputVectors\",\"gl_MaxFragmentInputVectors\",\"gl_MaxVertexTextureImageUnits\",\"gl_MaxCombinedTextureImageUnits\",\"gl_MaxTextureImageUnits\",\"gl_MaxFragmentUniformVectors\",\"gl_MaxDrawBuffers\",\"gl_MinProgramTexelOffset\",\"gl_MaxProgramTexelOffset\",\"gl_DepthRangeParameters\",\"gl_DepthRange\",\"trunc\",\"round\",\"roundEven\",\"isnan\",\"isinf\",\"floatBitsToInt\",\"floatBitsToUint\",\"intBitsToFloat\",\"uintBitsToFloat\",\"packSnorm2x16\",\"unpackSnorm2x16\",\"packUnorm2x16\",\"unpackUnorm2x16\",\"packHalf2x16\",\"unpackHalf2x16\",\"outerProduct\",\"transpose\",\"determinant\",\"inverse\",\"texture\",\"textureSize\",\"textureProj\",\"textureLod\",\"textureOffset\",\"texelFetch\",\"texelFetchOffset\",\"textureProjOffset\",\"textureLodOffset\",\"textureProjLod\",\"textureProjLodOffset\",\"textureGrad\",\"textureGradOffset\",\"textureProjGrad\",\"textureProjGradOffset\"])},{\"./builtins\":226}],226:[function(t,e,r){e.exports=[\"abs\",\"acos\",\"all\",\"any\",\"asin\",\"atan\",\"ceil\",\"clamp\",\"cos\",\"cross\",\"dFdx\",\"dFdy\",\"degrees\",\"distance\",\"dot\",\"equal\",\"exp\",\"exp2\",\"faceforward\",\"floor\",\"fract\",\"gl_BackColor\",\"gl_BackLightModelProduct\",\"gl_BackLightProduct\",\"gl_BackMaterial\",\"gl_BackSecondaryColor\",\"gl_ClipPlane\",\"gl_ClipVertex\",\"gl_Color\",\"gl_DepthRange\",\"gl_DepthRangeParameters\",\"gl_EyePlaneQ\",\"gl_EyePlaneR\",\"gl_EyePlaneS\",\"gl_EyePlaneT\",\"gl_Fog\",\"gl_FogCoord\",\"gl_FogFragCoord\",\"gl_FogParameters\",\"gl_FragColor\",\"gl_FragCoord\",\"gl_FragData\",\"gl_FragDepth\",\"gl_FragDepthEXT\",\"gl_FrontColor\",\"gl_FrontFacing\",\"gl_FrontLightModelProduct\",\"gl_FrontLightProduct\",\"gl_FrontMaterial\",\"gl_FrontSecondaryColor\",\"gl_LightModel\",\"gl_LightModelParameters\",\"gl_LightModelProducts\",\"gl_LightProducts\",\"gl_LightSource\",\"gl_LightSourceParameters\",\"gl_MaterialParameters\",\"gl_MaxClipPlanes\",\"gl_MaxCombinedTextureImageUnits\",\"gl_MaxDrawBuffers\",\"gl_MaxFragmentUniformComponents\",\"gl_MaxLights\",\"gl_MaxTextureCoords\",\"gl_MaxTextureImageUnits\",\"gl_MaxTextureUnits\",\"gl_MaxVaryingFloats\",\"gl_MaxVertexAttribs\",\"gl_MaxVertexTextureImageUnits\",\"gl_MaxVertexUniformComponents\",\"gl_ModelViewMatrix\",\"gl_ModelViewMatrixInverse\",\"gl_ModelViewMatrixInverseTranspose\",\"gl_ModelViewMatrixTranspose\",\"gl_ModelViewProjectionMatrix\",\"gl_ModelViewProjectionMatrixInverse\",\"gl_ModelViewProjectionMatrixInverseTranspose\",\"gl_ModelViewProjectionMatrixTranspose\",\"gl_MultiTexCoord0\",\"gl_MultiTexCoord1\",\"gl_MultiTexCoord2\",\"gl_MultiTexCoord3\",\"gl_MultiTexCoord4\",\"gl_MultiTexCoord5\",\"gl_MultiTexCoord6\",\"gl_MultiTexCoord7\",\"gl_Normal\",\"gl_NormalMatrix\",\"gl_NormalScale\",\"gl_ObjectPlaneQ\",\"gl_ObjectPlaneR\",\"gl_ObjectPlaneS\",\"gl_ObjectPlaneT\",\"gl_Point\",\"gl_PointCoord\",\"gl_PointParameters\",\"gl_PointSize\",\"gl_Position\",\"gl_ProjectionMatrix\",\"gl_ProjectionMatrixInverse\",\"gl_ProjectionMatrixInverseTranspose\",\"gl_ProjectionMatrixTranspose\",\"gl_SecondaryColor\",\"gl_TexCoord\",\"gl_TextureEnvColor\",\"gl_TextureMatrix\",\"gl_TextureMatrixInverse\",\"gl_TextureMatrixInverseTranspose\",\"gl_TextureMatrixTranspose\",\"gl_Vertex\",\"greaterThan\",\"greaterThanEqual\",\"inversesqrt\",\"length\",\"lessThan\",\"lessThanEqual\",\"log\",\"log2\",\"matrixCompMult\",\"max\",\"min\",\"mix\",\"mod\",\"normalize\",\"not\",\"notEqual\",\"pow\",\"radians\",\"reflect\",\"refract\",\"sign\",\"sin\",\"smoothstep\",\"sqrt\",\"step\",\"tan\",\"texture2D\",\"texture2DLod\",\"texture2DProj\",\"texture2DProjLod\",\"textureCube\",\"textureCubeLod\",\"texture2DLodEXT\",\"texture2DProjLodEXT\",\"textureCubeLodEXT\",\"texture2DGradEXT\",\"texture2DProjGradEXT\",\"textureCubeGradEXT\"]},{}],227:[function(t,e,r){var n=t(\"./literals\");e.exports=n.slice().concat([\"layout\",\"centroid\",\"smooth\",\"case\",\"mat2x2\",\"mat2x3\",\"mat2x4\",\"mat3x2\",\"mat3x3\",\"mat3x4\",\"mat4x2\",\"mat4x3\",\"mat4x4\",\"uvec2\",\"uvec3\",\"uvec4\",\"samplerCubeShadow\",\"sampler2DArray\",\"sampler2DArrayShadow\",\"isampler2D\",\"isampler3D\",\"isamplerCube\",\"isampler2DArray\",\"usampler2D\",\"usampler3D\",\"usamplerCube\",\"usampler2DArray\",\"coherent\",\"restrict\",\"readonly\",\"writeonly\",\"resource\",\"atomic_uint\",\"noperspective\",\"patch\",\"sample\",\"subroutine\",\"common\",\"partition\",\"active\",\"filter\",\"image1D\",\"image2D\",\"image3D\",\"imageCube\",\"iimage1D\",\"iimage2D\",\"iimage3D\",\"iimageCube\",\"uimage1D\",\"uimage2D\",\"uimage3D\",\"uimageCube\",\"image1DArray\",\"image2DArray\",\"iimage1DArray\",\"iimage2DArray\",\"uimage1DArray\",\"uimage2DArray\",\"image1DShadow\",\"image2DShadow\",\"image1DArrayShadow\",\"image2DArrayShadow\",\"imageBuffer\",\"iimageBuffer\",\"uimageBuffer\",\"sampler1DArray\",\"sampler1DArrayShadow\",\"isampler1D\",\"isampler1DArray\",\"usampler1D\",\"usampler1DArray\",\"isampler2DRect\",\"usampler2DRect\",\"samplerBuffer\",\"isamplerBuffer\",\"usamplerBuffer\",\"sampler2DMS\",\"isampler2DMS\",\"usampler2DMS\",\"sampler2DMSArray\",\"isampler2DMSArray\",\"usampler2DMSArray\"])},{\"./literals\":228}],228:[function(t,e,r){e.exports=[\"precision\",\"highp\",\"mediump\",\"lowp\",\"attribute\",\"const\",\"uniform\",\"varying\",\"break\",\"continue\",\"do\",\"for\",\"while\",\"if\",\"else\",\"in\",\"out\",\"inout\",\"float\",\"int\",\"uint\",\"void\",\"bool\",\"true\",\"false\",\"discard\",\"return\",\"mat2\",\"mat3\",\"mat4\",\"vec2\",\"vec3\",\"vec4\",\"ivec2\",\"ivec3\",\"ivec4\",\"bvec2\",\"bvec3\",\"bvec4\",\"sampler1D\",\"sampler2D\",\"sampler3D\",\"samplerCube\",\"sampler1DShadow\",\"sampler2DShadow\",\"struct\",\"asm\",\"class\",\"union\",\"enum\",\"typedef\",\"template\",\"this\",\"packed\",\"goto\",\"switch\",\"default\",\"inline\",\"noinline\",\"volatile\",\"public\",\"static\",\"extern\",\"external\",\"interface\",\"long\",\"short\",\"double\",\"half\",\"fixed\",\"unsigned\",\"input\",\"output\",\"hvec2\",\"hvec3\",\"hvec4\",\"dvec2\",\"dvec3\",\"dvec4\",\"fvec2\",\"fvec3\",\"fvec4\",\"sampler2DRect\",\"sampler3DRect\",\"sampler2DRectShadow\",\"sizeof\",\"cast\",\"namespace\",\"using\"]},{}],229:[function(t,e,r){e.exports=[\"<<=\",\">>=\",\"++\",\"--\",\"<<\",\">>\",\"<=\",\">=\",\"==\",\"!=\",\"&&\",\"||\",\"+=\",\"-=\",\"*=\",\"/=\",\"%=\",\"&=\",\"^^\",\"^=\",\"|=\",\"(\",\")\",\"[\",\"]\",\".\",\"!\",\"~\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\">\",\"&\",\"^\",\"|\",\"?\",\":\",\"=\",\",\",\";\",\"{\",\"}\"]},{}],230:[function(t,e,r){var n=t(\"./index\");e.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},{\"./index\":224}],231:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n<t.length-1;n++)r.push(t[n],e[n]||\"\");return r.push(t[n]),r.join(\"\")}},{}],232:[function(t,e,r){\"use strict\";var n=t(\"is-browser\");e.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e),window.removeEventListener(\"test\",null,e)}catch(e){t=!1}return t}()},{\"is-browser\":236}],233:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error(\"Must have at least d+1 points\");var i=t[0].length;if(r<=i)throw new Error(\"Must input at least d+1 points\");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error(\"Input not in general position\");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;s<0&&(l[0]=1,l[1]=0);var f=new a(l,new Array(i+1),!1),h=f.adjacent,p=new Array(i+2);for(c=0;c<=i;++c){for(var d=l.slice(),g=0;g<=i;++g)g===c&&(d[g]=-1);var v=d[0];d[0]=d[1],d[1]=v;var m=new a(d,new Array(i+1),!0);h[c]=m,p[c]=m}for(p[i+1]=f,c=0;c<=i;++c){d=h[c].vertices;var y=h[c].adjacent;for(g=0;g<=i;++g){var x=d[g];if(x<0)y[g]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(y[g]=h[b])}}var _=new u(i,o,p),w=!!e;for(c=i+1;c<r;++c)_.insert(t[c],w);return _.boundary()};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\").compareCells;function a(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function o(t,e,r){this.vertices=t,this.cell=e,this.index=r}function s(t,e){return i(t.vertices,e.vertices)}a.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var l=[];function u(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter((function(t){return!t.boundary})),this.tuple=new Array(t+1);for(var i=0;i<=t;++i)this.tuple[i]=this.vertices[i];var a,o=l[t];o||(o=l[t]=((a=n[t+1])||(a=n),function(t){return function(){var e=this.tuple;return t.apply(this,e)}}(a))),this.orient=o}var c=u.prototype;c.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;)for(var s=(t=o.pop()).adjacent,l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,f=0;f<=r;++f){var h=c[f];i[f]=h<0?e:a[h]}var p=this.orient();if(p>0)return u;u.lastVisited=-n,0===p&&o.push(u)}}return null},c.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];for(s.lastVisited=r,c=0;c<=n;++c){var f=u[c];if(!(f.lastVisited>=r)){var h=a[c];a[c]=t;var p=this.orient();if(a[c]=h,p<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},c.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var h=[];f.length>0;){var p=(e=f.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var v=0;v<=n;++v)if(v!==g){var m=d[v];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,u.push(m),f.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=p.slice(),k=d.slice(),T=new a(w,k,!0);c.push(T);var M=_.indexOf(e);if(!(M<0))for(_[M]=T,k[g]=m,w[v]=-1,k[v]=e,d[v]=T,T.flip(),b=0;b<=n;++b){var A=w[b];if(!(A<0||A===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var L=w[C];L<0||C===b||(S[E++]=L)}h.push(new o(S,T,b))}}}}}for(h.sort(s),v=0;v+1<h.length;v+=2){var P=h[v],O=h[v+1],I=P.index,D=O.index;I<0||D<0||(P.cell.adjacent[P.index]=O.cell,O.cell.adjacent[O.index]=P.cell)}},c.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o<=i;++o){var s=n.vertices[o];a[o]=s<0?t:r[s]}var l=this.orient(a);l<0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&&this.addPeaks(t,n)}},c.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i<n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,u=0,c=0;c<=t;++c)s[c]>=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{\"robust-orientation\":284,\"simplicial-complex\":293}],234:[function(t,e,r){\"use strict\";var n=t(\"binary-search-bounds\");function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){return t&&0!==t.length?new m(v(t)):new m(null)};var a=i.prototype;function o(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 s(t,e){var r=v(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function u(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function c(t,e,r){for(var n=0;n<t.length&&t[n][0]<=e;++n){var i=r(t[n]);if(i)return i}}function f(t,e,r){for(var n=t.length-1;n>=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r<t.length;++r){var n=e(t[r]);if(n)return n}}function p(t,e){return t-e}function d(t,e){return t[0]-e[0]||t[1]-e[1]}function g(t,e){return t[1]-e[1]||t[0]-e[0]}function v(t){if(0===t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t[r][0],t[r][1]);e.sort(p);var n=e[e.length>>1],a=[],o=[],s=[];for(r=0;r<t.length;++r){var l=t[r];l[1]<n?a.push(l):n<l[0]?o.push(l):s.push(l)}var u=s,c=s.slice();return u.sort(d),c.sort(g),new i(n,v(a),v(o),u,c)}function m(t){this.root=t}a.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},a.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)?l(this,t):this.left.insert(t):this.left=v([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=v([t]);else{var r=n.ge(this.leftPoints,t,d),i=n.ge(this.rightPoints,t,g);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},a.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)?u(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?u(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,t,d);a<this.leftPoints.length&&this.leftPoints[a][0]===t[0];++a)if(this.leftPoints[a]===t)for(this.count-=1,this.leftPoints.splice(a,1),s=n.ge(this.rightPoints,t,g);s<this.rightPoints.length&&this.rightPoints[s][1]===t[1];++s)if(this.rightPoints[s]===t)return this.rightPoints.splice(s,1),1;return 0},a.queryPoint=function(t,e){return t<this.mid?this.left&&(r=this.left.queryPoint(t,e))?r:c(this.leftPoints,t,e):t>this.mid?this.right&&(r=this.right.queryPoint(t,e))?r:f(this.rightPoints,t,e):h(this.leftPoints,e);var r},a.queryInterval=function(t,e,r){var n;return t<this.mid&&this.left&&(n=this.left.queryInterval(t,e,r))||e>this.mid&&this.right&&(n=this.right.queryInterval(t,e,r))?n:e<this.mid?c(this.leftPoints,e,r):t>this.mid?f(this.rightPoints,t,r):h(this.leftPoints,r)};var y=m.prototype;y.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},y.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},y.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},y.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(y,\"count\",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,\"intervals\",{get:function(){return this.root?this.root.intervals([]):[]}})},{\"binary-search-bounds\":31}],235:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=r;return e}},{}],236:[function(t,e,r){e.exports=!0},{}],237:[function(t,e,r){function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return\"function\"==typeof t.readFloatLE&&\"function\"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],238:[function(t,e,r){\"use strict\";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var n=/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series[46]0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series[46]0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function a(t){t||(t={});var e=t.ua;if(e||\"undefined\"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&\"string\"==typeof e.headers[\"user-agent\"]&&(e=e.headers[\"user-agent\"]),\"string\"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf(\"Macintosh\")&&-1!==e.indexOf(\"Safari\")&&(r=!0),r}},{}],239:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},{}],240:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],241:[function(t,e,r){var n=t(\"./normalize\"),i=t(\"gl-mat4/create\"),a=t(\"gl-mat4/clone\"),o=t(\"gl-mat4/determinant\"),s=t(\"gl-mat4/invert\"),l=t(\"gl-mat4/transpose\"),u={length:t(\"gl-vec3/length\"),normalize:t(\"gl-vec3/normalize\"),dot:t(\"gl-vec3/dot\"),cross:t(\"gl-vec3/cross\")},c=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function g(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}e.exports=function(t,e,r,i,v,m){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),v||(v=[0,0,0,1]),m||(m=[0,0,0,1]),!n(c,t))return!1;if(a(f,c),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)<1e-8))return!1;var y,x,b,_,w,k,T,M=c[3],A=c[7],S=c[11],E=c[12],C=c[13],L=c[14],P=c[15];if(0!==M||0!==A||0!==S){if(h[0]=M,h[1]=A,h[2]=S,h[3]=P,!s(f,f))return!1;l(f,f),y=v,b=f,_=(x=h)[0],w=x[1],k=x[2],T=x[3],y[0]=b[0]*_+b[4]*w+b[8]*k+b[12]*T,y[1]=b[1]*_+b[5]*w+b[9]*k+b[13]*T,y[2]=b[2]*_+b[6]*w+b[10]*k+b[14]*T,y[3]=b[3]*_+b[7]*w+b[11]*k+b[15]*T}else v[0]=v[1]=v[2]=0,v[3]=1;if(e[0]=E,e[1]=C,e[2]=L,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,c),r[0]=u.length(p[0]),u.normalize(p[0],p[0]),i[0]=u.dot(p[0],p[1]),g(p[1],p[1],p[0],1,-i[0]),r[1]=u.length(p[1]),u.normalize(p[1],p[1]),i[0]/=r[1],i[1]=u.dot(p[0],p[2]),g(p[2],p[2],p[0],1,-i[1]),i[2]=u.dot(p[1],p[2]),g(p[2],p[2],p[1],1,-i[2]),r[2]=u.length(p[2]),u.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],u.cross(d,p[1],p[2]),u.dot(p[0],d)<0)for(var O=0;O<3;O++)r[O]*=-1,p[O][0]*=-1,p[O][1]*=-1,p[O][2]*=-1;return m[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),m[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),m[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),m[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(m[0]=-m[0]),p[0][2]>p[2][0]&&(m[1]=-m[1]),p[1][0]>p[0][1]&&(m[2]=-m[2]),!0}},{\"./normalize\":242,\"gl-mat4/clone\":92,\"gl-mat4/create\":93,\"gl-mat4/determinant\":94,\"gl-mat4/invert\":98,\"gl-mat4/transpose\":109,\"gl-vec3/cross\":157,\"gl-vec3/dot\":162,\"gl-vec3/length\":172,\"gl-vec3/normalize\":179}],242:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],243:[function(t,e,r){var n=t(\"gl-vec3/lerp\"),i=t(\"mat4-recompose\"),a=t(\"mat4-decompose\"),o=t(\"gl-mat4/determinant\"),s=t(\"quat-slerp\"),l=f(),u=f(),c=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,u.translate,u.scale,u.skew,u.perspective,u.quaternion);return!(!h||!p||(n(c.translate,l.translate,u.translate,f),n(c.skew,l.skew,u.skew,f),n(c.scale,l.scale,u.scale,f),n(c.perspective,l.perspective,u.perspective,f),s(c.quaternion,l.quaternion,u.quaternion,f),i(t,c.translate,c.scale,c.skew,c.perspective,c.quaternion),0))}},{\"gl-mat4/determinant\":94,\"gl-vec3/lerp\":173,\"mat4-decompose\":241,\"mat4-recompose\":244,\"quat-slerp\":271}],244:[function(t,e,r){var n={identity:t(\"gl-mat4/identity\"),translate:t(\"gl-mat4/translate\"),multiply:t(\"gl-mat4/multiply\"),create:t(\"gl-mat4/create\"),scale:t(\"gl-mat4/scale\"),fromRotationTranslation:t(\"gl-mat4/fromRotationTranslation\")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{\"gl-mat4/create\":93,\"gl-mat4/fromRotationTranslation\":96,\"gl-mat4/identity\":97,\"gl-mat4/multiply\":100,\"gl-mat4/scale\":107,\"gl-mat4/translate\":108}],245:[function(t,e,r){\"use strict\";var n=t(\"binary-search-bounds\"),i=t(\"mat4-interpolate\"),a=t(\"gl-mat4/invert\"),o=t(\"gl-mat4/rotateX\"),s=t(\"gl-mat4/rotateY\"),l=t(\"gl-mat4/rotateZ\"),u=t(\"gl-mat4/lookAt\"),c=t(\"gl-mat4/translate\"),f=(t(\"gl-mat4/scale\"),t(\"gl-vec3/normalize\")),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)o[u]=s[l++];else{var c=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(u=0;u<16;++u)h[u]=s[l++];var d=this.nextMatrix;for(u=0;u<16;++u)d[u]=s[l++],p=p&&h[u]===d[u];if(c<1e-6||p)for(u=0;u<16;++u)o[u]=h[u];else i(o,h,d,(t-e[r])/c)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],f(g,g);var v=this.computedInverse;a(v,o);var m=this.computedEye,y=v[15];m[0]=v[12]/y,m[1]=v[13]/y,m[2]=v[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(u=0;u<3;++u)x[u]=m[u]-o[2+4*u]*b}},d.idle=function(t){if(!(t<this.lastT())){for(var e=this._components,r=e.length-16,n=0;n<16;++n)e.push(e[r++]);this._time.push(t)}},d.flush=function(t){var e=n.gt(this._time,t)-2;e<0||(this._time.splice(0,e),this._components.splice(0,16*e))},d.lastT=function(){return this._time[this._time.length-1]},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||h,n=n||this.computedUp,this.setMatrix(t,u(this.computedMatrix,e,r,n));for(var i=0,a=0;a<3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},d.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&&s(i,i,e),r&&o(i,i,r),n&&l(i,i,n),this.setMatrix(t,a(this.computedMatrix,i))};var g=[0,0,0];d.pan=function(t,e,r,n){g[0]=-(e||0),g[1]=-(r||0),g[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;c(i,i,g),this.setMatrix(t,a(i,i))},d.translate=function(t,e,r,n){g[0]=e||0,g[1]=r||0,g[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;c(i,i,g),this.setMatrix(t,i)},d.setMatrix=function(t,e){if(!(t<this.lastT())){this._time.push(t);for(var r=0;r<16;++r)this._components.push(e[r])}},d.setDistance=function(t,e){this.computedRadius[0]=e},d.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},d.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},{\"binary-search-bounds\":31,\"gl-mat4/invert\":98,\"gl-mat4/lookAt\":99,\"gl-mat4/rotateX\":104,\"gl-mat4/rotateY\":105,\"gl-mat4/rotateZ\":106,\"gl-mat4/scale\":107,\"gl-mat4/translate\":108,\"gl-vec3/normalize\":179,\"mat4-interpolate\":243}],246:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.length;if(e<3){for(var r=new Array(e),i=0;i<e;++i)r[i]=i;return 2===e&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:r}var a=new Array(e);for(i=0;i<e;++i)a[i]=i;a.sort((function(e,r){return t[e][0]-t[r][0]||t[e][1]-t[r][1]}));var o=[a[0],a[1]],s=[a[0],a[1]];for(i=2;i<e;++i){for(var l=a[i],u=t[l],c=o.length;c>1&&n(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&n(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,h=(i=0,o.length);i<h;++i)r[f++]=o[i];for(var p=s.length-2;p>0;--p)r[f++]=s[p];return r};var n=t(\"robust-orientation\")[3]},{\"robust-orientation\":284}],247:[function(t,e,r){\"use strict\";e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return\"altKey\"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),\"shiftKey\"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),\"ctrlKey\"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),\"metaKey\"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function u(t,s){var u=n.x(s),c=n.y(s);\"buttons\"in s&&(t=0|s.buttons),(t!==r||u!==i||c!==a||l(s))&&(r=0|t,i=u||0,a=c||0,e&&e(r,i,a,o))}function c(t){u(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?u(0,t):u(r,t)}function d(t){u(r|n.buttons(t),t)}function g(t){u(r&~n.buttons(t),t)}function v(){s||(s=!0,t.addEventListener(\"mousemove\",p),t.addEventListener(\"mousedown\",d),t.addEventListener(\"mouseup\",g),t.addEventListener(\"mouseleave\",c),t.addEventListener(\"mouseenter\",c),t.addEventListener(\"mouseout\",c),t.addEventListener(\"mouseover\",c),t.addEventListener(\"blur\",f),t.addEventListener(\"keyup\",h),t.addEventListener(\"keydown\",h),t.addEventListener(\"keypress\",h),t!==window&&(window.addEventListener(\"blur\",f),window.addEventListener(\"keyup\",h),window.addEventListener(\"keydown\",h),window.addEventListener(\"keypress\",h)))}v();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?v():s&&(s=!1,t.removeEventListener(\"mousemove\",p),t.removeEventListener(\"mousedown\",d),t.removeEventListener(\"mouseup\",g),t.removeEventListener(\"mouseleave\",c),t.removeEventListener(\"mouseenter\",c),t.removeEventListener(\"mouseout\",c),t.removeEventListener(\"mouseover\",c),t.removeEventListener(\"blur\",f),t.removeEventListener(\"keyup\",h),t.removeEventListener(\"keydown\",h),t.removeEventListener(\"keypress\",h),t!==window&&(window.removeEventListener(\"blur\",f),window.removeEventListener(\"keyup\",h),window.removeEventListener(\"keydown\",h),window.removeEventListener(\"keypress\",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=t(\"mouse-event\")},{\"mouse-event\":249}],248:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i,a=t.clientX||0,o=t.clientY||0,s=(i=e)===window||i===document||i===document.body?n:i.getBoundingClientRect();return r[0]=a-s.left,r[1]=o-s.top,r}},{}],249:[function(t,e,r){\"use strict\";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(\"object\"==typeof t){if(\"buttons\"in t)return t.buttons;if(\"which\"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if(\"button\"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},r.element=n,r.x=function(t){if(\"object\"==typeof t){if(\"offsetX\"in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(\"object\"==typeof t){if(\"offsetY\"in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],250:[function(t,e,r){\"use strict\";var n=t(\"to-px\");e.exports=function(t,e,r){\"function\"==typeof t&&(r=!!e,e=t,t=window);var i=n(\"ex\",t),a=function(t){r&&t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=1;switch(t.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(a*=s,o*=s,(n*=s)||a||o)return e(n,a,o,t)};return t.addEventListener(\"wheel\",a),a}},{\"to-px\":304}],251:[function(t,e,r){\"use strict\";var n=t(\"typedarray-pool\");e.exports=function(t){function e(t){throw new Error(\"ndarray-extract-contour: \"+t)}\"object\"!=typeof t&&e(\"Must specify arguments\");var r=t.order;Array.isArray(r)||e(\"Must specify order\");var a=t.arrayArguments||1;a<1&&e(\"Must have at least one array argument\");var o=t.scalarArguments||0;o<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 s=t.getters||[],l=new Array(a),u=0;u<a;++u)s.indexOf(u)>=0?l[u]=!0:l[u]=!1;return function(t,e,r,a,o,s){var l=[s,o].join(\",\");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,l)};var i={\"false,0,1\":function(t,e,r,n,i){return function(a,o,s,l){var u,c=0|a.shape[0],f=0|a.shape[1],h=a.data,p=0|a.offset,d=0|a.stride[0],g=0|a.stride[1],v=p,m=0|-d,y=0,x=0|-g,b=0,_=-d-g|0,w=0,k=0|d,T=g-d*c|0,M=0,A=0,S=0,E=2*c|0,C=n(E),L=n(E),P=0,O=0,I=-1,D=-1,z=0,R=0|-c,F=0|c,N=0,B=-c-1|0,j=c-1|0,U=0,V=0,H=0;for(M=0;M<c;++M)C[P++]=r(h[v],o,s,l),v+=k;if(v+=T,f>0){if(A=1,C[P++]=r(h[v],o,s,l),v+=k,c>0)for(M=1,u=h[v],O=C[P]=r(u,o,s,l),z=C[P+I],N=C[P+R],U=C[P+B],O===z&&O===N&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,z,N,U,o,s,l),V=L[P]=S++),P+=1,v+=k,M=2;M<c;++M)u=h[v],O=C[P]=r(u,o,s,l),z=C[P+I],N=C[P+R],U=C[P+B],O===z&&O===N&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,z,N,U,o,s,l),V=L[P]=S++,U!==z&&e(L[P+I],V,w,y,U,z,o,s,l)),P+=1,v+=k;for(v+=T,P=0,H=I,I=D,D=H,H=R,R=F,F=H,H=B,B=j,j=H,A=2;A<f;++A){if(C[P++]=r(h[v],o,s,l),v+=k,c>0)for(M=1,u=h[v],O=C[P]=r(u,o,s,l),z=C[P+I],N=C[P+R],U=C[P+B],O===z&&O===N&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,z,N,U,o,s,l),V=L[P]=S++,U!==N&&e(L[P+R],V,b,w,N,U,o,s,l)),P+=1,v+=k,M=2;M<c;++M)u=h[v],O=C[P]=r(u,o,s,l),z=C[P+I],N=C[P+R],U=C[P+B],O===z&&O===N&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,z,N,U,o,s,l),V=L[P]=S++,U!==N&&e(L[P+R],V,b,w,N,U,o,s,l),U!==z&&e(L[P+I],V,w,y,U,z,o,s,l)),P+=1,v+=k;1&A&&(P=0),H=I,I=D,D=H,H=R,R=F,F=H,H=B,B=j,j=H,v+=T}}i(L),i(C)}},\"false,1,0\":function(t,e,r,n,i){return function(a,o,s,l){var u,c=0|a.shape[0],f=0|a.shape[1],h=a.data,p=0|a.offset,d=0|a.stride[0],g=0|a.stride[1],v=p,m=0|-d,y=0,x=0|-g,b=0,_=-d-g|0,w=0,k=0|g,T=d-g*f|0,M=0,A=0,S=0,E=2*f|0,C=n(E),L=n(E),P=0,O=0,I=-1,D=-1,z=0,R=0|-f,F=0|f,N=0,B=-f-1|0,j=f-1|0,U=0,V=0,H=0;for(A=0;A<f;++A)C[P++]=r(h[v],o,s,l),v+=k;if(v+=T,c>0){if(M=1,C[P++]=r(h[v],o,s,l),v+=k,f>0)for(A=1,u=h[v],O=C[P]=r(u,o,s,l),N=C[P+R],z=C[P+I],U=C[P+B],O===N&&O===z&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,N,z,U,o,s,l),V=L[P]=S++),P+=1,v+=k,A=2;A<f;++A)u=h[v],O=C[P]=r(u,o,s,l),N=C[P+R],z=C[P+I],U=C[P+B],O===N&&O===z&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,N,z,U,o,s,l),V=L[P]=S++,U!==z&&e(L[P+I],V,b,w,z,U,o,s,l)),P+=1,v+=k;for(v+=T,P=0,H=R,R=F,F=H,H=I,I=D,D=H,H=B,B=j,j=H,M=2;M<c;++M){if(C[P++]=r(h[v],o,s,l),v+=k,f>0)for(A=1,u=h[v],O=C[P]=r(u,o,s,l),N=C[P+R],z=C[P+I],U=C[P+B],O===N&&O===z&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,N,z,U,o,s,l),V=L[P]=S++,U!==N&&e(L[P+R],V,w,y,U,N,o,s,l)),P+=1,v+=k,A=2;A<f;++A)u=h[v],O=C[P]=r(u,o,s,l),N=C[P+R],z=C[P+I],U=C[P+B],O===N&&O===z&&O===U||(y=h[v+m],b=h[v+x],w=h[v+_],t(M,A,u,y,b,w,O,N,z,U,o,s,l),V=L[P]=S++,U!==z&&e(L[P+I],V,b,w,z,U,o,s,l),U!==N&&e(L[P+R],V,w,y,U,N,o,s,l)),P+=1,v+=k;1&M&&(P=0),H=R,R=F,F=H,H=I,I=D,D=H,H=B,B=j,j=H,v+=T}}i(L),i(C)}}}},{\"typedarray-pool\":308}],252:[function(t,e,r){\"use strict\";var n=t(\"dup\"),i={zero:function(t,e,r,n){var i=t[0];n|=0;var a=0,o=r[0];for(a=0;a<i;++a)e[n]=0,n+=o},fdTemplate1:function(t,e,r,n,i,a,o){var s=t[0],l=r[0],u=-1*l,c=l;n|=0,o|=0;var f=0,h=l,p=a[0];for(f=0;f<s;++f)i[o]=.5*(e[n+u]-e[n+c]),n+=h,o+=p},fdTemplate2:function(t,e,r,n,i,a,o,s,l,u){var c=t[0],f=t[1],h=r[0],p=r[1],d=a[0],g=a[1],v=l[0],m=l[1],y=-1*h,x=h,b=-1*p,_=p;n|=0,o|=0,u|=0;var w=0,k=0,T=p,M=h-f*p,A=g,S=d-f*g,E=m,C=v-f*m;for(k=0;k<c;++k){for(w=0;w<f;++w)i[o]=.5*(e[n+y]-e[n+x]),s[u]=.5*(e[n+b]-e[n+_]),n+=T,o+=A,u+=E;n+=M,o+=S,u+=C}}},a={cdiff:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}},zero:function(t){var e={};return function(r){var n=r.dtype,i=r.order,a=[n,i.join()].join(),o=e[a];return o||(e[a]=o=t([n,i])),o(r.shape.slice(0),r.data,r.stride,0|r.offset)}},fdTemplate1:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=n.dtype,s=n.order,l=[i,a.join(),o,s.join()].join(),u=e[l];return u||(e[l]=u=t([i,a,o,s])),u(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset)}},fdTemplate2:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}}};function o(t){return(0,a[t.funcName])(s.bind(void 0,t))}function s(t){return i[t.funcName]}function l(t){return o({funcName:t.funcName})}var u={},c={},f=l({funcName:\"cdiff\"}),h=l({funcName:\"zero\"});function p(t){return t in u?u[t]:u[t]=l({funcName:\"fdTemplate\"+t})}function d(t,e,r,n){return function(t,i){var a=i.shape.slice();return a[0]>2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),t.pick(0,-1,1).lo(1).hi(a[1]-2)),e(t.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),t.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),e(t.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),t.pick(-1,0,0).lo(1).hi(a[0]-2)),e(t.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),t.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),e(t.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(a[0]-1,0,0,0),t.set(a[0]-1,0,1,0),t.set(0,a[1]-1,0,0),t.set(0,a[1]-1,1,0),t.set(a[0]-1,a[1]-1,0,0),t.set(a[0]-1,a[1]-1,1,0),t}}e.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,\"string\"==typeof r?r:\"clamp\")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(a=c[e])return a;for(var r=t.length,n=[f,h],i=1;i<=r;++i)n.push(p(i));var a=d.apply(void 0,n);return c[e]=a,a}(r)(t,e)}},{dup:65}],253:[function(t,e,r){\"use strict\";function n(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r<t.shape[0],a=0<=r+1&&r+1<t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function i(t,e,r){var n=Math.floor(e),i=e-n,a=0<=n&&n<t.shape[0],o=0<=n+1&&n+1<t.shape[0],s=Math.floor(r),l=r-s,u=0<=s&&s<t.shape[1],c=0<=s+1&&s+1<t.shape[1],f=a&&u?t.get(n,s):0,h=a&&c?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&&u?t.get(n+1,s):0))+l*((1-i)*h+i*(o&&c?t.get(n+1,s+1):0))}function a(t,e,r,n){var i=Math.floor(e),a=e-i,o=0<=i&&i<t.shape[0],s=0<=i+1&&i+1<t.shape[0],l=Math.floor(r),u=r-l,c=0<=l&&l<t.shape[1],f=0<=l+1&&l+1<t.shape[1],h=Math.floor(n),p=n-h,d=0<=h&&h<t.shape[2],g=0<=h+1&&h+1<t.shape[2],v=o&&c&&d?t.get(i,l,h):0,m=o&&f&&d?t.get(i,l+1,h):0,y=s&&c&&d?t.get(i+1,l,h):0,x=s&&f&&d?t.get(i+1,l+1,h):0,b=o&&c&&g?t.get(i,l,h+1):0,_=o&&f&&g?t.get(i,l+1,h+1):0;return(1-p)*((1-u)*((1-a)*v+a*y)+u*((1-a)*m+a*x))+p*((1-u)*((1-a)*b+a*(s&&c&&g?t.get(i+1,l,h+1):0))+u*((1-a)*_+a*(s&&f&&g?t.get(i+1,l+1,h+1):0)))}function o(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e<n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0<=i[e]&&i[e]<t.shape[e],s[e]=0<=i[e]+1&&i[e]+1<t.shape[e];var l,u,c,f=0;t:for(e=0;e<1<<n;++e){for(u=1,c=t.offset,l=0;l<n;++l)if(e&1<<l){if(!s[l])continue t;u*=a[l],c+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;u*=1-a[l],c+=t.stride[l]*i[l]}f+=u*t.data[c]}return f}e.exports=function(t,e,r,s){switch(t.shape.length){case 0:return 0;case 1:return n(t,e);case 2:return i(t,e,r);case 3:return a(t,e,r,s);default:return o.apply(void 0,arguments)}},e.exports.d1=n,e.exports.d2=i,e.exports.d3=a},{}],254:[function(t,e,r){\"use strict\";var n={\"float64,2,1,0\":function(){return function(t,e,r,n,i){var a=t[0],o=t[1],s=t[2],l=r[0],u=r[1],c=r[2];n|=0;var f=0,h=0,p=0,d=c,g=u-s*c,v=l-o*u;for(p=0;p<a;++p){for(h=0;h<o;++h){for(f=0;f<s;++f)e[n]/=i,n+=d;n+=g}n+=v}}},\"uint8,2,0,1,float64,2,1,0\":function(){return function(t,e,r,n,i,a,o,s){for(var l=t[0],u=t[1],c=t[2],f=r[0],h=r[1],p=r[2],d=a[0],g=a[1],v=a[2],m=n|=0,y=o|=0,x=0|t[0];x>0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|t[1];b>0;){b<64?(u=b,b=0):(u=64,b-=64),n=m+x*f+b*h,o=y+x*d+b*g;var _=0,w=0,k=0,T=p,M=f-c*p,A=h-l*f,S=v,E=d-c*v,C=g-l*d;for(k=0;k<u;++k){for(w=0;w<l;++w){for(_=0;_<c;++_)e[n]=i[o]*s,n+=T,o+=S;n+=M,o+=E}n+=A,o+=C}}}}},\"float32,1,0,float32,1,0\":function(){return function(t,e,r,n,i,a,o){var s=t[0],l=t[1],u=r[0],c=r[1],f=a[0],h=a[1];n|=0,o|=0;var p=0,d=0,g=c,v=u-l*c,m=h,y=f-l*h;for(d=0;d<s;++d){for(p=0;p<l;++p)e[n]=i[o],n+=g,o+=m;n+=v,o+=y}}},\"float32,1,0,float32,0,1\":function(){return function(t,e,r,n,i,a,o){for(var s=t[0],l=t[1],u=r[0],c=r[1],f=a[0],h=a[1],p=n|=0,d=o|=0,g=0|t[1];g>0;){g<64?(l=g,g=0):(l=64,g-=64);for(var v=0|t[0];v>0;){v<64?(s=v,v=0):(s=64,v-=64),n=p+g*c+v*u,o=d+g*h+v*f;var m=0,y=0,x=c,b=u-l*c,_=h,w=f-l*h;for(y=0;y<s;++y){for(m=0;m<l;++m)e[n]=i[o],n+=x,o+=_;n+=b,o+=w}}}}},\"uint8,2,0,1,uint8,1,2,0\":function(){return function(t,e,r,n,i,a,o){for(var s=t[0],l=t[1],u=t[2],c=r[0],f=r[1],h=r[2],p=a[0],d=a[1],g=a[2],v=n|=0,m=o|=0,y=0|t[2];y>0;){y<64?(u=y,y=0):(u=64,y-=64);for(var x=0|t[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|t[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=v+y*h+x*c+b*f,o=m+y*g+x*p+b*d;var _=0,w=0,k=0,T=h,M=c-u*h,A=f-s*c,S=g,E=p-u*g,C=d-s*p;for(k=0;k<l;++k){for(w=0;w<s;++w){for(_=0;_<u;++_)e[n]=i[o],n+=T,o+=S;n+=M,o+=E}n+=A,o+=C}}}}}},\"uint8,2,0,1,array,2,0,1\":function(){return function(t,e,r,n,i,a,o){var s=t[0],l=t[1],u=t[2],c=r[0],f=r[1],h=r[2],p=a[0],d=a[1],g=a[2];n|=0,o|=0;var v=0,m=0,y=0,x=h,b=c-u*h,_=f-s*c,w=g,k=p-u*g,T=d-s*p;for(y=0;y<l;++y){for(m=0;m<s;++m){for(v=0;v<u;++v)e[n]=i[o],n+=x,o+=w;n+=b,o+=k}n+=_,o+=T}}}},i=function(t,e){var r=e.join(\",\");return(0,n[r])()},a={mul:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}},muls:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=[a,o.join(),s,l.join()].join(),c=e[u];return c||(e[u]=c=t([a,o,s,l])),c(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i)}},mulseq:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=[i,a.join()].join(),s=e[o];return s||(e[o]=s=t([i,a])),s(r.shape.slice(0),r.data,r.stride,0|r.offset,n)}},div:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}},divs:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=[a,o.join(),s,l.join()].join(),c=e[u];return c||(e[u]=c=t([a,o,s,l])),c(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i)}},divseq:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=[i,a.join()].join(),s=e[o];return s||(e[o]=s=t([i,a])),s(r.shape.slice(0),r.data,r.stride,0|r.offset,n)}},assign:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=n.dtype,s=n.order,l=[i,a.join(),o,s.join()].join(),u=e[l];return u||(e[l]=u=t([i,a,o,s])),u(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset)}}};function o(t){return e={funcName:t.funcName},(0,a[e.funcName])(i.bind(void 0,e));var e}var s={mul:\"*\",div:\"/\"};!function(){for(var t in s)r[t]=o({funcName:t}),r[t+\"s\"]=o({funcName:t+\"s\"}),r[t+\"seq\"]=o({funcName:t+\"seq\"})}(),r.assign=o({funcName:\"assign\"})},{}],255:[function(t,e,r){\"use strict\";var n=t(\"ndarray\"),i=t(\"./doConvert.js\");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{\"./doConvert.js\":256,ndarray:259}],256:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i){var a=t[0],o=t[1],s=t[2],l=r[0],u=r[1],c=r[2],f=[0,0,0];n|=0;var h=0,p=0,d=0,g=c,v=u-s*c,m=l-o*u;for(d=0;d<a;++d){for(p=0;p<o;++p){for(h=0;h<s;++h){var y,x=i;for(y=0;y<f.length-1;++y)x=x[f[y]];e[n]=x[f[f.length-1]],n+=g,++f[2]}n+=v,f[2]-=s,++f[1]}n+=m,f[1]-=o,++f[0]}}};e.exports=(n={funcName:\"convert\"},function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=[i,a.join()].join(),s=e[o];return s||(e[o]=s=t([i,a])),s(r.shape.slice(0),r.data,r.stride,0|r.offset,n)}}(i.bind(void 0,n)))},{}],257:[function(t,e,r){\"use strict\";var n=t(\"typedarray-pool\");function i(t){return\"uint32\"===t?[n.mallocUint32,n.freeUint32]:null}var a={\"uint32,1,0\":function(t,e){return function(r,n,i,a,o,s,l,u,c,f,h){var p,d,g,v,m,y,x,b,_=r*o+a,w=t(u);for(p=r+1;p<=n;++p){for(d=p,g=_+=o,m=0,y=_,v=0;v<u;++v)w[m++]=i[y],y+=c;t:for(;d-- >r;){m=0,y=g-o;e:for(v=0;v<u;++v){if((x=i[y])<(b=w[m]))break t;if(x>b)break e;y+=f,m+=h}for(m=g,y=g-o,v=0;v<u;++v)i[m]=i[y],m+=c,y+=c;g-=o}for(m=g,y=0,v=0;v<u;++v)i[m]=w[y++],m+=c}e(w)}}},o={\"uint32,1,0\":function(t,e,r){return function n(i,a,o,s,l,u,c,f,h,p,d){var g,v,m,y,x,b,_,w,k,T,M,A,S,E,C,L,P,O,I,D,z,R,F,N,B,j=(a-i+1)/6|0,U=i+j,V=a-j,H=i+a>>1,q=H-j,G=H+j,Y=U,W=q,X=H,Z=G,K=V,J=i+1,$=a-1,Q=!0,tt=0,et=0,rt=0,nt=f,it=e(nt),at=e(nt);M=l*Y,A=l*W,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=Y,Y=W,W=v;break t}if(rt<0)break t;B+=p}M=l*Z,A=l*K,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=Z,Z=K,K=v;break t}if(rt<0)break t;B+=p}M=l*Y,A=l*X,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=Y,Y=X,X=v;break t}if(rt<0)break t;B+=p}M=l*W,A=l*X,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=W,W=X,X=v;break t}if(rt<0)break t;B+=p}M=l*Y,A=l*Z,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=Y,Y=Z,Z=v;break t}if(rt<0)break t;B+=p}M=l*X,A=l*Z,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=X,X=Z,Z=v;break t}if(rt<0)break t;B+=p}M=l*W,A=l*K,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=W,W=K,K=v;break t}if(rt<0)break t;B+=p}M=l*W,A=l*X,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=W,W=X,X=v;break t}if(rt<0)break t;B+=p}M=l*Z,A=l*K,B=s;t:for(T=0;T<f;++T){if(w=A+B,(rt=o[_=M+B]-o[w])>0){v=Z,Z=K,K=v;break t}if(rt<0)break t;B+=p}for(M=l*Y,A=l*W,S=l*X,E=l*Z,C=l*K,L=l*U,P=l*H,O=l*V,N=0,B=s,T=0;T<f;++T)_=M+B,w=A+B,k=S+B,I=E+B,D=C+B,z=L+B,R=P+B,F=O+B,it[N]=o[w],at[N]=o[I],Q=Q&&it[N]===at[N],m=o[_],y=o[k],x=o[D],o[z]=m,o[R]=y,o[F]=x,++N,B+=h;for(M=l*q,A=l*i,B=s,T=0;T<f;++T)w=A+B,o[_=M+B]=o[w],B+=h;for(M=l*G,A=l*a,B=s,T=0;T<f;++T)w=A+B,o[_=M+B]=o[w],B+=h;if(Q)for(b=J;b<=$;++b){for(_=s+b*l,N=0,T=0;T<f&&0==(rt=o[_]-it[N]);++T)N+=d,_+=p;if(0!==rt)if(rt<0){if(b!==J)for(M=l*b,A=l*J,B=s,T=0;T<f;++T)w=A+B,g=o[_=M+B],o[_]=o[w],o[w]=g,B+=h;++J}else for(;;){for(_=s+$*l,N=0,T=0;T<f&&0==(rt=o[_]-it[N]);++T)N+=d,_+=p;if(!(rt>0)){if(rt<0){for(M=l*b,A=l*J,S=l*$,B=s,T=0;T<f;++T)w=A+B,k=S+B,g=o[_=M+B],o[_]=o[w],o[w]=o[k],o[k]=g,B+=h;++J,--$;break}for(M=l*b,A=l*$,B=s,T=0;T<f;++T)w=A+B,g=o[_=M+B],o[_]=o[w],o[w]=g,B+=h;--$;break}$--}}else for(b=J;b<=$;++b){for(_=s+b*l,N=0,T=0;T<f&&0==(tt=o[_]-it[N]);++T)N+=d,_+=p;if(tt<0){if(b!==J)for(M=l*b,A=l*J,B=s,T=0;T<f;++T)w=A+B,g=o[_=M+B],o[_]=o[w],o[w]=g,B+=h;++J}else{for(_=s+b*l,N=0,T=0;T<f&&0==(et=o[_]-at[N]);++T)N+=d,_+=p;if(et>0)for(;;){for(_=s+$*l,N=0,T=0;T<f&&0==(rt=o[_]-at[N]);++T)N+=d,_+=p;if(!(rt>0)){for(_=s+$*l,N=0,T=0;T<f&&0==(rt=o[_]-it[N]);++T)N+=d,_+=p;if(rt<0){for(M=l*b,A=l*J,S=l*$,B=s,T=0;T<f;++T)w=A+B,k=S+B,g=o[_=M+B],o[_]=o[w],o[w]=o[k],o[k]=g,B+=h;++J,--$}else{for(M=l*b,A=l*$,B=s,T=0;T<f;++T)w=A+B,g=o[_=M+B],o[_]=o[w],o[w]=g,B+=h;--$}break}if(--$<b)break}}}for(M=l*i,A=l*(J-1),N=0,B=s,T=0;T<f;++T)w=A+B,o[_=M+B]=o[w],o[w]=it[N],++N,B+=h;for(M=l*a,A=l*($+1),N=0,B=s,T=0;T<f;++T)w=A+B,o[_=M+B]=o[w],o[w]=at[N],++N,B+=h;if(J-2-i<=32?t(i,J-2,o,s,l,u,c,f,h,p,d):n(i,J-2,o,s,l,u,c,f,h,p,d),a-($+2)<=32?t($+2,a,o,s,l,u,c,f,h,p,d):n($+2,a,o,s,l,u,c,f,h,p,d),Q)return r(it),void r(at);if(J<U&&$>V){t:for(;;){for(_=s+J*l,N=0,B=s,T=0;T<f;++T){if(o[_]!==it[N])break t;++N,_+=h}++J}t:for(;;){for(_=s+$*l,N=0,B=s,T=0;T<f;++T){if(o[_]!==at[N])break t;++N,_+=h}--$}for(b=J;b<=$;++b){for(_=s+b*l,N=0,T=0;T<f&&0==(tt=o[_]-it[N]);++T)N+=d,_+=p;if(0===tt){if(b!==J)for(M=l*b,A=l*J,B=s,T=0;T<f;++T)w=A+B,g=o[_=M+B],o[_]=o[w],o[w]=g,B+=h;++J}else{for(_=s+b*l,N=0,T=0;T<f&&0==(et=o[_]-at[N]);++T)N+=d,_+=p;if(0===et)for(;;){for(_=s+$*l,N=0,T=0;T<f&&0==(rt=o[_]-at[N]);++T)N+=d,_+=p;if(0!==rt){for(_=s+$*l,N=0,T=0;T<f&&0==(rt=o[_]-it[N]);++T)N+=d,_+=p;if(rt<0){for(M=l*b,A=l*J,S=l*$,B=s,T=0;T<f;++T)w=A+B,k=S+B,g=o[_=M+B],o[_]=o[w],o[w]=o[k],o[k]=g,B+=h;++J,--$}else{for(M=l*b,A=l*$,B=s,T=0;T<f;++T)w=A+B,g=o[_=M+B],o[_]=o[w],o[w]=g,B+=h;--$}break}if(--$<b)break}}}}r(it),r(at),$-J<=32?t(J,$,o,s,l,u,c,f,h,p,d):n(J,$,o,s,l,u,c,f,h,p,d)}}},s={\"uint32,1,0\":function(t,e){return function(r){var n=r.data,i=0|r.offset,a=r.shape,o=r.stride,s=0|o[0],l=0|a[0],u=0|o[1],c=0|a[1],f=u,h=u;l<=32?t(0,l-1,n,i,s,u,l,c,f,h,1):e(0,l-1,n,i,s,u,l,c,f,h,1)}}};e.exports=function(t,e){var r=[e,t].join(\",\"),n=s[r],l=function(t,e){var r=i(e),n=[e,t].join(\",\"),o=a[n];return r?o(r[0],r[1]):o()}(t,e);return n(l,function(t,e,r){var n=i(e),a=[e,t].join(\",\"),s=o[a];return t.length>1&&n?s(r,n[0],n[1]):s(r)}(t,e,l))}},{\"typedarray-pool\":308}],258:[function(t,e,r){\"use strict\";var n=t(\"./lib/compile_sort.js\"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(\":\"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{\"./lib/compile_sort.js\":257}],259:[function(t,e,r){var n=t(\"is-buffer\"),i=\"undefined\"!=typeof Float64Array;function a(t,e){return t[0]-e[0]}function o(){var t,e=this.stride,r=new Array(e.length);for(t=0;t<r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(a);var n=new Array(r.length);for(t=0;t<n.length;++t)n[t]=r[t][1];return n}var s={T:function(t){function e(t){this.data=t}var r=e.prototype;return r.dtype=t,r.index=function(){return-1},r.size=0,r.dimension=-1,r.shape=r.stride=r.order=[],r.lo=r.hi=r.transpose=r.step=function(){return new e(this.data)},r.get=r.set=function(){},r.pick=function(){return null},function(t){return new e(t)}},0:function(t,e){function r(t,e){this.data=t,this.offset=e}var n=r.prototype;return n.dtype=t,n.index=function(){return this.offset},n.dimension=0,n.size=1,n.shape=n.stride=n.order=[],n.lo=n.hi=n.transpose=n.step=function(){return new r(this.data,this.offset)},n.pick=function(){return e(this.data)},n.valueOf=n.get=function(){return\"generic\"===t?this.data.get(this.offset):this.data[this.offset]},n.set=function(e){return\"generic\"===t?this.data.set(this.offset,e):this.data[this.offset]=e},function(t,e,n,i){return new r(t,i)}},1:function(t,e,r){function n(t,e,r,n){this.data=t,this.shape=[e],this.stride=[r],this.offset=0|n}var i=n.prototype;return i.dtype=t,i.dimension=1,Object.defineProperty(i,\"size\",{get:function(){return this.shape[0]}}),i.order=[0],i.set=function(e,r){return\"generic\"===t?this.data.set(this.offset+this.stride[0]*e,r):this.data[this.offset+this.stride[0]*e]=r},i.get=function(e){return\"generic\"===t?this.data.get(this.offset+this.stride[0]*e):this.data[this.offset+this.stride[0]*e]},i.index=function(t){return this.offset+this.stride[0]*t},i.hi=function(t){return new n(this.data,\"number\"!=typeof t||t<0?this.shape[0]:0|t,this.stride[0],this.offset)},i.lo=function(t){var e=this.offset,r=0,i=this.shape[0],a=this.stride[0];return\"number\"==typeof t&&t>=0&&(e+=a*(r=0|t),i-=r),new n(this.data,i,a,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return\"number\"==typeof t&&((a=0|t)<0?(i+=r*(e-1),e=o(-e/a)):e=o(e/a),r*=a),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return\"number\"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,a){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,\"size\",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,\"order\",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return\"generic\"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return\"generic\"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,\"number\"!=typeof t||t<0?this.shape[0]:0|t,\"number\"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return\"number\"==typeof t&&t>=0&&(r+=s*(i=0|t),a-=i),\"number\"==typeof e&&e>=0&&(r+=l*(i=0|e),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,u=Math.ceil;return\"number\"==typeof t&&((l=0|t)<0?(s+=a*(r-1),r=u(-r/l)):r=u(r/l),a*=l),\"number\"==typeof e&&((l=0|e)<0?(s+=o*(i-1),i=u(-i/l)):i=u(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],a=this.offset;return\"number\"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),\"number\"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,a)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,a,o,s){this.data=t,this.shape=[e,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,\"order\",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return\"generic\"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return\"generic\"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,\"number\"!=typeof t||t<0?this.shape[0]:0|t,\"number\"!=typeof e||e<0?this.shape[1]:0|e,\"number\"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.stride[0],c=this.stride[1],f=this.stride[2];return\"number\"==typeof t&&t>=0&&(i+=u*(a=0|t),o-=a),\"number\"==typeof e&&e>=0&&(i+=c*(a=0|e),s-=a),\"number\"==typeof r&&r>=0&&(i+=f*(a=0|r),l-=a),new n(this.data,o,s,l,u,c,f,i)},i.step=function(t,e,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],u=this.stride[2],c=this.offset,f=0,h=Math.ceil;return\"number\"==typeof t&&((f=0|t)<0?(c+=s*(i-1),i=h(-i/f)):i=h(i/f),s*=f),\"number\"==typeof e&&((f=0|e)<0?(c+=l*(a-1),a=h(-a/f)):a=h(a/f),l*=f),\"number\"==typeof r&&((f=0|r)<0?(c+=u*(o-1),o=h(-o/f)):o=h(o/f),u*=f),new n(this.data,i,a,o,s,l,u,c)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[t],i[e],i[r],a[t],a[e],a[r],this.offset)},i.pick=function(t,r,n){var i=[],a=[],o=this.offset;return\"number\"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(i.push(this.shape[0]),a.push(this.stride[0])),\"number\"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),\"number\"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,e[i.length+1])(this.data,i,a,o)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u){this.data=t,this.shape=[e,r,n,i],this.stride=[a,o,s,l],this.offset=0|u}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,\"order\",{get:r}),i.set=function(e,r,n,i,a){return\"generic\"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(e,r,n,i){return\"generic\"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,\"number\"!=typeof t||t<0?this.shape[0]:0|t,\"number\"!=typeof e||e<0?this.shape[1]:0|e,\"number\"!=typeof r||r<0?this.shape[2]:0|r,\"number\"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],u=this.shape[2],c=this.shape[3],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3];return\"number\"==typeof t&&t>=0&&(a+=f*(o=0|t),s-=o),\"number\"==typeof e&&e>=0&&(a+=h*(o=0|e),l-=o),\"number\"==typeof r&&r>=0&&(a+=p*(o=0|r),u-=o),\"number\"==typeof i&&i>=0&&(a+=d*(o=0|i),c-=o),new n(this.data,s,l,u,c,f,h,p,d,a)},i.step=function(t,e,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],u=this.stride[0],c=this.stride[1],f=this.stride[2],h=this.stride[3],p=this.offset,d=0,g=Math.ceil;return\"number\"==typeof t&&((d=0|t)<0?(p+=u*(a-1),a=g(-a/d)):a=g(a/d),u*=d),\"number\"==typeof e&&((d=0|e)<0?(p+=c*(o-1),o=g(-o/d)):o=g(o/d),c*=d),\"number\"==typeof r&&((d=0|r)<0?(p+=f*(s-1),s=g(-s/d)):s=g(s/d),f*=d),\"number\"==typeof i&&((d=0|i)<0?(p+=h*(l-1),l=g(-l/d)):l=g(l/d),h*=d),new n(this.data,a,o,s,l,u,c,f,h,p)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],o[t],o[e],o[r],o[i],this.offset)},i.pick=function(t,r,n,i){var a=[],o=[],s=this.offset;return\"number\"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(a.push(this.shape[0]),o.push(this.stride[0])),\"number\"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),\"number\"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),\"number\"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,e[a.length+1])(this.data,a,o,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u,c,f){this.data=t,this.shape=[e,r,n,i,a],this.stride=[o,s,l,u,c],this.offset=0|f}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,\"order\",{get:r}),i.set=function(e,r,n,i,a,o){return\"generic\"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(e,r,n,i,a){return\"generic\"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,a){return new n(this.data,\"number\"!=typeof t||t<0?this.shape[0]:0|t,\"number\"!=typeof e||e<0?this.shape[1]:0|e,\"number\"!=typeof r||r<0?this.shape[2]:0|r,\"number\"!=typeof i||i<0?this.shape[3]:0|i,\"number\"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,a){var o=this.offset,s=0,l=this.shape[0],u=this.shape[1],c=this.shape[2],f=this.shape[3],h=this.shape[4],p=this.stride[0],d=this.stride[1],g=this.stride[2],v=this.stride[3],m=this.stride[4];return\"number\"==typeof t&&t>=0&&(o+=p*(s=0|t),l-=s),\"number\"==typeof e&&e>=0&&(o+=d*(s=0|e),u-=s),\"number\"==typeof r&&r>=0&&(o+=g*(s=0|r),c-=s),\"number\"==typeof i&&i>=0&&(o+=v*(s=0|i),f-=s),\"number\"==typeof a&&a>=0&&(o+=m*(s=0|a),h-=s),new n(this.data,l,u,c,f,h,p,d,g,v,m,o)},i.step=function(t,e,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.shape[3],c=this.shape[4],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3],g=this.stride[4],v=this.offset,m=0,y=Math.ceil;return\"number\"==typeof t&&((m=0|t)<0?(v+=f*(o-1),o=y(-o/m)):o=y(o/m),f*=m),\"number\"==typeof e&&((m=0|e)<0?(v+=h*(s-1),s=y(-s/m)):s=y(s/m),h*=m),\"number\"==typeof r&&((m=0|r)<0?(v+=p*(l-1),l=y(-l/m)):l=y(l/m),p*=m),\"number\"==typeof i&&((m=0|i)<0?(v+=d*(u-1),u=y(-u/m)):u=y(u/m),d*=m),\"number\"==typeof a&&((m=0|a)<0?(v+=g*(c-1),c=y(-c/m)):c=y(c/m),g*=m),new n(this.data,o,s,l,u,c,f,h,p,d,g,v)},i.transpose=function(t,e,r,i,a){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],o[a],s[t],s[e],s[r],s[i],s[a],this.offset)},i.pick=function(t,r,n,i,a){var o=[],s=[],l=this.offset;return\"number\"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(o.push(this.shape[0]),s.push(this.stride[0])),\"number\"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),\"number\"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),\"number\"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),\"number\"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,e[o.length+1])(this.data,o,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?\"T\":String(e),n=s[r];return-1===e?n(t):0===e?n(t,u[t][0]):n(t,u[t],o)}var u={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(t,e,r,a){if(void 0===t)return(0,u.array[0])([]);\"number\"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,c=1;s>=0;--s)r[s]=c,c*=e[s]}if(void 0===a)for(a=0,s=0;s<o;++s)r[s]<0&&(a-=(e[s]-1)*r[s]);for(var f=function(t){if(n(t))return\"buffer\";if(i)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 Uint8ClampedArray]\":return\"uint8_clamped\";case\"[object Uint8Array]\":return\"uint8\";case\"[object Uint16Array]\":return\"uint16\";case\"[object Uint32Array]\":return\"uint32\";case\"[object BigInt64Array]\":return\"bigint64\";case\"[object BigUint64Array]\":return\"biguint64\"}return Array.isArray(t)?\"array\":\"generic\"}(t),h=u[f];h.length<=o+1;)h.push(l(f,h.length-1));return(0,h[o+1])(t,e,r,a)}},{\"is-buffer\":237}],260:[function(t,e,r){\"use strict\";var n=t(\"double-bits\"),i=Math.pow(2,-1074),a=-1>>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);return e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},{\"double-bits\":64}],261:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o)i[o]=[0,0,0];for(o=0;o<t.length;++o)for(var s=t[o],l=0,u=s[s.length-1],c=s[0],f=0;f<s.length;++f){l=u,u=c,c=s[(f+1)%s.length];for(var h=e[l],p=e[u],d=e[c],g=new Array(3),v=0,m=new Array(3),y=0,x=0;x<3;++x)g[x]=h[x]-p[x],v+=g[x]*g[x],m[x]=d[x]-p[x],y+=m[x]*m[x];if(v*y>a){var b=i[u],_=1/Math.sqrt(v*y);for(x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(m[w]*g[k]-m[k]*g[w])}}}for(o=0;o<n;++o){b=i[o];var T=0;for(x=0;x<3;++x)T+=b[x]*b[x];if(T>a)for(_=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o){for(var s=t[o],l=new Array(3),u=0;u<3;++u)l[u]=e[s[u]];var c=new Array(3),f=new Array(3);for(u=0;u<3;++u)c[u]=l[1][u]-l[0][u],f[u]=l[2][u]-l[0][u];var h=new Array(3),p=0;for(u=0;u<3;++u){var d=(u+1)%3,g=(u+2)%3;h[u]=c[d]*f[g]-c[g]*f[d],p+=h[u]*h[u]}for(p=p>a?1/Math.sqrt(p):0,u=0;u<3;++u)h[u]*=p;i[o]=h}return i}},{}],262:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a,o,s,l,u){var c=e+a+u;if(f>0){var f=Math.sqrt(c+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,u);f=Math.sqrt(2*h-c+1),e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],263:[function(t,e,r){\"use strict\";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),c(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),(\"eye\"in t||\"up\"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=t(\"filtered-vector\"),i=t(\"gl-mat4/lookAt\"),a=t(\"gl-mat4/fromQuat\"),o=t(\"gl-mat4/invert\"),s=t(\"./lib/quatFromFrame\");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function c(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=u(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;c(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,f=0;f<3;++f)u+=r[l+4*f]*i[f];r[12+l]=-u}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],u=l(a,o,s);a/=u,o/=u,s/=u;var c=i[0],f=i[4],h=i[8],p=c*a+f*o+h*s,d=l(c-=a*p,f-=o*p,h-=s*p);c/=d,f/=d,h/=d;var g=i[2],v=i[6],m=i[10],y=g*a+v*o+m*s,x=g*c+v*f+m*h,b=l(g-=y*a+x*c,v-=y*o+x*f,m-=y*s+x*h);g/=b,v/=b,m/=b;var _=c*e+a*r,w=f*e+o*r,k=h*e+s*r;this.center.move(t,_,w,k);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(t,Math.log(T))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],c=i[1],f=i[5],h=i[9],p=i[2],d=i[6],g=i[10],v=e*a+r*c,m=e*o+r*f,y=e*s+r*h,x=-(d*y-g*m),b=-(g*v-p*y),_=-(p*m-d*v),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),k=u(x,b,_,w);k>1e-6?(x/=k,b/=k,_/=k,w/=k):(x=b=_=0,w=1);var T=this.computedRotation,M=T[0],A=T[1],S=T[2],E=T[3],C=M*w+E*x+A*_-S*b,L=A*w+E*b+S*x-M*_,P=S*w+E*_+M*b-A*x,O=E*w-M*x-A*b-S*_;if(n){x=p,b=d,_=g;var I=Math.sin(n)/l(x,b,_);x*=I,b*=I,_*=I,O=O*(w=Math.cos(e))-(C=C*w+O*x+L*_-P*b)*x-(L=L*w+O*b+P*x-C*_)*b-(P=P*w+O*_+C*b-L*x)*_}var D=u(C,L,P,O);D>1e-6?(C/=D,L/=D,P/=D,O/=D):(C=L=P=0,O=1),this.rotation.set(t,C,L,P,O)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),c(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,u=0;u<3;++u)l+=Math.pow(r[u]-e[u],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),c(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,u=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,u-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{\"./lib/quatFromFrame\":262,\"filtered-vector\":68,\"gl-mat4/fromQuat\":95,\"gl-mat4/invert\":98,\"gl-mat4/lookAt\":99}],264:[function(t,e,r){\"use strict\";var n=t(\"repeat-string\");e.exports=function(t,e,r){return n(r=void 0!==r?r+\"\":\" \",e)+t}},{\"repeat-string\":277}],265:[function(t,e,r){e.exports=function(t,e){e||(e=[0,\"\"]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\\d.\\-\\+]*\\s*(.*)/)[1]||\"\",e}},{}],266:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o<r;++o)a[0][o]=[],a[1][o]=[];for(o=0;o<i;++o){var s=t[o];a[0][s[0]].push(s),a[1][s[1]].push(s)}var l=[];for(o=0;o<r;++o)a[0][o].length+a[1][o].length===0&&l.push([o]);function u(t,e){var r=a[e][t[e]];r.splice(r.indexOf(t),1)}function c(t,r,i){for(var o,s,l,c=0;c<2;++c)if(a[c][r].length>0){o=a[c][r][0],l=c;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],p=0;p<h.length;++p){var d=h[p],g=d[1^f];n(e[t],e[r],e[s],e[g])>0&&(o=d,s=g,l=f)}return i||o&&u(o,l),s}function f(t,r){var i=a[r][t][0],o=[t];u(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=c(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=c(l,f,!0);if(n(e[l],e[f],e[h],e[p])<0)break;o.push(t),s=c(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(o=0;o<r;++o)for(var p=0;p<2;++p){for(var d=[];a[p][o].length>0;){a[0][o].length;var g=f(o,p);h(0,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t(\"compare-angle\")},{\"compare-angle\":54}],267:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s<e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l<=1&&o.push(s)}for(;o.length>0;){i[p=o.pop()]=!1;var u=r[p];for(s=0;s<u.length;++s){var c=u[s];0==--a[c]&&o.push(c)}}var f=new Array(e.length),h=[];for(s=0;s<e.length;++s)if(i[s]){var p=h.length;f[s]=p,h.push(e[s])}else f[s]=-1;var d=[];for(s=0;s<t.length;++s){var g=t[s];i[g[0]]&&i[g[1]]&&d.push([f[g[0]],f[g[1]]])}return[d,h]};var n=t(\"edges-to-adjacency-list\")},{\"edges-to-adjacency-list\":66}],268:[function(t,e,r){\"use strict\";e.exports=function(t,e){t=(F=u(t,e))[0];for(var r=(e=F[1]).length,f=(t.length,n(t,e.length)),h=0;h<r;++h)if(f[h].length%2==1)throw new Error(\"planar-graph-to-polyline: graph must be manifold\");var p=i(t,e),d=(p=p.filter((function(t){for(var r=t.length,n=[0],i=0;i<r;++i){var a=e[t[i]],l=e[t[(i+1)%r]],u=o(-a[0],a[1]),c=o(-a[0],l[1]),f=o(l[0],a[1]),h=o(l[0],l[1]);n=s(n,s(s(u,c),s(f,h)))}return n[n.length-1]>0}))).length,g=new Array(d),v=new Array(d);for(h=0;h<d;++h){g[h]=h;var m=new Array(d),y=p[h].map((function(t){return e[t]})),x=a([y]),b=0;t:for(var _=0;_<d;++_)if(m[_]=0,h!==_){for(var w=(H=p[_]).length,k=0;k<w;++k){var T=x(e[H[k]]);if(0!==T){T<0&&(m[_]=1,b+=1);continue t}}m[_]=1,b+=1}v[h]=[b,h,m]}for(v.sort((function(t,e){return e[0]-t[0]})),h=0;h<d;++h){var M=(m=v[h])[1],A=m[2];for(_=0;_<d;++_)A[_]&&(g[_]=M)}var S=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=[];return e}(d);for(h=0;h<d;++h)S[h].push(g[h]),S[g[h]].push(h);var E={},C=c(r,!1);for(h=0;h<d;++h)for(w=(H=p[h]).length,_=0;_<w;++_){var L=H[_],P=H[(_+1)%w],O=Math.min(L,P)+\":\"+Math.max(L,P);if(O in E){var I=E[O];S[I].push(h),S[h].push(I),C[L]=C[P]=!0}else E[O]=h}function D(t){for(var e=t.length,r=0;r<e;++r)if(!C[t[r]])return!1;return!0}var z=[],R=c(d,-1);for(h=0;h<d;++h)g[h]!==h||D(p[h])?R[h]=-1:(z.push(h),R[h]=0);for(var F=[];z.length>0;){var N=z.pop(),B=S[N];l(B,(function(t,e){return t-e}));var j,U=B.length,V=R[N];for(0===V&&(j=[H=p[N]]),h=0;h<U;++h){var H,q=B[h];R[q]>=0||(R[q]=1^V,z.push(q),0===V&&(D(H=p[q])||(H.reverse(),j.push(H))))}0===V&&F.push(j)}return F};var n=t(\"edges-to-adjacency-list\"),i=t(\"planar-dual\"),a=t(\"point-in-big-polygon\"),o=t(\"two-product\"),s=t(\"robust-sum\"),l=t(\"uniq\"),u=t(\"./lib/trim-leaves\");function c(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}},{\"./lib/trim-leaves\":267,\"edges-to-adjacency-list\":66,\"planar-dual\":266,\"point-in-big-polygon\":269,\"robust-sum\":289,\"two-product\":306,uniq:310}],269:[function(t,e,r){e.exports=function(t){for(var e=t.length,r=[],a=[],s=0;s<e;++s)for(var c=t[s],f=c.length,h=f-1,p=0;p<f;h=p++){var d=c[h],g=c[p];d[0]===g[0]?a.push([d,g]):r.push([d,g])}if(0===r.length)return 0===a.length?u:(v=l(a),function(t){return v(t[0],t[1])?0:1});var v,m=i(r),y=function(t,e){return function(r){var i=o.le(e,r[0]);if(i<0)return 1;var a=t[i];if(!a){if(!(i>0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,u=n(r,l[0],l[1]);if(l[0][0]<l[1][0])if(u<0)a=a.left;else{if(!(u>0))return 0;s=-1,a=a.right}else if(u>0)a=a.left;else{if(!(u<0))return 0;s=1,a=a.right}}return s}}(m.slabs,m.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t(\"robust-orientation\")[3],i=t(\"slab-decomposition\"),a=t(\"interval-tree-1d\"),o=t(\"binary-search-bounds\");function s(){return!0}function l(t){for(var e={},r=0;r<t.length;++r){var n=t[r],i=n[0][0],o=n[0][1],l=n[1][1],u=[Math.min(o,l),Math.max(o,l)];i in e?e[i].push(u):e[i]=[u]}var c={},f=Object.keys(e);for(r=0;r<f.length;++r){var h=e[f[r]];c[f[r]]=a(h)}return function(t){return function(e,r){var n=t[e];return!!n&&!!n.queryPoint(r,s)}}(c)}function u(t){return 1}},{\"binary-search-bounds\":31,\"interval-tree-1d\":234,\"robust-orientation\":284,\"slab-decomposition\":299}],270:[function(t,e,r){\"use strict\";var n=new Float64Array(4),i=new Float64Array(4),a=new Float64Array(4);e.exports=function(t,e,r,o,s){n.length<o.length&&(n=new Float64Array(o.length),i=new Float64Array(o.length),a=new Float64Array(o.length));for(var l=0;l<o.length;++l)n[l]=t[l]-o[l],i[l]=e[l]-t[l],a[l]=r[l]-t[l];var u=0,c=0,f=0,h=0,p=0,d=0;for(l=0;l<o.length;++l){var g=i[l],v=a[l],m=n[l];u+=g*g,c+=g*v,f+=v*v,h+=m*g,p+=m*v,d+=m*m}var y,x,b,_,w,k=Math.abs(u*f-c*c),T=c*p-f*h,M=c*h-u*p;if(T+M<=k)if(T<0)M<0&&h<0?(M=0,-h>=u?(T=1,y=u+2*h+d):y=h*(T=-h/u)+d):(T=0,p>=0?(M=0,y=d):-p>=f?(M=1,y=f+2*p+d):y=p*(M=-p/f)+d);else if(M<0)M=0,h>=0?(T=0,y=d):-h>=u?(T=1,y=u+2*h+d):y=h*(T=-h/u)+d;else{var A=1/k;y=(T*=A)*(u*T+c*(M*=A)+2*h)+M*(c*T+f*M+2*p)+d}else T<0?(b=f+p)>(x=c+h)?(_=b-x)>=(w=u-2*c+f)?(T=1,M=0,y=u+2*h+d):y=(T=_/w)*(u*T+c*(M=1-T)+2*h)+M*(c*T+f*M+2*p)+d:(T=0,b<=0?(M=1,y=f+2*p+d):p>=0?(M=0,y=d):y=p*(M=-p/f)+d):M<0?(b=u+h)>(x=c+p)?(_=b-x)>=(w=u-2*c+f)?(M=1,T=0,y=f+2*p+d):y=(T=1-(M=_/w))*(u*T+c*M+2*h)+M*(c*T+f*M+2*p)+d:(M=0,b<=0?(T=1,y=u+2*h+d):h>=0?(T=0,y=d):y=h*(T=-h/u)+d):(_=f+p-c-h)<=0?(T=0,M=1,y=f+2*p+d):_>=(w=u-2*c+f)?(T=1,M=0,y=u+2*h+d):y=(T=_/w)*(u*T+c*(M=1-T)+2*h)+M*(c*T+f*M+2*p)+d;var S=1-T-M;for(l=0;l<o.length;++l)s[l]=S*t[l]+T*e[l]+M*r[l];return y<0?0:y}},{}],271:[function(t,e,r){e.exports=t(\"gl-quat/slerp\")},{\"gl-quat/slerp\":124}],272:[function(t,e,r){\"use strict\";var n=t(\"big-rat/add\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\"big-rat/add\":15}],273:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=new Array(t.length),r=0;r<t.length;++r)e[r]=n(t[r]);return e};var n=t(\"big-rat\")},{\"big-rat\":18}],274:[function(t,e,r){\"use strict\";var n=t(\"big-rat\"),i=t(\"big-rat/mul\");e.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s<a;++s)o[s]=i(t[s],r);return o}},{\"big-rat\":18,\"big-rat/mul\":27}],275:[function(t,e,r){\"use strict\";var n=t(\"big-rat/sub\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\"big-rat/sub\":29}],276:[function(t,e,r){\"use strict\";var n=t(\"compare-cell\"),i=t(\"compare-oriented-cell\"),a=t(\"cell-orientation\");e.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o<e;++o){var s=t[o],l=a(s);if(0!==l){if(r>0){var u=t[r-1];if(0===n(s,u)&&a(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{\"cell-orientation\":47,\"compare-cell\":56,\"compare-oriented-cell\":57}],277:[function(t,e,r){\"use strict\";var n,i=\"\";e.exports=function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"expected a string\");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||void 0===n)n=t,i=\"\";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i=(i+=t).substr(0,r)}},{}],278:[function(t,e,n){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==r?r:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],279:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r;(l=(s=t[i])-((r=a+s)-a))&&(t[--n]=r,r=l)}var o=0;for(i=n;i<e;++i){var s,l;(l=(s=r)-((r=(a=t[i])+s)-a))&&(t[o++]=l)}return t[o++]=r,t.length=o,t}},{}],280:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"robust-sum\"),a=t(\"robust-scale\"),o=t(\"robust-compress\");function s(t,e,r,n){return function(e){return n(t(r(e[0][0],e[1][1]),r(-e[0][1],e[1][0])))}}function l(t,e,r,n){return function(i){return n(t(e(t(r(i[1][1],i[2][2]),r(-i[1][2],i[2][1])),i[0][0]),t(e(t(r(i[1][0],i[2][2]),r(-i[1][2],i[2][0])),-i[0][1]),e(t(r(i[1][0],i[2][1]),r(-i[1][1],i[2][0])),i[0][2]))))}}function u(t,e,r,n){return function(i){return n(t(t(e(t(e(t(r(i[2][2],i[3][3]),r(-i[2][3],i[3][2])),i[1][1]),t(e(t(r(i[2][1],i[3][3]),r(-i[2][3],i[3][1])),-i[1][2]),e(t(r(i[2][1],i[3][2]),r(-i[2][2],i[3][1])),i[1][3]))),i[0][0]),e(t(e(t(r(i[2][2],i[3][3]),r(-i[2][3],i[3][2])),i[1][0]),t(e(t(r(i[2][0],i[3][3]),r(-i[2][3],i[3][0])),-i[1][2]),e(t(r(i[2][0],i[3][2]),r(-i[2][2],i[3][0])),i[1][3]))),-i[0][1])),t(e(t(e(t(r(i[2][1],i[3][3]),r(-i[2][3],i[3][1])),i[1][0]),t(e(t(r(i[2][0],i[3][3]),r(-i[2][3],i[3][0])),-i[1][1]),e(t(r(i[2][0],i[3][1]),r(-i[2][1],i[3][0])),i[1][3]))),i[0][2]),e(t(e(t(r(i[2][1],i[3][2]),r(-i[2][2],i[3][1])),i[1][0]),t(e(t(r(i[2][0],i[3][2]),r(-i[2][2],i[3][0])),-i[1][1]),e(t(r(i[2][0],i[3][1]),r(-i[2][1],i[3][0])),i[1][2]))),-i[0][3]))))}}function c(t,e,r,n){return function(i){return n(t(t(e(t(t(e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][2]),t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),-i[2][3]),e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][4]))),i[1][1]),e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][3]),e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][4]))),-i[1][2])),t(e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][4]))),i[1][3]),e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][3]))),-i[1][4]))),i[0][0]),e(t(t(e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][2]),t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),-i[2][3]),e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][4]))),i[1][0]),e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][3]),e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),i[2][4]))),-i[1][2])),t(e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][4]))),i[1][3]),e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][3]))),-i[1][4]))),-i[0][1])),t(e(t(t(e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][3]),e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][4]))),i[1][0]),e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][3]),e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),i[2][4]))),-i[1][1])),t(e(t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][4]))),i[1][3]),e(t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][3]))),-i[1][4]))),i[0][2]),t(e(t(t(e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][4]))),i[1][0]),e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][4]))),-i[1][1])),t(e(t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][4]))),i[1][2]),e(t(e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][2]))),-i[1][4]))),-i[0][3]),e(t(t(e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][3]))),i[1][0]),e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][3]))),-i[1][1])),t(e(t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][3]))),i[1][2]),e(t(e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][2]))),-i[1][3]))),i[0][4])))))}}function f(t){return(2===t?s:3===t?l:4===t?u:5===t?c:void 0)(i,a,n,o)}var h=[function(){return[0]},function(t){return[t[0][0]]}];function p(t,e,r,n,i,a,o,s){return function(l){switch(l.length){case 0:return t(l);case 1:return e(l);case 2:return r(l);case 3:return n(l);case 4:return i(l);case 5:return a(l)}var u=o[l.length];return u||(u=o[l.length]=s(l.length)),u(l)}}!function(){for(;h.length<6;)h.push(f(h.length));e.exports=p.apply(void 0,h.concat([h,f]));for(var t=0;t<h.length;++t)e.exports[t]=h[t]}()},{\"robust-compress\":279,\"robust-scale\":286,\"robust-sum\":289,\"two-product\":306}],281:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"robust-sum\");e.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a<t.length;++a)r=i(r,n(t[a],e[a]));return r}},{\"robust-sum\":289,\"two-product\":306}],282:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"robust-sum\"),a=t(\"robust-subtract\"),o=t(\"robust-scale\");function s(t){return(3===t?l:4===t?u:5===t?c:f)(i,a,n,o)}function l(t,e,r,n){return function(i,a,o){var s=r(i[0],i[0]),l=n(s,a[0]),u=n(s,o[0]),c=r(a[0],a[0]),f=n(c,i[0]),h=n(c,o[0]),p=r(o[0],o[0]),d=n(p,i[0]),g=n(p,a[0]),v=t(e(g,h),e(f,l)),m=e(d,u),y=e(v,m);return y[y.length-1]}}function u(t,e,r,n){return function(i,a,o,s){var l=t(r(i[0],i[0]),r(i[1],i[1])),u=n(l,a[0]),c=n(l,o[0]),f=n(l,s[0]),h=t(r(a[0],a[0]),r(a[1],a[1])),p=n(h,i[0]),d=n(h,o[0]),g=n(h,s[0]),v=t(r(o[0],o[0]),r(o[1],o[1])),m=n(v,i[0]),y=n(v,a[0]),x=n(v,s[0]),b=t(r(s[0],s[0]),r(s[1],s[1])),_=n(b,i[0]),w=n(b,a[0]),k=n(b,o[0]),T=t(t(n(e(k,x),a[1]),t(n(e(w,g),-o[1]),n(e(y,d),s[1]))),t(n(e(w,g),i[1]),t(n(e(_,f),-a[1]),n(e(p,u),s[1])))),M=t(t(n(e(k,x),i[1]),t(n(e(_,f),-o[1]),n(e(m,c),s[1]))),t(n(e(y,d),i[1]),t(n(e(m,c),-a[1]),n(e(p,u),o[1])))),A=e(T,M);return A[A.length-1]}}function c(t,e,r,n){return function(i,a,o,s,l){var u=t(r(i[0],i[0]),t(r(i[1],i[1]),r(i[2],i[2]))),c=n(u,a[0]),f=n(u,o[0]),h=n(u,s[0]),p=n(u,l[0]),d=t(r(a[0],a[0]),t(r(a[1],a[1]),r(a[2],a[2]))),g=n(d,i[0]),v=n(d,o[0]),m=n(d,s[0]),y=n(d,l[0]),x=t(r(o[0],o[0]),t(r(o[1],o[1]),r(o[2],o[2]))),b=n(x,i[0]),_=n(x,a[0]),w=n(x,s[0]),k=n(x,l[0]),T=t(r(s[0],s[0]),t(r(s[1],s[1]),r(s[2],s[2]))),M=n(T,i[0]),A=n(T,a[0]),S=n(T,o[0]),E=n(T,l[0]),C=t(r(l[0],l[0]),t(r(l[1],l[1]),r(l[2],l[2]))),L=n(C,i[0]),P=n(C,a[0]),O=n(C,o[0]),I=n(C,s[0]),D=t(t(t(n(t(n(e(I,E),o[1]),t(n(e(O,k),-s[1]),n(e(S,w),l[1]))),a[2]),t(n(t(n(e(I,E),a[1]),t(n(e(P,y),-s[1]),n(e(A,m),l[1]))),-o[2]),n(t(n(e(O,k),a[1]),t(n(e(P,y),-o[1]),n(e(_,v),l[1]))),s[2]))),t(n(t(n(e(S,w),a[1]),t(n(e(A,m),-o[1]),n(e(_,v),s[1]))),-l[2]),t(n(t(n(e(I,E),a[1]),t(n(e(P,y),-s[1]),n(e(A,m),l[1]))),i[2]),n(t(n(e(I,E),i[1]),t(n(e(L,p),-s[1]),n(e(M,h),l[1]))),-a[2])))),t(t(n(t(n(e(P,y),i[1]),t(n(e(L,p),-a[1]),n(e(g,c),l[1]))),s[2]),t(n(t(n(e(A,m),i[1]),t(n(e(M,h),-a[1]),n(e(g,c),s[1]))),-l[2]),n(t(n(e(S,w),a[1]),t(n(e(A,m),-o[1]),n(e(_,v),s[1]))),i[2]))),t(n(t(n(e(S,w),i[1]),t(n(e(M,h),-o[1]),n(e(b,f),s[1]))),-a[2]),t(n(t(n(e(A,m),i[1]),t(n(e(M,h),-a[1]),n(e(g,c),s[1]))),o[2]),n(t(n(e(_,v),i[1]),t(n(e(b,f),-a[1]),n(e(g,c),o[1]))),-s[2]))))),z=t(t(t(n(t(n(e(I,E),o[1]),t(n(e(O,k),-s[1]),n(e(S,w),l[1]))),i[2]),n(t(n(e(I,E),i[1]),t(n(e(L,p),-s[1]),n(e(M,h),l[1]))),-o[2])),t(n(t(n(e(O,k),i[1]),t(n(e(L,p),-o[1]),n(e(b,f),l[1]))),s[2]),n(t(n(e(S,w),i[1]),t(n(e(M,h),-o[1]),n(e(b,f),s[1]))),-l[2]))),t(t(n(t(n(e(O,k),a[1]),t(n(e(P,y),-o[1]),n(e(_,v),l[1]))),i[2]),n(t(n(e(O,k),i[1]),t(n(e(L,p),-o[1]),n(e(b,f),l[1]))),-a[2])),t(n(t(n(e(P,y),i[1]),t(n(e(L,p),-a[1]),n(e(g,c),l[1]))),o[2]),n(t(n(e(_,v),i[1]),t(n(e(b,f),-a[1]),n(e(g,c),o[1]))),-l[2])))),R=e(D,z);return R[R.length-1]}}function f(t,e,r,n){return function(i,a,o,s,l,u){var c=t(t(r(i[0],i[0]),r(i[1],i[1])),t(r(i[2],i[2]),r(i[3],i[3]))),f=n(c,a[0]),h=n(c,o[0]),p=n(c,s[0]),d=n(c,l[0]),g=n(c,u[0]),v=t(t(r(a[0],a[0]),r(a[1],a[1])),t(r(a[2],a[2]),r(a[3],a[3]))),m=n(v,i[0]),y=n(v,o[0]),x=n(v,s[0]),b=n(v,l[0]),_=n(v,u[0]),w=t(t(r(o[0],o[0]),r(o[1],o[1])),t(r(o[2],o[2]),r(o[3],o[3]))),k=n(w,i[0]),T=n(w,a[0]),M=n(w,s[0]),A=n(w,l[0]),S=n(w,u[0]),E=t(t(r(s[0],s[0]),r(s[1],s[1])),t(r(s[2],s[2]),r(s[3],s[3]))),C=n(E,i[0]),L=n(E,a[0]),P=n(E,o[0]),O=n(E,l[0]),I=n(E,u[0]),D=t(t(r(l[0],l[0]),r(l[1],l[1])),t(r(l[2],l[2]),r(l[3],l[3]))),z=n(D,i[0]),R=n(D,a[0]),F=n(D,o[0]),N=n(D,s[0]),B=n(D,u[0]),j=t(t(r(u[0],u[0]),r(u[1],u[1])),t(r(u[2],u[2]),r(u[3],u[3]))),U=n(j,i[0]),V=n(j,a[0]),H=n(j,o[0]),q=n(j,s[0]),G=n(j,l[0]),Y=t(t(t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(q,I),-l[1]),n(e(N,O),u[1]))),o[2]),n(t(n(e(G,B),o[1]),t(n(e(H,S),-l[1]),n(e(F,A),u[1]))),-s[2])),t(n(t(n(e(q,I),o[1]),t(n(e(H,S),-s[1]),n(e(P,M),u[1]))),l[2]),n(t(n(e(N,O),o[1]),t(n(e(F,A),-s[1]),n(e(P,M),l[1]))),-u[2]))),a[3]),t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(q,I),-l[1]),n(e(N,O),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(V,_),-l[1]),n(e(R,b),u[1]))),-s[2])),t(n(t(n(e(q,I),a[1]),t(n(e(V,_),-s[1]),n(e(L,x),u[1]))),l[2]),n(t(n(e(N,O),a[1]),t(n(e(R,b),-s[1]),n(e(L,x),l[1]))),-u[2]))),-o[3]),n(t(t(n(t(n(e(G,B),o[1]),t(n(e(H,S),-l[1]),n(e(F,A),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(V,_),-l[1]),n(e(R,b),u[1]))),-o[2])),t(n(t(n(e(H,S),a[1]),t(n(e(V,_),-o[1]),n(e(T,y),u[1]))),l[2]),n(t(n(e(F,A),a[1]),t(n(e(R,b),-o[1]),n(e(T,y),l[1]))),-u[2]))),s[3]))),t(t(n(t(t(n(t(n(e(q,I),o[1]),t(n(e(H,S),-s[1]),n(e(P,M),u[1]))),a[2]),n(t(n(e(q,I),a[1]),t(n(e(V,_),-s[1]),n(e(L,x),u[1]))),-o[2])),t(n(t(n(e(H,S),a[1]),t(n(e(V,_),-o[1]),n(e(T,y),u[1]))),s[2]),n(t(n(e(P,M),a[1]),t(n(e(L,x),-o[1]),n(e(T,y),s[1]))),-u[2]))),-l[3]),n(t(t(n(t(n(e(N,O),o[1]),t(n(e(F,A),-s[1]),n(e(P,M),l[1]))),a[2]),n(t(n(e(N,O),a[1]),t(n(e(R,b),-s[1]),n(e(L,x),l[1]))),-o[2])),t(n(t(n(e(F,A),a[1]),t(n(e(R,b),-o[1]),n(e(T,y),l[1]))),s[2]),n(t(n(e(P,M),a[1]),t(n(e(L,x),-o[1]),n(e(T,y),s[1]))),-l[2]))),u[3])),t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(q,I),-l[1]),n(e(N,O),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(V,_),-l[1]),n(e(R,b),u[1]))),-s[2])),t(n(t(n(e(q,I),a[1]),t(n(e(V,_),-s[1]),n(e(L,x),u[1]))),l[2]),n(t(n(e(N,O),a[1]),t(n(e(R,b),-s[1]),n(e(L,x),l[1]))),-u[2]))),i[3]),n(t(t(n(t(n(e(G,B),s[1]),t(n(e(q,I),-l[1]),n(e(N,O),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,g),-l[1]),n(e(z,d),u[1]))),-s[2])),t(n(t(n(e(q,I),i[1]),t(n(e(U,g),-s[1]),n(e(C,p),u[1]))),l[2]),n(t(n(e(N,O),i[1]),t(n(e(z,d),-s[1]),n(e(C,p),l[1]))),-u[2]))),-a[3])))),t(t(t(n(t(t(n(t(n(e(G,B),a[1]),t(n(e(V,_),-l[1]),n(e(R,b),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,g),-l[1]),n(e(z,d),u[1]))),-a[2])),t(n(t(n(e(V,_),i[1]),t(n(e(U,g),-a[1]),n(e(m,f),u[1]))),l[2]),n(t(n(e(R,b),i[1]),t(n(e(z,d),-a[1]),n(e(m,f),l[1]))),-u[2]))),s[3]),n(t(t(n(t(n(e(q,I),a[1]),t(n(e(V,_),-s[1]),n(e(L,x),u[1]))),i[2]),n(t(n(e(q,I),i[1]),t(n(e(U,g),-s[1]),n(e(C,p),u[1]))),-a[2])),t(n(t(n(e(V,_),i[1]),t(n(e(U,g),-a[1]),n(e(m,f),u[1]))),s[2]),n(t(n(e(L,x),i[1]),t(n(e(C,p),-a[1]),n(e(m,f),s[1]))),-u[2]))),-l[3])),t(n(t(t(n(t(n(e(N,O),a[1]),t(n(e(R,b),-s[1]),n(e(L,x),l[1]))),i[2]),n(t(n(e(N,O),i[1]),t(n(e(z,d),-s[1]),n(e(C,p),l[1]))),-a[2])),t(n(t(n(e(R,b),i[1]),t(n(e(z,d),-a[1]),n(e(m,f),l[1]))),s[2]),n(t(n(e(L,x),i[1]),t(n(e(C,p),-a[1]),n(e(m,f),s[1]))),-l[2]))),u[3]),n(t(t(n(t(n(e(q,I),o[1]),t(n(e(H,S),-s[1]),n(e(P,M),u[1]))),a[2]),n(t(n(e(q,I),a[1]),t(n(e(V,_),-s[1]),n(e(L,x),u[1]))),-o[2])),t(n(t(n(e(H,S),a[1]),t(n(e(V,_),-o[1]),n(e(T,y),u[1]))),s[2]),n(t(n(e(P,M),a[1]),t(n(e(L,x),-o[1]),n(e(T,y),s[1]))),-u[2]))),i[3]))),t(t(n(t(t(n(t(n(e(q,I),o[1]),t(n(e(H,S),-s[1]),n(e(P,M),u[1]))),i[2]),n(t(n(e(q,I),i[1]),t(n(e(U,g),-s[1]),n(e(C,p),u[1]))),-o[2])),t(n(t(n(e(H,S),i[1]),t(n(e(U,g),-o[1]),n(e(k,h),u[1]))),s[2]),n(t(n(e(P,M),i[1]),t(n(e(C,p),-o[1]),n(e(k,h),s[1]))),-u[2]))),-a[3]),n(t(t(n(t(n(e(q,I),a[1]),t(n(e(V,_),-s[1]),n(e(L,x),u[1]))),i[2]),n(t(n(e(q,I),i[1]),t(n(e(U,g),-s[1]),n(e(C,p),u[1]))),-a[2])),t(n(t(n(e(V,_),i[1]),t(n(e(U,g),-a[1]),n(e(m,f),u[1]))),s[2]),n(t(n(e(L,x),i[1]),t(n(e(C,p),-a[1]),n(e(m,f),s[1]))),-u[2]))),o[3])),t(n(t(t(n(t(n(e(H,S),a[1]),t(n(e(V,_),-o[1]),n(e(T,y),u[1]))),i[2]),n(t(n(e(H,S),i[1]),t(n(e(U,g),-o[1]),n(e(k,h),u[1]))),-a[2])),t(n(t(n(e(V,_),i[1]),t(n(e(U,g),-a[1]),n(e(m,f),u[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(k,h),-a[1]),n(e(m,f),o[1]))),-u[2]))),-s[3]),n(t(t(n(t(n(e(P,M),a[1]),t(n(e(L,x),-o[1]),n(e(T,y),s[1]))),i[2]),n(t(n(e(P,M),i[1]),t(n(e(C,p),-o[1]),n(e(k,h),s[1]))),-a[2])),t(n(t(n(e(L,x),i[1]),t(n(e(C,p),-a[1]),n(e(m,f),s[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(k,h),-a[1]),n(e(m,f),o[1]))),-s[2]))),u[3]))))),W=t(t(t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(q,I),-l[1]),n(e(N,O),u[1]))),o[2]),n(t(n(e(G,B),o[1]),t(n(e(H,S),-l[1]),n(e(F,A),u[1]))),-s[2])),t(n(t(n(e(q,I),o[1]),t(n(e(H,S),-s[1]),n(e(P,M),u[1]))),l[2]),n(t(n(e(N,O),o[1]),t(n(e(F,A),-s[1]),n(e(P,M),l[1]))),-u[2]))),i[3]),t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(q,I),-l[1]),n(e(N,O),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,g),-l[1]),n(e(z,d),u[1]))),-s[2])),t(n(t(n(e(q,I),i[1]),t(n(e(U,g),-s[1]),n(e(C,p),u[1]))),l[2]),n(t(n(e(N,O),i[1]),t(n(e(z,d),-s[1]),n(e(C,p),l[1]))),-u[2]))),-o[3]),n(t(t(n(t(n(e(G,B),o[1]),t(n(e(H,S),-l[1]),n(e(F,A),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,g),-l[1]),n(e(z,d),u[1]))),-o[2])),t(n(t(n(e(H,S),i[1]),t(n(e(U,g),-o[1]),n(e(k,h),u[1]))),l[2]),n(t(n(e(F,A),i[1]),t(n(e(z,d),-o[1]),n(e(k,h),l[1]))),-u[2]))),s[3]))),t(t(n(t(t(n(t(n(e(q,I),o[1]),t(n(e(H,S),-s[1]),n(e(P,M),u[1]))),i[2]),n(t(n(e(q,I),i[1]),t(n(e(U,g),-s[1]),n(e(C,p),u[1]))),-o[2])),t(n(t(n(e(H,S),i[1]),t(n(e(U,g),-o[1]),n(e(k,h),u[1]))),s[2]),n(t(n(e(P,M),i[1]),t(n(e(C,p),-o[1]),n(e(k,h),s[1]))),-u[2]))),-l[3]),n(t(t(n(t(n(e(N,O),o[1]),t(n(e(F,A),-s[1]),n(e(P,M),l[1]))),i[2]),n(t(n(e(N,O),i[1]),t(n(e(z,d),-s[1]),n(e(C,p),l[1]))),-o[2])),t(n(t(n(e(F,A),i[1]),t(n(e(z,d),-o[1]),n(e(k,h),l[1]))),s[2]),n(t(n(e(P,M),i[1]),t(n(e(C,p),-o[1]),n(e(k,h),s[1]))),-l[2]))),u[3])),t(n(t(t(n(t(n(e(G,B),o[1]),t(n(e(H,S),-l[1]),n(e(F,A),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(V,_),-l[1]),n(e(R,b),u[1]))),-o[2])),t(n(t(n(e(H,S),a[1]),t(n(e(V,_),-o[1]),n(e(T,y),u[1]))),l[2]),n(t(n(e(F,A),a[1]),t(n(e(R,b),-o[1]),n(e(T,y),l[1]))),-u[2]))),i[3]),n(t(t(n(t(n(e(G,B),o[1]),t(n(e(H,S),-l[1]),n(e(F,A),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,g),-l[1]),n(e(z,d),u[1]))),-o[2])),t(n(t(n(e(H,S),i[1]),t(n(e(U,g),-o[1]),n(e(k,h),u[1]))),l[2]),n(t(n(e(F,A),i[1]),t(n(e(z,d),-o[1]),n(e(k,h),l[1]))),-u[2]))),-a[3])))),t(t(t(n(t(t(n(t(n(e(G,B),a[1]),t(n(e(V,_),-l[1]),n(e(R,b),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,g),-l[1]),n(e(z,d),u[1]))),-a[2])),t(n(t(n(e(V,_),i[1]),t(n(e(U,g),-a[1]),n(e(m,f),u[1]))),l[2]),n(t(n(e(R,b),i[1]),t(n(e(z,d),-a[1]),n(e(m,f),l[1]))),-u[2]))),o[3]),n(t(t(n(t(n(e(H,S),a[1]),t(n(e(V,_),-o[1]),n(e(T,y),u[1]))),i[2]),n(t(n(e(H,S),i[1]),t(n(e(U,g),-o[1]),n(e(k,h),u[1]))),-a[2])),t(n(t(n(e(V,_),i[1]),t(n(e(U,g),-a[1]),n(e(m,f),u[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(k,h),-a[1]),n(e(m,f),o[1]))),-u[2]))),-l[3])),t(n(t(t(n(t(n(e(F,A),a[1]),t(n(e(R,b),-o[1]),n(e(T,y),l[1]))),i[2]),n(t(n(e(F,A),i[1]),t(n(e(z,d),-o[1]),n(e(k,h),l[1]))),-a[2])),t(n(t(n(e(R,b),i[1]),t(n(e(z,d),-a[1]),n(e(m,f),l[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(k,h),-a[1]),n(e(m,f),o[1]))),-l[2]))),u[3]),n(t(t(n(t(n(e(N,O),o[1]),t(n(e(F,A),-s[1]),n(e(P,M),l[1]))),a[2]),n(t(n(e(N,O),a[1]),t(n(e(R,b),-s[1]),n(e(L,x),l[1]))),-o[2])),t(n(t(n(e(F,A),a[1]),t(n(e(R,b),-o[1]),n(e(T,y),l[1]))),s[2]),n(t(n(e(P,M),a[1]),t(n(e(L,x),-o[1]),n(e(T,y),s[1]))),-l[2]))),i[3]))),t(t(n(t(t(n(t(n(e(N,O),o[1]),t(n(e(F,A),-s[1]),n(e(P,M),l[1]))),i[2]),n(t(n(e(N,O),i[1]),t(n(e(z,d),-s[1]),n(e(C,p),l[1]))),-o[2])),t(n(t(n(e(F,A),i[1]),t(n(e(z,d),-o[1]),n(e(k,h),l[1]))),s[2]),n(t(n(e(P,M),i[1]),t(n(e(C,p),-o[1]),n(e(k,h),s[1]))),-l[2]))),-a[3]),n(t(t(n(t(n(e(N,O),a[1]),t(n(e(R,b),-s[1]),n(e(L,x),l[1]))),i[2]),n(t(n(e(N,O),i[1]),t(n(e(z,d),-s[1]),n(e(C,p),l[1]))),-a[2])),t(n(t(n(e(R,b),i[1]),t(n(e(z,d),-a[1]),n(e(m,f),l[1]))),s[2]),n(t(n(e(L,x),i[1]),t(n(e(C,p),-a[1]),n(e(m,f),s[1]))),-l[2]))),o[3])),t(n(t(t(n(t(n(e(F,A),a[1]),t(n(e(R,b),-o[1]),n(e(T,y),l[1]))),i[2]),n(t(n(e(F,A),i[1]),t(n(e(z,d),-o[1]),n(e(k,h),l[1]))),-a[2])),t(n(t(n(e(R,b),i[1]),t(n(e(z,d),-a[1]),n(e(m,f),l[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(k,h),-a[1]),n(e(m,f),o[1]))),-l[2]))),-s[3]),n(t(t(n(t(n(e(P,M),a[1]),t(n(e(L,x),-o[1]),n(e(T,y),s[1]))),i[2]),n(t(n(e(P,M),i[1]),t(n(e(C,p),-o[1]),n(e(k,h),s[1]))),-a[2])),t(n(t(n(e(L,x),i[1]),t(n(e(C,p),-a[1]),n(e(m,f),s[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(k,h),-a[1]),n(e(m,f),o[1]))),-s[2]))),l[3]))))),X=e(Y,W);return X[X.length-1]}}var h=[function(){return 0},function(){return 0},function(){return 0}];function p(t){var e=h[t.length];return e||(e=h[t.length]=s(t.length)),e.apply(void 0,t)}function d(t,e,r,n,i,a,o,s){return function(e,r,l,u,c,f){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,l);case 4:return a(e,r,l,u);case 5:return o(e,r,l,u,c);case 6:return s(e,r,l,u,c,f)}for(var h=new Array(arguments.length),p=0;p<arguments.length;++p)h[p]=arguments[p];return t(h)}}!function(){for(;h.length<=6;)h.push(s(h.length));e.exports=d.apply(void 0,[p].concat(h));for(var t=0;t<=6;++t)e.exports[t]=h[t]}()},{\"robust-scale\":286,\"robust-subtract\":288,\"robust-sum\":289,\"two-product\":306}],283:[function(t,e,r){\"use strict\";var n=t(\"robust-determinant\");function i(t){return(2===t?a:3===t?o:4===t?s:5===t?l:u)(t<6?n[t]:n)}function a(t){return function(e,r){return[t([[+r[0],+e[0][1]],[+r[1],+e[1][1]]]),t([[+e[0][0],+r[0]],[+e[1][0],+r[1]]]),t(e)]}}function o(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2]],[+r[1],+e[1][1],+e[1][2]],[+r[2],+e[2][1],+e[2][2]]]),t([[+e[0][0],+r[0],+e[0][2]],[+e[1][0],+r[1],+e[1][2]],[+e[2][0],+r[2],+e[2][2]]]),t([[+e[0][0],+e[0][1],+r[0]],[+e[1][0],+e[1][1],+r[1]],[+e[2][0],+e[2][1],+r[2]]]),t(e)]}}function s(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2],+e[0][3]],[+r[1],+e[1][1],+e[1][2],+e[1][3]],[+r[2],+e[2][1],+e[2][2],+e[2][3]],[+r[3],+e[3][1],+e[3][2],+e[3][3]]]),t([[+e[0][0],+r[0],+e[0][2],+e[0][3]],[+e[1][0],+r[1],+e[1][2],+e[1][3]],[+e[2][0],+r[2],+e[2][2],+e[2][3]],[+e[3][0],+r[3],+e[3][2],+e[3][3]]]),t([[+e[0][0],+e[0][1],+r[0],+e[0][3]],[+e[1][0],+e[1][1],+r[1],+e[1][3]],[+e[2][0],+e[2][1],+r[2],+e[2][3]],[+e[3][0],+e[3][1],+r[3],+e[3][3]]]),t([[+e[0][0],+e[0][1],+e[0][2],+r[0]],[+e[1][0],+e[1][1],+e[1][2],+r[1]],[+e[2][0],+e[2][1],+e[2][2],+r[2]],[+e[3][0],+e[3][1],+e[3][2],+r[3]]]),t(e)]}}function l(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2],+e[0][3],+e[0][4]],[+r[1],+e[1][1],+e[1][2],+e[1][3],+e[1][4]],[+r[2],+e[2][1],+e[2][2],+e[2][3],+e[2][4]],[+r[3],+e[3][1],+e[3][2],+e[3][3],+e[3][4]],[+r[4],+e[4][1],+e[4][2],+e[4][3],+e[4][4]]]),t([[+e[0][0],+r[0],+e[0][2],+e[0][3],+e[0][4]],[+e[1][0],+r[1],+e[1][2],+e[1][3],+e[1][4]],[+e[2][0],+r[2],+e[2][2],+e[2][3],+e[2][4]],[+e[3][0],+r[3],+e[3][2],+e[3][3],+e[3][4]],[+e[4][0],+r[4],+e[4][2],+e[4][3],+e[4][4]]]),t([[+e[0][0],+e[0][1],+r[0],+e[0][3],+e[0][4]],[+e[1][0],+e[1][1],+r[1],+e[1][3],+e[1][4]],[+e[2][0],+e[2][1],+r[2],+e[2][3],+e[2][4]],[+e[3][0],+e[3][1],+r[3],+e[3][3],+e[3][4]],[+e[4][0],+e[4][1],+r[4],+e[4][3],+e[4][4]]]),t([[+e[0][0],+e[0][1],+e[0][2],+r[0],+e[0][4]],[+e[1][0],+e[1][1],+e[1][2],+r[1],+e[1][4]],[+e[2][0],+e[2][1],+e[2][2],+r[2],+e[2][4]],[+e[3][0],+e[3][1],+e[3][2],+r[3],+e[3][4]],[+e[4][0],+e[4][1],+e[4][2],+r[4],+e[4][4]]]),t([[+e[0][0],+e[0][1],+e[0][2],+e[0][3],+r[0]],[+e[1][0],+e[1][1],+e[1][2],+e[1][3],+r[1]],[+e[2][0],+e[2][1],+e[2][2],+e[2][3],+r[2]],[+e[3][0],+e[3][1],+e[3][2],+e[3][3],+r[3]],[+e[4][0],+e[4][1],+e[4][2],+e[4][3],+r[4]]]),t(e)]}}function u(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2],+e[0][3],+e[0][4],+e[0][5]],[+r[1],+e[1][1],+e[1][2],+e[1][3],+e[1][4],+e[1][5]],[+r[2],+e[2][1],+e[2][2],+e[2][3],+e[2][4],+e[2][5]],[+r[3],+e[3][1],+e[3][2],+e[3][3],+e[3][4],+e[3][5]],[+r[4],+e[4][1],+e[4][2],+e[4][3],+e[4][4],+e[4][5]],[+r[5],+e[5][1],+e[5][2],+e[5][3],+e[5][4],+e[5][5]]]),t([[+e[0][0],+r[0],+e[0][2],+e[0][3],+e[0][4],+e[0][5]],[+e[1][0],+r[1],+e[1][2],+e[1][3],+e[1][4],+e[1][5]],[+e[2][0],+r[2],+e[2][2],+e[2][3],+e[2][4],+e[2][5]],[+e[3][0],+r[3],+e[3][2],+e[3][3],+e[3][4],+e[3][5]],[+e[4][0],+r[4],+e[4][2],+e[4][3],+e[4][4],+e[4][5]],[+e[5][0],+r[5],+e[5][2],+e[5][3],+e[5][4],+e[5][5]]]),t([[+e[0][0],+e[0][1],+r[0],+e[0][3],+e[0][4],+e[0][5]],[+e[1][0],+e[1][1],+r[1],+e[1][3],+e[1][4],+e[1][5]],[+e[2][0],+e[2][1],+r[2],+e[2][3],+e[2][4],+e[2][5]],[+e[3][0],+e[3][1],+r[3],+e[3][3],+e[3][4],+e[3][5]],[+e[4][0],+e[4][1],+r[4],+e[4][3],+e[4][4],+e[4][5]],[+e[5][0],+e[5][1],+r[5],+e[5][3],+e[5][4],+e[5][5]]]),t([[+e[0][0],+e[0][1],+e[0][2],+r[0],+e[0][4],+e[0][5]],[+e[1][0],+e[1][1],+e[1][2],+r[1],+e[1][4],+e[1][5]],[+e[2][0],+e[2][1],+e[2][2],+r[2],+e[2][4],+e[2][5]],[+e[3][0],+e[3][1],+e[3][2],+r[3],+e[3][4],+e[3][5]],[+e[4][0],+e[4][1],+e[4][2],+r[4],+e[4][4],+e[4][5]],[+e[5][0],+e[5][1],+e[5][2],+r[5],+e[5][4],+e[5][5]]]),t([[+e[0][0],+e[0][1],+e[0][2],+e[0][3],+r[0],+e[0][5]],[+e[1][0],+e[1][1],+e[1][2],+e[1][3],+r[1],+e[1][5]],[+e[2][0],+e[2][1],+e[2][2],+e[2][3],+r[2],+e[2][5]],[+e[3][0],+e[3][1],+e[3][2],+e[3][3],+r[3],+e[3][5]],[+e[4][0],+e[4][1],+e[4][2],+e[4][3],+r[4],+e[4][5]],[+e[5][0],+e[5][1],+e[5][2],+e[5][3],+r[5],+e[5][5]]]),t([[+e[0][0],+e[0][1],+e[0][2],+e[0][3],+e[0][4],+r[0]],[+e[1][0],+e[1][1],+e[1][2],+e[1][3],+e[1][4],+r[1]],[+e[2][0],+e[2][1],+e[2][2],+e[2][3],+e[2][4],+r[2]],[+e[3][0],+e[3][1],+e[3][2],+e[3][3],+e[3][4],+r[3]],[+e[4][0],+e[4][1],+e[4][2],+e[4][3],+e[4][4],+r[4]],[+e[5][0],+e[5][1],+e[5][2],+e[5][3],+e[5][4],+r[5]]]),t(e)]}}var c=[function(){return[[0]]},function(t,e){return[[e[0]],[t[0][0]]]}];function f(t,e,r,n,i,a,o,s){return function(l,u){switch(l.length){case 0:return t(l,u);case 1:return e(l,u);case 2:return r(l,u);case 3:return n(l,u);case 4:return i(l,u);case 5:return a(l,u)}var c=o[l.length];return c||(c=o[l.length]=s(l.length)),c(l,u)}}!function(){for(;c.length<6;)c.push(i(c.length));e.exports=f.apply(void 0,c.concat([c,i]));for(var t=0;t<6;++t)e.exports[t]=c[t]}()},{\"robust-determinant\":280}],284:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"robust-sum\"),a=t(\"robust-scale\"),o=t(\"robust-subtract\");function s(t,e,r,n){return function(r,i,a){var o=t(t(e(i[1],a[0]),e(-a[1],i[0])),t(e(r[1],i[0]),e(-i[1],r[0]))),s=t(e(r[1],a[0]),e(-a[1],r[0])),l=n(o,s);return l[l.length-1]}}function l(t,e,r,n){return function(i,a,o,s){var l=t(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),a[2]),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),s[2]))),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),s[2])))),u=t(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),s[2]))),t(r(t(e(a[1],o[0]),e(-o[1],a[0])),i[2]),t(r(t(e(i[1],o[0]),e(-o[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),o[2])))),c=n(l,u);return c[c.length-1]}}function u(t,e,r,n){return function(i,a,o,s,l){var u=t(t(t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),o[2]),t(r(t(e(o[1],l[0]),e(-l[1],o[0])),-s[2]),r(t(e(o[1],s[0]),e(-s[1],o[0])),l[2]))),a[3]),t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-s[2]),r(t(e(a[1],s[0]),e(-s[1],a[0])),l[2]))),-o[3]),r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),l[2]))),s[3]))),t(r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),a[2]),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),s[2]))),-l[3]),t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-s[2]),r(t(e(a[1],s[0]),e(-s[1],a[0])),l[2]))),i[3]),r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-s[2]),r(t(e(i[1],s[0]),e(-s[1],i[0])),l[2]))),-a[3])))),t(t(r(t(r(t(e(a[1],l[0]),e(-l[1],a[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),l[2]))),s[3]),t(r(t(r(t(e(a[1],s[0]),e(-s[1],a[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),s[2]))),-l[3]),r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),a[2]),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),s[2]))),i[3]))),t(r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),s[2]))),-a[3]),t(r(t(r(t(e(a[1],s[0]),e(-s[1],a[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),s[2]))),o[3]),r(t(r(t(e(a[1],o[0]),e(-o[1],a[0])),i[2]),t(r(t(e(i[1],o[0]),e(-o[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),o[2]))),-s[3]))))),c=t(t(t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),o[2]),t(r(t(e(o[1],l[0]),e(-l[1],o[0])),-s[2]),r(t(e(o[1],s[0]),e(-s[1],o[0])),l[2]))),i[3]),r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-s[2]),r(t(e(i[1],s[0]),e(-s[1],i[0])),l[2]))),-o[3])),t(r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),l[2]))),s[3]),r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),s[2]))),-l[3]))),t(t(r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),l[2]))),i[3]),r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),l[2]))),-a[3])),t(r(t(r(t(e(a[1],l[0]),e(-l[1],a[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),l[2]))),o[3]),r(t(r(t(e(a[1],o[0]),e(-o[1],a[0])),i[2]),t(r(t(e(i[1],o[0]),e(-o[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),o[2]))),-l[3])))),f=n(u,c);return f[f.length-1]}}function c(t){return(3===t?s:4===t?l:u)(i,n,a,o)}var f=c(3),h=c(4),p=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i>0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],f=e[2]-n[2],p=r[2]-n[2],d=a*u,g=o*l,v=o*s,m=i*u,y=i*l,x=a*s,b=c*(d-g)+f*(v-m)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(c)+(Math.abs(v)+Math.abs(m))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=c(t.length)),e.apply(void 0,t)}function g(t,e,r,n,i,a,o){return function(e,r,s,l,u){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,u)}for(var c=new Array(arguments.length),f=0;f<arguments.length;++f)c[f]=arguments[f];return t(c)}}!function(){for(;p.length<=5;)p.push(c(p.length));e.exports=g.apply(void 0,[d].concat(p));for(var t=0;t<=5;++t)e.exports[t]=p[t]}()},{\"robust-scale\":286,\"robust-subtract\":288,\"robust-sum\":289,\"two-product\":306}],285:[function(t,e,r){\"use strict\";var n=t(\"robust-sum\"),i=t(\"robust-scale\");e.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length<e.length)for(var a=0;a<t.length;++a)r=n(r,i(e,t[a]));else for(a=0;a<e.length;++a)r=n(r,i(t,e[a]));return r}},{\"robust-scale\":286,\"robust-sum\":289}],286:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"two-sum\");e.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],u=0;n(t[0],e,s),s[0]&&(o[u++]=s[0]);for(var c=1;c<r;++c){n(t[c],e,l);var f=s[1];i(f,l[0],s),s[0]&&(o[u++]=s[0]);var h=l[1],p=s[1],d=h+p,g=p-(d-h);s[1]=d,g&&(o[u++]=g)}return s[1]&&(o[u++]=s[1]),0===u&&(o[u++]=0),o.length=u,o}},{\"two-product\":306,\"two-sum\":307}],287:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a>0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),u=r[i],c=n[i],f=Math.min(u,c);if(Math.max(u,c)<s||l<f)return!1}return!0}(t,e,r,i))};var n=t(\"robust-orientation\")[3]},{\"robust-orientation\":284}],288:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],-e[0]);var i,a,o=new Array(r+n),s=0,l=0,u=0,c=Math.abs,f=t[l],h=c(f),p=-e[u],d=c(p);h<d?(a=f,(l+=1)<r&&(h=c(f=t[l]))):(a=p,(u+=1)<n&&(d=c(p=-e[u]))),l<r&&h<d||u>=n?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=p,(u+=1)<n&&(d=c(p=-e[u])));for(var g,v,m=i+a,y=m-i,x=a-y,b=x,_=m;l<r&&u<n;)h<d?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=p,(u+=1)<n&&(d=c(p=-e[u]))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(l+=1)<r&&(f=t[l]);for(;u<n;)(x=(a=b)-(y=(m=(i=p)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(u+=1)<n&&(p=-e[u]);return b&&(o[s++]=b),_&&(o[s++]=_),s||(o[s++]=0),o.length=s,o}},{}],289:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],e[0]);var i,a,o=new Array(r+n),s=0,l=0,u=0,c=Math.abs,f=t[l],h=c(f),p=e[u],d=c(p);h<d?(a=f,(l+=1)<r&&(h=c(f=t[l]))):(a=p,(u+=1)<n&&(d=c(p=e[u]))),l<r&&h<d||u>=n?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=p,(u+=1)<n&&(d=c(p=e[u])));for(var g,v,m=i+a,y=m-i,x=a-y,b=x,_=m;l<r&&u<n;)h<d?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=p,(u+=1)<n&&(d=c(p=e[u]))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(l+=1)<r&&(f=t[l]);for(;u<n;)(x=(a=b)-(y=(m=(i=p)+a)-i))&&(o[s++]=x),b=_-((g=_+m)-(v=g-_))+(m-v),_=g,(u+=1)<n&&(p=e[u]);return b&&(o[s++]=b),_&&(o[s++]=_),s||(o[s++]=0),o.length=s,o}},{}],290:[function(t,e,r){\"use strict\";e.exports=function(t){return i(n(t))};var n=t(\"boundary-cells\"),i=t(\"reduce-simplicial-complex\")},{\"boundary-cells\":34,\"reduce-simplicial-complex\":276}],291:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,s){if(r=r||0,void 0===s&&(s=function(t){for(var e=t.length,r=0,n=0;n<e;++n)r=0|Math.max(r,t[n].length);return r-1}(t)),0===t.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a<r;++a)n[a]=t[a]<e|0;return n}(e,+r),u=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,u=0;u<r;++u)for(var c=t[u],f=(e=c.length,0);f<e;++f)for(var h=0;h<f;++h){var p=c[h],d=c[f];s[l++]=0|Math.min(p,d),s[l++]=0|Math.max(p,d)}a(n(s,[l/2|0,2]));var g=2;for(u=2;u<l;u+=2)s[u-2]===s[u]&&s[u-1]===s[u+1]||(s[g++]=s[u],s[g++]=s[u+1]);return n(s,[g/2|0,2])}(t,s),c=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),u=0,c=0;c<s;++c){var f=o[2*c],h=o[2*c+1];if(r[f]!==r[h]){var p=e[f],d=e[h];o[2*u]=f,o[2*u+1]=h,l[u++]=(d-a)/(d-p)}}return t.shape[0]=u,n(l,[u])}(u,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s<n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o<l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}for(r[2*o+1]=n;++o<e;)r[2*o]=r[2*o+1]=n;return r}(u,0|e.length),h=o(s)(t,u.data,f,l),p=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i<e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(u),d=[].slice.call(c.data,0,c.shape[0]);return i.free(l),i.free(u.data),i.free(c.data),i.free(f),{cells:h,vertexIds:p,vertexWeights:d}};var n=t(\"ndarray\"),i=t(\"typedarray-pool\"),a=t(\"ndarray-sort\"),o=t(\"./lib/codegen\")},{\"./lib/codegen\":292,ndarray:259,\"ndarray-sort\":258,\"typedarray-pool\":308}],292:[function(t,e,r){\"use strict\";e.exports=function(t){return n[t]()};var n=[function(){return function(t,e,r,n){for(var i=t.length,a=0;a<i;++a)t[a].length;return[]}},function(){function t(t,e,r,n){for(var i=0|Math.min(r,n),a=0|Math.max(r,n),o=t[2*i],s=t[2*i+1];o<s;){var l=o+s>>1,u=e[2*l+1];if(u===a)return l;a<u?s=l:o=l+1}return o}return function(e,r,n,i){for(var a=e.length,o=[],s=0;s<a;++s){var l=e[s];if(2===l.length){var u=(i[l[0]]<<0)+(i[l[1]]<<1);if(0===u||3===u)continue;switch(u){case 0:case 3:break;case 1:o.push([t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0])])}}}return o}},function(){function t(t,e,r,n){for(var i=0|Math.min(r,n),a=0|Math.max(r,n),o=t[2*i],s=t[2*i+1];o<s;){var l=o+s>>1,u=e[2*l+1];if(u===a)return l;a<u?s=l:o=l+1}return o}return function(e,r,n,i){for(var a=e.length,o=[],s=0;s<a;++s){var l=e[s],u=l.length;if(3===u){if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2))||7===c)continue;switch(c){case 0:case 7:break;case 1:o.push([t(n,r,l[0],l[2]),t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0]),t(n,r,l[1],l[2])]);break;case 3:o.push([t(n,r,l[0],l[2]),t(n,r,l[1],l[2])]);break;case 4:o.push([t(n,r,l[2],l[1]),t(n,r,l[2],l[0])]);break;case 5:o.push([t(n,r,l[2],l[1]),t(n,r,l[0],l[1])]);break;case 6:o.push([t(n,r,l[1],l[0]),t(n,r,l[2],l[0])])}}else if(2===u){var c;if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1))||3===c)continue;switch(c){case 0:case 3:break;case 1:o.push([t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0])])}}}return o}},function(){function t(t,e,r,n){for(var i=0|Math.min(r,n),a=0|Math.max(r,n),o=t[2*i],s=t[2*i+1];o<s;){var l=o+s>>1,u=e[2*l+1];if(u===a)return l;a<u?s=l:o=l+1}return o}return function(e,r,n,i){for(var a=e.length,o=[],s=0;s<a;++s){var l=e[s],u=l.length;if(4===u){if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2)+(i[l[3]]<<3))||15===c)continue;switch(c){case 0:case 15:break;case 1:o.push([t(n,r,l[0],l[1]),t(n,r,l[0],l[2]),t(n,r,l[0],l[3])]);break;case 2:o.push([t(n,r,l[1],l[2]),t(n,r,l[1],l[0]),t(n,r,l[1],l[3])]);break;case 3:o.push([t(n,r,l[1],l[2]),t(n,r,l[0],l[2]),t(n,r,l[0],l[3])],[t(n,r,l[1],l[3]),t(n,r,l[1],l[2]),t(n,r,l[0],l[3])]);break;case 4:o.push([t(n,r,l[2],l[0]),t(n,r,l[2],l[1]),t(n,r,l[2],l[3])]);break;case 5:o.push([t(n,r,l[0],l[1]),t(n,r,l[2],l[1]),t(n,r,l[0],l[3])],[t(n,r,l[2],l[1]),t(n,r,l[2],l[3]),t(n,r,l[0],l[3])]);break;case 6:o.push([t(n,r,l[2],l[0]),t(n,r,l[1],l[0]),t(n,r,l[1],l[3])],[t(n,r,l[2],l[3]),t(n,r,l[2],l[0]),t(n,r,l[1],l[3])]);break;case 7:o.push([t(n,r,l[0],l[3]),t(n,r,l[1],l[3]),t(n,r,l[2],l[3])]);break;case 8:o.push([t(n,r,l[3],l[1]),t(n,r,l[3],l[0]),t(n,r,l[3],l[2])]);break;case 9:o.push([t(n,r,l[3],l[1]),t(n,r,l[0],l[1]),t(n,r,l[0],l[2])],[t(n,r,l[3],l[2]),t(n,r,l[3],l[1]),t(n,r,l[0],l[2])]);break;case 10:o.push([t(n,r,l[1],l[0]),t(n,r,l[3],l[0]),t(n,r,l[1],l[2])],[t(n,r,l[3],l[0]),t(n,r,l[3],l[2]),t(n,r,l[1],l[2])]);break;case 11:o.push([t(n,r,l[1],l[2]),t(n,r,l[0],l[2]),t(n,r,l[3],l[2])]);break;case 12:o.push([t(n,r,l[3],l[0]),t(n,r,l[2],l[0]),t(n,r,l[2],l[1])],[t(n,r,l[3],l[1]),t(n,r,l[3],l[0]),t(n,r,l[2],l[1])]);break;case 13:o.push([t(n,r,l[0],l[1]),t(n,r,l[2],l[1]),t(n,r,l[3],l[1])]);break;case 14:o.push([t(n,r,l[2],l[0]),t(n,r,l[1],l[0]),t(n,r,l[3],l[0])])}}else if(3===u){if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2))||7===c)continue;switch(c){case 0:case 7:break;case 1:o.push([t(n,r,l[0],l[2]),t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0]),t(n,r,l[1],l[2])]);break;case 3:o.push([t(n,r,l[0],l[2]),t(n,r,l[1],l[2])]);break;case 4:o.push([t(n,r,l[2],l[1]),t(n,r,l[2],l[0])]);break;case 5:o.push([t(n,r,l[2],l[1]),t(n,r,l[0],l[1])]);break;case 6:o.push([t(n,r,l[1],l[0]),t(n,r,l[2],l[0])])}}else if(2===u){var c;if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1))||3===c)continue;switch(c){case 0:case 3:break;case 1:o.push([t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0])])}}}return o}}]},{}],293:[function(t,e,r){\"use strict\";var n=t(\"bit-twiddle\"),i=t(\"union-find\");function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),u=i(e[0],e[1]);return(s=i(l,t[2])-i(u,e[2]))||i(l+t[2],a)-i(u+e[2],o);default:var c=t.slice(0);c.sort();var f=e.slice(0);f.sort();for(var h=0;h<r;++h)if(n=c[h]-f[h])return n;return 0}}function o(t,e){return a(t[0],e[0])}function s(t,e){if(e){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=[t[i],e[i]];for(n.sort(o),i=0;i<r;++i)t[i]=n[i][0],e[i]=n[i][1];return t}return t.sort(a),t}function l(t){if(0===t.length)return[];for(var e=1,r=t.length,n=1;n<r;++n){var i=t[n];if(a(i,t[n-1])){if(n===e){e++;continue}t[e++]=i}}return t.length=e,t}function u(t,e){for(var r=0,n=t.length-1,i=-1;r<=n;){var o=r+n>>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function c(t,e){for(var r=new Array(t.length),i=0,o=r.length;i<o;++i)r[i]=[];for(var s=[],l=(i=0,e.length);i<l;++i)for(var c=e[i],f=c.length,h=1,p=1<<f;h<p;++h){s.length=n.popCount(h);for(var d=0,g=0;g<f;++g)h&1<<g&&(s[d++]=c[g]);var v=u(t,s);if(!(v<0))for(;r[v++].push(i),!(v>=t.length||0!==a(t[v],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<<e+1)-1,a=0;a<t.length;++a)for(var o=t[a],l=i;l<1<<o.length;l=n.nextCombination(l)){for(var u=new Array(e+1),c=0,f=0;f<o.length;++f)l&1<<f&&(u[c++]=o[f]);r.push(u)}return s(r)}r.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n<i;++n)e=r(e,t[n].length);return e-1},r.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)e=r(e,a[o]);return e+1},r.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;++r)e[r]=t[r].slice(0);return e},r.compareCells=a,r.normalize=s,r.unique=l,r.findCell=u,r.incidence=c,r.dual=function(t,e){if(!e)return c(l(f(t,0)),t);for(var r=new Array(e),n=0;n<e;++n)r[n]=[];n=0;for(var i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)r[a[o]].push(n);return r},r.explode=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0|i.length,o=1,l=1<<a;o<l;++o){for(var u=[],c=0;c<a;++c)o>>>c&1&&u.push(i[c]);e.push(u)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;++a){for(var l=new Array(i.length-1),u=0,c=0;u<o;++u)u!==a&&(l[c++]=i[u]);e.push(l)}return s(e)},r.connectedComponents=function(t,e){return e?function(t,e){for(var r=new i(e),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var s=o+1;s<a.length;++s)r.link(a[o],a[s]);var l=[],u=r.ranks;for(n=0;n<u.length;++n)u[n]=-1;for(n=0;n<t.length;++n){var c=r.find(t[n][0]);u[c]<0?(u[c]=l.length,l.push([t[n].slice(0)])):l[u[c]].push(t[n].slice(0))}return l}(t,e):function(t){for(var e=l(s(f(t,0))),r=new i(e.length),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var c=u(e,[a[o]]),h=o+1;h<a.length;++h)r.link(c,u(e,[a[h]]));var p=[],d=r.ranks;for(n=0;n<d.length;++n)d[n]=-1;for(n=0;n<t.length;++n){var g=r.find(u(e,[t[n][0]]));d[g]<0?(d[g]=p.length,p.push([t[n].slice(0)])):p[d[g]].push(t[n].slice(0))}return p}(t)}},{\"bit-twiddle\":32,\"union-find\":309}],294:[function(t,e,r){arguments[4][32][0].apply(r,arguments)},{dup:32}],295:[function(t,e,r){arguments[4][293][0].apply(r,arguments)},{\"bit-twiddle\":294,dup:293,\"union-find\":296}],296:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},n.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],297:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){for(var a=e.length,o=t.length,s=new Array(a),l=new Array(a),u=new Array(a),c=new Array(a),f=0;f<a;++f)s[f]=l[f]=-1,u[f]=1/0,c[f]=!1;for(f=0;f<o;++f){var h=t[f];if(2!==h.length)throw new Error(\"Input must be a graph\");var p=h[1],d=h[0];-1!==l[d]?l[d]=-2:l[d]=p,-1!==s[p]?s[p]=-2:s[p]=d}function g(t){if(c[t])return 1/0;var r,i,a,o=s[t],u=l[t];return o<0||u<0?1/0:(r=e[t],i=e[o],a=e[u],Math.abs(n(r,i,a))/Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)))}function v(t,e){var r=T[t],n=T[e];T[t]=n,T[e]=r,M[r]=e,M[n]=t}function m(t){return u[T[t]]}function y(t){return 1&t?t-1>>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n<A){var o=m(n);o<r&&(a=n,r=o)}if(i<A&&m(i)<r&&(a=i),a===t)return t;v(t,a),t=a}}function b(t){for(var e=m(t);t>0;){var r=y(t);if(!(r>=0&&e<m(r)))return t;v(t,r),t=r}}function _(){if(A>0){var t=T[0];return v(0,A-1),A-=1,x(0),t}return-1}function w(t,e){var r=T[t];return u[r]===e?t:(u[r]=-1/0,b(t),_(),u[r]=e,b((A+=1)-1))}function k(t){if(!c[t]){c[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),M[e]>=0&&w(M[e],g(e)),M[r]>=0&&w(M[r],g(r))}}var T=[],M=new Array(a);for(f=0;f<a;++f)(u[f]=g(f))<1/0?(M[f]=T.length,T.push(f)):M[f]=-1;var A=T.length;for(f=A>>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||u[S]>r)break;k(S)}var E=[];for(f=0;f<a;++f)c[f]||(M[f]=E.length,E.push(e[f].slice()));function C(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!c[n]||i<0||i===n)break;if(i=t[n=i],!c[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}E.length;var L=[];return t.forEach((function(t){var e=C(s,t[0]),r=C(l,t[1]);if(e>=0&&r>=0&&e!==r){var n=M[e],i=M[r];n!==i&&L.push([n,i])}})),i.unique(i.normalize(L)),{positions:E,edges:L}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":284,\"simplicial-complex\":295}],298:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,a,o,s;if(e[0][0]<e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]>e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]<t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),u=n(r,a,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=n(s,o,a),u=n(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return a[0]-s[0]};var n=t(\"robust-orientation\");function i(t,e){var r,i,a,o;if(e[0][0]<e[1][0])r=e[0],i=e[1];else{if(!(e[0][0]>e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),u=Math.min(e[0][1],e[1][1]),c=Math.max(e[0][1],e[1][1]);return l<u?l-u:s>c?s-c:l-c}r=e[1],i=e[0]}t[0][1]<t[1][1]?(a=t[0],o=t[1]):(a=t[1],o=t[0]);var f=n(i,r,a);return f||(f=n(i,r,o))||o-i}},{\"robust-orientation\":284}],299:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.length,r=2*e,n=new Array(r),a=0;a<e;++a){var l=t[a],u=l[0][0]<l[1][0];n[2*a]=new f(l[0][0],l,u,a),n[2*a+1]=new f(l[1][0],l,!u,a)}n.sort((function(t,e){var r=t.x-e.x;return r||(r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1])}));var h=i(o),p=[],d=[],g=[];for(a=0;a<r;){for(var v=n[a].x,m=[];a<r;){var y=n[a];if(y.x!==v)break;a+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(m.push(new c(y.segment[0][1],y.index,!0,!0)),m.push(new c(y.segment[1][1],y.index,!1,!1))):(m.push(new c(y.segment[1][1],y.index,!0,!1)),m.push(new c(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}p.push(h.root),d.push(v),g.push(m)}return new s(p,d,g)};var n=t(\"binary-search-bounds\"),i=t(\"functional-red-black-tree\"),a=t(\"robust-orientation\"),o=t(\"./lib/order-segments\");function s(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function l(t,e){return t.y-e}function u(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]<o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=a(n,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=u(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=u(t.right,e))return l;t=t.left}}return r}function c(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=u(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var c=u(this.slabs[e-1],t);c&&(s?o(c.key,s)>0&&(s=c.key,i=c.value):(i=c.value,s=c.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h<f.length){var p=f[h];if(t[1]===p.y){if(p.closed)return p.index;for(;h<f.length-1&&f[h+1].y===t[1];)if((p=f[h+=1]).closed)return p.index;if(p.y===t[1]&&!p.start){if((h+=1)>=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},{\"./lib/order-segments\":298,\"binary-search-bounds\":31,\"functional-red-black-tree\":69,\"robust-orientation\":284}],300:[function(t,e,r){\"use strict\";var n=t(\"robust-dot-product\"),i=t(\"robust-sum\");function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l<o;++l)s[l]=i*t[l]+a*r[l];return s}e.exports=function(t,e){for(var r=[],n=[],i=a(t[t.length-1],e),s=t[t.length-1],l=t[0],u=0;u<t.length;++u,s=l){var c=a(l=t[u],e);if(i<0&&c>0||i>0&&c<0){var f=o(s,c,l,i);r.push(f),n.push(f.slice())}c<0?n.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=c}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var u=a(s=t[l],e);(n<0&&u>0||n>0&&u<0)&&r.push(o(i,u,s,n)),u>=0&&r.push(s.slice()),n=u}return r},e.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var u=a(s=t[l],e);(n<0&&u>0||n>0&&u<0)&&r.push(o(i,u,s,n)),u<=0&&r.push(s.slice()),n=u}return r}},{\"robust-dot-product\":281,\"robust-sum\":289}],301:[function(t,e,r){!function(){\"use strict\";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,index_access:/^\\[(\\d+)\\]/,sign:/^[+-]/};function e(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,u,c,f,h,p=1,d=r.length,g=\"\";for(a=0;a<d;a++)if(\"string\"==typeof r[a])g+=r[a];else if(\"object\"==typeof r[a]){if((s=r[a]).keys)for(i=n[p],o=0;o<s.keys.length;o++){if(null==i)throw new Error(e('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"',s.keys[o],s.keys[o-1]));i=i[s.keys[o]]}else i=s.param_no?n[s.param_no]:n[p++];if(t.not_type.test(s.type)&&t.not_primitive.test(s.type)&&i instanceof Function&&(i=i()),t.numeric_arg.test(s.type)&&\"number\"!=typeof i&&isNaN(i))throw new TypeError(e(\"[sprintf] expecting number but found %T\",i));switch(t.number.test(s.type)&&(f=i>=0),s.type){case\"b\":i=parseInt(i,10).toString(2);break;case\"c\":i=String.fromCharCode(parseInt(i,10));break;case\"d\":case\"i\":i=parseInt(i,10);break;case\"j\":i=JSON.stringify(i,null,s.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):i;break;case\"x\":i=(parseInt(i,10)>>>0).toString(16);break;case\"X\":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(s.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h=\"\":(h=f?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),u=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",c=s.width-(h+i).length,l=s.width&&c>0?u.repeat(c):\"\",g+=s.align?h+i+l:\"0\"===u?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.push(\"%\");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(r[2]){o|=1;var s=[],l=r[2],u=[];if(null===(u=t.key.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(s.push(u[1]);\"\"!==(l=l.substring(u[0].length));)if(null!==(u=t.key_access.exec(l)))s.push(u[1]);else{if(null===(u=t.index_access.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");s.push(u[1])}r[2]=s}else o|=2;if(3===o)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;s<n;++s)a[s]=[r[s]],o[s]=[s];return{positions:a,cells:o}}(t,e);var r=t.order.join()+\"-\"+t.dtype,s=o[r];return e=+e||0,s||(s=o[r]=function(t,e){var r=t.length+\"d\",i=a[r];if(i)return i(n,t,e)}(t.order,t.dtype)),s(t,e)};var n=t(\"ndarray-extract-contour\"),i=t(\"zero-crossings\"),a={\"2d\":function(t,e,r){var n=t({order:e,scalarArguments:3,getters:\"generic\"===r?[0]:void 0,phase:function(t,e,r,n){return t>n|0},vertex:function(t,e,r,n,i,a,o,s,l,u,c,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(u<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:c.push([t-.5,e-.5]);break;case 1:c.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:c.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:c.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:c.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:c.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:c.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:c.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:c.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:c.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:c.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:c.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:c.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:c.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:c.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},o={}},{\"ndarray-extract-contour\":251,\"zero-crossings\":318}],303:[function(t,e,r){(function(r){(function(){\"use strict\";e.exports=function t(e,r,i){i=i||{};var o=a[e];o||(o=a[e]={\" \":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o<e.length;++o)for(var s=e[o],l=0;l<3;++l){var u=r[s[l]];n[i++]=u[0],n[i++]=u[1]+1.4,a=Math.max(u[0],a)}return{data:n,shape:a}}(n(r,{triangles:!0,font:e,textAlign:i.textAlign||\"left\",textBaseline:\"alphabetic\",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var l=r.split(/(\\d|\\s)/),u=new Array(l.length),c=0,f=0,h=0;h<l.length;++h)u[h]=t(e,l[h]),c+=u[h].data.length,f+=u[h].shape,h>0&&(f+=.02);var p=new Float32Array(c),d=0,g=-.5*f;for(h=0;h<u.length;++h){for(var v=u[h].data,m=0;m<v.length;m+=2)p[d++]=v[m]+g,p[d++]=v[m+1];g+=u[h].shape+.02}s=o[r]={data:p,shape:f}}return s};var n=t(\"vectorize-text\"),i=window||r.global||{},a=i.__TEXT_CACHE||{};i.__TEXT_CACHE={}}).call(this)}).call(this,t(\"_process\"))},{_process:5,\"vectorize-text\":311}],304:[function(t,e,r){\"use strict\";var n=t(\"parse-unit\");function i(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*a(r[1],t)}function a(t,e){switch(e=e||document.body,t=(t||\"px\").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case\"%\":return e.clientHeight/100;case\"ch\":case\"ex\":return function(t,e){var r=document.createElement(\"div\");r.style[\"font-size\"]=\"128\"+t,e.appendChild(r);var n=i(r,\"font-size\")/128;return e.removeChild(r),n}(t,e);case\"em\":return i(e,\"font-size\");case\"rem\":return i(document.body,\"font-size\");case\"vw\":return window.innerWidth/100;case\"vh\":return window.innerHeight/100;case\"vmin\":return Math.min(window.innerWidth,window.innerHeight)/100;case\"vmax\":return Math.max(window.innerWidth,window.innerHeight)/100;case\"in\":return 96;case\"cm\":return 96/2.54;case\"mm\":return 96/25.4;case\"pt\":return 96/72;case\"pc\":return 16}return 1}e.exports=a},{\"parse-unit\":265}],305:[function(t,e,r){\"use strict\";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],n=t.right||f(r),i=t.radius||1,a=t.theta||0,c=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),\"eye\"in t){var p=t.eye,d=[p[0]-e[0],p[1]-e[1],p[2]-e[2]];o(n,d,r),u(n[0],n[1],n[2])<1e-6?n=f(r):s(n,n),i=u(d[0],d[1],d[2]);var g=l(r,d)/i,v=l(n,d)/i;c=Math.acos(g),a=Math.acos(v)}return i=Math.log(i),new h(t.zoomMin,t.zoomMax,e,r,n,i,a,c)};var n=t(\"filtered-vector\"),i=t(\"gl-mat4/invert\"),a=t(\"gl-mat4/rotate\"),o=t(\"gl-vec3/cross\"),s=t(\"gl-vec3/normalize\"),l=t(\"gl-vec3/dot\");function u(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t){return Math.min(1,Math.max(-1,t))}function f(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e>Math.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),c=0;for(a=0;a<3;++a)r[a]-=e[a]*i/n,c+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(c);for(a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],v=Math.cos(d),m=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=v*y,w=m*y,k=x,T=-v*x,M=-m*x,A=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=_*r[a]+w*h[a]+k*e[a];E[4*a+1]=T*r[a]+M*h[a]+A*e[a],E[4*a+2]=C,E[4*a+3]=0}var L=E[1],P=E[5],O=E[9],I=E[2],D=E[6],z=E[10],R=P*z-O*D,F=O*I-L*z,N=L*D-P*I,B=u(R,F,N);for(R/=B,F/=B,N/=B,E[0]=R,E[4]=F,E[8]=N,a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){c=0;for(var j=0;j<3;++j)c+=E[a+4*j]*S[j];E[12+a]=-c}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,u=0;u<3;++u)i[4*u]=o[u],i[4*u+1]=s[u],i[4*u+2]=l[u];for(a(i,i,n,d),u=0;u<3;++u)o[u]=i[4*u],s[u]=i[4*u+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=u(a,o,s);a/=l,o/=l,s/=l;var c=i[0],f=i[4],h=i[8],p=c*a+f*o+h*s,d=u(c-=a*p,f-=o*p,h-=s*p),g=(c/=d)*e+a*r,v=(f/=d)*e+o*r,m=(h/=d)*e+s*r;this.center.move(t,g,v,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;\"number\"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),g=Math.max(h,p,d);h===g?(s=s<0?-1:1,l=f=0):d===g?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var v=u(s,l,f);s/=v,l/=v,f/=v}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,k=u(x-=s*w,b-=l*w,_-=f*w),T=l*(_/=k)-f*(b/=k),M=f*(x/=k)-s*_,A=s*b-l*x,S=u(T,M,A);if(T/=S,M/=S,A/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],C=e[5],L=e[9],P=E*x+C*b+L*_,O=E*T+C*M+L*A;m=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(O,P)}else{var I=e[2],D=e[6],z=e[10],R=I*s+D*l+z*f,F=I*x+D*b+z*_,N=I*T+D*M+z*A;m=Math.asin(c(R)),y=Math.atan2(N,F)}this.angle.jump(t,y,m),this.recalcMatrix(t);var B=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-B*W,G-j*W,Y-U*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=u(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=u(l,f,h);if(!(p<1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,g=d[0],v=d[1],m=d[2],y=i*g+a*v+o*m,x=u(g-=y*i,v-=y*a,m-=y*o);if(!(x<.01&&(x=u(g=a*h-o*f,v=o*l-i*h,m=i*f-a*l))<1e-6)){g/=x,v/=x,m/=x,this.up.set(t,i,a,o),this.right.set(t,g,v,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*m-o*v,_=o*g-i*m,w=i*v-a*g,k=u(b,_,w),T=i*l+a*f+o*h,M=g*l+v*f+m*h,A=(b/=k)*l+(_/=k)*f+(w/=k)*h,S=Math.asin(c(T)),E=Math.atan2(A,M),C=this.angle._state,L=C[C.length-1],P=C[C.length-2];L%=2*Math.PI;var O=Math.abs(L+2*Math.PI-E),I=Math.abs(L-E),D=Math.abs(L-2*Math.PI-E);O<I&&(L+=2*Math.PI),D<I&&(L-=2*Math.PI),this.angle.jump(this.angle.lastT(),L,P),this.angle.set(t,E,S)}}}}},{\"filtered-vector\":68,\"gl-mat4/invert\":98,\"gl-mat4/rotate\":103,\"gl-vec3/cross\":157,\"gl-vec3/dot\":162,\"gl-vec3/normalize\":179}],306:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var i=t*e,a=n*t,o=a-(a-t),s=t-o,l=n*e,u=l-(l-e),c=e-u,f=s*c-(i-o*u-s*u-o*c);return r?(r[0]=f,r[1]=i,r):[f,i]};var n=+(Math.pow(2,27)+1)},{}],307:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);return r?(r[0]=o+a,r[1]=n,r):[o+a,n]}},{}],308:[function(t,e,n){(function(e){(function(){\"use strict\";var r=t(\"bit-twiddle\"),i=t(\"dup\"),a=t(\"buffer\").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=\"undefined\"!=typeof Uint8ClampedArray,s=\"undefined\"!=typeof BigUint64Array,l=\"undefined\"!=typeof BigInt64Array,u=e.__TYPEDARRAY_POOL;u.UINT8C||(u.UINT8C=i([32,0])),u.BIGUINT64||(u.BIGUINT64=i([32,0])),u.BIGINT64||(u.BIGINT64=i([32,0])),u.BUFFER||(u.BUFFER=i([32,0]));var c=u.DATA,f=u.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,n=r.log2(e);c[n].push(t)}}function p(t){t=r.nextPow2(t);var e=r.log2(t),n=c[e];return n.length>0?n.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function v(t){return new Uint32Array(p(4*t),0,t)}function m(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function k(t){return s?new BigUint64Array(p(8*t),0,t):null}function T(t){return l?new BigInt64Array(p(8*t),0,t):null}function M(t){return new DataView(p(t),0,t)}function A(t){t=r.nextPow2(t);var e=r.log2(t),n=f[e];return n.length>0?n.pop():new a(t)}n.free=function(t){if(a.isBuffer(t))f[r.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|r.log2(e);c[n].push(t)}},n.freeUint8=n.freeUint16=n.freeUint32=n.freeBigUint64=n.freeInt8=n.freeInt16=n.freeInt32=n.freeBigInt64=n.freeFloat32=n.freeFloat=n.freeFloat64=n.freeDouble=n.freeUint8Clamped=n.freeDataView=function(t){h(t.buffer)},n.freeArrayBuffer=h,n.freeBuffer=function(t){f[r.log2(t.length)].push(t)},n.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return p(t);switch(e){case\"uint8\":return d(t);case\"uint16\":return g(t);case\"uint32\":return v(t);case\"int8\":return m(t);case\"int16\":return y(t);case\"int32\":return x(t);case\"float\":case\"float32\":return b(t);case\"double\":case\"float64\":return _(t);case\"uint8_clamped\":return w(t);case\"bigint64\":return T(t);case\"biguint64\":return k(t);case\"buffer\":return A(t);case\"data\":case\"dataview\":return M(t);default:return null}return null},n.mallocArrayBuffer=p,n.mallocUint8=d,n.mallocUint16=g,n.mallocUint32=v,n.mallocInt8=m,n.mallocInt16=y,n.mallocInt32=x,n.mallocFloat32=n.mallocFloat=b,n.mallocFloat64=n.mallocDouble=_,n.mallocUint8Clamped=w,n.mallocBigUint64=k,n.mallocBigInt64=T,n.mallocDataView=M,n.mallocBuffer=A,n.clearCache=function(){for(var t=0;t<32;++t)u.UINT8[t].length=0,u.UINT16[t].length=0,u.UINT32[t].length=0,u.INT8[t].length=0,u.INT16[t].length=0,u.INT32[t].length=0,u.FLOAT[t].length=0,u.DOUBLE[t].length=0,u.BIGUINT64[t].length=0,u.BIGINT64[t].length=0,u.UINT8C[t].length=0,c[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==r?r:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bit-twiddle\":32,buffer:3,dup:65}],309:[function(t,e,r){\"use strict\";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n;var i=n.prototype;Object.defineProperty(i,\"length\",{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},i.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],310:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o<n;++o)if(a=i,e(i=t[o],a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a<r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},{}],311:[function(t,e,r){\"use strict\";e.exports=function(t,e){return\"object\"==typeof e&&null!==e||(e={}),n(t,e.canvas||i,e.context||a,e)};var n=t(\"./lib/vtext\"),i=null,a=null;\"undefined\"!=typeof document&&((i=document.createElement(\"canvas\")).width=8192,i.height=1024,a=i.getContext(\"2d\"))},{\"./lib/vtext\":312}],312:[function(t,e,r){e.exports=function(t,e,r,n){var a=64,o=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return n&&(n.size&&n.size>0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+\"px\",n.font].filter((function(t){return t})).join(\" \"),r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",v(function(t,e,r,n,a,o){r=r.replace(/\\n/g,\"\"),r=!0===o.breaklines?r.replace(/\\<br\\>/g,\"\\n\"):r.replace(/\\<br\\>/g,\" \");var s=\"\",l=[];for(m=0;m<r.length;++m)l[m]=s;!0===o.bolds&&(l=p(\"b\",u,r,l)),!0===o.italics&&(l=p(\"i\",c,r,l)),!0===o.superscripts&&(l=p(\"sup\",\"+1\",r,l)),!0===o.subscripts&&(l=p(\"sub\",\"-1\",r,l));var d=[],g=\"\";for(m=0;m<r.length;++m)null!==l[m]&&(g+=r[m],d.push(l[m]));var v,m,y,x,b,_=g.split(\"\\n\"),w=_.length,k=Math.round(a*n),T=n,M=2*n,A=0,S=w*k+M;t.height<S&&(t.height=S),e.fillStyle=\"#000\",e.fillRect(0,0,t.width,t.height),e.fillStyle=\"#fff\";var E=0,C=\"\";function L(){if(\"\"!==C){var t=e.measureText(C).width;e.fillText(C,T+y,M+x),y+=t}}function P(){return Math.round(b)+\"px \"}function O(t,r){var n=\"\"+e.font;if(!0===o.subscripts){var i=t.indexOf(h),a=r.indexOf(h),s=i>-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(P(),\"?px \"),b*=Math.pow(.75,l-s),n=n.replace(\"?px \",P())),x+=.25*k*(l-s)}if(!0===o.superscripts){var p=t.indexOf(f),d=r.indexOf(f),g=p>-1?parseInt(t[1+p]):0,v=d>-1?parseInt(r[1+d]):0;g!==v&&(n=n.replace(P(),\"?px \"),b*=Math.pow(.75,v-g),n=n.replace(\"?px \",P())),x-=.25*k*(v-g)}if(!0===o.bolds){var m=t.indexOf(u)>-1,y=r.indexOf(u)>-1;!m&&y&&(n=_?n.replace(\"italic \",\"italic bold \"):\"bold \"+n),m&&!y&&(n=n.replace(\"bold \",\"\"))}if(!0===o.italics){var _=t.indexOf(c)>-1,w=r.indexOf(c)>-1;!_&&w&&(n=\"italic \"+n),_&&!w&&(n=n.replace(\"italic \",\"\"))}e.font=n}for(v=0;v<w;++v){var I=_[v]+\"\\n\";for(y=0,x=v*k,b=n,C=\"\",m=0;m<I.length;++m){var D=m+E<d.length?d[m+E]:d[d.length-1];s===D?C+=I[m]:(L(),C=I[m],void 0!==D&&(O(s,D),s=D))}L(),E+=I.length;var z=0|Math.round(y+2*T);A<z&&(A=z)}var R=A,F=M+k*w;return i(e.getImageData(0,0,R,F).data,[F,R,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a,o,s),n,a)},e.exports.processPixels=v;var n=t(\"surface-nets\"),i=t(\"ndarray\"),a=t(\"simplify-planar-graph\"),o=t(\"clean-pslg\"),s=t(\"cdt2d\"),l=t(\"planar-graph-to-polyline\"),u=\"b|\",c=\"i|\",f=\"+\",h=\"-\";function p(t,e,r,n){for(var i=\"<\"+t+\">\",a=\"</\"+t+\">\",o=i.length,s=a.length,l=e[0]===f||e[0]===h,u=0,c=-s;u>-1&&-1!==(u=r.indexOf(i,u))&&-1!==(c=r.indexOf(a,u+o))&&!(c<=u);){for(var p=u;p<c+s;++p)if(p<u+o||p>=c)n[p]=null,r=r.substr(0,p)+\" \"+r.substr(p+1);else if(null!==n[p]){var d=n[p].indexOf(e[0]);-1===d?n[p]+=e:l&&(n[p]=n[p].substr(0,d+1)+(1+parseInt(n[p][d+1]))+n[p].substr(d+2))}var g=u+o,v=r.substr(g,c-g).indexOf(i);u=-1!==v?v:c+s}return n}function d(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function g(t,e,r,n){var i=d(t,n),a=function(t,e,r){for(var n=e.textAlign||\"start\",i=e.textBaseline||\"alphabetic\",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l<s;++l)for(var u=t[l],c=0;c<2;++c)a[c]=0|Math.min(a[c],u[c]),o[c]=0|Math.max(o[c],u[c]);var f=0;switch(n){case\"center\":f=-.5*(a[0]+o[0]);break;case\"right\":case\"end\":f=-o[0];break;case\"left\":case\"start\":f=-a[0];break;default:throw new Error(\"vectorize-text: Unrecognized textAlign: '\"+n+\"'\")}var h=0;switch(i){case\"hanging\":case\"top\":h=-a[1];break;case\"middle\":h=-.5*(a[1]+o[1]);break;case\"alphabetic\":case\"ideographic\":h=-3*r;break;case\"bottom\":h=-o[1];break;default:throw new Error(\"vectorize-text: Unrecoginized textBaseline: '\"+i+\"'\")}var p=1/r;return\"lineHeight\"in e?p*=+e.lineHeight:\"width\"in e?p=e.width/(o[0]-a[0]):\"height\"in e&&(p=e.height/(o[1]-a[1])),t.map((function(t){return[p*(t[0]+f),p*(t[1]+h)]}))}(i.positions,e,r),u=i.edges,c=\"ccw\"===e.orientation;if(o(a,u),e.polygons||e.polygon||e.polyline){for(var f=l(u,a),h=new Array(f.length),p=0;p<f.length;++p){for(var g=f[p],v=new Array(g.length),m=0;m<g.length;++m){for(var y=g[m],x=new Array(y.length),b=0;b<y.length;++b)x[b]=a[y[b]].slice();c&&x.reverse(),v[m]=x}h[p]=v}return h}return e.triangles||e.triangulate||e.triangle?{cells:s(a,u,{delaunay:!1,exterior:!1,interior:!0}),positions:a}:{edges:u,positions:a}}function v(t,e,r){try{return g(t,e,r,!0)}catch(t){}try{return g(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:42,\"clean-pslg\":50,ndarray:259,\"planar-graph-to-polyline\":268,\"simplify-planar-graph\":297,\"surface-nets\":302}],313:[function(t,e,r){!function(){\"use strict\";if(\"undefined\"==typeof ses||!ses.ok||ses.ok()){\"undefined\"!=typeof ses&&(ses.weakMapPermitHostObjects=v);var t=!1;if(\"function\"==typeof WeakMap){var r=WeakMap;if(\"undefined\"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var n=new r,i=Object.freeze({});if(n.set(i,1),1===n.get(i))return void(e.exports=WeakMap);t=!0}}Object.prototype.hasOwnProperty;var a=Object.getOwnPropertyNames,o=Object.defineProperty,s=Object.isExtensible,l=\"weakmap:\",u=l+\"ident:\"+Math.random()+\"___\";if(\"undefined\"!=typeof crypto&&\"function\"==typeof crypto.getRandomValues&&\"function\"==typeof ArrayBuffer&&\"function\"==typeof Uint8Array){var c=new ArrayBuffer(25),f=new Uint8Array(c);crypto.getRandomValues(f),u=l+\"rand:\"+Array.prototype.map.call(f,(function(t){return(t%36).toString(36)})).join(\"\")+\"___\"}if(o(Object,\"getOwnPropertyNames\",{value:function(t){return a(t).filter(m)}}),\"getPropertyNames\"in Object){var h=Object.getPropertyNames;o(Object,\"getPropertyNames\",{value:function(t){return h(t).filter(m)}})}!function(){var t=Object.freeze;o(Object,\"freeze\",{value:function(e){return y(e),t(e)}});var e=Object.seal;o(Object,\"seal\",{value:function(t){return y(t),e(t)}});var r=Object.preventExtensions;o(Object,\"preventExtensions\",{value:function(t){return y(t),r(t)}})}();var p=!1,d=0,g=function(){this instanceof g||b();var t=[],e=[],r=d++;return Object.create(g.prototype,{get___:{value:x((function(n,i){var a,o=y(n);return o?r in o?o[r]:i:(a=t.indexOf(n))>=0?e[a]:i}))},has___:{value:x((function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:x((function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this}))},delete___:{value:x((function(n){var i,a,o=y(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))}))}})};g.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),\"function\"==typeof r?function(){function n(){this instanceof g||b();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new g),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new g),i.set___(t,e)}else n.set(t,e);return this},Object.create(g.prototype,{get___:{value:x((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:x((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:x(e)},delete___:{value:x((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:x((function(t){if(t!==v)throw new Error(\"bogus call to permitHostObjects___\");a=!0}))}})}t&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),n.prototype=g.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,\"constructor\",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(\"undefined\"!=typeof Proxy&&(Proxy=void 0),e.exports=g)}function v(t){t.permitHostObjects___&&t.permitHostObjects___(v)}function m(t){return!(t.substr(0,l.length)==l&&\"___\"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[u];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,u,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||\"undefined\"==typeof console||(p=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}}()},{}],314:[function(t,e,r){var n=t(\"./hidden-store.js\");e.exports=function(){var t={};return function(e){if((\"object\"!=typeof e||null===e)&&\"function\"!=typeof e)throw new Error(\"Weakmap-shim: Key must be object\");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},{\"./hidden-store.js\":315}],315:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,\"valueOf\",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],316:[function(t,e,r){var n=t(\"./create-store.js\");e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty(\"value\")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return\"value\"in t(e)},delete:function(e){return delete t(e).value}}}},{\"./create-store.js\":314}],317:[function(t,e,r){\"use strict\";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],u=s;n|=0;var c=0,f=s;for(c=0;c<o;++c){var h=e[n]-a,p=e[n+u]-a;h>=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:\"zeroCrossings\"},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t(\"./lib/zc-core\")},{\"./lib/zc-core\":317}]},{},[6])(6)}))}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[27])(27)},2703:(t,e,r)=>{\"use strict\";var n=r(414);function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function t(t,e,r,i,a,o){if(o!==n){var s=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw s.name=\"Invariant Violation\",s}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r}},5697:(t,e,r)=>{t.exports=r(2703)()},414:t=>{\"use strict\";t.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},9459:(t,e,r)=>{var n,i,a,o;window,t.exports=(n=r(7294),i=r(3935),a=r(5697),o=r(9058),function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=2)}([function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},i=n({}),a=function(t,e){return null==t||null==e};e.hashDiff=function(t,e){return a(t,e)||t.hash()!==e.hash()},e.shallowObjDiff=function(t,e){if(a(t,e)&&(null!=t||null!=e))return!0;if(t===e)return!1;if((void 0===t?\"undefined\":n(t))!==i||(void 0===e?\"undefined\":n(e))!==i)return t!==e;var r=Object.keys(t),o=Object.keys(e),s=function(r){return t[r]!==e[r]};return r.length!==o.length||!(!r.some(s)&&!o.some(s))}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.get=function(t,e){return null!=t?t[e]:null},e.toJson=function(t){return t},e.forEach=function(t,e){return t.forEach(e)}},function(t,e,r){\"use strict\";t.exports=r(3).default},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=c(r(4)),a=c(r(5)),o=r(6),s=r(8),l=c(r(9)),u=r(10);function c(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.displayName=\"CytoscapeComponent\",r}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.Component),n(e,null,[{key:\"normalizeElements\",value:function(t){if(null!=t.length)return t;var e=t.nodes,r=t.edges;return null==e&&(e=[]),null==r&&(r=[]),e.concat(r)}},{key:\"propTypes\",get:function(){return o.types}},{key:\"defaultProps\",get:function(){return s.defaults}}]),n(e,[{key:\"componentDidMount\",value:function(){var t=a.default.findDOMNode(this),e=this.props,r=e.global,n=e.headless,i=e.styleEnabled,o=e.hideEdgesOnViewport,s=e.textureOnViewport,u=e.motionBlur,c=e.motionBlurOpacity,f=e.wheelSensitivity,h=e.pixelRatio,p=this._cy=new l.default({container:t,headless:n,styleEnabled:i,hideEdgesOnViewport:o,textureOnViewport:s,motionBlur:u,motionBlurOpacity:c,wheelSensitivity:f,pixelRatio:h});r&&(window[r]=p),this.updateCytoscape(null,this.props)}},{key:\"updateCytoscape\",value:function(t,e){var r=this._cy,n=e.diff,i=e.toJson,a=e.get,o=e.forEach;(0,u.patch)(r,t,e,n,i,a,o),null!=e.cy&&e.cy(r)}},{key:\"componentDidUpdate\",value:function(t){this.updateCytoscape(t,this.props)}},{key:\"componentWillUnmount\",value:function(){this._cy.destroy()}},{key:\"render\",value:function(){var t=this.props,e=t.id,r=t.className,n=t.style;return i.default.createElement(\"div\",{id:e,className:r,style:n})}}]),e}();e.default=f},function(t,e){t.exports=n},function(t,e){t.exports=i},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.types=void 0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(7)),i=n.default.string,a=n.default.array,o=n.default.object,s=n.default.number,l=n.default.bool,u=n.default.oneOfType,c=n.default.any,f=n.default.func;e.types={id:i,className:i,style:u([i,o]),elements:u([a,c]),stylesheet:u([a,c]),layout:u([o,c]),pan:u([o,c]),zoom:s,panningEnabled:l,userPanningEnabled:l,minZoom:s,maxZoom:s,zoomingEnabled:l,userZoomingEnabled:l,boxSelectionEnabled:l,autoungrabify:l,autolock:l,autounselectify:l,get:f,toJson:f,diff:f,forEach:f,cy:f,headless:l,styleEnabled:l,hideEdgesOnViewport:l,textureOnViewport:l,motionBlur:l,motionBlurOpacity:s,wheelSensitivity:s,pixelRatio:u([i,o])}},function(t,e){t.exports=a},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.defaults=e.pan=e.zoom=e.stylesheet=e.elements=e.identity=void 0;var n=r(0),i=r(1),a=(e.identity=function(t){return t},e.elements=[{data:{id:\"a\",label:\"Example node A\"}},{data:{id:\"b\",label:\"Example node B\"}},{data:{id:\"e\",source:\"a\",target:\"b\"}}]),o=e.stylesheet=[{selector:\"node\",style:{label:\"data(label)\"}}],s=e.zoom=1,l=e.pan={x:0,y:0};e.defaults={diff:n.shallowObjDiff,get:i.get,toJson:i.toJson,forEach:i.forEach,elements:a,stylesheet:o,zoom:s,pan:l}},function(t,e){t.exports=o},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.patch=void 0;var n=r(1),i=r(0),a=function(t,e,r,i){return r((0,n.get)(t,i),(0,n.get)(e,i))},o=(e.patch=function(t,e,r,c,f,h,p){t.batch((function(){(c===i.shallowObjDiff||a(e,r,c,\"elements\"))&&u(t,(0,n.get)(e,\"elements\"),(0,n.get)(r,\"elements\"),f,h,p,c),a(e,r,c,\"stylesheet\")&&l(t,(0,n.get)(e,\"stylesheet\"),(0,n.get)(r,\"stylesheet\"),f),[\"zoom\",\"minZoom\",\"maxZoom\",\"zoomingEnabled\",\"userZoomingEnabled\",\"pan\",\"panningEnabled\",\"userPanningEnabled\",\"boxSelectionEnabled\",\"autoungrabify\",\"autolock\",\"autounselectify\"].forEach((function(i){a(e,r,c,i)&&o(t,i,(0,n.get)(e,i),(0,n.get)(r,i),f)}))})),a(e,r,c,\"layout\")&&s(t,(0,n.get)(e,\"layout\"),(0,n.get)(r,\"layout\"),f)},function(t,e,r,n,i){t[e](i(n))}),s=function(t,e,r,n){var i=n(r);null!=i&&t.layout(i).run()},l=function(t,e,r,n){var i=t.style();null!=i&&i.fromJson(n(r)).update()},u=function(t,e,r,n,i,a,o){var s=[],l=t.collection(),u=[],f={},h={},p=function(t){return i(i(t,\"data\"),\"id\")};a(r,(function(t){var e=p(t);h[e]=t})),null!=e&&a(e,(function(e){var r=p(e);f[r]=e,function(t){return null!=h[t]}(r)||l.merge(t.getElementById(r))})),a(r,(function(t){var e=p(t),r=function(t){return f[t]}(e);!function(t){return null!=f[t]}(e)?s.push(n(t)):u.push({ele1:r,ele2:t})})),l.length>0&&t.remove(l),s.length>0&&t.add(s),u.forEach((function(e){var r=e.ele1,a=e.ele2;return c(t,r,a,n,i,o)}))},c=function(t,e,r,n,i,a){var o=i(i(r,\"data\"),\"id\"),s=t.getElementById(o),l={};[\"data\",\"position\",\"selected\",\"selectable\",\"locked\",\"grabbable\",\"classes\"].forEach((function(t){var o=i(r,t);a(o,i(e,t))&&(l[t]=n(o))}));var u=i(r,\"scratch\");a(u,i(e,\"scratch\"))&&s.scratch(n(u)),Object.keys(l).length>0&&s.json(l)}}]))},4448:(t,e,r)=>{\"use strict\";var n=r(7294),i=r(7418),a=r(3840);function o(t){for(var e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+t,r=1;r<arguments.length;r++)e+=\"&args[]=\"+encodeURIComponent(arguments[r]);return\"Minified React error #\"+t+\"; visit \"+e+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}if(!n)throw Error(o(227));var s=new Set,l={};function u(t,e){c(t,e),c(t+\"Capture\",e)}function c(t,e){for(l[t]=e,t=0;t<e.length;t++)s.add(e[t])}var f=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement),h=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,p=Object.prototype.hasOwnProperty,d={},g={};function v(t,e,r,n,i,a,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var m={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach((function(t){m[t]=new v(t,0,!1,t,null,!1,!1)})),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach((function(t){var e=t[0];m[e]=new v(e,1,!1,t[1],null,!1,!1)})),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach((function(t){m[t]=new v(t,2,!1,t.toLowerCase(),null,!1,!1)})),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach((function(t){m[t]=new v(t,2,!1,t,null,!1,!1)})),\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach((function(t){m[t]=new v(t,3,!1,t.toLowerCase(),null,!1,!1)})),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach((function(t){m[t]=new v(t,3,!0,t,null,!1,!1)})),[\"capture\",\"download\"].forEach((function(t){m[t]=new v(t,4,!1,t,null,!1,!1)})),[\"cols\",\"rows\",\"size\",\"span\"].forEach((function(t){m[t]=new v(t,6,!1,t,null,!1,!1)})),[\"rowSpan\",\"start\"].forEach((function(t){m[t]=new v(t,5,!1,t.toLowerCase(),null,!1,!1)}));var y=/[\\-:]([a-z])/g;function x(t){return t[1].toUpperCase()}function b(t,e,r,n){var i=m.hasOwnProperty(e)?m[e]:null;(null!==i?0===i.type:!n&&2<e.length&&(\"o\"===e[0]||\"O\"===e[0])&&(\"n\"===e[1]||\"N\"===e[1]))||(function(t,e,r,n){if(null==e||function(t,e,r,n){if(null!==r&&0===r.type)return!1;switch(typeof e){case\"function\":case\"symbol\":return!0;case\"boolean\":return!n&&(null!==r?!r.acceptsBooleans:\"data-\"!==(t=t.toLowerCase().slice(0,5))&&\"aria-\"!==t);default:return!1}}(t,e,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,r,i,n)&&(r=null),n||null===i?function(t){return!!p.call(g,t)||!p.call(d,t)&&(h.test(t)?g[t]=!0:(d[t]=!0,!1))}(e)&&(null===r?t.removeAttribute(e):t.setAttribute(e,\"\"+r)):i.mustUseProperty?t[i.propertyName]=null===r?3!==i.type&&\"\":r:(e=i.attributeName,n=i.attributeNamespace,null===r?t.removeAttribute(e):(r=3===(i=i.type)||4===i&&!0===r?\"\":\"\"+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach((function(t){var e=t.replace(y,x);m[e]=new v(e,1,!1,t,null,!1,!1)})),\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach((function(t){var e=t.replace(y,x);m[e]=new v(e,1,!1,t,\"http://www.w3.org/1999/xlink\",!1,!1)})),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach((function(t){var e=t.replace(y,x);m[e]=new v(e,1,!1,t,\"http://www.w3.org/XML/1998/namespace\",!1,!1)})),[\"tabIndex\",\"crossOrigin\"].forEach((function(t){m[t]=new v(t,1,!1,t.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1),[\"src\",\"href\",\"action\",\"formAction\"].forEach((function(t){m[t]=new v(t,1,!1,t.toLowerCase(),null,!0,!0)}));var _=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=60103,k=60106,T=60107,M=60108,A=60114,S=60109,E=60110,C=60112,L=60113,P=60120,O=60115,I=60116,D=60121,z=60128,R=60129,F=60130,N=60131;if(\"function\"==typeof Symbol&&Symbol.for){var B=Symbol.for;w=B(\"react.element\"),k=B(\"react.portal\"),T=B(\"react.fragment\"),M=B(\"react.strict_mode\"),A=B(\"react.profiler\"),S=B(\"react.provider\"),E=B(\"react.context\"),C=B(\"react.forward_ref\"),L=B(\"react.suspense\"),P=B(\"react.suspense_list\"),O=B(\"react.memo\"),I=B(\"react.lazy\"),D=B(\"react.block\"),B(\"react.scope\"),z=B(\"react.opaque.id\"),R=B(\"react.debug_trace_mode\"),F=B(\"react.offscreen\"),N=B(\"react.legacy_hidden\")}var j,U=\"function\"==typeof Symbol&&Symbol.iterator;function V(t){return null===t||\"object\"!=typeof t?null:\"function\"==typeof(t=U&&t[U]||t[\"@@iterator\"])?t:null}function H(t){if(void 0===j)try{throw Error()}catch(t){var e=t.stack.trim().match(/\\n( *(at )?)/);j=e&&e[1]||\"\"}return\"\\n\"+j+t}var q=!1;function G(t,e){if(!t||q)return\"\";q=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,\"props\",{set:function(){throw Error()}}),\"object\"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var n=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){n=t}t.call(e.prototype)}else{try{throw Error()}catch(t){n=t}t()}}catch(t){if(t&&n&&\"string\"==typeof t.stack){for(var i=t.stack.split(\"\\n\"),a=n.stack.split(\"\\n\"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s])return\"\\n\"+i[o].replace(\" at new \",\" at \")}while(1<=o&&0<=s);break}}}finally{q=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:\"\")?H(t):\"\"}function Y(t){switch(t.tag){case 5:return H(t.type);case 16:return H(\"Lazy\");case 13:return H(\"Suspense\");case 19:return H(\"SuspenseList\");case 0:case 2:case 15:return G(t.type,!1);case 11:return G(t.type.render,!1);case 22:return G(t.type._render,!1);case 1:return G(t.type,!0);default:return\"\"}}function W(t){if(null==t)return null;if(\"function\"==typeof t)return t.displayName||t.name||null;if(\"string\"==typeof t)return t;switch(t){case T:return\"Fragment\";case k:return\"Portal\";case A:return\"Profiler\";case M:return\"StrictMode\";case L:return\"Suspense\";case P:return\"SuspenseList\"}if(\"object\"==typeof t)switch(t.$$typeof){case E:return(t.displayName||\"Context\")+\".Consumer\";case S:return(t._context.displayName||\"Context\")+\".Provider\";case C:var e=t.render;return e=e.displayName||e.name||\"\",t.displayName||(\"\"!==e?\"ForwardRef(\"+e+\")\":\"ForwardRef\");case O:return W(t.type);case D:return W(t._render);case I:e=t._payload,t=t._init;try{return W(t(e))}catch(t){}}return null}function X(t){switch(typeof t){case\"boolean\":case\"number\":case\"object\":case\"string\":case\"undefined\":return t;default:return\"\"}}function Z(t){var e=t.type;return(t=t.nodeName)&&\"input\"===t.toLowerCase()&&(\"checkbox\"===e||\"radio\"===e)}function K(t){t._valueTracker||(t._valueTracker=function(t){var e=Z(t)?\"checked\":\"value\",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=\"\"+t[e];if(!t.hasOwnProperty(e)&&void 0!==r&&\"function\"==typeof r.get&&\"function\"==typeof r.set){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){n=\"\"+t,a.call(this,t)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(t){n=\"\"+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function J(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n=\"\";return t&&(n=Z(t)?t.checked?\"true\":\"false\":t.value),(t=n)!==r&&(e.setValue(t),!0)}function $(t){if(void 0===(t=t||(\"undefined\"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Q(t,e){var r=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:t._wrapperState.initialChecked})}function tt(t,e){var r=null==e.defaultValue?\"\":e.defaultValue,n=null!=e.checked?e.checked:e.defaultChecked;r=X(null!=e.value?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:\"checkbox\"===e.type||\"radio\"===e.type?null!=e.checked:null!=e.value}}function et(t,e){null!=(e=e.checked)&&b(t,\"checked\",e,!1)}function rt(t,e){et(t,e);var r=X(e.value),n=e.type;if(null!=r)\"number\"===n?(0===r&&\"\"===t.value||t.value!=r)&&(t.value=\"\"+r):t.value!==\"\"+r&&(t.value=\"\"+r);else if(\"submit\"===n||\"reset\"===n)return void t.removeAttribute(\"value\");e.hasOwnProperty(\"value\")?it(t,e.type,r):e.hasOwnProperty(\"defaultValue\")&&it(t,e.type,X(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function nt(t,e,r){if(e.hasOwnProperty(\"value\")||e.hasOwnProperty(\"defaultValue\")){var n=e.type;if(!(\"submit\"!==n&&\"reset\"!==n||void 0!==e.value&&null!==e.value))return;e=\"\"+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}\"\"!==(r=t.name)&&(t.name=\"\"),t.defaultChecked=!!t._wrapperState.initialChecked,\"\"!==r&&(t.name=r)}function it(t,e,r){\"number\"===e&&$(t.ownerDocument)===t||(null==r?t.defaultValue=\"\"+t._wrapperState.initialValue:t.defaultValue!==\"\"+r&&(t.defaultValue=\"\"+r))}function at(t,e){return t=i({children:void 0},e),(e=function(t){var e=\"\";return n.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function ot(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e[\"$\"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty(\"$\"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=\"\"+X(r),e=null,i=0;i<t.length;i++){if(t[i].value===r)return t[i].selected=!0,void(n&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function st(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(o(91));return i({},e,{value:void 0,defaultValue:void 0,children:\"\"+t._wrapperState.initialValue})}function lt(t,e){var r=e.value;if(null==r){if(r=e.children,e=e.defaultValue,null!=r){if(null!=e)throw Error(o(92));if(Array.isArray(r)){if(!(1>=r.length))throw Error(o(93));r=r[0]}e=r}null==e&&(e=\"\"),r=e}t._wrapperState={initialValue:X(r)}}function ut(t,e){var r=X(e.value),n=X(e.defaultValue);null!=r&&((r=\"\"+r)!==t.value&&(t.value=r),null==e.defaultValue&&t.defaultValue!==r&&(t.defaultValue=r)),null!=n&&(t.defaultValue=\"\"+n)}function ct(t){var e=t.textContent;e===t._wrapperState.initialValue&&\"\"!==e&&null!==e&&(t.value=e)}var ft=\"http://www.w3.org/1999/xhtml\";function ht(t){switch(t){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function pt(t,e){return null==t||\"http://www.w3.org/1999/xhtml\"===t?ht(e):\"http://www.w3.org/2000/svg\"===t&&\"foreignObject\"===e?\"http://www.w3.org/1999/xhtml\":t}var dt,gt,vt=(gt=function(t,e){if(\"http://www.w3.org/2000/svg\"!==t.namespaceURI||\"innerHTML\"in t)t.innerHTML=e;else{for((dt=dt||document.createElement(\"div\")).innerHTML=\"<svg>\"+e.valueOf().toString()+\"</svg>\",e=dt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,r,n){MSApp.execUnsafeLocalFunction((function(){return gt(t,e)}))}:gt);function mt(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&3===r.nodeType)return void(r.nodeValue=e)}t.textContent=e}var yt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xt=[\"Webkit\",\"ms\",\"Moz\",\"O\"];function bt(t,e,r){return null==e||\"boolean\"==typeof e||\"\"===e?\"\":r||\"number\"!=typeof e||0===e||yt.hasOwnProperty(t)&&yt[t]?(\"\"+e).trim():e+\"px\"}function _t(t,e){for(var r in t=t.style,e)if(e.hasOwnProperty(r)){var n=0===r.indexOf(\"--\"),i=bt(r,e[r],n);\"float\"===r&&(r=\"cssFloat\"),n?t.setProperty(r,i):t[r]=i}}Object.keys(yt).forEach((function(t){xt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),yt[e]=yt[t]}))}));var wt=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kt(t,e){if(e){if(wt[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(o(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(o(60));if(\"object\"!=typeof e.dangerouslySetInnerHTML||!(\"__html\"in e.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=e.style&&\"object\"!=typeof e.style)throw Error(o(62))}}function Tt(t,e){if(-1===t.indexOf(\"-\"))return\"string\"==typeof e.is;switch(t){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}function Mt(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var At=null,St=null,Et=null;function Ct(t){if(t=ri(t)){if(\"function\"!=typeof At)throw Error(o(280));var e=t.stateNode;e&&(e=ii(e),At(t.stateNode,t.type,e))}}function Lt(t){St?Et?Et.push(t):Et=[t]:St=t}function Pt(){if(St){var t=St,e=Et;if(Et=St=null,Ct(t),e)for(t=0;t<e.length;t++)Ct(e[t])}}function Ot(t,e){return t(e)}function It(t,e,r,n,i){return t(e,r,n,i)}function Dt(){}var zt=Ot,Rt=!1,Ft=!1;function Nt(){null===St&&null===Et||(Dt(),Pt())}function Bt(t,e){var r=t.stateNode;if(null===r)return null;var n=ii(r);if(null===n)return null;r=n[e];t:switch(e){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(n=!n.disabled)||(n=!(\"button\"===(t=t.type)||\"input\"===t||\"select\"===t||\"textarea\"===t)),t=!n;break t;default:t=!1}if(t)return null;if(r&&\"function\"!=typeof r)throw Error(o(231,e,typeof r));return r}var jt=!1;if(f)try{var Ut={};Object.defineProperty(Ut,\"passive\",{get:function(){jt=!0}}),window.addEventListener(\"test\",Ut,Ut),window.removeEventListener(\"test\",Ut,Ut)}catch(gt){jt=!1}function Vt(t,e,r,n,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(t){this.onError(t)}}var Ht=!1,qt=null,Gt=!1,Yt=null,Wt={onError:function(t){Ht=!0,qt=t}};function Xt(t,e,r,n,i,a,o,s,l){Ht=!1,qt=null,Vt.apply(Wt,arguments)}function Zt(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!=(1026&(e=t).flags)&&(r=e.return),t=e.return}while(t)}return 3===e.tag?r:null}function Kt(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&null!==(t=t.alternate)&&(e=t.memoizedState),null!==e)return e.dehydrated}return null}function Jt(t){if(Zt(t)!==t)throw Error(o(188))}function $t(t){if(t=function(t){var e=t.alternate;if(!e){if(null===(e=Zt(t)))throw Error(o(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(n=i.return)){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return Jt(i),t;if(a===n)return Jt(i),e;a=a.sibling}throw Error(o(188))}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,l=i.child;l;){if(l===r){s=!0,r=i,n=a;break}if(l===n){s=!0,n=i,r=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===r){s=!0,r=a,n=i;break}if(l===n){s=!0,n=a,r=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(r.alternate!==n)throw Error(o(190))}if(3!==r.tag)throw Error(o(188));return r.stateNode.current===r?t:e}(t),!t)return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function Qt(t,e){for(var r=t.alternate;null!==e;){if(e===t||e===r)return!0;e=e.return}return!1}var te,ee,re,ne,ie=!1,ae=[],oe=null,se=null,le=null,ue=new Map,ce=new Map,fe=[],he=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");function pe(t,e,r,n,i){return{blockedOn:t,domEventName:e,eventSystemFlags:16|r,nativeEvent:i,targetContainers:[n]}}function de(t,e){switch(t){case\"focusin\":case\"focusout\":oe=null;break;case\"dragenter\":case\"dragleave\":se=null;break;case\"mouseover\":case\"mouseout\":le=null;break;case\"pointerover\":case\"pointerout\":ue.delete(e.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":ce.delete(e.pointerId)}}function ge(t,e,r,n,i,a){return null===t||t.nativeEvent!==a?(t=pe(e,r,n,i,a),null!==e&&null!==(e=ri(e))&&ee(e),t):(t.eventSystemFlags|=n,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function ve(t){var e=ei(t.target);if(null!==e){var r=Zt(e);if(null!==r)if(13===(e=r.tag)){if(null!==(e=Kt(r)))return t.blockedOn=e,void ne(t.lanePriority,(function(){a.unstable_runWithPriority(t.priority,(function(){re(r)}))}))}else if(3===e&&r.stateNode.hydrate)return void(t.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}t.blockedOn=null}function me(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var r=$e(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==r)return null!==(e=ri(r))&&ee(e),t.blockedOn=r,!1;e.shift()}return!0}function ye(t,e,r){me(t)&&r.delete(e)}function xe(){for(ie=!1;0<ae.length;){var t=ae[0];if(null!==t.blockedOn){null!==(t=ri(t.blockedOn))&&te(t);break}for(var e=t.targetContainers;0<e.length;){var r=$e(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==r){t.blockedOn=r;break}e.shift()}null===t.blockedOn&&ae.shift()}null!==oe&&me(oe)&&(oe=null),null!==se&&me(se)&&(se=null),null!==le&&me(le)&&(le=null),ue.forEach(ye),ce.forEach(ye)}function be(t,e){t.blockedOn===e&&(t.blockedOn=null,ie||(ie=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,xe)))}function _e(t){function e(e){return be(e,t)}if(0<ae.length){be(ae[0],t);for(var r=1;r<ae.length;r++){var n=ae[r];n.blockedOn===t&&(n.blockedOn=null)}}for(null!==oe&&be(oe,t),null!==se&&be(se,t),null!==le&&be(le,t),ue.forEach(e),ce.forEach(e),r=0;r<fe.length;r++)(n=fe[r]).blockedOn===t&&(n.blockedOn=null);for(;0<fe.length&&null===(r=fe[0]).blockedOn;)ve(r),null===r.blockedOn&&fe.shift()}function we(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r[\"Webkit\"+t]=\"webkit\"+e,r[\"Moz\"+t]=\"moz\"+e,r}var ke={animationend:we(\"Animation\",\"AnimationEnd\"),animationiteration:we(\"Animation\",\"AnimationIteration\"),animationstart:we(\"Animation\",\"AnimationStart\"),transitionend:we(\"Transition\",\"TransitionEnd\")},Te={},Me={};function Ae(t){if(Te[t])return Te[t];if(!ke[t])return t;var e,r=ke[t];for(e in r)if(r.hasOwnProperty(e)&&e in Me)return Te[t]=r[e];return t}f&&(Me=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete ke.animationend.animation,delete ke.animationiteration.animation,delete ke.animationstart.animation),\"TransitionEvent\"in window||delete ke.transitionend.transition);var Se=Ae(\"animationend\"),Ee=Ae(\"animationiteration\"),Ce=Ae(\"animationstart\"),Le=Ae(\"transitionend\"),Pe=new Map,Oe=new Map,Ie=[\"abort\",\"abort\",Se,\"animationEnd\",Ee,\"animationIteration\",Ce,\"animationStart\",\"canplay\",\"canPlay\",\"canplaythrough\",\"canPlayThrough\",\"durationchange\",\"durationChange\",\"emptied\",\"emptied\",\"encrypted\",\"encrypted\",\"ended\",\"ended\",\"error\",\"error\",\"gotpointercapture\",\"gotPointerCapture\",\"load\",\"load\",\"loadeddata\",\"loadedData\",\"loadedmetadata\",\"loadedMetadata\",\"loadstart\",\"loadStart\",\"lostpointercapture\",\"lostPointerCapture\",\"playing\",\"playing\",\"progress\",\"progress\",\"seeking\",\"seeking\",\"stalled\",\"stalled\",\"suspend\",\"suspend\",\"timeupdate\",\"timeUpdate\",Le,\"transitionEnd\",\"waiting\",\"waiting\"];function De(t,e){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];i=\"on\"+(i[0].toUpperCase()+i.slice(1)),Oe.set(n,e),Pe.set(n,i),u(i,[n])}}(0,a.unstable_now)();var ze=8;function Re(t){if(0!=(1&t))return ze=15,1;if(0!=(2&t))return ze=14,2;if(0!=(4&t))return ze=13,4;var e=24&t;return 0!==e?(ze=12,e):0!=(32&t)?(ze=11,32):0!=(e=192&t)?(ze=10,e):0!=(256&t)?(ze=9,256):0!=(e=3584&t)?(ze=8,e):0!=(4096&t)?(ze=7,4096):0!=(e=4186112&t)?(ze=6,e):0!=(e=62914560&t)?(ze=5,e):67108864&t?(ze=4,67108864):0!=(134217728&t)?(ze=3,134217728):0!=(e=805306368&t)?(ze=2,e):0!=(1073741824&t)?(ze=1,1073741824):(ze=8,t)}function Fe(t,e){var r=t.pendingLanes;if(0===r)return ze=0;var n=0,i=0,a=t.expiredLanes,o=t.suspendedLanes,s=t.pingedLanes;if(0!==a)n=a,i=ze=15;else if(0!=(a=134217727&r)){var l=a&~o;0!==l?(n=Re(l),i=ze):0!=(s&=a)&&(n=Re(s),i=ze)}else 0!=(a=r&~o)?(n=Re(a),i=ze):0!==s&&(n=Re(s),i=ze);if(0===n)return 0;if(n=r&((0>(n=31-He(n))?0:1<<n)<<1)-1,0!==e&&e!==n&&0==(e&o)){if(Re(e),i<=ze)return e;ze=i}if(0!==(e=t.entangledLanes))for(t=t.entanglements,e&=n;0<e;)i=1<<(r=31-He(e)),n|=t[r],e&=~i;return n}function Ne(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function Be(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return 0===(t=je(24&~e))?Be(10,e):t;case 10:return 0===(t=je(192&~e))?Be(8,e):t;case 8:return 0===(t=je(3584&~e))&&0===(t=je(4186112&~e))&&(t=512),t;case 2:return 0===(e=je(805306368&~e))&&(e=268435456),e}throw Error(o(358,t))}function je(t){return t&-t}function Ue(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Ve(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,(t=t.eventTimes)[e=31-He(e)]=r}var He=Math.clz32?Math.clz32:function(t){return 0===t?32:31-(qe(t)/Ge|0)|0},qe=Math.log,Ge=Math.LN2,Ye=a.unstable_UserBlockingPriority,We=a.unstable_runWithPriority,Xe=!0;function Ze(t,e,r,n){Rt||Dt();var i=Je,a=Rt;Rt=!0;try{It(i,t,e,r,n)}finally{(Rt=a)||Nt()}}function Ke(t,e,r,n){We(Ye,Je.bind(null,t,e,r,n))}function Je(t,e,r,n){var i;if(Xe)if((i=0==(4&e))&&0<ae.length&&-1<he.indexOf(t))t=pe(null,t,e,r,n),ae.push(t);else{var a=$e(t,e,r,n);if(null===a)i&&de(t,n);else{if(i){if(-1<he.indexOf(t))return t=pe(a,t,e,r,n),void ae.push(t);if(function(t,e,r,n,i){switch(e){case\"focusin\":return oe=ge(oe,t,e,r,n,i),!0;case\"dragenter\":return se=ge(se,t,e,r,n,i),!0;case\"mouseover\":return le=ge(le,t,e,r,n,i),!0;case\"pointerover\":var a=i.pointerId;return ue.set(a,ge(ue.get(a)||null,t,e,r,n,i)),!0;case\"gotpointercapture\":return a=i.pointerId,ce.set(a,ge(ce.get(a)||null,t,e,r,n,i)),!0}return!1}(a,t,e,r,n))return;de(t,n)}Dn(t,e,n,null,r)}}}function $e(t,e,r,n){var i=Mt(n);if(null!==(i=ei(i))){var a=Zt(i);if(null===a)i=null;else{var o=a.tag;if(13===o){if(null!==(i=Kt(a)))return i;i=null}else if(3===o){if(a.stateNode.hydrate)return 3===a.tag?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Dn(t,e,n,i,r),null}var Qe=null,tr=null,er=null;function rr(){if(er)return er;var t,e,r=tr,n=r.length,i=\"value\"in Qe?Qe.value:Qe.textContent,a=i.length;for(t=0;t<n&&r[t]===i[t];t++);var o=n-t;for(e=1;e<=o&&r[n-e]===i[a-e];e++);return er=i.slice(t,1<e?1-e:void 0)}function nr(t){var e=t.keyCode;return\"charCode\"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function ir(){return!0}function ar(){return!1}function or(t){function e(e,r,n,i,a){for(var o in this._reactName=e,this._targetInst=n,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null,t)t.hasOwnProperty(o)&&(e=t[o],this[o]=e?e(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?ir:ar,this.isPropagationStopped=ar,this}return i(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():\"unknown\"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=ir)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():\"unknown\"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=ir)},persist:function(){},isPersistent:ir}),e}var sr,lr,ur,cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fr=or(cr),hr=i({},cr,{view:0,detail:0}),pr=or(hr),dr=i({},hr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ar,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return\"movementX\"in t?t.movementX:(t!==ur&&(ur&&\"mousemove\"===t.type?(sr=t.screenX-ur.screenX,lr=t.screenY-ur.screenY):lr=sr=0,ur=t),sr)},movementY:function(t){return\"movementY\"in t?t.movementY:lr}}),gr=or(dr),vr=or(i({},dr,{dataTransfer:0})),mr=or(i({},hr,{relatedTarget:0})),yr=or(i({},cr,{animationName:0,elapsedTime:0,pseudoElement:0})),xr=i({},cr,{clipboardData:function(t){return\"clipboardData\"in t?t.clipboardData:window.clipboardData}}),br=or(xr),_r=or(i({},cr,{data:0})),wr={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},kr={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},Tr={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Mr(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Tr[t])&&!!e[t]}function Ar(){return Mr}var Sr=i({},hr,{key:function(t){if(t.key){var e=wr[t.key]||t.key;if(\"Unidentified\"!==e)return e}return\"keypress\"===t.type?13===(t=nr(t))?\"Enter\":String.fromCharCode(t):\"keydown\"===t.type||\"keyup\"===t.type?kr[t.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ar,charCode:function(t){return\"keypress\"===t.type?nr(t):0},keyCode:function(t){return\"keydown\"===t.type||\"keyup\"===t.type?t.keyCode:0},which:function(t){return\"keypress\"===t.type?nr(t):\"keydown\"===t.type||\"keyup\"===t.type?t.keyCode:0}}),Er=or(Sr),Cr=or(i({},dr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Lr=or(i({},hr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ar})),Pr=or(i({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Or=i({},dr,{deltaX:function(t){return\"deltaX\"in t?t.deltaX:\"wheelDeltaX\"in t?-t.wheelDeltaX:0},deltaY:function(t){return\"deltaY\"in t?t.deltaY:\"wheelDeltaY\"in t?-t.wheelDeltaY:\"wheelDelta\"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Ir=or(Or),Dr=[9,13,27,32],zr=f&&\"CompositionEvent\"in window,Rr=null;f&&\"documentMode\"in document&&(Rr=document.documentMode);var Fr=f&&\"TextEvent\"in window&&!Rr,Nr=f&&(!zr||Rr&&8<Rr&&11>=Rr),Br=String.fromCharCode(32),jr=!1;function Ur(t,e){switch(t){case\"keyup\":return-1!==Dr.indexOf(e.keyCode);case\"keydown\":return 229!==e.keyCode;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function Vr(t){return\"object\"==typeof(t=t.detail)&&\"data\"in t?t.data:null}var Hr=!1,qr={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return\"input\"===e?!!qr[t.type]:\"textarea\"===e}function Yr(t,e,r,n){Lt(n),0<(e=Rn(e,\"onChange\")).length&&(r=new fr(\"onChange\",\"change\",null,r,n),t.push({event:r,listeners:e}))}var Wr=null,Xr=null;function Zr(t){En(t,0)}function Kr(t){if(J(ni(t)))return t}function Jr(t,e){if(\"change\"===t)return e}var $r=!1;if(f){var Qr;if(f){var tn=\"oninput\"in document;if(!tn){var en=document.createElement(\"div\");en.setAttribute(\"oninput\",\"return;\"),tn=\"function\"==typeof en.oninput}Qr=tn}else Qr=!1;$r=Qr&&(!document.documentMode||9<document.documentMode)}function rn(){Wr&&(Wr.detachEvent(\"onpropertychange\",nn),Xr=Wr=null)}function nn(t){if(\"value\"===t.propertyName&&Kr(Xr)){var e=[];if(Yr(e,Xr,t,Mt(t)),t=Zr,Rt)t(e);else{Rt=!0;try{Ot(t,e)}finally{Rt=!1,Nt()}}}}function an(t,e,r){\"focusin\"===t?(rn(),Xr=r,(Wr=e).attachEvent(\"onpropertychange\",nn)):\"focusout\"===t&&rn()}function on(t){if(\"selectionchange\"===t||\"keyup\"===t||\"keydown\"===t)return Kr(Xr)}function sn(t,e){if(\"click\"===t)return Kr(e)}function ln(t,e){if(\"input\"===t||\"change\"===t)return Kr(e)}var un=\"function\"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},cn=Object.prototype.hasOwnProperty;function fn(t,e){if(un(t,e))return!0;if(\"object\"!=typeof t||null===t||\"object\"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++)if(!cn.call(e,r[n])||!un(t[r[n]],e[r[n]]))return!1;return!0}function hn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function pn(t,e){var r,n=hn(t);for(t=0;n;){if(3===n.nodeType){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=hn(n)}}function dn(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?dn(t,e.parentNode):\"contains\"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function gn(){for(var t=window,e=$();e instanceof t.HTMLIFrameElement;){try{var r=\"string\"==typeof e.contentWindow.location.href}catch(t){r=!1}if(!r)break;e=$((t=e.contentWindow).document)}return e}function vn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(\"input\"===e&&(\"text\"===t.type||\"search\"===t.type||\"tel\"===t.type||\"url\"===t.type||\"password\"===t.type)||\"textarea\"===e||\"true\"===t.contentEditable)}var mn=f&&\"documentMode\"in document&&11>=document.documentMode,yn=null,xn=null,bn=null,_n=!1;function wn(t,e,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;_n||null==yn||yn!==$(n)||(n=\"selectionStart\"in(n=yn)&&vn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},bn&&fn(bn,n)||(bn=n,0<(n=Rn(xn,\"onSelect\")).length&&(e=new fr(\"onSelect\",\"select\",null,e,r),t.push({event:e,listeners:n}),e.target=yn)))}De(\"cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"),0),De(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"),1),De(Ie,2);for(var kn=\"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"),Tn=0;Tn<kn.length;Tn++)Oe.set(kn[Tn],0);c(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),c(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),c(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),c(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),u(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),u(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),u(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),u(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),u(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),u(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var Mn=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),An=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(Mn));function Sn(t,e,r){var n=t.type||\"unknown-event\";t.currentTarget=r,function(t,e,r,n,i,a,s,l,u){if(Xt.apply(this,arguments),Ht){if(!Ht)throw Error(o(198));var c=qt;Ht=!1,qt=null,Gt||(Gt=!0,Yt=c)}}(n,e,void 0,t),t.currentTarget=null}function En(t,e){e=0!=(4&e);for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;t:{var a=void 0;if(e)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break t;Sn(i,s,u),a=l}else for(o=0;o<n.length;o++){if(l=(s=n[o]).instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break t;Sn(i,s,u),a=l}}}if(Gt)throw t=Yt,Gt=!1,Yt=null,t}function Cn(t,e){var r=ai(e),n=t+\"__bubble\";r.has(n)||(In(e,t,2,!1),r.add(n))}var Ln=\"_reactListening\"+Math.random().toString(36).slice(2);function Pn(t){t[Ln]||(t[Ln]=!0,s.forEach((function(e){An.has(e)||On(e,!1,t,null),On(e,!0,t,null)})))}function On(t,e,r,n){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=r;if(\"selectionchange\"===t&&9!==r.nodeType&&(a=r.ownerDocument),null!==n&&!e&&An.has(t)){if(\"scroll\"!==t)return;i|=2,a=n}var o=ai(a),s=t+\"__\"+(e?\"capture\":\"bubble\");o.has(s)||(e&&(i|=4),In(a,t,i,e),o.add(s))}function In(t,e,r,n){var i=Oe.get(e);switch(void 0===i?2:i){case 0:i=Ze;break;case 1:i=Ke;break;default:i=Je}r=i.bind(null,e,r,t),i=void 0,!jt||\"touchstart\"!==e&&\"touchmove\"!==e&&\"wheel\"!==e||(i=!0),n?void 0!==i?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):void 0!==i?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function Dn(t,e,r,n,i){var a=n;if(0==(1&e)&&0==(2&e)&&null!==n)t:for(;;){if(null===n)return;var o=n.tag;if(3===o||4===o){var s=n.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=n.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=ei(s)))return;if(5===(l=o.tag)||6===l){n=a=o;continue t}s=s.parentNode}}n=n.return}!function(t,e,r){if(Ft)return t();Ft=!0;try{zt(t,e,r)}finally{Ft=!1,Nt()}}((function(){var n=a,i=Mt(r),o=[];t:{var s=Pe.get(t);if(void 0!==s){var l=fr,u=t;switch(t){case\"keypress\":if(0===nr(r))break t;case\"keydown\":case\"keyup\":l=Er;break;case\"focusin\":u=\"focus\",l=mr;break;case\"focusout\":u=\"blur\",l=mr;break;case\"beforeblur\":case\"afterblur\":l=mr;break;case\"click\":if(2===r.button)break t;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":l=gr;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":l=vr;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":l=Lr;break;case Se:case Ee:case Ce:l=yr;break;case Le:l=Pr;break;case\"scroll\":l=pr;break;case\"wheel\":l=Ir;break;case\"copy\":case\"cut\":case\"paste\":l=br;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":l=Cr}var c=0!=(4&e),f=!c&&\"scroll\"===t,h=c?null!==s?s+\"Capture\":null:s;c=[];for(var p,d=n;null!==d;){var g=(p=d).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&null!=(g=Bt(d,h))&&c.push(zn(d,g,p))),f)break;d=d.return}0<c.length&&(s=new l(s,u,null,r,i),o.push({event:s,listeners:c}))}}if(0==(7&e)){if(l=\"mouseout\"===t||\"pointerout\"===t,(!(s=\"mouseover\"===t||\"pointerover\"===t)||0!=(16&e)||!(u=r.relatedTarget||r.fromElement)||!ei(u)&&!u[Qn])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=n,null!==(u=(u=r.relatedTarget||r.toElement)?ei(u):null)&&(u!==(f=Zt(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=n),l!==u)){if(c=gr,g=\"onMouseLeave\",h=\"onMouseEnter\",d=\"mouse\",\"pointerout\"!==t&&\"pointerover\"!==t||(c=Cr,g=\"onPointerLeave\",h=\"onPointerEnter\",d=\"pointer\"),f=null==l?s:ni(l),p=null==u?s:ni(u),(s=new c(g,d+\"leave\",l,r,i)).target=f,s.relatedTarget=p,g=null,ei(i)===n&&((c=new c(h,d+\"enter\",u,r,i)).target=p,c.relatedTarget=f,g=c),f=g,l&&u)t:{for(h=u,d=0,p=c=l;p;p=Fn(p))d++;for(p=0,g=h;g;g=Fn(g))p++;for(;0<d-p;)c=Fn(c),d--;for(;0<p-d;)h=Fn(h),p--;for(;d--;){if(c===h||null!==h&&c===h.alternate)break t;c=Fn(c),h=Fn(h)}c=null}else c=null;null!==l&&Nn(o,s,l,c,!1),null!==u&&null!==f&&Nn(o,f,u,c,!0)}if(\"select\"===(l=(s=n?ni(n):window).nodeName&&s.nodeName.toLowerCase())||\"input\"===l&&\"file\"===s.type)var v=Jr;else if(Gr(s))if($r)v=ln;else{v=on;var m=an}else(l=s.nodeName)&&\"input\"===l.toLowerCase()&&(\"checkbox\"===s.type||\"radio\"===s.type)&&(v=sn);switch(v&&(v=v(t,n))?Yr(o,v,r,i):(m&&m(t,s,n),\"focusout\"===t&&(m=s._wrapperState)&&m.controlled&&\"number\"===s.type&&it(s,\"number\",s.value)),m=n?ni(n):window,t){case\"focusin\":(Gr(m)||\"true\"===m.contentEditable)&&(yn=m,xn=n,bn=null);break;case\"focusout\":bn=xn=yn=null;break;case\"mousedown\":_n=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":_n=!1,wn(o,r,i);break;case\"selectionchange\":if(mn)break;case\"keydown\":case\"keyup\":wn(o,r,i)}var y;if(zr)t:{switch(t){case\"compositionstart\":var x=\"onCompositionStart\";break t;case\"compositionend\":x=\"onCompositionEnd\";break t;case\"compositionupdate\":x=\"onCompositionUpdate\";break t}x=void 0}else Hr?Ur(t,r)&&(x=\"onCompositionEnd\"):\"keydown\"===t&&229===r.keyCode&&(x=\"onCompositionStart\");x&&(Nr&&\"ko\"!==r.locale&&(Hr||\"onCompositionStart\"!==x?\"onCompositionEnd\"===x&&Hr&&(y=rr()):(tr=\"value\"in(Qe=i)?Qe.value:Qe.textContent,Hr=!0)),0<(m=Rn(n,x)).length&&(x=new _r(x,t,null,r,i),o.push({event:x,listeners:m}),(y||null!==(y=Vr(r)))&&(x.data=y))),(y=Fr?function(t,e){switch(t){case\"compositionend\":return Vr(e);case\"keypress\":return 32!==e.which?null:(jr=!0,Br);case\"textInput\":return(t=e.data)===Br&&jr?null:t;default:return null}}(t,r):function(t,e){if(Hr)return\"compositionend\"===t||!zr&&Ur(t,e)?(t=rr(),er=tr=Qe=null,Hr=!1,t):null;switch(t){case\"paste\":default:return null;case\"keypress\":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case\"compositionend\":return Nr&&\"ko\"!==e.locale?null:e.data}}(t,r))&&0<(n=Rn(n,\"onBeforeInput\")).length&&(i=new _r(\"onBeforeInput\",\"beforeinput\",null,r,i),o.push({event:i,listeners:n}),i.data=y)}En(o,e)}))}function zn(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Rn(t,e){for(var r=e+\"Capture\",n=[];null!==t;){var i=t,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Bt(t,r))&&n.unshift(zn(t,a,i)),null!=(a=Bt(t,e))&&n.push(zn(t,a,i))),t=t.return}return n}function Fn(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Nn(t,e,r,n,i){for(var a=e._reactName,o=[];null!==r&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(null!==l&&l===n)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=Bt(r,a))&&o.unshift(zn(r,l,s)):i||null!=(l=Bt(r,a))&&o.push(zn(r,l,s))),r=r.return}0!==o.length&&t.push({event:e,listeners:o})}function Bn(){}var jn=null,Un=null;function Vn(t,e){switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":return!!e.autoFocus}return!1}function Hn(t,e){return\"textarea\"===t||\"option\"===t||\"noscript\"===t||\"string\"==typeof e.children||\"number\"==typeof e.children||\"object\"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var qn=\"function\"==typeof setTimeout?setTimeout:void 0,Gn=\"function\"==typeof clearTimeout?clearTimeout:void 0;function Yn(t){(1===t.nodeType||9===t.nodeType&&null!=(t=t.body))&&(t.textContent=\"\")}function Wn(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function Xn(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var r=t.data;if(\"$\"===r||\"$!\"===r||\"$?\"===r){if(0===e)return t;e--}else\"/$\"===r&&e++}t=t.previousSibling}return null}var Zn=0,Kn=Math.random().toString(36).slice(2),Jn=\"__reactFiber$\"+Kn,$n=\"__reactProps$\"+Kn,Qn=\"__reactContainer$\"+Kn,ti=\"__reactEvents$\"+Kn;function ei(t){var e=t[Jn];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Qn]||r[Jn]){if(r=e.alternate,null!==e.child||null!==r&&null!==r.child)for(t=Xn(t);null!==t;){if(r=t[Jn])return r;t=Xn(t)}return e}r=(t=r).parentNode}return null}function ri(t){return!(t=t[Jn]||t[Qn])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function ni(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(o(33))}function ii(t){return t[$n]||null}function ai(t){var e=t[ti];return void 0===e&&(e=t[ti]=new Set),e}var oi=[],si=-1;function li(t){return{current:t}}function ui(t){0>si||(t.current=oi[si],oi[si]=null,si--)}function ci(t,e){si++,oi[si]=t.current,t.current=e}var fi={},hi=li(fi),pi=li(!1),di=fi;function gi(t,e){var r=t.type.contextTypes;if(!r)return fi;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in r)a[i]=e[i];return n&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=a),a}function vi(t){return null!=t.childContextTypes}function mi(){ui(pi),ui(hi)}function yi(t,e,r){if(hi.current!==fi)throw Error(o(168));ci(hi,e),ci(pi,r)}function xi(t,e,r){var n=t.stateNode;if(t=e.childContextTypes,\"function\"!=typeof n.getChildContext)return r;for(var a in n=n.getChildContext())if(!(a in t))throw Error(o(108,W(e)||\"Unknown\",a));return i({},r,n)}function bi(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||fi,di=hi.current,ci(hi,t),ci(pi,pi.current),!0}function _i(t,e,r){var n=t.stateNode;if(!n)throw Error(o(169));r?(t=xi(t,e,di),n.__reactInternalMemoizedMergedChildContext=t,ui(pi),ui(hi),ci(hi,t)):ui(pi),ci(pi,r)}var wi=null,ki=null,Ti=a.unstable_runWithPriority,Mi=a.unstable_scheduleCallback,Ai=a.unstable_cancelCallback,Si=a.unstable_shouldYield,Ei=a.unstable_requestPaint,Ci=a.unstable_now,Li=a.unstable_getCurrentPriorityLevel,Pi=a.unstable_ImmediatePriority,Oi=a.unstable_UserBlockingPriority,Ii=a.unstable_NormalPriority,Di=a.unstable_LowPriority,zi=a.unstable_IdlePriority,Ri={},Fi=void 0!==Ei?Ei:function(){},Ni=null,Bi=null,ji=!1,Ui=Ci(),Vi=1e4>Ui?Ci:function(){return Ci()-Ui};function Hi(){switch(Li()){case Pi:return 99;case Oi:return 98;case Ii:return 97;case Di:return 96;case zi:return 95;default:throw Error(o(332))}}function qi(t){switch(t){case 99:return Pi;case 98:return Oi;case 97:return Ii;case 96:return Di;case 95:return zi;default:throw Error(o(332))}}function Gi(t,e){return t=qi(t),Ti(t,e)}function Yi(t,e,r){return t=qi(t),Mi(t,e,r)}function Wi(){if(null!==Bi){var t=Bi;Bi=null,Ai(t)}Xi()}function Xi(){if(!ji&&null!==Ni){ji=!0;var t=0;try{var e=Ni;Gi(99,(function(){for(;t<e.length;t++){var r=e[t];do{r=r(!0)}while(null!==r)}})),Ni=null}catch(e){throw null!==Ni&&(Ni=Ni.slice(t+1)),Mi(Pi,Wi),e}finally{ji=!1}}}var Zi=_.ReactCurrentBatchConfig;function Ki(t,e){if(t&&t.defaultProps){for(var r in e=i({},e),t=t.defaultProps)void 0===e[r]&&(e[r]=t[r]);return e}return e}var Ji=li(null),$i=null,Qi=null,ta=null;function ea(){ta=Qi=$i=null}function ra(t){var e=Ji.current;ui(Ji),t.type._context._currentValue=e}function na(t,e){for(;null!==t;){var r=t.alternate;if((t.childLanes&e)===e){if(null===r||(r.childLanes&e)===e)break;r.childLanes|=e}else t.childLanes|=e,null!==r&&(r.childLanes|=e);t=t.return}}function ia(t,e){$i=t,ta=Qi=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(Ro=!0),t.firstContext=null)}function aa(t,e){if(ta!==t&&!1!==e&&0!==e)if(\"number\"==typeof e&&1073741823!==e||(ta=t,e=1073741823),e={context:t,observedBits:e,next:null},null===Qi){if(null===$i)throw Error(o(308));Qi=e,$i.dependencies={lanes:0,firstContext:e,responders:null}}else Qi=Qi.next=e;return t._currentValue}var oa=!1;function sa(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function la(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ua(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ca(t,e){if(null!==(t=t.updateQueue)){var r=(t=t.shared).pending;null===r?e.next=e:(e.next=r.next,r.next=e),t.pending=e}}function fa(t,e){var r=t.updateQueue,n=t.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,a=null;if(null!==(r=r.firstBaseUpdate)){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===a?i=a=o:a=a.next=o,r=r.next}while(null!==r);null===a?i=a=e:a=a.next=e}else i=a=e;return r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},void(t.updateQueue=r)}null===(t=r.lastBaseUpdate)?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function ha(t,e,r,n){var a=t.updateQueue;oa=!1;var o=a.firstBaseUpdate,s=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var u=l,c=u.next;u.next=null,null===s?o=c:s.next=c,s=u;var f=t.alternate;if(null!==f){var h=(f=f.updateQueue).lastBaseUpdate;h!==s&&(null===h?f.firstBaseUpdate=c:h.next=c,f.lastBaseUpdate=u)}}if(null!==o){for(h=a.baseState,s=0,f=c=u=null;;){l=o.lane;var p=o.eventTime;if((n&l)===l){null!==f&&(f=f.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});t:{var d=t,g=o;switch(l=e,p=r,g.tag){case 1:if(\"function\"==typeof(d=g.payload)){h=d.call(p,h,l);break t}h=d;break t;case 3:d.flags=-4097&d.flags|64;case 0:if(null==(l=\"function\"==typeof(d=g.payload)?d.call(p,h,l):d))break t;h=i({},h,l);break t;case 2:oa=!0}}null!==o.callback&&(t.flags|=32,null===(l=a.effects)?a.effects=[o]:l.push(o))}else p={eventTime:p,lane:l,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===f?(c=f=p,u=h):f=f.next=p,s|=l;if(null===(o=o.next)){if(null===(l=a.shared.pending))break;o=l.next,l.next=null,a.lastBaseUpdate=l,a.shared.pending=null}}null===f&&(u=h),a.baseState=u,a.firstBaseUpdate=c,a.lastBaseUpdate=f,Ns|=s,t.lanes=s,t.memoizedState=h}}function pa(t,e,r){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(null!==i){if(n.callback=null,n=r,\"function\"!=typeof i)throw Error(o(191,i));i.call(n)}}}var da=(new n.Component).refs;function ga(t,e,r,n){r=null==(r=r(n,e=t.memoizedState))?e:i({},e,r),t.memoizedState=r,0===t.lanes&&(t.updateQueue.baseState=r)}var va={isMounted:function(t){return!!(t=t._reactInternals)&&Zt(t)===t},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ul(),i=cl(t),a=ua(n,i);a.payload=e,null!=r&&(a.callback=r),ca(t,a),fl(t,i,n)},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ul(),i=cl(t),a=ua(n,i);a.tag=1,a.payload=e,null!=r&&(a.callback=r),ca(t,a),fl(t,i,n)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ul(),n=cl(t),i=ua(r,n);i.tag=2,null!=e&&(i.callback=e),ca(t,i),fl(t,n,r)}};function ma(t,e,r,n,i,a,o){return\"function\"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(n,a,o):!(e.prototype&&e.prototype.isPureReactComponent&&fn(r,n)&&fn(i,a))}function ya(t,e,r){var n=!1,i=fi,a=e.contextType;return\"object\"==typeof a&&null!==a?a=aa(a):(i=vi(e)?di:hi.current,a=(n=null!=(n=e.contextTypes))?gi(t,i):fi),e=new e(r,a),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=va,t.stateNode=e,e._reactInternals=t,n&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function xa(t,e,r,n){t=e.state,\"function\"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(r,n),\"function\"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&va.enqueueReplaceState(e,e.state,null)}function ba(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs=da,sa(t);var a=e.contextType;\"object\"==typeof a&&null!==a?i.context=aa(a):(a=vi(e)?di:hi.current,i.context=gi(t,a)),ha(t,r,i,n),i.state=t.memoizedState,\"function\"==typeof(a=e.getDerivedStateFromProps)&&(ga(t,e,a,r),i.state=t.memoizedState),\"function\"==typeof e.getDerivedStateFromProps||\"function\"==typeof i.getSnapshotBeforeUpdate||\"function\"!=typeof i.UNSAFE_componentWillMount&&\"function\"!=typeof i.componentWillMount||(e=i.state,\"function\"==typeof i.componentWillMount&&i.componentWillMount(),\"function\"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&va.enqueueReplaceState(i,i.state,null),ha(t,r,i,n),i.state=t.memoizedState),\"function\"==typeof i.componentDidMount&&(t.flags|=4)}var _a=Array.isArray;function wa(t,e,r){if(null!==(t=r.ref)&&\"function\"!=typeof t&&\"object\"!=typeof t){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(o(309));var n=r.stateNode}if(!n)throw Error(o(147,t));var i=\"\"+t;return null!==e&&null!==e.ref&&\"function\"==typeof e.ref&&e.ref._stringRef===i?e.ref:(e=function(t){var e=n.refs;e===da&&(e=n.refs={}),null===t?delete e[i]:e[i]=t},e._stringRef=i,e)}if(\"string\"!=typeof t)throw Error(o(284));if(!r._owner)throw Error(o(290,t))}return t}function ka(t,e){if(\"textarea\"!==t.type)throw Error(o(31,\"[object Object]\"===Object.prototype.toString.call(e)?\"object with keys {\"+Object.keys(e).join(\", \")+\"}\":e))}function Ta(t){function e(e,r){if(t){var n=e.lastEffect;null!==n?(n.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r,r.nextEffect=null,r.flags=8}}function r(r,n){if(!t)return null;for(;null!==n;)e(r,n),n=n.sibling;return null}function n(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=Hl(t,e)).index=0,t.sibling=null,t}function a(e,r,n){return e.index=n,t?null!==(n=e.alternate)?(n=n.index)<r?(e.flags=2,r):n:(e.flags=2,r):r}function s(e){return t&&null===e.alternate&&(e.flags=2),e}function l(t,e,r,n){return null===e||6!==e.tag?((e=Wl(r,t.mode,n)).return=t,e):((e=i(e,r)).return=t,e)}function u(t,e,r,n){return null!==e&&e.elementType===r.type?((n=i(e,r.props)).ref=wa(t,e,r),n.return=t,n):((n=ql(r.type,r.key,r.props,null,t.mode,n)).ref=wa(t,e,r),n.return=t,n)}function c(t,e,r,n){return null===e||4!==e.tag||e.stateNode.containerInfo!==r.containerInfo||e.stateNode.implementation!==r.implementation?((e=Xl(r,t.mode,n)).return=t,e):((e=i(e,r.children||[])).return=t,e)}function f(t,e,r,n,a){return null===e||7!==e.tag?((e=Gl(r,t.mode,n,a)).return=t,e):((e=i(e,r)).return=t,e)}function h(t,e,r){if(\"string\"==typeof e||\"number\"==typeof e)return(e=Wl(\"\"+e,t.mode,r)).return=t,e;if(\"object\"==typeof e&&null!==e){switch(e.$$typeof){case w:return(r=ql(e.type,e.key,e.props,null,t.mode,r)).ref=wa(t,null,e),r.return=t,r;case k:return(e=Xl(e,t.mode,r)).return=t,e}if(_a(e)||V(e))return(e=Gl(e,t.mode,r,null)).return=t,e;ka(t,e)}return null}function p(t,e,r,n){var i=null!==e?e.key:null;if(\"string\"==typeof r||\"number\"==typeof r)return null!==i?null:l(t,e,\"\"+r,n);if(\"object\"==typeof r&&null!==r){switch(r.$$typeof){case w:return r.key===i?r.type===T?f(t,e,r.props.children,n,i):u(t,e,r,n):null;case k:return r.key===i?c(t,e,r,n):null}if(_a(r)||V(r))return null!==i?null:f(t,e,r,n,null);ka(t,r)}return null}function d(t,e,r,n,i){if(\"string\"==typeof n||\"number\"==typeof n)return l(e,t=t.get(r)||null,\"\"+n,i);if(\"object\"==typeof n&&null!==n){switch(n.$$typeof){case w:return t=t.get(null===n.key?r:n.key)||null,n.type===T?f(e,t,n.props.children,i,n.key):u(e,t,n,i);case k:return c(e,t=t.get(null===n.key?r:n.key)||null,n,i)}if(_a(n)||V(n))return f(e,t=t.get(r)||null,n,i,null);ka(e,n)}return null}function g(i,o,s,l){for(var u=null,c=null,f=o,g=o=0,v=null;null!==f&&g<s.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var m=p(i,f,s[g],l);if(null===m){null===f&&(f=v);break}t&&f&&null===m.alternate&&e(i,f),o=a(m,o,g),null===c?u=m:c.sibling=m,c=m,f=v}if(g===s.length)return r(i,f),u;if(null===f){for(;g<s.length;g++)null!==(f=h(i,s[g],l))&&(o=a(f,o,g),null===c?u=f:c.sibling=f,c=f);return u}for(f=n(i,f);g<s.length;g++)null!==(v=d(f,i,g,s[g],l))&&(t&&null!==v.alternate&&f.delete(null===v.key?g:v.key),o=a(v,o,g),null===c?u=v:c.sibling=v,c=v);return t&&f.forEach((function(t){return e(i,t)})),u}function v(i,s,l,u){var c=V(l);if(\"function\"!=typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(151));for(var f=c=null,g=s,v=s=0,m=null,y=l.next();null!==g&&!y.done;v++,y=l.next()){g.index>v?(m=g,g=null):m=g.sibling;var x=p(i,g,y.value,u);if(null===x){null===g&&(g=m);break}t&&g&&null===x.alternate&&e(i,g),s=a(x,s,v),null===f?c=x:f.sibling=x,f=x,g=m}if(y.done)return r(i,g),c;if(null===g){for(;!y.done;v++,y=l.next())null!==(y=h(i,y.value,u))&&(s=a(y,s,v),null===f?c=y:f.sibling=y,f=y);return c}for(g=n(i,g);!y.done;v++,y=l.next())null!==(y=d(g,i,v,y.value,u))&&(t&&null!==y.alternate&&g.delete(null===y.key?v:y.key),s=a(y,s,v),null===f?c=y:f.sibling=y,f=y);return t&&g.forEach((function(t){return e(i,t)})),c}return function(t,n,a,l){var u=\"object\"==typeof a&&null!==a&&a.type===T&&null===a.key;u&&(a=a.props.children);var c=\"object\"==typeof a&&null!==a;if(c)switch(a.$$typeof){case w:t:{for(c=a.key,u=n;null!==u;){if(u.key===c){if(7===u.tag){if(a.type===T){r(t,u.sibling),(n=i(u,a.props.children)).return=t,t=n;break t}}else if(u.elementType===a.type){r(t,u.sibling),(n=i(u,a.props)).ref=wa(t,u,a),n.return=t,t=n;break t}r(t,u);break}e(t,u),u=u.sibling}a.type===T?((n=Gl(a.props.children,t.mode,l,a.key)).return=t,t=n):((l=ql(a.type,a.key,a.props,null,t.mode,l)).ref=wa(t,n,a),l.return=t,t=l)}return s(t);case k:t:{for(u=a.key;null!==n;){if(n.key===u){if(4===n.tag&&n.stateNode.containerInfo===a.containerInfo&&n.stateNode.implementation===a.implementation){r(t,n.sibling),(n=i(n,a.children||[])).return=t,t=n;break t}r(t,n);break}e(t,n),n=n.sibling}(n=Xl(a,t.mode,l)).return=t,t=n}return s(t)}if(\"string\"==typeof a||\"number\"==typeof a)return a=\"\"+a,null!==n&&6===n.tag?(r(t,n.sibling),(n=i(n,a)).return=t,t=n):(r(t,n),(n=Wl(a,t.mode,l)).return=t,t=n),s(t);if(_a(a))return g(t,n,a,l);if(V(a))return v(t,n,a,l);if(c&&ka(t,a),void 0===a&&!u)switch(t.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,W(t.type)||\"Component\"))}return r(t,n)}}var Ma=Ta(!0),Aa=Ta(!1),Sa={},Ea=li(Sa),Ca=li(Sa),La=li(Sa);function Pa(t){if(t===Sa)throw Error(o(174));return t}function Oa(t,e){switch(ci(La,e),ci(Ca,t),ci(Ea,Sa),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:pt(null,\"\");break;default:e=pt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}ui(Ea),ci(Ea,e)}function Ia(){ui(Ea),ui(Ca),ui(La)}function Da(t){Pa(La.current);var e=Pa(Ea.current),r=pt(e,t.type);e!==r&&(ci(Ca,t),ci(Ea,r))}function za(t){Ca.current===t&&(ui(Ea),ui(Ca))}var Ra=li(0);function Fa(t){for(var e=t;null!==e;){if(13===e.tag){var r=e.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||\"$?\"===r.data||\"$!\"===r.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(64&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Na=null,Ba=null,ja=!1;function Ua(t,e){var r=Ul(5,null,null,0);r.elementType=\"DELETED\",r.type=\"DELETED\",r.stateNode=e,r.return=t,r.flags=8,null!==t.lastEffect?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function Va(t,e){switch(t.tag){case 5:var r=t.type;return null!==(e=1!==e.nodeType||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=\"\"===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);default:return!1}}function Ha(t){if(ja){var e=Ba;if(e){var r=e;if(!Va(t,e)){if(!(e=Wn(r.nextSibling))||!Va(t,e))return t.flags=-1025&t.flags|2,ja=!1,void(Na=t);Ua(Na,r)}Na=t,Ba=Wn(e.firstChild)}else t.flags=-1025&t.flags|2,ja=!1,Na=t}}function qa(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;Na=t}function Ga(t){if(t!==Na)return!1;if(!ja)return qa(t),ja=!0,!1;var e=t.type;if(5!==t.tag||\"head\"!==e&&\"body\"!==e&&!Hn(e,t.memoizedProps))for(e=Ba;e;)Ua(t,e),e=Wn(e.nextSibling);if(qa(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(o(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var r=t.data;if(\"/$\"===r){if(0===e){Ba=Wn(t.nextSibling);break t}e--}else\"$\"!==r&&\"$!\"!==r&&\"$?\"!==r||e++}t=t.nextSibling}Ba=null}}else Ba=Na?Wn(t.stateNode.nextSibling):null;return!0}function Ya(){Ba=Na=null,ja=!1}var Wa=[];function Xa(){for(var t=0;t<Wa.length;t++)Wa[t]._workInProgressVersionPrimary=null;Wa.length=0}var Za=_.ReactCurrentDispatcher,Ka=_.ReactCurrentBatchConfig,Ja=0,$a=null,Qa=null,to=null,eo=!1,ro=!1;function no(){throw Error(o(321))}function io(t,e){if(null===e)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!un(t[r],e[r]))return!1;return!0}function ao(t,e,r,n,i,a){if(Ja=a,$a=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Za.current=null===t||null===t.memoizedState?Oo:Io,t=r(n,i),ro){a=0;do{if(ro=!1,!(25>a))throw Error(o(301));a+=1,to=Qa=null,e.updateQueue=null,Za.current=Do,t=r(n,i)}while(ro)}if(Za.current=Po,e=null!==Qa&&null!==Qa.next,Ja=0,to=Qa=$a=null,eo=!1,e)throw Error(o(300));return t}function oo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===to?$a.memoizedState=to=t:to=to.next=t,to}function so(){if(null===Qa){var t=$a.alternate;t=null!==t?t.memoizedState:null}else t=Qa.next;var e=null===to?$a.memoizedState:to.next;if(null!==e)to=e,Qa=t;else{if(null===t)throw Error(o(310));t={memoizedState:(Qa=t).memoizedState,baseState:Qa.baseState,baseQueue:Qa.baseQueue,queue:Qa.queue,next:null},null===to?$a.memoizedState=to=t:to=to.next=t}return to}function lo(t,e){return\"function\"==typeof e?e(t):e}function uo(t){var e=so(),r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=t;var n=Qa,i=n.baseQueue,a=r.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}n.baseQueue=i=a,r.pending=null}if(null!==i){i=i.next,n=n.baseState;var l=s=a=null,u=i;do{var c=u.lane;if((Ja&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),n=u.eagerReducer===t?u.eagerState:t(n,u.action);else{var f={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===l?(s=l=f,a=n):l=l.next=f,$a.lanes|=c,Ns|=c}u=u.next}while(null!==u&&u!==i);null===l?a=n:l.next=s,un(n,e.memoizedState)||(Ro=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=l,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function co(t){var e=so(),r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do{a=t(a,s.action),s=s.next}while(s!==i);un(a,e.memoizedState)||(Ro=!0),e.memoizedState=a,null===e.baseQueue&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function fo(t,e,r){var n=e._getVersion;n=n(e._source);var i=e._workInProgressVersionPrimary;if(null!==i?t=i===n:(t=t.mutableReadLanes,(t=(Ja&t)===t)&&(e._workInProgressVersionPrimary=n,Wa.push(e))),t)return r(e._source);throw Wa.push(e),Error(o(350))}function ho(t,e,r,n){var i=Ls;if(null===i)throw Error(o(349));var a=e._getVersion,s=a(e._source),l=Za.current,u=l.useState((function(){return fo(i,e,r)})),c=u[1],f=u[0];u=to;var h=t.memoizedState,p=h.refs,d=p.getSnapshot,g=h.source;h=h.subscribe;var v=$a;return t.memoizedState={refs:p,source:e,subscribe:n},l.useEffect((function(){p.getSnapshot=r,p.setSnapshot=c;var t=a(e._source);if(!un(s,t)){t=r(e._source),un(f,t)||(c(t),t=cl(v),i.mutableReadLanes|=t&i.pendingLanes),t=i.mutableReadLanes,i.entangledLanes|=t;for(var n=i.entanglements,o=t;0<o;){var l=31-He(o),u=1<<l;n[l]|=t,o&=~u}}}),[r,e,n]),l.useEffect((function(){return n(e._source,(function(){var t=p.getSnapshot,r=p.setSnapshot;try{r(t(e._source));var n=cl(v);i.mutableReadLanes|=n&i.pendingLanes}catch(t){r((function(){throw t}))}}))}),[e,n]),un(d,r)&&un(g,e)&&un(h,n)||((t={pending:null,dispatch:null,lastRenderedReducer:lo,lastRenderedState:f}).dispatch=c=Lo.bind(null,$a,t),u.queue=t,u.baseQueue=null,f=fo(i,e,r),u.memoizedState=u.baseState=f),f}function po(t,e,r){return ho(so(),t,e,r)}function go(t){var e=oo();return\"function\"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:lo,lastRenderedState:t}).dispatch=Lo.bind(null,$a,t),[e.memoizedState,t]}function vo(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},null===(e=$a.updateQueue)?(e={lastEffect:null},$a.updateQueue=e,e.lastEffect=t.next=t):null===(r=e.lastEffect)?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t),t}function mo(t){return t={current:t},oo().memoizedState=t}function yo(){return so().memoizedState}function xo(t,e,r,n){var i=oo();$a.flags|=t,i.memoizedState=vo(1|e,r,void 0,void 0===n?null:n)}function bo(t,e,r,n){var i=so();n=void 0===n?null:n;var a=void 0;if(null!==Qa){var o=Qa.memoizedState;if(a=o.destroy,null!==n&&io(n,o.deps))return void vo(e,r,a,n)}$a.flags|=t,i.memoizedState=vo(1|e,r,a,n)}function _o(t,e){return xo(516,4,t,e)}function wo(t,e){return bo(516,4,t,e)}function ko(t,e){return bo(4,2,t,e)}function To(t,e){return\"function\"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Mo(t,e,r){return r=null!=r?r.concat([t]):null,bo(4,2,To.bind(null,e,t),r)}function Ao(){}function So(t,e){var r=so();e=void 0===e?null:e;var n=r.memoizedState;return null!==n&&null!==e&&io(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function Eo(t,e){var r=so();e=void 0===e?null:e;var n=r.memoizedState;return null!==n&&null!==e&&io(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function Co(t,e){var r=Hi();Gi(98>r?98:r,(function(){t(!0)})),Gi(97<r?97:r,(function(){var r=Ka.transition;Ka.transition=1;try{t(!1),e()}finally{Ka.transition=r}}))}function Lo(t,e,r){var n=ul(),i=cl(t),a={lane:i,action:r,eagerReducer:null,eagerState:null,next:null},o=e.pending;if(null===o?a.next=a:(a.next=o.next,o.next=a),e.pending=a,o=t.alternate,t===$a||null!==o&&o===$a)ro=eo=!0;else{if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var s=e.lastRenderedState,l=o(s,r);if(a.eagerReducer=o,a.eagerState=l,un(l,s))return}catch(t){}fl(t,i,n)}}var Po={readContext:aa,useCallback:no,useContext:no,useEffect:no,useImperativeHandle:no,useLayoutEffect:no,useMemo:no,useReducer:no,useRef:no,useState:no,useDebugValue:no,useDeferredValue:no,useTransition:no,useMutableSource:no,useOpaqueIdentifier:no,unstable_isNewReconciler:!1},Oo={readContext:aa,useCallback:function(t,e){return oo().memoizedState=[t,void 0===e?null:e],t},useContext:aa,useEffect:_o,useImperativeHandle:function(t,e,r){return r=null!=r?r.concat([t]):null,xo(4,2,To.bind(null,e,t),r)},useLayoutEffect:function(t,e){return xo(4,2,t,e)},useMemo:function(t,e){var r=oo();return e=void 0===e?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=oo();return e=void 0!==r?r(e):e,n.memoizedState=n.baseState=e,t=(t=n.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=Lo.bind(null,$a,t),[n.memoizedState,t]},useRef:mo,useState:go,useDebugValue:Ao,useDeferredValue:function(t){var e=go(t),r=e[0],n=e[1];return _o((function(){var e=Ka.transition;Ka.transition=1;try{n(t)}finally{Ka.transition=e}}),[t]),r},useTransition:function(){var t=go(!1),e=t[0];return mo(t=Co.bind(null,t[1])),[t,e]},useMutableSource:function(t,e,r){var n=oo();return n.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:r},ho(n,t,e,r)},useOpaqueIdentifier:function(){if(ja){var t=!1,e=function(t){return{$$typeof:z,toString:t,valueOf:t}}((function(){throw t||(t=!0,r(\"r:\"+(Zn++).toString(36))),Error(o(355))})),r=go(e)[1];return 0==(2&$a.mode)&&($a.flags|=516,vo(5,(function(){r(\"r:\"+(Zn++).toString(36))}),void 0,null)),e}return go(e=\"r:\"+(Zn++).toString(36)),e},unstable_isNewReconciler:!1},Io={readContext:aa,useCallback:So,useContext:aa,useEffect:wo,useImperativeHandle:Mo,useLayoutEffect:ko,useMemo:Eo,useReducer:uo,useRef:yo,useState:function(){return uo(lo)},useDebugValue:Ao,useDeferredValue:function(t){var e=uo(lo),r=e[0],n=e[1];return wo((function(){var e=Ka.transition;Ka.transition=1;try{n(t)}finally{Ka.transition=e}}),[t]),r},useTransition:function(){var t=uo(lo)[0];return[yo().current,t]},useMutableSource:po,useOpaqueIdentifier:function(){return uo(lo)[0]},unstable_isNewReconciler:!1},Do={readContext:aa,useCallback:So,useContext:aa,useEffect:wo,useImperativeHandle:Mo,useLayoutEffect:ko,useMemo:Eo,useReducer:co,useRef:yo,useState:function(){return co(lo)},useDebugValue:Ao,useDeferredValue:function(t){var e=co(lo),r=e[0],n=e[1];return wo((function(){var e=Ka.transition;Ka.transition=1;try{n(t)}finally{Ka.transition=e}}),[t]),r},useTransition:function(){var t=co(lo)[0];return[yo().current,t]},useMutableSource:po,useOpaqueIdentifier:function(){return co(lo)[0]},unstable_isNewReconciler:!1},zo=_.ReactCurrentOwner,Ro=!1;function Fo(t,e,r,n){e.child=null===t?Aa(e,null,r,n):Ma(e,t.child,r,n)}function No(t,e,r,n,i){r=r.render;var a=e.ref;return ia(e,i),n=ao(t,e,r,n,a,i),null===t||Ro?(e.flags|=1,Fo(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,rs(t,e,i))}function Bo(t,e,r,n,i,a){if(null===t){var o=r.type;return\"function\"!=typeof o||Vl(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((t=ql(r.type,null,n,e,e.mode,a)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,jo(t,e,o,n,i,a))}return o=t.child,0==(i&a)&&(i=o.memoizedProps,(r=null!==(r=r.compare)?r:fn)(i,n)&&t.ref===e.ref)?rs(t,e,a):(e.flags|=1,(t=Hl(o,n)).ref=e.ref,t.return=e,e.child=t)}function jo(t,e,r,n,i,a){if(null!==t&&fn(t.memoizedProps,n)&&t.ref===e.ref){if(Ro=!1,0==(a&i))return e.lanes=t.lanes,rs(t,e,a);0!=(16384&t.flags)&&(Ro=!0)}return Ho(t,e,r,n,a)}function Uo(t,e,r){var n=e.pendingProps,i=n.children,a=null!==t?t.memoizedState:null;if(\"hidden\"===n.mode||\"unstable-defer-without-hiding\"===n.mode)if(0==(4&e.mode))e.memoizedState={baseLanes:0},xl(0,r);else{if(0==(1073741824&r))return t=null!==a?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},xl(0,t),null;e.memoizedState={baseLanes:0},xl(0,null!==a?a.baseLanes:r)}else null!==a?(n=a.baseLanes|r,e.memoizedState=null):n=r,xl(0,n);return Fo(t,e,i,r),e.child}function Vo(t,e){var r=e.ref;(null===t&&null!==r||null!==t&&t.ref!==r)&&(e.flags|=128)}function Ho(t,e,r,n,i){var a=vi(r)?di:hi.current;return a=gi(e,a),ia(e,i),r=ao(t,e,r,n,a,i),null===t||Ro?(e.flags|=1,Fo(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,rs(t,e,i))}function qo(t,e,r,n,i){if(vi(r)){var a=!0;bi(e)}else a=!1;if(ia(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),ya(e,r,n),ba(e,r,n,i),n=!0;else if(null===t){var o=e.stateNode,s=e.memoizedProps;o.props=s;var l=o.context,u=r.contextType;u=\"object\"==typeof u&&null!==u?aa(u):gi(e,u=vi(r)?di:hi.current);var c=r.getDerivedStateFromProps,f=\"function\"==typeof c||\"function\"==typeof o.getSnapshotBeforeUpdate;f||\"function\"!=typeof o.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof o.componentWillReceiveProps||(s!==n||l!==u)&&xa(e,o,n,u),oa=!1;var h=e.memoizedState;o.state=h,ha(e,n,o,i),l=e.memoizedState,s!==n||h!==l||pi.current||oa?(\"function\"==typeof c&&(ga(e,r,c,n),l=e.memoizedState),(s=oa||ma(e,r,s,n,h,l,u))?(f||\"function\"!=typeof o.UNSAFE_componentWillMount&&\"function\"!=typeof o.componentWillMount||(\"function\"==typeof o.componentWillMount&&o.componentWillMount(),\"function\"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),\"function\"==typeof o.componentDidMount&&(e.flags|=4)):(\"function\"==typeof o.componentDidMount&&(e.flags|=4),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(\"function\"==typeof o.componentDidMount&&(e.flags|=4),n=!1)}else{o=e.stateNode,la(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:Ki(e.type,s),o.props=u,f=e.pendingProps,h=o.context,l=\"object\"==typeof(l=r.contextType)&&null!==l?aa(l):gi(e,l=vi(r)?di:hi.current);var p=r.getDerivedStateFromProps;(c=\"function\"==typeof p||\"function\"==typeof o.getSnapshotBeforeUpdate)||\"function\"!=typeof o.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof o.componentWillReceiveProps||(s!==f||h!==l)&&xa(e,o,n,l),oa=!1,h=e.memoizedState,o.state=h,ha(e,n,o,i);var d=e.memoizedState;s!==f||h!==d||pi.current||oa?(\"function\"==typeof p&&(ga(e,r,p,n),d=e.memoizedState),(u=oa||ma(e,r,u,n,h,d,l))?(c||\"function\"!=typeof o.UNSAFE_componentWillUpdate&&\"function\"!=typeof o.componentWillUpdate||(\"function\"==typeof o.componentWillUpdate&&o.componentWillUpdate(n,d,l),\"function\"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(n,d,l)),\"function\"==typeof o.componentDidUpdate&&(e.flags|=4),\"function\"==typeof o.getSnapshotBeforeUpdate&&(e.flags|=256)):(\"function\"!=typeof o.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),\"function\"!=typeof o.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),e.memoizedProps=n,e.memoizedState=d),o.props=n,o.state=d,o.context=l,n=u):(\"function\"!=typeof o.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),\"function\"!=typeof o.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),n=!1)}return Go(t,e,r,n,a,i)}function Go(t,e,r,n,i,a){Vo(t,e);var o=0!=(64&e.flags);if(!n&&!o)return i&&_i(e,r,!1),rs(t,e,a);n=e.stateNode,zo.current=e;var s=o&&\"function\"!=typeof r.getDerivedStateFromError?null:n.render();return e.flags|=1,null!==t&&o?(e.child=Ma(e,t.child,null,a),e.child=Ma(e,null,s,a)):Fo(t,e,s,a),e.memoizedState=n.state,i&&_i(e,r,!0),e.child}function Yo(t){var e=t.stateNode;e.pendingContext?yi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&yi(0,e.context,!1),Oa(t,e.containerInfo)}var Wo,Xo,Zo,Ko={dehydrated:null,retryLane:0};function Jo(t,e,r){var n,i=e.pendingProps,a=Ra.current,o=!1;return(n=0!=(64&e.flags))||(n=(null===t||null!==t.memoizedState)&&0!=(2&a)),n?(o=!0,e.flags&=-65):null!==t&&null===t.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),ci(Ra,1&a),null===t?(void 0!==i.fallback&&Ha(e),t=i.children,a=i.fallback,o?(t=$o(e,t,a,r),e.child.memoizedState={baseLanes:r},e.memoizedState=Ko,t):\"number\"==typeof i.unstable_expectedLoadTime?(t=$o(e,t,a,r),e.child.memoizedState={baseLanes:r},e.memoizedState=Ko,e.lanes=33554432,t):((r=Yl({mode:\"visible\",children:t},e.mode,r,null)).return=e,e.child=r)):(t.memoizedState,o?(i=function(t,e,r,n,i){var a=e.mode,o=t.child;t=o.sibling;var s={mode:\"hidden\",children:r};return 0==(2&a)&&e.child!==o?((r=e.child).childLanes=0,r.pendingProps=s,null!==(o=r.lastEffect)?(e.firstEffect=r.firstEffect,e.lastEffect=o,o.nextEffect=null):e.firstEffect=e.lastEffect=null):r=Hl(o,s),null!==t?n=Hl(t,n):(n=Gl(n,a,i,null)).flags|=2,n.return=e,r.return=e,r.sibling=n,e.child=r,n}(t,e,i.children,i.fallback,r),o=e.child,a=t.child.memoizedState,o.memoizedState=null===a?{baseLanes:r}:{baseLanes:a.baseLanes|r},o.childLanes=t.childLanes&~r,e.memoizedState=Ko,i):(r=function(t,e,r,n){var i=t.child;return t=i.sibling,r=Hl(i,{mode:\"visible\",children:r}),0==(2&e.mode)&&(r.lanes=n),r.return=e,r.sibling=null,null!==t&&(t.nextEffect=null,t.flags=8,e.firstEffect=e.lastEffect=t),e.child=r}(t,e,i.children,r),e.memoizedState=null,r))}function $o(t,e,r,n){var i=t.mode,a=t.child;return e={mode:\"hidden\",children:e},0==(2&i)&&null!==a?(a.childLanes=0,a.pendingProps=e):a=Yl(e,i,0,null),r=Gl(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r}function Qo(t,e){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),na(t.return,e)}function ts(t,e,r,n,i,a){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i,lastEffect:a}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i,o.lastEffect=a)}function es(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(Fo(t,e,n.children,r),0!=(2&(n=Ra.current)))n=1&n|2,e.flags|=64;else{if(null!==t&&0!=(64&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Qo(t,r);else if(19===t.tag)Qo(t,r);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(ci(Ra,n),0==(2&e.mode))e.memoizedState=null;else switch(i){case\"forwards\":for(r=e.child,i=null;null!==r;)null!==(t=r.alternate)&&null===Fa(t)&&(i=r),r=r.sibling;null===(r=i)?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),ts(e,!1,i,r,a,e.lastEffect);break;case\"backwards\":for(r=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===Fa(t)){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}ts(e,!0,r,null,a,e.lastEffect);break;case\"together\":ts(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function rs(t,e,r){if(null!==t&&(e.dependencies=t.dependencies),Ns|=e.lanes,0!=(r&e.childLanes)){if(null!==t&&e.child!==t.child)throw Error(o(153));if(null!==e.child){for(r=Hl(t=e.child,t.pendingProps),e.child=r,r.return=e;null!==t.sibling;)t=t.sibling,(r=r.sibling=Hl(t,t.pendingProps)).return=e;r.sibling=null}return e.child}return null}function ns(t,e){if(!ja)switch(t.tailMode){case\"hidden\":e=t.tail;for(var r=null;null!==e;)null!==e.alternate&&(r=e),e=e.sibling;null===r?t.tail=null:r.sibling=null;break;case\"collapsed\":r=t.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?e||null===t.tail?t.tail=null:t.tail.sibling=null:n.sibling=null}}function is(t,e,r){var n=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return vi(e.type)&&mi(),null;case 3:return Ia(),ui(pi),ui(hi),Xa(),(n=e.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||(Ga(e)?e.flags|=4:n.hydrate||(e.flags|=256)),null;case 5:za(e);var a=Pa(La.current);if(r=e.type,null!==t&&null!=e.stateNode)Xo(t,e,r,n),t.ref!==e.ref&&(e.flags|=128);else{if(!n){if(null===e.stateNode)throw Error(o(166));return null}if(t=Pa(Ea.current),Ga(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[Jn]=e,n[$n]=s,r){case\"dialog\":Cn(\"cancel\",n),Cn(\"close\",n);break;case\"iframe\":case\"object\":case\"embed\":Cn(\"load\",n);break;case\"video\":case\"audio\":for(t=0;t<Mn.length;t++)Cn(Mn[t],n);break;case\"source\":Cn(\"error\",n);break;case\"img\":case\"image\":case\"link\":Cn(\"error\",n),Cn(\"load\",n);break;case\"details\":Cn(\"toggle\",n);break;case\"input\":tt(n,s),Cn(\"invalid\",n);break;case\"select\":n._wrapperState={wasMultiple:!!s.multiple},Cn(\"invalid\",n);break;case\"textarea\":lt(n,s),Cn(\"invalid\",n)}for(var u in kt(r,s),t=null,s)s.hasOwnProperty(u)&&(a=s[u],\"children\"===u?\"string\"==typeof a?n.textContent!==a&&(t=[\"children\",a]):\"number\"==typeof a&&n.textContent!==\"\"+a&&(t=[\"children\",\"\"+a]):l.hasOwnProperty(u)&&null!=a&&\"onScroll\"===u&&Cn(\"scroll\",n));switch(r){case\"input\":K(n),nt(n,s,!0);break;case\"textarea\":K(n),ct(n);break;case\"select\":case\"option\":break;default:\"function\"==typeof s.onClick&&(n.onclick=Bn)}n=t,e.updateQueue=n,null!==n&&(e.flags|=4)}else{switch(u=9===a.nodeType?a:a.ownerDocument,t===ft&&(t=ht(r)),t===ft?\"script\"===r?((t=u.createElement(\"div\")).innerHTML=\"<script><\\/script>\",t=t.removeChild(t.firstChild)):\"string\"==typeof n.is?t=u.createElement(r,{is:n.is}):(t=u.createElement(r),\"select\"===r&&(u=t,n.multiple?u.multiple=!0:n.size&&(u.size=n.size))):t=u.createElementNS(t,r),t[Jn]=e,t[$n]=n,Wo(t,e),e.stateNode=t,u=Tt(r,n),r){case\"dialog\":Cn(\"cancel\",t),Cn(\"close\",t),a=n;break;case\"iframe\":case\"object\":case\"embed\":Cn(\"load\",t),a=n;break;case\"video\":case\"audio\":for(a=0;a<Mn.length;a++)Cn(Mn[a],t);a=n;break;case\"source\":Cn(\"error\",t),a=n;break;case\"img\":case\"image\":case\"link\":Cn(\"error\",t),Cn(\"load\",t),a=n;break;case\"details\":Cn(\"toggle\",t),a=n;break;case\"input\":tt(t,n),a=Q(t,n),Cn(\"invalid\",t);break;case\"option\":a=at(t,n);break;case\"select\":t._wrapperState={wasMultiple:!!n.multiple},a=i({},n,{value:void 0}),Cn(\"invalid\",t);break;case\"textarea\":lt(t,n),a=st(t,n),Cn(\"invalid\",t);break;default:a=n}kt(r,a);var c=a;for(s in c)if(c.hasOwnProperty(s)){var f=c[s];\"style\"===s?_t(t,f):\"dangerouslySetInnerHTML\"===s?null!=(f=f?f.__html:void 0)&&vt(t,f):\"children\"===s?\"string\"==typeof f?(\"textarea\"!==r||\"\"!==f)&&mt(t,f):\"number\"==typeof f&&mt(t,\"\"+f):\"suppressContentEditableWarning\"!==s&&\"suppressHydrationWarning\"!==s&&\"autoFocus\"!==s&&(l.hasOwnProperty(s)?null!=f&&\"onScroll\"===s&&Cn(\"scroll\",t):null!=f&&b(t,s,f,u))}switch(r){case\"input\":K(t),nt(t,n,!1);break;case\"textarea\":K(t),ct(t);break;case\"option\":null!=n.value&&t.setAttribute(\"value\",\"\"+X(n.value));break;case\"select\":t.multiple=!!n.multiple,null!=(s=n.value)?ot(t,!!n.multiple,s,!1):null!=n.defaultValue&&ot(t,!!n.multiple,n.defaultValue,!0);break;default:\"function\"==typeof a.onClick&&(t.onclick=Bn)}Vn(r,n)&&(e.flags|=4)}null!==e.ref&&(e.flags|=128)}return null;case 6:if(t&&null!=e.stateNode)Zo(0,e,t.memoizedProps,n);else{if(\"string\"!=typeof n&&null===e.stateNode)throw Error(o(166));r=Pa(La.current),Pa(Ea.current),Ga(e)?(n=e.stateNode,r=e.memoizedProps,n[Jn]=e,n.nodeValue!==r&&(e.flags|=4)):((n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[Jn]=e,e.stateNode=n)}return null;case 13:return ui(Ra),n=e.memoizedState,0!=(64&e.flags)?(e.lanes=r,e):(n=null!==n,r=!1,null===t?void 0!==e.memoizedProps.fallback&&Ga(e):r=null!==t.memoizedState,n&&!r&&0!=(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!=(1&Ra.current)?0===zs&&(zs=3):(0!==zs&&3!==zs||(zs=4),null===Ls||0==(134217727&Ns)&&0==(134217727&Bs)||gl(Ls,Os))),(n||r)&&(e.flags|=4),null);case 4:return Ia(),null===t&&Pn(e.stateNode.containerInfo),null;case 10:return ra(e),null;case 19:if(ui(Ra),null===(n=e.memoizedState))return null;if(s=0!=(64&e.flags),null===(u=n.rendering))if(s)ns(n,!1);else{if(0!==zs||null!==t&&0!=(64&t.flags))for(t=e.child;null!==t;){if(null!==(u=Fa(t))){for(e.flags|=64,ns(n,!1),null!==(s=u.updateQueue)&&(e.updateQueue=s,e.flags|=4),null===n.lastEffect&&(e.firstEffect=null),e.lastEffect=n.lastEffect,n=r,r=e.child;null!==r;)t=n,(s=r).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(u=s.alternate)?(s.childLanes=0,s.lanes=t,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,t=u.dependencies,s.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return ci(Ra,1&Ra.current|2),e.child}t=t.sibling}null!==n.tail&&Vi()>Hs&&(e.flags|=64,s=!0,ns(n,!1),e.lanes=33554432)}else{if(!s)if(null!==(t=Fa(u))){if(e.flags|=64,s=!0,null!==(r=t.updateQueue)&&(e.updateQueue=r,e.flags|=4),ns(n,!0),null===n.tail&&\"hidden\"===n.tailMode&&!u.alternate&&!ja)return null!==(e=e.lastEffect=n.lastEffect)&&(e.nextEffect=null),null}else 2*Vi()-n.renderingStartTime>Hs&&1073741824!==r&&(e.flags|=64,s=!0,ns(n,!1),e.lanes=33554432);n.isBackwards?(u.sibling=e.child,e.child=u):(null!==(r=n.last)?r.sibling=u:e.child=u,n.last=u)}return null!==n.tail?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=Vi(),r.sibling=null,e=Ra.current,ci(Ra,s?1&e|2:1&e),r):null;case 23:case 24:return bl(),null!==t&&null!==t.memoizedState!=(null!==e.memoizedState)&&\"unstable-defer-without-hiding\"!==n.mode&&(e.flags|=4),null}throw Error(o(156,e.tag))}function as(t){switch(t.tag){case 1:vi(t.type)&&mi();var e=t.flags;return 4096&e?(t.flags=-4097&e|64,t):null;case 3:if(Ia(),ui(pi),ui(hi),Xa(),0!=(64&(e=t.flags)))throw Error(o(285));return t.flags=-4097&e|64,t;case 5:return za(t),null;case 13:return ui(Ra),4096&(e=t.flags)?(t.flags=-4097&e|64,t):null;case 19:return ui(Ra),null;case 4:return Ia(),null;case 10:return ra(t),null;case 23:case 24:return bl(),null;default:return null}}function os(t,e){try{var r=\"\",n=e;do{r+=Y(n),n=n.return}while(n);var i=r}catch(t){i=\"\\nError generating stack: \"+t.message+\"\\n\"+t.stack}return{value:t,source:e,stack:i}}function ss(t,e){try{console.error(e.value)}catch(t){setTimeout((function(){throw t}))}}Wo=function(t,e){for(var r=e.child;null!==r;){if(5===r.tag||6===r.tag)t.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Xo=function(t,e,r,n){var a=t.memoizedProps;if(a!==n){t=e.stateNode,Pa(Ea.current);var o,s=null;switch(r){case\"input\":a=Q(t,a),n=Q(t,n),s=[];break;case\"option\":a=at(t,a),n=at(t,n),s=[];break;case\"select\":a=i({},a,{value:void 0}),n=i({},n,{value:void 0}),s=[];break;case\"textarea\":a=st(t,a),n=st(t,n),s=[];break;default:\"function\"!=typeof a.onClick&&\"function\"==typeof n.onClick&&(t.onclick=Bn)}for(f in kt(r,n),r=null,a)if(!n.hasOwnProperty(f)&&a.hasOwnProperty(f)&&null!=a[f])if(\"style\"===f){var u=a[f];for(o in u)u.hasOwnProperty(o)&&(r||(r={}),r[o]=\"\")}else\"dangerouslySetInnerHTML\"!==f&&\"children\"!==f&&\"suppressContentEditableWarning\"!==f&&\"suppressHydrationWarning\"!==f&&\"autoFocus\"!==f&&(l.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in n){var c=n[f];if(u=null!=a?a[f]:void 0,n.hasOwnProperty(f)&&c!==u&&(null!=c||null!=u))if(\"style\"===f)if(u){for(o in u)!u.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]=\"\");for(o in c)c.hasOwnProperty(o)&&u[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(s||(s=[]),s.push(f,r)),r=c;else\"dangerouslySetInnerHTML\"===f?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(s=s||[]).push(f,c)):\"children\"===f?\"string\"!=typeof c&&\"number\"!=typeof c||(s=s||[]).push(f,\"\"+c):\"suppressContentEditableWarning\"!==f&&\"suppressHydrationWarning\"!==f&&(l.hasOwnProperty(f)?(null!=c&&\"onScroll\"===f&&Cn(\"scroll\",t),s||u===c||(s=[])):\"object\"==typeof c&&null!==c&&c.$$typeof===z?c.toString():(s=s||[]).push(f,c))}r&&(s=s||[]).push(\"style\",r);var f=s;(e.updateQueue=f)&&(e.flags|=4)}},Zo=function(t,e,r,n){r!==n&&(e.flags|=4)};var ls=\"function\"==typeof WeakMap?WeakMap:Map;function us(t,e,r){(r=ua(-1,r)).tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Ws||(Ws=!0,Xs=n),ss(0,e)},r}function cs(t,e,r){(r=ua(-1,r)).tag=3;var n=t.type.getDerivedStateFromError;if(\"function\"==typeof n){var i=e.value;r.payload=function(){return ss(0,e),n(i)}}var a=t.stateNode;return null!==a&&\"function\"==typeof a.componentDidCatch&&(r.callback=function(){\"function\"!=typeof n&&(null===Zs?Zs=new Set([this]):Zs.add(this),ss(0,e));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:\"\"})}),r}var fs=\"function\"==typeof WeakSet?WeakSet:Set;function hs(t){var e=t.ref;if(null!==e)if(\"function\"==typeof e)try{e(null)}catch(e){Fl(t,e)}else e.current=null}function ps(t,e){switch(e.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&e.flags&&null!==t){var r=t.memoizedProps,n=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?r:Ki(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:return void(256&e.flags&&Yn(e.stateNode.containerInfo))}throw Error(o(163))}function ds(t,e,r){switch(r.tag){case 0:case 11:case 15:case 22:if(null!==(e=null!==(e=r.updateQueue)?e.lastEffect:null)){t=e=e.next;do{if(3==(3&t.tag)){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}if(null!==(e=null!==(e=r.updateQueue)?e.lastEffect:null)){t=e=e.next;do{var i=t;n=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(Dl(r,t),Il(r,t)),t=n}while(t!==e)}return;case 1:return t=r.stateNode,4&r.flags&&(null===e?t.componentDidMount():(n=r.elementType===r.type?e.memoizedProps:Ki(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),void(null!==(e=r.updateQueue)&&pa(r,e,t));case 3:if(null!==(e=r.updateQueue)){if(t=null,null!==r.child)switch(r.child.tag){case 5:case 1:t=r.child.stateNode}pa(r,e,t)}return;case 5:return t=r.stateNode,void(null===e&&4&r.flags&&Vn(r.type,r.memoizedProps)&&t.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===r.memoizedState&&(r=r.alternate,null!==r&&(r=r.memoizedState,null!==r&&(r=r.dehydrated,null!==r&&_e(r)))))}throw Error(o(163))}function gs(t,e){for(var r=t;;){if(5===r.tag){var n=r.stateNode;if(e)\"function\"==typeof(n=n.style).setProperty?n.setProperty(\"display\",\"none\",\"important\"):n.display=\"none\";else{n=r.stateNode;var i=r.memoizedProps.style;i=null!=i&&i.hasOwnProperty(\"display\")?i.display:null,n.style.display=bt(\"display\",i)}}else if(6===r.tag)r.stateNode.nodeValue=e?\"\":r.memoizedProps;else if((23!==r.tag&&24!==r.tag||null===r.memoizedState||r===t)&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function vs(t,e){if(ki&&\"function\"==typeof ki.onCommitFiberUnmount)try{ki.onCommitFiberUnmount(wi,e)}catch(t){}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var r=t=t.next;do{var n=r,i=n.destroy;if(n=n.tag,void 0!==i)if(0!=(4&n))Dl(e,r);else{n=e;try{i()}catch(t){Fl(n,t)}}r=r.next}while(r!==t)}break;case 1:if(hs(e),\"function\"==typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Fl(e,t)}break;case 5:hs(e);break;case 4:ws(t,e)}}function ms(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function ys(t){return 5===t.tag||3===t.tag||4===t.tag}function xs(t){t:{for(var e=t.return;null!==e;){if(ys(e))break t;e=e.return}throw Error(o(160))}var r=e;switch(e=r.stateNode,r.tag){case 5:var n=!1;break;case 3:case 4:e=e.containerInfo,n=!0;break;default:throw Error(o(161))}16&r.flags&&(mt(e,\"\"),r.flags&=-17);t:e:for(r=t;;){for(;null===r.sibling;){if(null===r.return||ys(r.return)){r=null;break t}r=r.return}for(r.sibling.return=r.return,r=r.sibling;5!==r.tag&&6!==r.tag&&18!==r.tag;){if(2&r.flags)continue e;if(null===r.child||4===r.tag)continue e;r.child.return=r,r=r.child}if(!(2&r.flags)){r=r.stateNode;break t}}n?bs(t,r,e):_s(t,r,e)}function bs(t,e,r){var n=t.tag,i=5===n||6===n;if(i)t=i?t.stateNode:t.stateNode.instance,e?8===r.nodeType?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(8===r.nodeType?(e=r.parentNode).insertBefore(t,r):(e=r).appendChild(t),null!=(r=r._reactRootContainer)||null!==e.onclick||(e.onclick=Bn));else if(4!==n&&null!==(t=t.child))for(bs(t,e,r),t=t.sibling;null!==t;)bs(t,e,r),t=t.sibling}function _s(t,e,r){var n=t.tag,i=5===n||6===n;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.insertBefore(t,e):r.appendChild(t);else if(4!==n&&null!==(t=t.child))for(_s(t,e,r),t=t.sibling;null!==t;)_s(t,e,r),t=t.sibling}function ws(t,e){for(var r,n,i=e,a=!1;;){if(!a){a=i.return;t:for(;;){if(null===a)throw Error(o(160));switch(r=a.stateNode,a.tag){case 5:n=!1;break t;case 3:case 4:r=r.containerInfo,n=!0;break t}a=a.return}a=!0}if(5===i.tag||6===i.tag){t:for(var s=t,l=i,u=l;;)if(vs(s,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===l)break t;for(;null===u.sibling;){if(null===u.return||u.return===l)break t;u=u.return}u.sibling.return=u.return,u=u.sibling}n?(s=r,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,n=!0,i.child.return=i,i=i.child;continue}}else if(vs(t,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;4===(i=i.return).tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function ks(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var n=r=r.next;do{3==(3&n.tag)&&(t=n.destroy,n.destroy=void 0,void 0!==t&&t()),n=n.next}while(n!==r)}return;case 1:case 12:case 17:return;case 5:if(null!=(r=e.stateNode)){n=e.memoizedProps;var i=null!==t?t.memoizedProps:n;t=e.type;var a=e.updateQueue;if(e.updateQueue=null,null!==a){for(r[$n]=n,\"input\"===t&&\"radio\"===n.type&&null!=n.name&&et(r,n),Tt(t,i),e=Tt(t,n),i=0;i<a.length;i+=2){var s=a[i],l=a[i+1];\"style\"===s?_t(r,l):\"dangerouslySetInnerHTML\"===s?vt(r,l):\"children\"===s?mt(r,l):b(r,s,l,e)}switch(t){case\"input\":rt(r,n);break;case\"textarea\":ut(r,n);break;case\"select\":t=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!n.multiple,null!=(a=n.value)?ot(r,!!n.multiple,a,!1):t!==!!n.multiple&&(null!=n.defaultValue?ot(r,!!n.multiple,n.defaultValue,!0):ot(r,!!n.multiple,n.multiple?[]:\"\",!1))}}}return;case 6:if(null===e.stateNode)throw Error(o(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((r=e.stateNode).hydrate&&(r.hydrate=!1,_e(r.containerInfo)));case 13:return null!==e.memoizedState&&(Vs=Vi(),gs(e.child,!0)),void Ts(e);case 19:return void Ts(e);case 23:case 24:return void gs(e,null!==e.memoizedState)}throw Error(o(163))}function Ts(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var r=t.stateNode;null===r&&(r=t.stateNode=new fs),e.forEach((function(e){var n=Bl.bind(null,t,e);r.has(e)||(r.add(e),e.then(n,n))}))}}function Ms(t,e){return null!==t&&(null===(t=t.memoizedState)||null!==t.dehydrated)&&null!==(e=e.memoizedState)&&null===e.dehydrated}var As=Math.ceil,Ss=_.ReactCurrentDispatcher,Es=_.ReactCurrentOwner,Cs=0,Ls=null,Ps=null,Os=0,Is=0,Ds=li(0),zs=0,Rs=null,Fs=0,Ns=0,Bs=0,js=0,Us=null,Vs=0,Hs=1/0;function qs(){Hs=Vi()+500}var Gs,Ys=null,Ws=!1,Xs=null,Zs=null,Ks=!1,Js=null,$s=90,Qs=[],tl=[],el=null,rl=0,nl=null,il=-1,al=0,ol=0,sl=null,ll=!1;function ul(){return 0!=(48&Cs)?Vi():-1!==il?il:il=Vi()}function cl(t){if(0==(2&(t=t.mode)))return 1;if(0==(4&t))return 99===Hi()?1:2;if(0===al&&(al=Fs),0!==Zi.transition){0!==ol&&(ol=null!==Us?Us.pendingLanes:0),t=al;var e=4186112&~ol;return 0==(e&=-e)&&0==(e=(t=4186112&~t)&-t)&&(e=8192),e}return t=Hi(),t=Be(0!=(4&Cs)&&98===t?12:t=function(t){switch(t){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(t),al)}function fl(t,e,r){if(50<rl)throw rl=0,nl=null,Error(o(185));if(null===(t=hl(t,e)))return null;Ve(t,e,r),t===Ls&&(Bs|=e,4===zs&&gl(t,Os));var n=Hi();1===e?0!=(8&Cs)&&0==(48&Cs)?vl(t):(pl(t,r),0===Cs&&(qs(),Wi())):(0==(4&Cs)||98!==n&&99!==n||(null===el?el=new Set([t]):el.add(t)),pl(t,r)),Us=t}function hl(t,e){t.lanes|=e;var r=t.alternate;for(null!==r&&(r.lanes|=e),r=t,t=t.return;null!==t;)t.childLanes|=e,null!==(r=t.alternate)&&(r.childLanes|=e),r=t,t=t.return;return 3===r.tag?r.stateNode:null}function pl(t,e){for(var r=t.callbackNode,n=t.suspendedLanes,i=t.pingedLanes,a=t.expirationTimes,s=t.pendingLanes;0<s;){var l=31-He(s),u=1<<l,c=a[l];if(-1===c){if(0==(u&n)||0!=(u&i)){c=e,Re(u);var f=ze;a[l]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=e&&(t.expiredLanes|=u);s&=~u}if(n=Fe(t,t===Ls?Os:0),e=ze,0===n)null!==r&&(r!==Ri&&Ai(r),t.callbackNode=null,t.callbackPriority=0);else{if(null!==r){if(t.callbackPriority===e)return;r!==Ri&&Ai(r)}15===e?(r=vl.bind(null,t),null===Ni?(Ni=[r],Bi=Mi(Pi,Xi)):Ni.push(r),r=Ri):14===e?r=Yi(99,vl.bind(null,t)):(r=function(t){switch(t){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(o(358,t))}}(e),r=Yi(r,dl.bind(null,t))),t.callbackPriority=e,t.callbackNode=r}}function dl(t){if(il=-1,ol=al=0,0!=(48&Cs))throw Error(o(327));var e=t.callbackNode;if(Ol()&&t.callbackNode!==e)return null;var r=Fe(t,t===Ls?Os:0);if(0===r)return null;var n=r,i=Cs;Cs|=16;var a=kl();for(Ls===t&&Os===n||(qs(),_l(t,n));;)try{Al();break}catch(e){wl(t,e)}if(ea(),Ss.current=a,Cs=i,null!==Ps?n=0:(Ls=null,Os=0,n=zs),0!=(Fs&Bs))_l(t,0);else if(0!==n){if(2===n&&(Cs|=64,t.hydrate&&(t.hydrate=!1,Yn(t.containerInfo)),0!==(r=Ne(t))&&(n=Tl(t,r))),1===n)throw e=Rs,_l(t,0),gl(t,r),pl(t,Vi()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=r,n){case 0:case 1:throw Error(o(345));case 2:case 5:Cl(t);break;case 3:if(gl(t,r),(62914560&r)===r&&10<(n=Vs+500-Vi())){if(0!==Fe(t,0))break;if(((i=t.suspendedLanes)&r)!==r){ul(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=qn(Cl.bind(null,t),n);break}Cl(t);break;case 4:if(gl(t,r),(4186112&r)===r)break;for(n=t.eventTimes,i=-1;0<r;){var s=31-He(r);a=1<<s,(s=n[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Vi()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*As(r/1960))-r)){t.timeoutHandle=qn(Cl.bind(null,t),r);break}Cl(t);break;default:throw Error(o(329))}}return pl(t,Vi()),t.callbackNode===e?dl.bind(null,t):null}function gl(t,e){for(e&=~js,e&=~Bs,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-He(e),n=1<<r;t[r]=-1,e&=~n}}function vl(t){if(0!=(48&Cs))throw Error(o(327));if(Ol(),t===Ls&&0!=(t.expiredLanes&Os)){var e=Os,r=Tl(t,e);0!=(Fs&Bs)&&(r=Tl(t,e=Fe(t,e)))}else r=Tl(t,e=Fe(t,0));if(0!==t.tag&&2===r&&(Cs|=64,t.hydrate&&(t.hydrate=!1,Yn(t.containerInfo)),0!==(e=Ne(t))&&(r=Tl(t,e))),1===r)throw r=Rs,_l(t,0),gl(t,e),pl(t,Vi()),r;return t.finishedWork=t.current.alternate,t.finishedLanes=e,Cl(t),pl(t,Vi()),null}function ml(t,e){var r=Cs;Cs|=1;try{return t(e)}finally{0===(Cs=r)&&(qs(),Wi())}}function yl(t,e){var r=Cs;Cs&=-2,Cs|=8;try{return t(e)}finally{0===(Cs=r)&&(qs(),Wi())}}function xl(t,e){ci(Ds,Is),Is|=e,Fs|=e}function bl(){Is=Ds.current,ui(Ds)}function _l(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(-1!==r&&(t.timeoutHandle=-1,Gn(r)),null!==Ps)for(r=Ps.return;null!==r;){var n=r;switch(n.tag){case 1:null!=(n=n.type.childContextTypes)&&mi();break;case 3:Ia(),ui(pi),ui(hi),Xa();break;case 5:za(n);break;case 4:Ia();break;case 13:case 19:ui(Ra);break;case 10:ra(n);break;case 23:case 24:bl()}r=r.return}Ls=t,Ps=Hl(t.current,null),Os=Is=Fs=e,zs=0,Rs=null,js=Bs=Ns=0}function wl(t,e){for(;;){var r=Ps;try{if(ea(),Za.current=Po,eo){for(var n=$a.memoizedState;null!==n;){var i=n.queue;null!==i&&(i.pending=null),n=n.next}eo=!1}if(Ja=0,to=Qa=$a=null,ro=!1,Es.current=null,null===r||null===r.return){zs=1,Rs=e,Ps=null;break}t:{var a=t,o=r.return,s=r,l=e;if(e=Os,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&\"object\"==typeof l&&\"function\"==typeof l.then){var u=l;if(0==(2&s.mode)){var c=s.alternate;c?(s.updateQueue=c.updateQueue,s.memoizedState=c.memoizedState,s.lanes=c.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!=(1&Ra.current),h=o;do{var p;if(p=13===h.tag){var d=h.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var g=h.memoizedProps;p=void 0!==g.fallback&&(!0!==g.unstable_avoidThisFallback||!f)}}if(p){var v=h.updateQueue;if(null===v){var m=new Set;m.add(u),h.updateQueue=m}else v.add(u);if(0==(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=ua(-1,1);y.tag=2,ca(s,y)}s.lanes|=1;break t}l=void 0,s=e;var x=a.pingCache;if(null===x?(x=a.pingCache=new ls,l=new Set,x.set(u,l)):void 0===(l=x.get(u))&&(l=new Set,x.set(u,l)),!l.has(s)){l.add(s);var b=Nl.bind(null,a,u,s);u.then(b,b)}h.flags|=4096,h.lanes=e;break t}h=h.return}while(null!==h);l=Error((W(s.type)||\"A React component\")+\" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==zs&&(zs=2),l=os(l,s),h=o;do{switch(h.tag){case 3:a=l,h.flags|=4096,e&=-e,h.lanes|=e,fa(h,us(0,a,e));break t;case 1:a=l;var _=h.type,w=h.stateNode;if(0==(64&h.flags)&&(\"function\"==typeof _.getDerivedStateFromError||null!==w&&\"function\"==typeof w.componentDidCatch&&(null===Zs||!Zs.has(w)))){h.flags|=4096,e&=-e,h.lanes|=e,fa(h,cs(h,a,e));break t}}h=h.return}while(null!==h)}El(r)}catch(t){e=t,Ps===r&&null!==r&&(Ps=r=r.return);continue}break}}function kl(){var t=Ss.current;return Ss.current=Po,null===t?Po:t}function Tl(t,e){var r=Cs;Cs|=16;var n=kl();for(Ls===t&&Os===e||_l(t,e);;)try{Ml();break}catch(e){wl(t,e)}if(ea(),Cs=r,Ss.current=n,null!==Ps)throw Error(o(261));return Ls=null,Os=0,zs}function Ml(){for(;null!==Ps;)Sl(Ps)}function Al(){for(;null!==Ps&&!Si();)Sl(Ps)}function Sl(t){var e=Gs(t.alternate,t,Is);t.memoizedProps=t.pendingProps,null===e?El(t):Ps=e,Es.current=null}function El(t){var e=t;do{var r=e.alternate;if(t=e.return,0==(2048&e.flags)){if(null!==(r=is(r,e,Is)))return void(Ps=r);if(24!==(r=e).tag&&23!==r.tag||null===r.memoizedState||0!=(1073741824&Is)||0==(4&r.mode)){for(var n=0,i=r.child;null!==i;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}null!==t&&0==(2048&t.flags)&&(null===t.firstEffect&&(t.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.flags&&(null!==t.lastEffect?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}else{if(null!==(r=as(e)))return r.flags&=2047,void(Ps=r);null!==t&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}if(null!==(e=e.sibling))return void(Ps=e);Ps=e=t}while(null!==e);0===zs&&(zs=5)}function Cl(t){var e=Hi();return Gi(99,Ll.bind(null,t,e)),null}function Ll(t,e){do{Ol()}while(null!==Js);if(0!=(48&Cs))throw Error(o(327));var r=t.finishedWork;if(null===r)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(o(177));t.callbackNode=null;var n=r.lanes|r.childLanes,i=n,a=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;for(var s=t.eventTimes,l=t.expirationTimes;0<a;){var u=31-He(a),c=1<<u;i[u]=0,s[u]=-1,l[u]=-1,a&=~c}if(null!==el&&0==(24&n)&&el.has(t)&&el.delete(t),t===Ls&&(Ps=Ls=null,Os=0),1<r.flags?null!==r.lastEffect?(r.lastEffect.nextEffect=r,n=r.firstEffect):n=r:n=r.firstEffect,null!==n){if(i=Cs,Cs|=32,Es.current=null,jn=Xe,vn(s=gn())){if(\"selectionStart\"in s)l={start:s.selectionStart,end:s.selectionEnd};else t:if(l=(l=s.ownerDocument)&&l.defaultView||window,(c=l.getSelection&&l.getSelection())&&0!==c.rangeCount){l=c.anchorNode,a=c.anchorOffset,u=c.focusNode,c=c.focusOffset;try{l.nodeType,u.nodeType}catch(t){l=null;break t}var f=0,h=-1,p=-1,d=0,g=0,v=s,m=null;e:for(;;){for(var y;v!==l||0!==a&&3!==v.nodeType||(h=f+a),v!==u||0!==c&&3!==v.nodeType||(p=f+c),3===v.nodeType&&(f+=v.nodeValue.length),null!==(y=v.firstChild);)m=v,v=y;for(;;){if(v===s)break e;if(m===l&&++d===a&&(h=f),m===u&&++g===c&&(p=f),null!==(y=v.nextSibling))break;m=(v=m).parentNode}v=y}l=-1===h||-1===p?null:{start:h,end:p}}else l=null;l=l||{start:0,end:0}}else l=null;Un={focusedElem:s,selectionRange:l},Xe=!1,sl=null,ll=!1,Ys=n;do{try{Pl()}catch(t){if(null===Ys)throw Error(o(330));Fl(Ys,t),Ys=Ys.nextEffect}}while(null!==Ys);sl=null,Ys=n;do{try{for(s=t;null!==Ys;){var x=Ys.flags;if(16&x&&mt(Ys.stateNode,\"\"),128&x){var b=Ys.alternate;if(null!==b){var _=b.ref;null!==_&&(\"function\"==typeof _?_(null):_.current=null)}}switch(1038&x){case 2:xs(Ys),Ys.flags&=-3;break;case 6:xs(Ys),Ys.flags&=-3,ks(Ys.alternate,Ys);break;case 1024:Ys.flags&=-1025;break;case 1028:Ys.flags&=-1025,ks(Ys.alternate,Ys);break;case 4:ks(Ys.alternate,Ys);break;case 8:ws(s,l=Ys);var w=l.alternate;ms(l),null!==w&&ms(w)}Ys=Ys.nextEffect}}catch(t){if(null===Ys)throw Error(o(330));Fl(Ys,t),Ys=Ys.nextEffect}}while(null!==Ys);if(_=Un,b=gn(),x=_.focusedElem,s=_.selectionRange,b!==x&&x&&x.ownerDocument&&dn(x.ownerDocument.documentElement,x)){null!==s&&vn(x)&&(b=s.start,void 0===(_=s.end)&&(_=b),\"selectionStart\"in x?(x.selectionStart=b,x.selectionEnd=Math.min(_,x.value.length)):(_=(b=x.ownerDocument||document)&&b.defaultView||window).getSelection&&(_=_.getSelection(),l=x.textContent.length,w=Math.min(s.start,l),s=void 0===s.end?w:Math.min(s.end,l),!_.extend&&w>s&&(l=s,s=w,w=l),l=pn(x,w),a=pn(x,s),l&&a&&(1!==_.rangeCount||_.anchorNode!==l.node||_.anchorOffset!==l.offset||_.focusNode!==a.node||_.focusOffset!==a.offset)&&((b=b.createRange()).setStart(l.node,l.offset),_.removeAllRanges(),w>s?(_.addRange(b),_.extend(a.node,a.offset)):(b.setEnd(a.node,a.offset),_.addRange(b))))),b=[];for(_=x;_=_.parentNode;)1===_.nodeType&&b.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(\"function\"==typeof x.focus&&x.focus(),x=0;x<b.length;x++)(_=b[x]).element.scrollLeft=_.left,_.element.scrollTop=_.top}Xe=!!jn,Un=jn=null,t.current=r,Ys=n;do{try{for(x=t;null!==Ys;){var k=Ys.flags;if(36&k&&ds(x,Ys.alternate,Ys),128&k){b=void 0;var T=Ys.ref;if(null!==T){var M=Ys.stateNode;Ys.tag,b=M,\"function\"==typeof T?T(b):T.current=b}}Ys=Ys.nextEffect}}catch(t){if(null===Ys)throw Error(o(330));Fl(Ys,t),Ys=Ys.nextEffect}}while(null!==Ys);Ys=null,Fi(),Cs=i}else t.current=r;if(Ks)Ks=!1,Js=t,$s=e;else for(Ys=n;null!==Ys;)e=Ys.nextEffect,Ys.nextEffect=null,8&Ys.flags&&((k=Ys).sibling=null,k.stateNode=null),Ys=e;if(0===(n=t.pendingLanes)&&(Zs=null),1===n?t===nl?rl++:(rl=0,nl=t):rl=0,r=r.stateNode,ki&&\"function\"==typeof ki.onCommitFiberRoot)try{ki.onCommitFiberRoot(wi,r,void 0,64==(64&r.current.flags))}catch(t){}if(pl(t,Vi()),Ws)throw Ws=!1,t=Xs,Xs=null,t;return 0!=(8&Cs)||Wi(),null}function Pl(){for(;null!==Ys;){var t=Ys.alternate;ll||null===sl||(0!=(8&Ys.flags)?Qt(Ys,sl)&&(ll=!0):13===Ys.tag&&Ms(t,Ys)&&Qt(Ys,sl)&&(ll=!0));var e=Ys.flags;0!=(256&e)&&ps(t,Ys),0==(512&e)||Ks||(Ks=!0,Yi(97,(function(){return Ol(),null}))),Ys=Ys.nextEffect}}function Ol(){if(90!==$s){var t=97<$s?97:$s;return $s=90,Gi(t,zl)}return!1}function Il(t,e){Qs.push(e,t),Ks||(Ks=!0,Yi(97,(function(){return Ol(),null})))}function Dl(t,e){tl.push(e,t),Ks||(Ks=!0,Yi(97,(function(){return Ol(),null})))}function zl(){if(null===Js)return!1;var t=Js;if(Js=null,0!=(48&Cs))throw Error(o(331));var e=Cs;Cs|=32;var r=tl;tl=[];for(var n=0;n<r.length;n+=2){var i=r[n],a=r[n+1],s=i.destroy;if(i.destroy=void 0,\"function\"==typeof s)try{s()}catch(t){if(null===a)throw Error(o(330));Fl(a,t)}}for(r=Qs,Qs=[],n=0;n<r.length;n+=2){i=r[n],a=r[n+1];try{var l=i.create;i.destroy=l()}catch(t){if(null===a)throw Error(o(330));Fl(a,t)}}for(l=t.current.firstEffect;null!==l;)t=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=t;return Cs=e,Wi(),!0}function Rl(t,e,r){ca(t,e=us(0,e=os(r,e),1)),e=ul(),null!==(t=hl(t,1))&&(Ve(t,1,e),pl(t,e))}function Fl(t,e){if(3===t.tag)Rl(t,t,e);else for(var r=t.return;null!==r;){if(3===r.tag){Rl(r,t,e);break}if(1===r.tag){var n=r.stateNode;if(\"function\"==typeof r.type.getDerivedStateFromError||\"function\"==typeof n.componentDidCatch&&(null===Zs||!Zs.has(n))){var i=cs(r,t=os(e,t),1);if(ca(r,i),i=ul(),null!==(r=hl(r,1)))Ve(r,1,i),pl(r,i);else if(\"function\"==typeof n.componentDidCatch&&(null===Zs||!Zs.has(n)))try{n.componentDidCatch(e,t)}catch(t){}break}}r=r.return}}function Nl(t,e,r){var n=t.pingCache;null!==n&&n.delete(e),e=ul(),t.pingedLanes|=t.suspendedLanes&r,Ls===t&&(Os&r)===r&&(4===zs||3===zs&&(62914560&Os)===Os&&500>Vi()-Vs?_l(t,0):js|=r),pl(t,e)}function Bl(t,e){var r=t.stateNode;null!==r&&r.delete(e),0==(e=0)&&(0==(2&(e=t.mode))?e=1:0==(4&e)?e=99===Hi()?1:2:(0===al&&(al=Fs),0===(e=je(62914560&~al))&&(e=4194304))),r=ul(),null!==(t=hl(t,e))&&(Ve(t,e,r),pl(t,r))}function jl(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ul(t,e,r,n){return new jl(t,e,r,n)}function Vl(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Hl(t,e){var r=t.alternate;return null===r?((r=Ul(t.tag,e,t.key,t.mode)).elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function ql(t,e,r,n,i,a){var s=2;if(n=t,\"function\"==typeof t)Vl(t)&&(s=1);else if(\"string\"==typeof t)s=5;else t:switch(t){case T:return Gl(r.children,i,a,e);case R:s=8,i|=16;break;case M:s=8,i|=1;break;case A:return(t=Ul(12,r,e,8|i)).elementType=A,t.type=A,t.lanes=a,t;case L:return(t=Ul(13,r,e,i)).type=L,t.elementType=L,t.lanes=a,t;case P:return(t=Ul(19,r,e,i)).elementType=P,t.lanes=a,t;case F:return Yl(r,i,a,e);case N:return(t=Ul(24,r,e,i)).elementType=N,t.lanes=a,t;default:if(\"object\"==typeof t&&null!==t)switch(t.$$typeof){case S:s=10;break t;case E:s=9;break t;case C:s=11;break t;case O:s=14;break t;case I:s=16,n=null;break t;case D:s=22;break t}throw Error(o(130,null==t?t:typeof t,\"\"))}return(e=Ul(s,r,e,i)).elementType=t,e.type=n,e.lanes=a,e}function Gl(t,e,r,n){return(t=Ul(7,t,n,e)).lanes=r,t}function Yl(t,e,r,n){return(t=Ul(23,t,n,e)).elementType=F,t.lanes=r,t}function Wl(t,e,r){return(t=Ul(6,t,null,e)).lanes=r,t}function Xl(t,e,r){return(e=Ul(4,null!==t.children?t.children:[],t.key,e)).lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Zl(t,e,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=r,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ue(0),this.expirationTimes=Ue(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ue(0),this.mutableSourceEagerHydrationData=null}function Kl(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==n?null:\"\"+n,children:t,containerInfo:e,implementation:r}}function Jl(t,e,r,n){var i=e.current,a=ul(),s=cl(i);t:if(r){e:{if(Zt(r=r._reactInternals)!==r||1!==r.tag)throw Error(o(170));var l=r;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(vi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(null!==l);throw Error(o(171))}if(1===r.tag){var u=r.type;if(vi(u)){r=xi(r,u,l);break t}}r=l}else r=fi;return null===e.context?e.context=r:e.pendingContext=r,(e=ua(a,s)).payload={element:t},null!==(n=void 0===n?null:n)&&(e.callback=n),ca(i,e),fl(i,s,a),s}function $l(t){return(t=t.current).child?(t.child.tag,t.child.stateNode):null}function Ql(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var r=t.retryLane;t.retryLane=0!==r&&r<e?r:e}}function tu(t,e){Ql(t,e),(t=t.alternate)&&Ql(t,e)}function eu(t,e,r){var n=null!=r&&null!=r.hydrationOptions&&r.hydrationOptions.mutableSources||null;if(r=new Zl(t,e,null!=r&&!0===r.hydrate),e=Ul(3,null,null,2===e?7:1===e?3:0),r.current=e,e.stateNode=r,sa(e),t[Qn]=r.current,Pn(8===t.nodeType?t.parentNode:t),n)for(t=0;t<n.length;t++){var i=(e=n[t])._getVersion;i=i(e._source),null==r.mutableSourceEagerHydrationData?r.mutableSourceEagerHydrationData=[e,i]:r.mutableSourceEagerHydrationData.push(e,i)}this._internalRoot=r}function ru(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||\" react-mount-point-unstable \"!==t.nodeValue))}function nu(t,e,r,n,i){var a=r._reactRootContainer;if(a){var o=a._internalRoot;if(\"function\"==typeof i){var s=i;i=function(){var t=$l(o);s.call(t)}}Jl(e,o,t,i)}else{if(a=r._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute(\"data-reactroot\"))),!e)for(var r;r=t.lastChild;)t.removeChild(r);return new eu(t,0,e?{hydrate:!0}:void 0)}(r,n),o=a._internalRoot,\"function\"==typeof i){var l=i;i=function(){var t=$l(o);l.call(t)}}yl((function(){Jl(e,o,t,i)}))}return $l(o)}function iu(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ru(e))throw Error(o(200));return Kl(t,e,null,r)}Gs=function(t,e,r){var n=e.lanes;if(null!==t)if(t.memoizedProps!==e.pendingProps||pi.current)Ro=!0;else{if(0==(r&n)){switch(Ro=!1,e.tag){case 3:Yo(e),Ya();break;case 5:Da(e);break;case 1:vi(e.type)&&bi(e);break;case 4:Oa(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;ci(Ji,i._currentValue),i._currentValue=n;break;case 13:if(null!==e.memoizedState)return 0!=(r&e.child.childLanes)?Jo(t,e,r):(ci(Ra,1&Ra.current),null!==(e=rs(t,e,r))?e.sibling:null);ci(Ra,1&Ra.current);break;case 19:if(n=0!=(r&e.childLanes),0!=(64&t.flags)){if(n)return es(t,e,r);e.flags|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ci(Ra,Ra.current),n)break;return null;case 23:case 24:return e.lanes=0,Uo(t,e,r)}return rs(t,e,r)}Ro=0!=(16384&t.flags)}else Ro=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=gi(e,hi.current),ia(e,r),i=ao(null,e,n,t,i,r),e.flags|=1,\"object\"==typeof i&&null!==i&&\"function\"==typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,vi(n)){var a=!0;bi(e)}else a=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,sa(e);var s=n.getDerivedStateFromProps;\"function\"==typeof s&&ga(e,n,s,t),i.updater=va,e.stateNode=i,i._reactInternals=e,ba(e,n,t,r),e=Go(null,e,n,!0,a,r)}else e.tag=0,Fo(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;t:{switch(null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=(a=i._init)(i._payload),e.type=i,a=e.tag=function(t){if(\"function\"==typeof t)return Vl(t)?1:0;if(null!=t){if((t=t.$$typeof)===C)return 11;if(t===O)return 14}return 2}(i),t=Ki(i,t),a){case 0:e=Ho(null,e,i,t,r);break t;case 1:e=qo(null,e,i,t,r);break t;case 11:e=No(null,e,i,t,r);break t;case 14:e=Bo(null,e,i,Ki(i.type,t),n,r);break t}throw Error(o(306,i,\"\"))}return e;case 0:return n=e.type,i=e.pendingProps,Ho(t,e,n,i=e.elementType===n?i:Ki(n,i),r);case 1:return n=e.type,i=e.pendingProps,qo(t,e,n,i=e.elementType===n?i:Ki(n,i),r);case 3:if(Yo(e),n=e.updateQueue,null===t||null===n)throw Error(o(282));if(n=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,la(t,e),ha(e,n,null,r),(n=e.memoizedState.element)===i)Ya(),e=rs(t,e,r);else{if((a=(i=e.stateNode).hydrate)&&(Ba=Wn(e.stateNode.containerInfo.firstChild),Na=e,a=ja=!0),a){if(null!=(t=i.mutableSourceEagerHydrationData))for(i=0;i<t.length;i+=2)(a=t[i])._workInProgressVersionPrimary=t[i+1],Wa.push(a);for(r=Aa(e,null,n,r),e.child=r;r;)r.flags=-3&r.flags|1024,r=r.sibling}else Fo(t,e,n,r),Ya();e=e.child}return e;case 5:return Da(e),null===t&&Ha(e),n=e.type,i=e.pendingProps,a=null!==t?t.memoizedProps:null,s=i.children,Hn(n,i)?s=null:null!==a&&Hn(n,a)&&(e.flags|=16),Vo(t,e),Fo(t,e,s,r),e.child;case 6:return null===t&&Ha(e),null;case 13:return Jo(t,e,r);case 4:return Oa(e,e.stateNode.containerInfo),n=e.pendingProps,null===t?e.child=Ma(e,null,n,r):Fo(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,No(t,e,n,i=e.elementType===n?i:Ki(n,i),r);case 7:return Fo(t,e,e.pendingProps,r),e.child;case 8:case 12:return Fo(t,e,e.pendingProps.children,r),e.child;case 10:t:{n=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value;var l=e.type._context;if(ci(Ji,l._currentValue),l._currentValue=a,null!==s)if(l=s.value,0==(a=un(l,a)?0:0|(\"function\"==typeof n._calculateChangedBits?n._calculateChangedBits(l,a):1073741823))){if(s.children===i.children&&!pi.current){e=rs(t,e,r);break t}}else for(null!==(l=e.child)&&(l.return=e);null!==l;){var u=l.dependencies;if(null!==u){s=l.child;for(var c=u.firstContext;null!==c;){if(c.context===n&&0!=(c.observedBits&a)){1===l.tag&&((c=ua(-1,r&-r)).tag=2,ca(l,c)),l.lanes|=r,null!==(c=l.alternate)&&(c.lanes|=r),na(l.return,r),u.lanes|=r;break}c=c.next}}else s=10===l.tag&&l.type===e.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===e){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Fo(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=(a=e.pendingProps).children,ia(e,r),n=n(i=aa(i,a.unstable_observedBits)),e.flags|=1,Fo(t,e,n,r),e.child;case 14:return a=Ki(i=e.type,e.pendingProps),Bo(t,e,i,a=Ki(i.type,a),n,r);case 15:return jo(t,e,e.type,e.pendingProps,n,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ki(n,i),null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,vi(n)?(t=!0,bi(e)):t=!1,ia(e,r),ya(e,n,i),ba(e,n,i,r),Go(null,e,n,!0,t,r);case 19:return es(t,e,r);case 23:case 24:return Uo(t,e,r)}throw Error(o(156,e.tag))},eu.prototype.render=function(t){Jl(t,this._internalRoot,null,null)},eu.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;Jl(null,t,null,(function(){e[Qn]=null}))},te=function(t){13===t.tag&&(fl(t,4,ul()),tu(t,4))},ee=function(t){13===t.tag&&(fl(t,67108864,ul()),tu(t,67108864))},re=function(t){if(13===t.tag){var e=ul(),r=cl(t);fl(t,r,e),tu(t,r)}},ne=function(t,e){return e()},At=function(t,e,r){switch(e){case\"input\":if(rt(t,r),e=r.name,\"radio\"===r.type&&null!=e){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+e)+'][type=\"radio\"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=ii(n);if(!i)throw Error(o(90));J(n),rt(n,i)}}}break;case\"textarea\":ut(t,r);break;case\"select\":null!=(e=r.value)&&ot(t,!!r.multiple,e,!1)}},Ot=ml,It=function(t,e,r,n,i){var a=Cs;Cs|=4;try{return Gi(98,t.bind(null,e,r,n,i))}finally{0===(Cs=a)&&(qs(),Wi())}},Dt=function(){0==(49&Cs)&&(function(){if(null!==el){var t=el;el=null,t.forEach((function(t){t.expiredLanes|=24&t.pendingLanes,pl(t,Vi())}))}Wi()}(),Ol())},zt=function(t,e){var r=Cs;Cs|=2;try{return t(e)}finally{0===(Cs=r)&&(qs(),Wi())}};var au={Events:[ri,ni,ii,Lt,Pt,Ol,{current:!1}]},ou={findFiberByHostInstance:ei,bundleType:0,version:\"17.0.2\",rendererPackageName:\"react-dom\"},su={bundleType:ou.bundleType,version:ou.version,rendererPackageName:ou.rendererPackageName,rendererConfig:ou.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=$t(t))?null:t.stateNode},findFiberByHostInstance:ou.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var lu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lu.isDisabled&&lu.supportsFiber)try{wi=lu.inject(su),ki=lu}catch(gt){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=au,e.createPortal=iu,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if(\"function\"==typeof t.render)throw Error(o(188));throw Error(o(268,Object.keys(t)))}return null===(t=$t(e))?null:t.stateNode},e.flushSync=function(t,e){var r=Cs;if(0!=(48&r))return t(e);Cs|=1;try{if(t)return Gi(99,t.bind(null,e))}finally{Cs=r,Wi()}},e.hydrate=function(t,e,r){if(!ru(e))throw Error(o(200));return nu(null,t,e,!0,r)},e.render=function(t,e,r){if(!ru(e))throw Error(o(200));return nu(null,t,e,!1,r)},e.unmountComponentAtNode=function(t){if(!ru(t))throw Error(o(40));return!!t._reactRootContainer&&(yl((function(){nu(null,null,t,!1,(function(){t._reactRootContainer=null,t[Qn]=null}))})),!0)},e.unstable_batchedUpdates=ml,e.unstable_createPortal=function(t,e){return iu(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!ru(r))throw Error(o(200));if(null==t||void 0===t._reactInternals)throw Error(o(38));return nu(t,e,r,!1,n)},e.version=\"17.0.2\"},3935:(t,e,r)=>{\"use strict\";!function t(){if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&\"function\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=r(4448)},9921:(t,e)=>{\"use strict\";var r=\"function\"==typeof Symbol&&Symbol.for,n=r?Symbol.for(\"react.element\"):60103,i=r?Symbol.for(\"react.portal\"):60106,a=r?Symbol.for(\"react.fragment\"):60107,o=r?Symbol.for(\"react.strict_mode\"):60108,s=r?Symbol.for(\"react.profiler\"):60114,l=r?Symbol.for(\"react.provider\"):60109,u=r?Symbol.for(\"react.context\"):60110,c=r?Symbol.for(\"react.async_mode\"):60111,f=r?Symbol.for(\"react.concurrent_mode\"):60111,h=r?Symbol.for(\"react.forward_ref\"):60112,p=r?Symbol.for(\"react.suspense\"):60113,d=r?Symbol.for(\"react.suspense_list\"):60120,g=r?Symbol.for(\"react.memo\"):60115,v=r?Symbol.for(\"react.lazy\"):60116,m=r?Symbol.for(\"react.block\"):60121,y=r?Symbol.for(\"react.fundamental\"):60117,x=r?Symbol.for(\"react.responder\"):60118,b=r?Symbol.for(\"react.scope\"):60119;function _(t){if(\"object\"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case c:case f:case a:case s:case o:case p:return t;default:switch(t=t&&t.$$typeof){case u:case h:case v:case g:case l:return t;default:return e}}case i:return e}}}function w(t){return _(t)===f}e.AsyncMode=c,e.ConcurrentMode=f,e.ContextConsumer=u,e.ContextProvider=l,e.Element=n,e.ForwardRef=h,e.Fragment=a,e.Lazy=v,e.Memo=g,e.Portal=i,e.Profiler=s,e.StrictMode=o,e.Suspense=p,e.isAsyncMode=function(t){return w(t)||_(t)===c},e.isConcurrentMode=w,e.isContextConsumer=function(t){return _(t)===u},e.isContextProvider=function(t){return _(t)===l},e.isElement=function(t){return\"object\"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return _(t)===h},e.isFragment=function(t){return _(t)===a},e.isLazy=function(t){return _(t)===v},e.isMemo=function(t){return _(t)===g},e.isPortal=function(t){return _(t)===i},e.isProfiler=function(t){return _(t)===s},e.isStrictMode=function(t){return _(t)===o},e.isSuspense=function(t){return _(t)===p},e.isValidElementType=function(t){return\"string\"==typeof t||\"function\"==typeof t||t===a||t===f||t===s||t===o||t===p||t===d||\"object\"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===g||t.$$typeof===l||t.$$typeof===u||t.$$typeof===h||t.$$typeof===y||t.$$typeof===x||t.$$typeof===b||t.$$typeof===m)},e.typeOf=_},9864:(t,e,r)=>{\"use strict\";t.exports=r(9921)},4922:(t,e,r)=>{\"use strict\";function n(t){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},n(t)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){var e=function(e){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,\"prototype\",{writable:!1}),e&&u(t,e)}(v,e);var r,n,i,o,s=(r=v,n=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=h(r);if(n){var i=h(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return c(this,t)});function v(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,v),(e=s.call(this,t)).p=Promise.resolve(),e.resizeHandler=null,e.handlers={},e.syncWindowResize=e.syncWindowResize.bind(f(e)),e.syncEventHandlers=e.syncEventHandlers.bind(f(e)),e.attachUpdateEvents=e.attachUpdateEvents.bind(f(e)),e.getRef=e.getRef.bind(f(e)),e.handleUpdate=e.handleUpdate.bind(f(e)),e.figureCallback=e.figureCallback.bind(f(e)),e.updatePlotly=e.updatePlotly.bind(f(e)),e}return i=v,(o=[{key:\"updatePlotly\",value:function(e,r,n){var i=this;this.p=this.p.then((function(){if(!i.unmounting){if(!i.el)throw new Error(\"Missing element reference\");return t.react(i.el,{data:i.props.data,layout:i.props.layout,config:i.props.config,frames:i.props.frames})}})).then((function(){i.unmounting||(i.syncWindowResize(e),i.syncEventHandlers(),i.figureCallback(r),n&&i.attachUpdateEvents())})).catch((function(t){i.props.onError&&i.props.onError(t)}))}},{key:\"componentDidMount\",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:\"componentDidUpdate\",value:function(t){this.unmounting=!1;var e=t.frames&&t.frames.length?t.frames.length:0,r=this.props.frames&&this.props.frames.length?this.props.frames.length:0,n=!(t.layout===this.props.layout&&t.data===this.props.data&&t.config===this.props.config&&r===e),i=void 0!==t.revision,a=t.revision!==this.props.revision;(n||i&&(!i||a))&&this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:\"componentWillUnmount\",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&g&&(window.removeEventListener(\"resize\",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),t.purge(this.el)}},{key:\"attachUpdateEvents\",value:function(){var t=this;this.el&&this.el.removeListener&&d.forEach((function(e){t.el.on(e,t.handleUpdate)}))}},{key:\"removeUpdateEvents\",value:function(){var t=this;this.el&&this.el.removeListener&&d.forEach((function(e){t.el.removeListener(e,t.handleUpdate)}))}},{key:\"handleUpdate\",value:function(){this.figureCallback(this.props.onUpdate)}},{key:\"figureCallback\",value:function(t){if(\"function\"==typeof t){var e=this.el;t({data:e.data,layout:e.layout,frames:this.el._transitionData?this.el._transitionData._frames:null},this.el)}}},{key:\"syncWindowResize\",value:function(e){var r=this;g&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return t.Plots.resize(r.el)},window.addEventListener(\"resize\",this.resizeHandler),e&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener(\"resize\",this.resizeHandler),this.resizeHandler=null))}},{key:\"getRef\",value:function(t){this.el=t,this.props.debug&&g&&(window.gd=this.el)}},{key:\"syncEventHandlers\",value:function(){var t=this;p.forEach((function(e){var r=t.props[\"on\"+e],n=t.handlers[e],i=Boolean(n);r&&!i?t.addEventHandler(e,r):!r&&i?t.removeEventHandler(e):r&&i&&r!==n&&(t.removeEventHandler(e),t.addEventHandler(e,r))}))}},{key:\"addEventHandler\",value:function(t,e){this.handlers[t]=e,this.el.on(this.getPlotlyEventName(t),this.handlers[t])}},{key:\"removeEventHandler\",value:function(t){this.el.removeListener(this.getPlotlyEventName(t),this.handlers[t]),delete this.handlers[t]}},{key:\"getPlotlyEventName\",value:function(t){return\"plotly_\"+t.toLowerCase()}},{key:\"render\",value:function(){return a.default.createElement(\"div\",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}])&&l(i.prototype,o),Object.defineProperty(i,\"prototype\",{writable:!1}),v}(a.Component);return e.propTypes={data:o.default.arrayOf(o.default.object),config:o.default.object,layout:o.default.object,frames:o.default.arrayOf(o.default.object),revision:o.default.number,onInitialized:o.default.func,onPurge:o.default.func,onError:o.default.func,onUpdate:o.default.func,debug:o.default.bool,style:o.default.object,className:o.default.string,useResizeHandler:o.default.bool,divId:o.default.string},p.forEach((function(t){e.propTypes[\"on\"+t]=o.default.func})),e.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:\"relative\",display:\"inline-block\"}},e};var i,a=function(t,e){if(t&&t.__esModule)return t;if(null===t||\"object\"!==n(t)&&\"function\"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(\"default\"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var l=a?Object.getOwnPropertyDescriptor(t,o):null;l&&(l.get||l.set)?Object.defineProperty(i,o,l):i[o]=t[o]}return i.default=t,r&&r.set(t,i),i}(r(7294)),o=(i=r(5697))&&i.__esModule?i:{default:i};function s(t){if(\"function\"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){if(e&&(\"object\"===n(e)||\"function\"==typeof e))return e;if(void 0!==e)throw new TypeError(\"Derived constructors may only return object or undefined\");return f(t)}function f(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var p=[\"AfterExport\",\"AfterPlot\",\"Animated\",\"AnimatingFrame\",\"AnimationInterrupted\",\"AutoSize\",\"BeforeExport\",\"BeforeHover\",\"ButtonClicked\",\"Click\",\"ClickAnnotation\",\"Deselect\",\"DoubleClick\",\"Framework\",\"Hover\",\"LegendClick\",\"LegendDoubleClick\",\"Relayout\",\"Relayouting\",\"Restyle\",\"Redraw\",\"Selected\",\"Selecting\",\"SliderChange\",\"SliderEnd\",\"SliderStart\",\"SunburstClick\",\"Transitioning\",\"TransitionInterrupted\",\"Unhover\",\"WebGlContextLost\"],d=[\"plotly_restyle\",\"plotly_redraw\",\"plotly_relayout\",\"plotly_relayouting\",\"plotly_doubleclick\",\"plotly_animated\",\"plotly_sunburstclick\"],g=\"undefined\"!=typeof window},8660:(t,e,r)=>{\"use strict\";e.Z=void 0;var n=a(r(4922)),i=a(r(5478));function a(t){return t&&t.__esModule?t:{default:t}}var o=(0,n.default)(i.default);e.Z=o},2408:(t,e,r)=>{\"use strict\";var n=r(7418),i=60103,a=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var o=60109,s=60110,l=60112;e.Suspense=60113;var u=60115,c=60116;if(\"function\"==typeof Symbol&&Symbol.for){var f=Symbol.for;i=f(\"react.element\"),a=f(\"react.portal\"),e.Fragment=f(\"react.fragment\"),e.StrictMode=f(\"react.strict_mode\"),e.Profiler=f(\"react.profiler\"),o=f(\"react.provider\"),s=f(\"react.context\"),l=f(\"react.forward_ref\"),e.Suspense=f(\"react.suspense\"),u=f(\"react.memo\"),c=f(\"react.lazy\")}var h=\"function\"==typeof Symbol&&Symbol.iterator;function p(t){for(var e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+t,r=1;r<arguments.length;r++)e+=\"&args[]=\"+encodeURIComponent(arguments[r]);return\"Minified React error #\"+t+\"; visit \"+e+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function v(t,e,r){this.props=t,this.context=e,this.refs=g,this.updater=r||d}function m(){}function y(t,e,r){this.props=t,this.context=e,this.refs=g,this.updater=r||d}v.prototype.isReactComponent={},v.prototype.setState=function(t,e){if(\"object\"!=typeof t&&\"function\"!=typeof t&&null!=t)throw Error(p(85));this.updater.enqueueSetState(this,t,e,\"setState\")},v.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,\"forceUpdate\")},m.prototype=v.prototype;var x=y.prototype=new m;x.constructor=y,n(x,v.prototype),x.isPureReactComponent=!0;var b={current:null},_=Object.prototype.hasOwnProperty,w={key:!0,ref:!0,__self:!0,__source:!0};function k(t,e,r){var n,a={},o=null,s=null;if(null!=e)for(n in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(o=\"\"+e.key),e)_.call(e,n)&&!w.hasOwnProperty(n)&&(a[n]=e[n]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];a.children=u}if(t&&t.defaultProps)for(n in l=t.defaultProps)void 0===a[n]&&(a[n]=l[n]);return{$$typeof:i,type:t,key:o,ref:s,props:a,_owner:b.current}}function T(t){return\"object\"==typeof t&&null!==t&&t.$$typeof===i}var M=/\\/+/g;function A(t,e){return\"object\"==typeof t&&null!==t&&null!=t.key?function(t){var e={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+t.replace(/[=:]/g,(function(t){return e[t]}))}(\"\"+t.key):e.toString(36)}function S(t,e,r,n,o){var s=typeof t;\"undefined\"!==s&&\"boolean\"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case\"string\":case\"number\":l=!0;break;case\"object\":switch(t.$$typeof){case i:case a:l=!0}}if(l)return o=o(l=t),t=\"\"===n?\".\"+A(l,0):n,Array.isArray(o)?(r=\"\",null!=t&&(r=t.replace(M,\"$&/\")+\"/\"),S(o,e,r,\"\",(function(t){return t}))):null!=o&&(T(o)&&(o=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(o,r+(!o.key||l&&l.key===o.key?\"\":(\"\"+o.key).replace(M,\"$&/\")+\"/\")+t)),e.push(o)),1;if(l=0,n=\"\"===n?\".\":n+\":\",Array.isArray(t))for(var u=0;u<t.length;u++){var c=n+A(s=t[u],u);l+=S(s,e,r,c,o)}else if(c=function(t){return null===t||\"object\"!=typeof t?null:\"function\"==typeof(t=h&&t[h]||t[\"@@iterator\"])?t:null}(t),\"function\"==typeof c)for(t=c.call(t),u=0;!(s=t.next()).done;)l+=S(s=s.value,e,r,c=n+A(s,u++),o);else if(\"object\"===s)throw e=\"\"+t,Error(p(31,\"[object Object]\"===e?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e));return l}function E(t,e,r){if(null==t)return t;var n=[],i=0;return S(t,n,\"\",\"\",(function(t){return e.call(r,t,i++)})),n}function C(t){if(-1===t._status){var e=t._result;e=e(),t._status=0,t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}if(1===t._status)return t._result;throw t._result}var L={current:null};function P(){var t=L.current;if(null===t)throw Error(p(321));return t}var O={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:b,IsSomeRendererActing:{current:!1},assign:n};e.Children={map:E,forEach:function(t,e,r){E(t,(function(){e.apply(this,arguments)}),r)},count:function(t){var e=0;return E(t,(function(){e++})),e},toArray:function(t){return E(t,(function(t){return t}))||[]},only:function(t){if(!T(t))throw Error(p(143));return t}},e.Component=v,e.PureComponent=y,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,e.cloneElement=function(t,e,r){if(null==t)throw Error(p(267,t));var a=n({},t.props),o=t.key,s=t.ref,l=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,l=b.current),void 0!==e.key&&(o=\"\"+e.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(c in e)_.call(e,c)&&!w.hasOwnProperty(c)&&(a[c]=void 0===e[c]&&void 0!==u?u[c]:e[c])}var c=arguments.length-2;if(1===c)a.children=r;else if(1<c){u=Array(c);for(var f=0;f<c;f++)u[f]=arguments[f+2];a.children=u}return{$$typeof:i,type:t.type,key:o,ref:s,props:a,_owner:l}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:s,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:t},t.Consumer=t},e.createElement=k,e.createFactory=function(t){var e=k.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:l,render:t}},e.isValidElement=T,e.lazy=function(t){return{$$typeof:c,_payload:{_status:-1,_result:t},_init:C}},e.memo=function(t,e){return{$$typeof:u,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return P().useCallback(t,e)},e.useContext=function(t,e){return P().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return P().useEffect(t,e)},e.useImperativeHandle=function(t,e,r){return P().useImperativeHandle(t,e,r)},e.useLayoutEffect=function(t,e){return P().useLayoutEffect(t,e)},e.useMemo=function(t,e){return P().useMemo(t,e)},e.useReducer=function(t,e,r){return P().useReducer(t,e,r)},e.useRef=function(t){return P().useRef(t)},e.useState=function(t){return P().useState(t)},e.version=\"17.0.2\"},7294:(t,e,r)=>{\"use strict\";t.exports=r(2408)},53:(t,e)=>{\"use strict\";var r,n,i,a;if(\"object\"==typeof performance&&\"function\"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}if(\"undefined\"==typeof window||\"function\"!=typeof MessageChannel){var u=null,c=null,f=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(t){throw setTimeout(f,0),t}};r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(f,0))},n=function(t,e){c=setTimeout(t,e)},i=function(){clearTimeout(c)},e.unstable_shouldYield=function(){return!1},a=e.unstable_forceFrameRate=function(){}}else{var h=window.setTimeout,p=window.clearTimeout;if(\"undefined\"!=typeof console){var d=window.cancelAnimationFrame;\"function\"!=typeof window.requestAnimationFrame&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"),\"function\"!=typeof d&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\")}var g=!1,v=null,m=-1,y=5,x=0;e.unstable_shouldYield=function(){return e.unstable_now()>=x},a=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):y=0<t?Math.floor(1e3/t):5};var b=new MessageChannel,_=b.port2;b.port1.onmessage=function(){if(null!==v){var t=e.unstable_now();x=t+y;try{v(!0,t)?_.postMessage(null):(g=!1,v=null)}catch(t){throw _.postMessage(null),t}}else g=!1},r=function(t){v=t,g||(g=!0,_.postMessage(null))},n=function(t,r){m=h((function(){t(e.unstable_now())}),r)},i=function(){p(m),m=-1}}function w(t,e){var r=t.length;t.push(e);t:for(;;){var n=r-1>>>1,i=t[n];if(!(void 0!==i&&0<M(i,e)))break t;t[n]=e,t[r]=i,r=n}}function k(t){return void 0===(t=t[0])?null:t}function T(t){var e=t[0];if(void 0!==e){var r=t.pop();if(r!==e){t[0]=r;t:for(var n=0,i=t.length;n<i;){var a=2*(n+1)-1,o=t[a],s=a+1,l=t[s];if(void 0!==o&&0>M(o,r))void 0!==l&&0>M(l,o)?(t[n]=l,t[s]=r,n=s):(t[n]=o,t[a]=r,n=a);else{if(!(void 0!==l&&0>M(l,r)))break t;t[n]=l,t[s]=r,n=s}}}return e}return null}function M(t,e){var r=t.sortIndex-e.sortIndex;return 0!==r?r:t.id-e.id}var A=[],S=[],E=1,C=null,L=3,P=!1,O=!1,I=!1;function D(t){for(var e=k(S);null!==e;){if(null===e.callback)T(S);else{if(!(e.startTime<=t))break;T(S),e.sortIndex=e.expirationTime,w(A,e)}e=k(S)}}function z(t){if(I=!1,D(t),!O)if(null!==k(A))O=!0,r(R);else{var e=k(S);null!==e&&n(z,e.startTime-t)}}function R(t,r){O=!1,I&&(I=!1,i()),P=!0;var a=L;try{for(D(r),C=k(A);null!==C&&(!(C.expirationTime>r)||t&&!e.unstable_shouldYield());){var o=C.callback;if(\"function\"==typeof o){C.callback=null,L=C.priorityLevel;var s=o(C.expirationTime<=r);r=e.unstable_now(),\"function\"==typeof s?C.callback=s:C===k(A)&&T(A),D(r)}else T(A);C=k(A)}if(null!==C)var l=!0;else{var u=k(S);null!==u&&n(z,u.startTime-r),l=!1}return l}finally{C=null,L=a,P=!1}}var F=a;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){O||P||(O=!0,r(R))},e.unstable_getCurrentPriorityLevel=function(){return L},e.unstable_getFirstCallbackNode=function(){return k(A)},e.unstable_next=function(t){switch(L){case 1:case 2:case 3:var e=3;break;default:e=L}var r=L;L=e;try{return t()}finally{L=r}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=F,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=L;L=t;try{return e()}finally{L=r}},e.unstable_scheduleCallback=function(t,a,o){var s=e.unstable_now();switch(o=\"object\"==typeof o&&null!==o&&\"number\"==typeof(o=o.delay)&&0<o?s+o:s,t){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return t={id:E++,callback:a,priorityLevel:t,startTime:o,expirationTime:l=o+l,sortIndex:-1},o>s?(t.sortIndex=o,w(S,t),null===k(A)&&t===k(S)&&(I?i():I=!0,n(z,o-s))):(t.sortIndex=l,w(A,t),O||P||(O=!0,r(R))),t},e.unstable_wrapCallback=function(t){var e=L;return function(){var r=L;L=e;try{return t.apply(this,arguments)}finally{L=r}}}},3840:(t,e,r)=>{\"use strict\";t.exports=r(53)},3379:t=>{\"use strict\";var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var a={},o=[],s=0;s<t.length;s++){var l=t[s],u=n.base?l[0]+n.base:l[0],c=a[u]||0,f=\"\".concat(u,\" \").concat(c);a[u]=c+1;var h=r(f),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var d=i(p,n);n.byIndex=s,e.splice(s,0,{identifier:f,updater:d,references:1})}o.push(f)}return o}function i(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var a=n(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<a.length;o++){var s=r(a[o]);e[s].references--}for(var l=n(t,i),u=0;u<a.length;u++){var c=r(a[u]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}a=l}}},569:t=>{\"use strict\";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");n.appendChild(r)}},9216:t=>{\"use strict\";t.exports=function(t){var e=document.createElement(\"style\");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},3565:(t,e,r)=>{\"use strict\";t.exports=function(t){var e=r.nc;e&&t.setAttribute(\"nonce\",e)}},7795:t=>{\"use strict\";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n=\"\";r.supports&&(n+=\"@supports (\".concat(r.supports,\") {\")),r.media&&(n+=\"@media \".concat(r.media,\" {\"));var i=void 0!==r.layer;i&&(n+=\"@layer\".concat(r.layer.length>0?\" \".concat(r.layer):\"\",\" {\")),n+=r.css,i&&(n+=\"}\"),r.media&&(n+=\"}\"),r.supports&&(n+=\"}\");var a=r.sourceMap;a&&\"undefined\"!=typeof btoa&&(n+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a)))),\" */\")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4589:t=>{\"use strict\";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},n={};function i(t){var e=n[t];if(void 0!==e)return e.exports;var a=n[t]={id:t,loaded:!1,exports:{}};return r[t].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}return i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,i.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if(\"object\"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&\"function\"==typeof r.then)return r}var a=Object.create(null);i.r(a);var o={};t=t||[null,e({}),e([]),e(e)];for(var s=2&n&&r;\"object\"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>o[t]=()=>r[t]));return o.default=()=>r,i.d(a,o),a},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),i.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,\"exports\",{enumerable:!0,set:()=>{throw new Error(\"ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: \"+t.id)}}),t),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},i.nc=void 0,i(8201)})()));\n",
+              "        </script>\n",
+              "        \n",
+              "    <div id=\"_interpret-viz-cf323da0-0b44-4aa6-be04-056c17476244\"></div>\n",
+              "    <script defer type=\"text/javascript\">\n",
+              "\n",
+              "    (function universalLoad(root, callback) {\n",
+              "      if(typeof exports === 'object' && typeof module === 'object') {\n",
+              "        // CommonJS2\n",
+              "        console.log(\"CommonJS2\");\n",
+              "        var interpretInline = require('interpret-inline');\n",
+              "        callback(interpretInline);\n",
+              "      } else if(typeof define === 'function' && define.amd) {\n",
+              "        // AMD\n",
+              "        console.log(\"AMD\");\n",
+              "        require(['interpret-inline'], function(interpretInline) {\n",
+              "          callback(interpretInline);\n",
+              "        });\n",
+              "      } else if(typeof exports === 'object') {\n",
+              "        // CommonJS\n",
+              "        console.log(\"CommonJS\");\n",
+              "        var interpretInline = require('interpret-inline');\n",
+              "        callback(interpretInline);\n",
+              "      } else {\n",
+              "        // Browser\n",
+              "        console.log(\"Browser\");\n",
+              "        callback(root['interpret-inline']);\n",
+              "      }\n",
+              "    })(this, function(interpretInline) {\n",
+              "        interpretInline.RenderApp(\"_interpret-viz-cf323da0-0b44-4aa6-be04-056c17476244\", {\"name\": \"ExplainableBoostingClassifier_1\", \"overall\": {\"type\": \"plotly\", \"figure\": {\"data\": [{\"marker\": {\"color\": [\"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\"]}, \"orientation\": \"h\", \"x\": [0.0585326394774751, 0.0646735170829893, 0.07240577866730295, 0.1179070367947336, 0.12033604098570344, 0.15412508627916552, 0.2212380723905335, 0.2963318567410247, 0.36056590591594345, 0.3818407344139292, 0.3978644220448435, 0.5336853205793298, 0.5559674941360957, 0.5908497157733126, 0.7384857434691107], \"y\": [\"MaritalStatus & HoursPerWeek\", \"Race\", \"NativeCountry\", \"WorkClass\", \"fnlwgt\", \"CapitalLoss\", \"Education\", \"HoursPerWeek\", \"EducationNum\", \"Gender\", \"Occupation\", \"Relationship\", \"CapitalGain\", \"MaritalStatus\", \"Age\"], \"type\": \"bar\"}], \"layout\": {\"title\": {\"text\": \"Global Term/Feature Importances\"}, \"xaxis\": {\"range\": [0, 0.7384857434691107], \"title\": {\"text\": \"Mean Absolute Score (Weighted)\"}}, \"yaxis\": {\"automargin\": true, \"dtick\": 1, \"title\": {\"text\": \"\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The term importances are the mean absolute contribution (score) each term (feature or interaction) makes to predictions averaged across the training dataset. Contributions are weighted by the number of samples in each bin, and by the sample weights (if any). The 15 most important terms are shown.\", \"link\": \"https://github.com/interpretml/interpret/blob/develop/examples/python/notebooks/EBM%20Feature%20Importances.ipynb\"}}, \"specific\": [{\"type\": \"plotly\", \"figure\": {\"data\": [{\"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Lower Bound\", \"x\": [17.0, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, 62.5, 63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, 74.5, 75.5, 76.5, 78.5, 79.5, 81.5, 83.5, 89.0, 90.0], \"y\": [-2.3775381755611558, -2.3775381755611558, -2.3775381755611558, -2.3775381755611558, -2.3706188658431193, -1.4626074617540636, -1.4626074617540636, -1.2064234817544297, -0.8025870698742016, -0.7255629685074949, -0.6046806320986587, -0.28825865321595545, -0.08856722525182927, 0.037949182973027934, 0.05496990169685167, 0.06984890266407667, 0.055881007521497106, 0.24992264758806904, 0.24832140437865188, 0.32466517627191266, 0.4891680542463019, 0.49263256989853776, 0.501156620841226, 0.6160090511146886, 0.5327847622875953, 0.44323416826826256, 0.6484222902048947, 0.6657057573673517, 0.7377058296845241, 0.6956277182316778, 0.8653427821225591, 0.8585867283073313, 0.7463089086938294, 0.7778212870037909, 0.8321368844227164, 0.897686117251725, 1.015343591587111, 1.0054906375016204, 0.5566184320005082, 0.648437352056582, 0.6558509185753623, 0.6617520387706901, 0.6792225980923832, 0.5655139663372032, 0.6140598511810531, 0.3331065836543291, 0.3869968150634503, 0.383809635315898, 0.1915925705797926, 0.1590326061933866, -0.06994154974017551, -0.06765499481503082, -0.06765499481503082, -0.034201701225429634, 0.009022304844930856, -0.2722699049703833, -0.08345749397237906, 0.0912966106040106, 0.07455359645800716, 0.06108972290159553, 0.17877191280872734, 0.08300477026948205, -0.7909623060878901, -0.9541196953942219, -0.923136363612385, -0.878845022893429, -0.878845022893429], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"color\": \"rgb(31, 119, 180)\", \"shape\": \"hv\"}, \"mode\": \"lines\", \"name\": \"Main\", \"x\": [17.0, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, 62.5, 63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, 74.5, 75.5, 76.5, 78.5, 79.5, 81.5, 83.5, 89.0, 90.0], \"y\": [-2.18038081994676, -2.18038081994676, -2.18038081994676, -2.18038081994676, -2.1767620696351417, -1.3725245371818362, -1.3725245371818362, -1.112236295316701, -0.7467026320343092, -0.6732833435573943, -0.5515576035929792, -0.23855383277512499, -0.06056723629814431, 0.0599923831648711, 0.10014817166170598, 0.10009060657524044, 0.08350923360071322, 0.2894002806088801, 0.28487497820756, 0.3501239201523874, 0.5225736367417237, 0.5277404646962751, 0.5539253060442819, 0.6629550411900771, 0.5673752408473803, 0.50336750697021, 0.6805333897233923, 0.694036837520758, 0.7718564761410991, 0.7190938358509138, 0.9002745749336807, 0.8939564141314229, 0.794344556049447, 0.8204502128824864, 0.8674621573629292, 0.9545558664345309, 1.0617223649433138, 1.0687470881876302, 0.6179514129384139, 0.6814791449880957, 0.682371828017877, 0.6857343514569119, 0.7288344278875245, 0.5968807370629802, 0.6760613860967778, 0.42166159689452176, 0.45568108511468175, 0.46862323797109834, 0.251196438623039, 0.23180333442039705, 0.014555293208659226, 0.0196492460167092, 0.0196492460167092, 0.03617374603602491, 0.20446841777900587, -0.14804132208848952, -0.02655154169831242, 0.18043462912945168, 0.20311338632747122, 0.19519906791905742, 0.4106263655174026, 0.36000540934343117, -0.641723887447354, -0.7976422625548666, -0.769532836085265, -0.7230714658933074, -0.7230714658933074], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Upper Bound\", \"x\": [17.0, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, 62.5, 63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, 74.5, 75.5, 76.5, 78.5, 79.5, 81.5, 83.5, 89.0, 90.0], \"y\": [-1.9832234643323639, -1.9832234643323639, -1.9832234643323639, -1.9832234643323639, -1.9829052734271644, -1.2824416126096088, -1.2824416126096088, -1.0180491088789725, -0.6908181941944168, -0.6210037186072936, -0.49843457508729977, -0.18884901233429452, -0.03256724734445936, 0.08203558335671426, 0.14532644162656028, 0.1303323104864042, 0.11113745967992933, 0.3288779136296912, 0.32142855203646814, 0.37558266403286217, 0.5559792192371455, 0.5628483594940125, 0.6066939912473378, 0.7099010312654656, 0.6019657194071654, 0.5635008456721575, 0.7126444892418898, 0.7223679176741642, 0.806007122597674, 0.7425599534701498, 0.9352063677448023, 0.9293260999555145, 0.8423802034050646, 0.8630791387611819, 0.902787430303142, 1.011425615617337, 1.1081011382995167, 1.13200353887364, 0.6792843938763197, 0.7145209379196094, 0.7088927374603917, 0.7097166641431336, 0.7784462576826658, 0.6282475077887572, 0.7380629210125025, 0.5102166101347144, 0.5243653551659132, 0.5534368406262987, 0.31080030666628533, 0.3045740626474075, 0.09905213615749396, 0.10695348684844921, 0.10695348684844921, 0.10654919329747946, 0.3999145307130809, -0.02381273920659578, 0.030354410575754227, 0.26957264765489275, 0.33167317619693526, 0.3293084129365193, 0.6424808182260779, 0.6370060484173803, -0.49248546880681787, -0.6411648297155113, -0.615929308558145, -0.5672979088931858, -0.5672979088931858], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\"17 - 20.5\", \"20.5 - 24\", \"24 - 27.4\", \"27.4 - 30.9\", \"30.9 - 34.4\", \"34.4 - 37.9\", \"37.9 - 41.3\", \"41.3 - 44.8\", \"44.8 - 48.3\", \"48.3 - 51.8\", \"51.8 - 55.2\", \"55.2 - 58.7\", \"58.7 - 62.2\", \"62.2 - 65.7\", \"65.7 - 69.1\", \"69.1 - 72.6\", \"72.6 - 76.1\", \"76.1 - 79.6\", \"79.6 - 83\", \"83 - 86.5\", \"86.5 - 90\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [18.738095238095237, 22.214285714285715, 25.69047619047619, 29.166666666666668, 32.64285714285714, 36.11904761904762, 39.595238095238095, 43.07142857142857, 46.54761904761905, 50.02380952380952, 53.5, 56.97619047619048, 60.45238095238095, 63.92857142857143, 67.4047619047619, 70.88095238095238, 74.35714285714286, 77.83333333333334, 81.30952380952381, 84.78571428571428, 88.26190476190476], \"y\": [1823, 1771, 2466, 1886, 2629, 1987, 2464, 1664, 2013, 1314, 1344, 811, 920, 461, 414, 162, 150, 51, 42, 10, 38], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"Age\", \"standoff\": 0}, \"matches\": \"x\"}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"Age\", \"standoff\": 0}, \"tickmode\": \"array\", \"ticktext\": [\"17 - 20.5\", \"20.5 - 24\", \"24 - 27.4\", \"27.4 - 30.9\", \"30.9 - 34.4\", \"34.4 - 37.9\", \"37.9 - 41.3\", \"41.3 - 44.8\", \"44.8 - 48.3\", \"48.3 - 51.8\", \"51.8 - 55.2\", \"55.2 - 58.7\", \"58.7 - 62.2\", \"62.2 - 65.7\", \"65.7 - 69.1\", \"69.1 - 72.6\", \"72.6 - 76.1\", \"76.1 - 79.6\", \"79.6 - 83\", \"83 - 86.5\", \"86.5 - 90\"], \"tickvals\": [18.738095238095237, 22.214285714285715, 25.69047619047619, 29.166666666666668, 32.64285714285714, 36.11904761904762, 39.595238095238095, 43.07142857142857, 46.54761904761905, 50.02380952380952, 53.5, 56.97619047619048, 60.45238095238095, 63.92857142857143, 67.4047619047619, 70.88095238095238, 74.35714285714286, 77.83333333333334, 81.30952380952381, 84.78571428571428, 88.26190476190476], \"matches\": \"x\"}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: Age (continuous)\"}, \"showlegend\": false, \"bargap\": 0}}, \"help\": {\"text\": \"The contribution (score) of the term Age to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.06461766471956118, 0.03699238926453252, 0.02793969780570793, 0.6398182373013396, 0.008919002862020409, 0.034710467262748596, 0.0253342674161251, 0.06328439859029578, 0.3733193387172631], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" ?\", \" Federal-gov\", \" Local-gov\", \" Never-worked\", \" Private\", \" Self-emp-inc\", \" Self-emp-not-inc\", \" State-gov\", \" Without-pay\"], \"y\": [-0.1732866236620718, 0.5962500589869482, -0.1505484152583838, -0.47218371712350893, 0.0495109942022031, 0.19087156416716727, -0.3812548505954946, -0.1952345931931279, -3.1600737638949474], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" ?\", \" Federal-gov\", \" Local-gov\", \" Never-worked\", \" Private\", \" Self-emp-inc\", \" Self-emp-not-inc\", \" State-gov\", \" Without-pay\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" ?\", \" Federal-gov\", \" Local-gov\", \" Never-worked\", \" Private\", \" Self-emp-inc\", \" Self-emp-not-inc\", \" State-gov\", \" Without-pay\"], \"y\": [1376, 737, 1588, 6, 16975, 837, 1921, 968, 12], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: WorkClass (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term WorkClass to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Lower Bound\", \"x\": [12285.0, 23600.5, 26570.5, 28048.0, 29640.5, 30944.5, 32159.0, 33119.0, 34066.5, 34838.5, 36026.0, 37295.5, 38633.5, 40010.5, 42295.5, 44282.5, 46627.0, 48531.0, 50353.5, 52241.0, 54070.0, 55905.5, 57920.0, 60356.5, 62637.0, 65324.5, 67693.5, 70094.0, 72550.0, 74670.0, 76920.0, 79043.0, 81134.0, 82790.0, 84405.5, 86528.0, 88323.0, 89966.5, 91961.5, 93963.5, 95635.0, 96864.5, 98086.0, 99143.5, 100019.0, 101262.5, 102113.0, 102937.0, 103905.5, 104894.0, 106033.5, 107117.5, 107913.0, 108929.5, 109892.0, 110864.0, 111565.0, 112495.5, 113377.0, 114359.5, 115168.5, 116140.5, 117020.0, 117737.5, 118503.0, 119269.0, 120195.5, 121156.0, 122277.5, 123388.5, 124279.0, 125288.5, 126400.5, 127468.5, 128606.0, 129795.0, 131134.5, 132586.5, 133575.5, 134802.5, 136129.0, 137334.0, 138355.0, 139279.0, 140618.0, 141653.0, 142753.5, 143628.5, 144648.0, 145636.5, 146692.5, 147703.5, 148921.5, 149772.5, 150875.0, 152010.5, 153046.0, 154142.5, 155060.5, 155962.0, 157267.0, 158382.0, 159564.0, 160268.0, 161045.0, 162162.0, 162919.0, 163698.5, 164600.0, 165488.0, 166442.0, 167314.0, 167973.0, 168749.0, 169511.5, 170156.5, 170986.0, 172028.5, 172790.5, 173693.0, 174290.5, 174864.5, 175531.5, 176078.0, 176726.5, 177304.5, 177981.5, 178774.5, 179672.0, 180545.0, 181315.0, 182112.5, 182701.5, 183499.5, 183990.0, 184781.5, 185389.5, 186189.5, 186975.0, 187639.0, 188260.0, 188828.5, 189660.0, 190229.5, 190769.5, 191387.0, 192141.0, 192785.0, 193373.0, 194099.0, 194903.0, 195649.5, 196386.5, 197287.0, 198073.5, 198689.0, 199417.5, 200170.0, 200862.5, 201726.0, 202518.5, 203320.5, 204207.0, 205021.5, 205994.5, 206888.5, 207681.0, 208781.5, 209646.0, 210680.5, 211489.5, 212780.5, 213617.5, 214704.0, 215884.0, 216772.5, 217897.5, 219186.0, 220401.5, 221663.5, 222974.5, 224211.0, 225443.0, 226706.5, 227816.0, 229307.5, 230778.0, 231939.5, 233660.0, 234919.5, 236420.5, 237866.5, 239400.5, 241017.0, 242601.5, 244059.0, 246202.0, 247978.0, 249897.5, 251910.0, 254206.5, 255839.5, 257671.0, 259598.5, 262265.0, 264849.0, 266857.5, 269064.0, 271558.5, 273670.5, 275969.0, 278360.0, 280353.0, 282748.5, 284816.5, 287310.5, 289817.0, 292682.5, 295935.5, 298751.5, 302414.0, 305547.5, 308269.0, 311922.0, 314928.5, 318041.0, 321007.5, 325124.0, 328383.5, 331533.0, 335085.5, 338385.5, 341381.5, 344154.5, 347524.5, 350550.5, 354656.0, 358675.0, 363205.5, 368748.0, 373708.0, 378162.5, 385018.5, 391270.5, 399418.0, 406554.5, 413368.0, 423937.5, 437776.0, 452429.0, 471057.5, 498893.0, 541804.0, 609862.0, 1484705.0], \"y\": [-0.048672415803703545, 0.06032909094333376, 0.07640231554455268, 0.07640231554455268, -0.12570309721112394, -0.08641438405910029, -0.345018769673209, -0.1758965144334951, -0.1739925656280927, -0.2861746279562917, -0.28361298157328024, -0.3584617205080315, -0.32610029240354255, -0.32610029240354255, -0.3223584856668024, -0.4180432440465923, -0.378708132981483, -1.345025675364721, -0.4511419576561152, -0.3800153133233096, -0.36629741685708794, -0.40777110664893373, -0.5110132391225544, -0.40732437085260825, -0.40732437085260825, -0.4042404469648553, -0.37815989880201156, -0.37456829495332833, -0.21678622517030066, -0.23344534136350686, -0.23766498467081304, -0.16154156558107577, -0.16158404466166312, -0.16158404466166312, -0.16158404466166312, -0.16443871215203926, -0.1584888648377152, -0.1584888648377152, -0.1155740915455, -0.11359153013873834, -0.1147772702010549, -0.1147772702010549, -0.11678477765529172, -0.11678477765529172, -0.11678477765529172, -0.11678477765529172, -0.11678477765529172, -0.0517384586281258, -0.0517384586281258, -0.0517384586281258, -0.057314572656175136, -0.038843811132834874, -0.26426181615371025, -0.40544245116384037, -0.22845706835994684, -0.22845706835994684, -0.2556363690333493, -0.2556363690333493, -0.32343433728257504, -0.32343433728257504, -0.5251919174667293, -0.02462541165090608, -0.027074572041819407, -0.027074572041819407, 0.0032188662055318146, 0.0032188662055318146, 0.0032188662055318146, 0.0032188662055318146, 0.0032188662055318146, 0.0032188662055318146, 0.03609999004559054, 0.03609999004559054, 0.0352517894748723, 0.022107915685321465, 0.016406773836069644, 0.0012783753705610766, 0.0012783753705610766, 0.0008644847900570532, -0.046677834635452074, -0.046677834635452074, -0.046677834635452074, -0.04763827457369785, -0.10253323210619526, 0.04605596137574433, 0.04605596137574433, 0.04362386448267547, 0.04130868433817061, 0.057882709044010563, 0.0657351544438167, 0.0659679229666672, 0.11370896119307304, 0.11131853613939913, 0.13278737248079195, 0.13966557142216718, 0.13966557142216718, 0.14845475492254306, 0.1495391877215796, 0.1495391877215796, 0.1478242631528849, 0.1478242631528849, 0.04770047358074718, 0.04770047358074718, 0.04770047358074718, 0.0018938450536856097, 0.000716536146919515, 0.02300160812250228, 0.02300160812250228, 0.02300160812250228, -0.01649722512379706, -0.20649307517601476, -0.07171670877038552, -0.07171670877038552, -0.06069172205471065, -0.03923788767721503, -0.03645697882183797, -0.03645697882183797, -0.03645697882183797, -0.03645697882183797, -0.0939545348356046, -0.05439301614601026, -0.05439301614601026, -0.05439301614601026, -0.04657495764273061, 0.04750699536278945, 0.04750699536278945, 0.06559095717886103, 0.040717886255685704, 0.032195895987585835, 0.029429542147640014, 0.029429542147640014, 0.029429542147640014, 0.03180421749322075, 0.03206838641687852, 0.01848394019443659, -0.14812522615528734, 0.012672067797883352, 0.012672067797883352, 0.012672067797883352, 0.01763558321285768, 0.018423242832047267, 0.006068819097626094, 0.006068819097626094, 0.006068819097626094, 0.006068819097626094, 0.006068819097626094, 0.006068819097626094, -0.018332183459535342, -0.00021701001531840985, -0.011719255550326015, -0.020103365761921555, -0.020103365761921555, -0.020103365761921555, -0.019126044957630015, -0.019126044957630015, -0.04298616242792791, -0.04298616242792791, -0.05611101577674836, -0.46543659268491683, -0.03726515473659571, -0.03726515473659571, -0.03726515473659571, -0.03434082712540107, 0.07065342422298779, 0.0421809278046268, 0.03956528656472104, 0.14317777026091205, 0.14279440782821726, 0.14875222232991367, 0.14590906507984586, 0.14590906507984586, 0.16794897736428183, 0.16794897736428183, 0.1679993949285228, 0.04248001348978901, 0.04248001348978901, 0.03828242570732731, 0.025351061315217, 0.02925095707675132, 0.02925095707675132, 0.02925095707675132, 0.02925095707675132, 0.02925095707675132, 0.08188781959317827, 0.08188781959317827, 0.13314096367747777, 0.13314096367747777, 0.00017483112252740518, 0.00017483112252740518, 0.00017483112252740518, 0.012461266621138459, 0.012461266621138459, -0.027206438282513852, -0.027206438282513852, -0.027206438282513852, -0.21073125293790212, -0.21679386263067046, -0.21679386263067046, -0.21797406666820554, -0.1969413012373136, -0.08242549145305537, -0.08242549145305537, -0.07874663870807552, -0.07874663870807552, -0.07874663870807552, -0.07874663870807552, -0.07884317192456328, -0.07884317192456328, -0.07948489756976637, -0.07948489756976637, -0.2582160609315749, -0.24938795087674004, -0.24938795087674004, -0.24938795087674004, -0.3026643358442916, -0.14058190645701374, -0.14058190645701374, -0.1405227363479784, -0.1405227363479784, -0.24608488078839874, -0.24608488078839874, -0.3695791803862236, -0.04581176439866615, -0.04581176439866615, -0.04581176439866615, -0.05043104196300252, -0.05043104196300252, -0.05043104196300252, -0.05693829378389836, -0.21274633899349302, -0.1871009936144148, -0.17182063241546083, -0.05184951482031507, -0.05184951482031507, -0.012839606792036981, -0.017744636136149045, 0.08155440581807658, 0.11891079930184476, 0.11510549140330177, 0.31349469897434895, 0.21076685228796038, 0.32576394264480113, 0.3313119391386586, 0.3270290667605327, 0.2863480368949519, 0.29301395842847777, 0.29301395842847777, 0.2990036288678056, 0.377405779700347, -0.0038129161416187857, -0.040583140800201534, -0.1496598643548785, 0.16298317786038524, 0.20499342946067767, 0.20324966581621123, 0.20324966581621123], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"color\": \"rgb(31, 119, 180)\", \"shape\": \"hv\"}, \"mode\": \"lines\", \"name\": \"Main\", \"x\": [12285.0, 23600.5, 26570.5, 28048.0, 29640.5, 30944.5, 32159.0, 33119.0, 34066.5, 34838.5, 36026.0, 37295.5, 38633.5, 40010.5, 42295.5, 44282.5, 46627.0, 48531.0, 50353.5, 52241.0, 54070.0, 55905.5, 57920.0, 60356.5, 62637.0, 65324.5, 67693.5, 70094.0, 72550.0, 74670.0, 76920.0, 79043.0, 81134.0, 82790.0, 84405.5, 86528.0, 88323.0, 89966.5, 91961.5, 93963.5, 95635.0, 96864.5, 98086.0, 99143.5, 100019.0, 101262.5, 102113.0, 102937.0, 103905.5, 104894.0, 106033.5, 107117.5, 107913.0, 108929.5, 109892.0, 110864.0, 111565.0, 112495.5, 113377.0, 114359.5, 115168.5, 116140.5, 117020.0, 117737.5, 118503.0, 119269.0, 120195.5, 121156.0, 122277.5, 123388.5, 124279.0, 125288.5, 126400.5, 127468.5, 128606.0, 129795.0, 131134.5, 132586.5, 133575.5, 134802.5, 136129.0, 137334.0, 138355.0, 139279.0, 140618.0, 141653.0, 142753.5, 143628.5, 144648.0, 145636.5, 146692.5, 147703.5, 148921.5, 149772.5, 150875.0, 152010.5, 153046.0, 154142.5, 155060.5, 155962.0, 157267.0, 158382.0, 159564.0, 160268.0, 161045.0, 162162.0, 162919.0, 163698.5, 164600.0, 165488.0, 166442.0, 167314.0, 167973.0, 168749.0, 169511.5, 170156.5, 170986.0, 172028.5, 172790.5, 173693.0, 174290.5, 174864.5, 175531.5, 176078.0, 176726.5, 177304.5, 177981.5, 178774.5, 179672.0, 180545.0, 181315.0, 182112.5, 182701.5, 183499.5, 183990.0, 184781.5, 185389.5, 186189.5, 186975.0, 187639.0, 188260.0, 188828.5, 189660.0, 190229.5, 190769.5, 191387.0, 192141.0, 192785.0, 193373.0, 194099.0, 194903.0, 195649.5, 196386.5, 197287.0, 198073.5, 198689.0, 199417.5, 200170.0, 200862.5, 201726.0, 202518.5, 203320.5, 204207.0, 205021.5, 205994.5, 206888.5, 207681.0, 208781.5, 209646.0, 210680.5, 211489.5, 212780.5, 213617.5, 214704.0, 215884.0, 216772.5, 217897.5, 219186.0, 220401.5, 221663.5, 222974.5, 224211.0, 225443.0, 226706.5, 227816.0, 229307.5, 230778.0, 231939.5, 233660.0, 234919.5, 236420.5, 237866.5, 239400.5, 241017.0, 242601.5, 244059.0, 246202.0, 247978.0, 249897.5, 251910.0, 254206.5, 255839.5, 257671.0, 259598.5, 262265.0, 264849.0, 266857.5, 269064.0, 271558.5, 273670.5, 275969.0, 278360.0, 280353.0, 282748.5, 284816.5, 287310.5, 289817.0, 292682.5, 295935.5, 298751.5, 302414.0, 305547.5, 308269.0, 311922.0, 314928.5, 318041.0, 321007.5, 325124.0, 328383.5, 331533.0, 335085.5, 338385.5, 341381.5, 344154.5, 347524.5, 350550.5, 354656.0, 358675.0, 363205.5, 368748.0, 373708.0, 378162.5, 385018.5, 391270.5, 399418.0, 406554.5, 413368.0, 423937.5, 437776.0, 452429.0, 471057.5, 498893.0, 541804.0, 609862.0, 1484705.0], \"y\": [0.07681378757978088, 0.14788531277983274, 0.1286186662723678, 0.1286186662723678, 0.003105309133560788, -0.013680817213010649, -0.24524210521752107, -0.11620455276915823, -0.13467571161961658, -0.21016966050083283, -0.2094983072486211, -0.2614132150564398, -0.2350213143985371, -0.2350213143985371, -0.2116618194666464, -0.32433557629570453, -0.2840871048082806, -1.1064249063928835, -0.3822016059916884, -0.2988226475518704, -0.2749103177436141, -0.36355565446874627, -0.41380725378827954, -0.36732341095391174, -0.36732341095391174, -0.3656421397819126, -0.34171250897157, -0.33924746044222753, -0.17964832595431426, -0.1821540263747747, -0.18756865933098008, -0.1257394029428224, -0.12542333208258513, -0.12542333208258513, -0.12542333208258513, -0.12067029356600542, -0.10159203746547943, -0.10159203746547943, -0.07623679327421645, -0.07242955744354448, -0.0736604313844722, -0.0736604313844722, -0.0751339590203621, -0.0751339590203621, -0.0751339590203621, -0.0751339590203621, -0.0751339590203621, 0.018191914339345888, 0.018191914339345888, 0.018191914339345888, 0.010439331957965578, 0.018457702243085503, -0.2287903324844808, -0.27672967612188404, -0.1923853328329063, -0.1923853328329063, -0.21044640904781883, -0.21044640904781883, -0.24746579295513418, -0.24746579295513418, -0.3776266066330092, 0.038126889544374015, 0.022262108664723584, 0.022262108664723584, 0.0354976403976165, 0.0354976403976165, 0.0354976403976165, 0.0354976403976165, 0.0354976403976165, 0.0354976403976165, 0.08501009092514154, 0.08501009092514154, 0.0676696230336403, 0.05433138639450458, 0.05015134209587517, 0.022427810935018666, 0.022427810935018666, 0.022167597988805687, -0.005168329379848749, -0.005168329379848749, -0.005168329379848749, -0.006261853427082978, -0.038270679855054945, 0.07479743369292262, 0.07479743369292262, 0.07273901242873428, 0.07128627070520015, 0.08753820880715983, 0.09809580314585209, 0.09907783944176375, 0.17417073345817688, 0.17035840594511714, 0.18673153141751753, 0.19040487720668445, 0.19040487720668445, 0.19387009000291686, 0.2155399783685174, 0.2155399783685174, 0.21370015159929565, 0.21370015159929565, 0.07768449404026097, 0.07768449404026097, 0.07768449404026097, 0.04996514190214621, 0.04821724519224888, 0.05695914924139331, 0.05695914924139331, 0.05695914924139331, 0.035595888586249215, -0.07921408702186294, -0.01790943225863595, -0.01790943225863595, -0.009089475904064573, 0.0005702726902718364, 0.003839120707512911, 0.003839120707512911, 0.003839120707512911, 0.003839120707512911, -0.03135978379702853, -0.00780534270958938, -0.00780534270958938, -0.00780534270958938, 0.01207842225737435, 0.12946492134812512, 0.12946492134812512, 0.16505318855576223, 0.148564494545277, 0.07620497121842026, 0.0712548840577328, 0.0712548840577328, 0.0712548840577328, 0.07240392289530341, 0.07307078527412622, 0.06455879457139815, -0.016769692344193815, 0.054527596708057076, 0.054527596708057076, 0.054527596708057076, 0.04948215550675194, 0.048693629801802044, 0.029600478855732623, 0.029600478855732623, 0.029600478855732623, 0.029600478855732623, 0.029600478855732623, 0.029600478855732623, 0.045339370953721134, 0.01655179704072257, 0.011683428207251614, 0.005621476808350623, 0.005621476808350623, 0.005621476808350623, 0.0060199277795407735, 0.0060199277795407735, -0.012462226243090097, -0.012462226243090097, -0.02593098160056781, -0.2720696880930059, 0.01993422524907311, 0.01993422524907311, 0.01993422524907311, 0.06351019735067027, 0.1341153873517109, 0.10838009111736487, 0.10618605562158126, 0.21541625261867328, 0.2131316554530791, 0.2064495241051432, 0.20183241855181586, 0.20183241855181586, 0.22770091900642092, 0.22770091900642092, 0.22732773987024865, 0.07837565987000143, 0.07837565987000143, 0.07129404502518003, 0.05309643014510009, 0.05701695906463873, 0.05701695906463873, 0.05701695906463873, 0.05701695906463873, 0.05701695906463873, 0.1069632643247713, 0.1069632643247713, 0.26074233540544267, 0.26074233540544267, 0.057009843129015136, 0.057009843129015136, 0.057009843129015136, 0.11139130491106342, 0.11139130491106342, 0.007036387835190741, 0.007036387835190741, 0.007036387835190741, -0.12412670188149752, -0.1324887721480929, -0.1324887721480929, -0.1459551226727221, -0.1371018301383771, -0.03908448358110897, -0.03908448358110897, -0.04420626122765828, -0.04420626122765828, -0.04420626122765828, -0.04420626122765828, -0.03977892617005599, -0.03977892617005599, -0.038349578135854184, -0.038349578135854184, -0.18388534690737293, -0.17800424024400788, -0.17800424024400788, -0.17800424024400788, -0.20244074392272546, -0.05587505013356936, -0.05587505013356936, -0.05951269356562372, -0.05951269356562372, -0.16851203911787602, -0.16851203911787602, -0.2685317347908117, 0.021701375417897767, 0.021701375417897767, 0.021701375417897767, -0.017998432314684412, -0.017998432314684412, -0.017998432314684412, -0.021817038187281854, -0.14876715632280377, -0.13846610135759105, -0.127506900709262, 0.006256795566819781, 0.006256795566819781, 0.05354192781306959, 0.05133881256991708, 0.2435095237935662, 0.18246381052744254, 0.18120792315669976, 0.4271374700809327, 0.3042848798169452, 0.3654864251459653, 0.37431313230398133, 0.3709107070926998, 0.34085496663218784, 0.3444152022022313, 0.3444152022022313, 0.35421413403508173, 0.46745250350759815, 0.10084705696381882, 0.09027692802880569, -0.06780663016476887, 0.24260915186578352, 0.2676643456862963, 0.23172044708267844, 0.23172044708267844], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Upper Bound\", \"x\": [12285.0, 23600.5, 26570.5, 28048.0, 29640.5, 30944.5, 32159.0, 33119.0, 34066.5, 34838.5, 36026.0, 37295.5, 38633.5, 40010.5, 42295.5, 44282.5, 46627.0, 48531.0, 50353.5, 52241.0, 54070.0, 55905.5, 57920.0, 60356.5, 62637.0, 65324.5, 67693.5, 70094.0, 72550.0, 74670.0, 76920.0, 79043.0, 81134.0, 82790.0, 84405.5, 86528.0, 88323.0, 89966.5, 91961.5, 93963.5, 95635.0, 96864.5, 98086.0, 99143.5, 100019.0, 101262.5, 102113.0, 102937.0, 103905.5, 104894.0, 106033.5, 107117.5, 107913.0, 108929.5, 109892.0, 110864.0, 111565.0, 112495.5, 113377.0, 114359.5, 115168.5, 116140.5, 117020.0, 117737.5, 118503.0, 119269.0, 120195.5, 121156.0, 122277.5, 123388.5, 124279.0, 125288.5, 126400.5, 127468.5, 128606.0, 129795.0, 131134.5, 132586.5, 133575.5, 134802.5, 136129.0, 137334.0, 138355.0, 139279.0, 140618.0, 141653.0, 142753.5, 143628.5, 144648.0, 145636.5, 146692.5, 147703.5, 148921.5, 149772.5, 150875.0, 152010.5, 153046.0, 154142.5, 155060.5, 155962.0, 157267.0, 158382.0, 159564.0, 160268.0, 161045.0, 162162.0, 162919.0, 163698.5, 164600.0, 165488.0, 166442.0, 167314.0, 167973.0, 168749.0, 169511.5, 170156.5, 170986.0, 172028.5, 172790.5, 173693.0, 174290.5, 174864.5, 175531.5, 176078.0, 176726.5, 177304.5, 177981.5, 178774.5, 179672.0, 180545.0, 181315.0, 182112.5, 182701.5, 183499.5, 183990.0, 184781.5, 185389.5, 186189.5, 186975.0, 187639.0, 188260.0, 188828.5, 189660.0, 190229.5, 190769.5, 191387.0, 192141.0, 192785.0, 193373.0, 194099.0, 194903.0, 195649.5, 196386.5, 197287.0, 198073.5, 198689.0, 199417.5, 200170.0, 200862.5, 201726.0, 202518.5, 203320.5, 204207.0, 205021.5, 205994.5, 206888.5, 207681.0, 208781.5, 209646.0, 210680.5, 211489.5, 212780.5, 213617.5, 214704.0, 215884.0, 216772.5, 217897.5, 219186.0, 220401.5, 221663.5, 222974.5, 224211.0, 225443.0, 226706.5, 227816.0, 229307.5, 230778.0, 231939.5, 233660.0, 234919.5, 236420.5, 237866.5, 239400.5, 241017.0, 242601.5, 244059.0, 246202.0, 247978.0, 249897.5, 251910.0, 254206.5, 255839.5, 257671.0, 259598.5, 262265.0, 264849.0, 266857.5, 269064.0, 271558.5, 273670.5, 275969.0, 278360.0, 280353.0, 282748.5, 284816.5, 287310.5, 289817.0, 292682.5, 295935.5, 298751.5, 302414.0, 305547.5, 308269.0, 311922.0, 314928.5, 318041.0, 321007.5, 325124.0, 328383.5, 331533.0, 335085.5, 338385.5, 341381.5, 344154.5, 347524.5, 350550.5, 354656.0, 358675.0, 363205.5, 368748.0, 373708.0, 378162.5, 385018.5, 391270.5, 399418.0, 406554.5, 413368.0, 423937.5, 437776.0, 452429.0, 471057.5, 498893.0, 541804.0, 609862.0, 1484705.0], \"y\": [0.2022999909632653, 0.23544153461633172, 0.1808350170001829, 0.1808350170001829, 0.13191371547824554, 0.059052749633078994, -0.14546544076183315, -0.05651259110482135, -0.09535885761114046, -0.13416469304537393, -0.13538363292396194, -0.16436470960484806, -0.14394233639353166, -0.14394233639353166, -0.10096515326649037, -0.23062790854481677, -0.1894660766350782, -0.867824137421046, -0.3132612543272616, -0.21762998178043114, -0.18352321863014018, -0.3193402022885588, -0.31660126845400477, -0.32732245105521524, -0.32732245105521524, -0.32704383259896996, -0.30526511914112847, -0.30392662593112674, -0.14251042673832787, -0.13086271138604255, -0.1374723339911471, -0.08993724030456904, -0.08926261950350714, -0.08926261950350714, -0.08926261950350714, -0.07690187497997159, -0.04469521009324364, -0.04469521009324364, -0.03689949500293291, -0.03126758474835063, -0.03254359256788951, -0.03254359256788951, -0.03348314038543249, -0.03348314038543249, -0.03348314038543249, -0.03348314038543249, -0.03348314038543249, 0.08812228730681758, 0.08812228730681758, 0.08812228730681758, 0.07819323657210629, 0.07575921561900588, -0.19331884881525135, -0.14801690107992774, -0.15631359730586575, -0.15631359730586575, -0.1652564490622884, -0.1652564490622884, -0.17149724862769333, -0.17149724862769333, -0.230061295799289, 0.10087919073965411, 0.07159878937126657, 0.07159878937126657, 0.06777641458970118, 0.06777641458970118, 0.06777641458970118, 0.06777641458970118, 0.06777641458970118, 0.06777641458970118, 0.13392019180469256, 0.13392019180469256, 0.1000874565924083, 0.08655485710368768, 0.0838959103556807, 0.04357724649947625, 0.04357724649947625, 0.04347071118755432, 0.036341175875754576, 0.036341175875754576, 0.036341175875754576, 0.03511456771953189, 0.025991872396085372, 0.1035389060101009, 0.1035389060101009, 0.10185416037479308, 0.10126385707222968, 0.1171937085703091, 0.13045645184788748, 0.1321877559168603, 0.2346325057232807, 0.22939827575083516, 0.2406756903542431, 0.24114418299120172, 0.24114418299120172, 0.23928542508329065, 0.2815407690154552, 0.2815407690154552, 0.27957604004570635, 0.27957604004570635, 0.10766851449977476, 0.10766851449977476, 0.10766851449977476, 0.0980364387506068, 0.09571795423757826, 0.09091669036028434, 0.09091669036028434, 0.09091669036028434, 0.08768900229629549, 0.04806490113228887, 0.03589784425311363, 0.03589784425311363, 0.042512770246581504, 0.040378433057758706, 0.04413522023686379, 0.04413522023686379, 0.04413522023686379, 0.04413522023686379, 0.031234967241547548, 0.0387823307268315, 0.0387823307268315, 0.0387823307268315, 0.07073180215747932, 0.21142284733346078, 0.21142284733346078, 0.2645154199326634, 0.25641110283486834, 0.1202140464492547, 0.11308022596782558, 0.11308022596782558, 0.11308022596782558, 0.11300362829738607, 0.11407318413137392, 0.11063364894835973, 0.11458584146689971, 0.0963831256182308, 0.0963831256182308, 0.0963831256182308, 0.0813287278006462, 0.07896401677155682, 0.053132138613839155, 0.053132138613839155, 0.053132138613839155, 0.053132138613839155, 0.053132138613839155, 0.053132138613839155, 0.10901092536697761, 0.03332060409676355, 0.03508611196482925, 0.0313463193786228, 0.0313463193786228, 0.0313463193786228, 0.031165900516711562, 0.031165900516711562, 0.01806170994174772, 0.01806170994174772, 0.004249052575612741, -0.078702783501095, 0.07713360523474193, 0.07713360523474193, 0.07713360523474193, 0.16136122182674162, 0.19757735048043404, 0.17457925443010291, 0.1728068246784415, 0.2876547349764345, 0.2834689030779409, 0.26414682588037275, 0.25775577202378586, 0.25775577202378586, 0.28745286064856, 0.28745286064856, 0.2866560848119745, 0.11427130625021385, 0.11427130625021385, 0.10430566434303273, 0.08084179897498318, 0.08478296105252614, 0.08478296105252614, 0.08478296105252614, 0.08478296105252614, 0.08478296105252614, 0.1320387090563643, 0.1320387090563643, 0.3883437071334076, 0.3883437071334076, 0.11384485513550287, 0.11384485513550287, 0.11384485513550287, 0.2103213432009884, 0.2103213432009884, 0.041279213952895334, 0.041279213952895334, 0.041279213952895334, -0.037522150825092915, -0.04818368166551534, -0.04818368166551534, -0.07393617867723865, -0.07726235903944059, 0.004256524290837435, 0.004256524290837435, -0.00966588374724104, -0.00966588374724104, -0.00966588374724104, -0.00966588374724104, -0.0007146804155487088, -0.0007146804155487088, 0.002785741298058003, 0.002785741298058003, -0.10955463288317098, -0.10662052961127572, -0.10662052961127572, -0.10662052961127572, -0.10221715200115933, 0.02883180618987502, 0.02883180618987502, 0.02149734921673095, 0.02149734921673095, -0.0909391974473533, -0.0909391974473533, -0.1674842891953998, 0.08921451523446168, 0.08921451523446168, 0.08921451523446168, 0.014434177333633696, 0.014434177333633696, 0.014434177333633696, 0.01330421740933465, -0.08478797365211452, -0.0898312091007673, -0.08319316900306314, 0.06436310595395464, 0.06436310595395464, 0.11992346241817615, 0.12042226127598321, 0.40546464176905583, 0.24601682175304032, 0.24731035491009773, 0.5407802411875164, 0.39780290734593, 0.40520890764712947, 0.4173143254693041, 0.41479234742486687, 0.39536189636942376, 0.39581644597598487, 0.39581644597598487, 0.40942463920235783, 0.5574992273148492, 0.2055070300692564, 0.2211369968578129, 0.014046604025340734, 0.3222351258711818, 0.330335261911915, 0.26019122834914565, 0.26019122834914565], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\"12.3K - 76.3K\", \"76.3K - 140K\", \"140K - 204K\", \"204K - 268K\", \"268K - 332K\", \"332K - 396K\", \"396K - 460K\", \"460K - 524K\", \"524K - 588K\", \"588K - 652K\", \"652K - 716K\", \"716K - 781K\", \"781K - 845K\", \"845K - 909K\", \"909K - 973K\", \"973K - 1.04M\", \"1.04M - 1.1M\", \"1.1M - 1.16M\", \"1.16M - 1.23M\", \"1.23M - 1.29M\", \"1.29M - 1.36M\", \"1.36M - 1.42M\", \"1.42M - 1.48M\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [44294.13043478261, 108312.39130434782, 172330.65217391303, 236348.91304347827, 300367.17391304346, 364385.43478260865, 428403.69565217395, 492421.95652173914, 556440.2173913044, 620458.4782608696, 684476.7391304348, 748495.0, 812513.2608695652, 876531.5217391304, 940549.7826086956, 1004568.0434782609, 1068586.3043478262, 1132604.5652173911, 1196622.8260869565, 1260641.086956522, 1324659.347826087, 1388677.6086956523, 1452695.8695652173], \"y\": [2844, 5216, 7557, 4283, 2159, 1357, 571, 212, 100, 47, 33, 14, 7, 4, 3, 3, 3, 1, 2, 1, 0, 1, 2], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"fnlwgt\", \"standoff\": 0}, \"matches\": \"x\"}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"fnlwgt\", \"standoff\": 0}, \"tickmode\": \"array\", \"ticktext\": [\"12.3K - 76.3K\", \"76.3K - 140K\", \"140K - 204K\", \"204K - 268K\", \"268K - 332K\", \"332K - 396K\", \"396K - 460K\", \"460K - 524K\", \"524K - 588K\", \"588K - 652K\", \"652K - 716K\", \"716K - 781K\", \"781K - 845K\", \"845K - 909K\", \"909K - 973K\", \"973K - 1.04M\", \"1.04M - 1.1M\", \"1.1M - 1.16M\", \"1.16M - 1.23M\", \"1.23M - 1.29M\", \"1.29M - 1.36M\", \"1.36M - 1.42M\", \"1.42M - 1.48M\"], \"tickvals\": [44294.13043478261, 108312.39130434782, 172330.65217391303, 236348.91304347827, 300367.17391304346, 364385.43478260865, 428403.69565217395, 492421.95652173914, 556440.2173913044, 620458.4782608696, 684476.7391304348, 748495.0, 812513.2608695652, 876531.5217391304, 940549.7826086956, 1004568.0434782609, 1068586.3043478262, 1132604.5652173911, 1196622.8260869565, 1260641.086956522, 1324659.347826087, 1388677.6086956523, 1452695.8695652173], \"matches\": \"x\"}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: fnlwgt (continuous)\"}, \"showlegend\": false, \"bargap\": 0}}, \"help\": {\"text\": \"The contribution (score) of the term fnlwgt to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.07316870268182618, 0.0863543622467301, 0.14634776890297185, 0.07549600789668898, 0.06776685328584353, 0.06818834987119948, 0.07170127948869431, 0.015862212716666713, 0.02153776200781221, 0.013889495965342058, 0.018968455562028308, 0.010483575908007668, 0.0077322377960856725, 0.4000223288248362, 0.04944162077860814, 0.02056994966095349], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" 10th\", \" 11th\", \" 12th\", \" 1st-4th\", \" 5th-6th\", \" 7th-8th\", \" 9th\", \" Assoc-acdm\", \" Assoc-voc\", \" Bachelors\", \" Doctorate\", \" HS-grad\", \" Masters\", \" Preschool\", \" Prof-school\", \" Some-college\"], \"y\": [-0.6951071139476437, -0.8857924756469966, -0.3584843757787366, -0.8258146395428049, -0.8371658936675856, -0.875139282743036, -0.8337074655791255, 0.25844714670760943, 0.2680691176999258, 0.28854378753043386, 0.2856264337660004, -0.031021819678432705, 0.20785932358389367, -0.829035632927618, 0.2607097531153648, 0.10467809151484259], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" 10th\", \" 11th\", \" 12th\", \" 1st-4th\", \" 5th-6th\", \" 7th-8th\", \" 9th\", \" Assoc-acdm\", \" Assoc-voc\", \" Bachelors\", \" Doctorate\", \" HS-grad\", \" Masters\", \" Preschool\", \" Prof-school\", \" Some-college\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" 10th\", \" 11th\", \" 12th\", \" 1st-4th\", \" 5th-6th\", \" 7th-8th\", \" 9th\", \" Assoc-acdm\", \" Assoc-voc\", \" Bachelors\", \" Doctorate\", \" HS-grad\", \" Masters\", \" Preschool\", \" Prof-school\", \" Some-college\"], \"y\": [715, 878, 347, 128, 244, 466, 378, 778, 1070, 4041, 317, 7798, 1290, 33, 431, 5506], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: Education (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term Education to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Lower Bound\", \"x\": [1.0, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.0], \"y\": [-5.01598250430514, -1.587863761475022, -1.0077761351643242, -0.7297500880159336, -0.3218561459543934, -0.3141108405874326, -0.31584408918563134, -0.2667083545655052, -0.28768011312016767, -0.1140609946014212, -0.14049993661738613, -0.13495897021403477, 0.4979267393168556, 0.8852250614712563, 1.50979882264206, 1.4509938758024512, 1.4509938758024512], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"color\": \"rgb(31, 119, 180)\", \"shape\": \"hv\"}, \"mode\": \"lines\", \"name\": \"Main\", \"x\": [1.0, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.0], \"y\": [-4.5440323441254264, -1.2992626240118865, -0.7898756035636242, -0.6470958976109953, -0.2985611115449629, -0.29927460274338136, -0.3047234829706602, -0.24114735608109591, -0.2828175456729124, -0.09525096415256881, -0.11134323089393242, -0.08343395099735954, 0.5136859158019244, 0.9091933223339754, 1.549447352477917, 1.5332294345403266, 1.5332294345403266], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Upper Bound\", \"x\": [1.0, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.0], \"y\": [-4.072082183945713, -1.010661486548751, -0.5719750719629242, -0.564441707206057, -0.2752660771355324, -0.2844383648993301, -0.2936028767556891, -0.21558635759668665, -0.2779549782256571, -0.07644093370371642, -0.0821865251704787, -0.03190893178068429, 0.5294450922869931, 0.9331615831966945, 1.5890958823137742, 1.615464993278202, 1.615464993278202], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\"1 - 1.75\", \"1.75 - 2.5\", \"2.5 - 3.25\", \"3.25 - 4\", \"4 - 4.75\", \"4.75 - 5.5\", \"5.5 - 6.25\", \"6.25 - 7\", \"7 - 7.75\", \"7.75 - 8.5\", \"8.5 - 9.25\", \"9.25 - 10\", \"10 - 10.8\", \"10.8 - 11.5\", \"11.5 - 12.2\", \"12.2 - 13\", \"13 - 13.8\", \"13.8 - 14.5\", \"14.5 - 15.2\", \"15.2 - 16\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [1.375, 2.125, 2.875, 3.625, 4.375, 5.125, 5.875, 6.625, 7.375, 8.125, 8.875, 9.625, 10.375, 11.125, 11.875, 12.625, 13.375, 14.125, 14.875, 15.625], \"y\": [33, 128, 244, 0, 466, 378, 715, 0, 878, 347, 7798, 0, 5506, 1070, 778, 0, 4041, 1290, 431, 317], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"EducationNum\", \"standoff\": 0}, \"matches\": \"x\"}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"EducationNum\", \"standoff\": 0}, \"tickmode\": \"array\", \"ticktext\": [\"1 - 1.75\", \"1.75 - 2.5\", \"2.5 - 3.25\", \"3.25 - 4\", \"4 - 4.75\", \"4.75 - 5.5\", \"5.5 - 6.25\", \"6.25 - 7\", \"7 - 7.75\", \"7.75 - 8.5\", \"8.5 - 9.25\", \"9.25 - 10\", \"10 - 10.8\", \"10.8 - 11.5\", \"11.5 - 12.2\", \"12.2 - 13\", \"13 - 13.8\", \"13.8 - 14.5\", \"14.5 - 15.2\", \"15.2 - 16\"], \"tickvals\": [1.375, 2.125, 2.875, 3.625, 4.375, 5.125, 5.875, 6.625, 7.375, 8.125, 8.875, 9.625, 10.375, 11.125, 11.875, 12.625, 13.375, 14.125, 14.875, 15.625], \"matches\": \"x\"}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: EducationNum (continuous)\"}, \"showlegend\": false, \"bargap\": 0}}, \"help\": {\"text\": \"The contribution (score) of the term EducationNum to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.037297246225252545, 0.17080851920341145, 0.006236133075545824, 0.07201392854080485, 0.029941139133475514, 0.07577169231297481, 0.061545669671160125], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" Divorced\", \" Married-AF-spouse\", \" Married-civ-spouse\", \" Married-spouse-absent\", \" Never-married\", \" Separated\", \" Widowed\"], \"y\": [-0.3562623145226058, 1.5506943179124129, 0.6370688812559946, -0.36969242471430175, -0.6898027485559215, -0.48537431475065895, 0.05023722488506949], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" Divorced\", \" Married-AF-spouse\", \" Married-civ-spouse\", \" Married-spouse-absent\", \" Never-married\", \" Separated\", \" Widowed\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" Divorced\", \" Married-AF-spouse\", \" Married-civ-spouse\", \" Married-spouse-absent\", \" Never-married\", \" Separated\", \" Widowed\"], \"y\": [3326, 18, 11222, 314, 8032, 768, 740], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: MaritalStatus (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term MaritalStatus to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.02892766216030679, 0.02892766216030679, 0.1440347290130887, 0.01848396302116341, 0.02464627192616531, 0.04912562816428956, 0.0426763172275495, 0.031084858535300408, 0.023751164603645458, 0.28648939095945813, 0.0225945098636538, 0.06191180873402535, 0.01937491222146176, 0.06279722388419384, 0.027557820042128478], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" ?\", \" Adm-clerical\", \" Armed-Forces\", \" Craft-repair\", \" Exec-managerial\", \" Farming-fishing\", \" Handlers-cleaners\", \" Machine-op-inspct\", \" Other-service\", \" Priv-house-serv\", \" Prof-specialty\", \" Protective-serv\", \" Sales\", \" Tech-support\", \" Transport-moving\"], \"y\": [-0.09841613541536062, -0.09841613541536062, -0.26631266242679874, -0.0659189068050283, 0.6735767326678304, -0.8557003259793029, -0.5957195029922209, -0.4431491616933013, -0.8065943614463503, -1.1266436961407675, 0.4217552260145598, 0.5553290479111996, 0.31946177741707626, 0.5212662454962204, -0.15950893021522553], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" ?\", \" Adm-clerical\", \" Armed-Forces\", \" Craft-repair\", \" Exec-managerial\", \" Farming-fishing\", \" Handlers-cleaners\", \" Machine-op-inspct\", \" Other-service\", \" Priv-house-serv\", \" Prof-specialty\", \" Protective-serv\", \" Sales\", \" Tech-support\", \" Transport-moving\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" ?\", \" Adm-clerical\", \" Armed-Forces\", \" Craft-repair\", \" Exec-managerial\", \" Farming-fishing\", \" Handlers-cleaners\", \" Machine-op-inspct\", \" Other-service\", \" Priv-house-serv\", \" Prof-specialty\", \" Protective-serv\", \" Sales\", \" Tech-support\", \" Transport-moving\"], \"y\": [1382, 2863, 6, 3065, 3046, 758, 1011, 1491, 2488, 112, 3116, 473, 2706, 700, 1203], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: Occupation (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term Occupation to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.008097656890728222, 0.030658520266562073, 0.06621794812545256, 0.06075206837394631, 0.032108311674846846, 0.04175237237762852], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" Husband\", \" Not-in-family\", \" Other-relative\", \" Own-child\", \" Unmarried\", \" Wife\"], \"y\": [0.4305983924414849, -0.23551429138595842, -0.6529685910442726, -0.8478420864729896, -0.5117648415923572, 1.9227248725908708], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" Husband\", \" Not-in-family\", \" Other-relative\", \" Own-child\", \" Unmarried\", \" Wife\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" Husband\", \" Not-in-family\", \" Other-relative\", \" Own-child\", \" Unmarried\", \" Wife\"], \"y\": [9882, 6214, 714, 3850, 2584, 1176], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: Relationship (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term Relationship to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.03919572315429998, 0.071534148418223, 0.03850266204448957, 0.2534869021028524, 0.00435735178254968], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" Amer-Indian-Eskimo\", \" Asian-Pac-Islander\", \" Black\", \" Other\", \" White\"], \"y\": [-0.7238975497104192, 0.1406111760800639, -0.21762838091758616, -0.5348835541937245, 0.03259998256013297], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" Amer-Indian-Eskimo\", \" Asian-Pac-Islander\", \" Black\", \" Other\", \" White\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" Amer-Indian-Eskimo\", \" Asian-Pac-Islander\", \" Black\", \" Other\", \" White\"], \"y\": [228, 788, 2381, 199, 20824], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: Race (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term Race to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.017134225324258234, 0.004460078925935362], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" Female\", \" Male\"], \"y\": [-0.5752344685001944, 0.28576618861134384], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" Female\", \" Male\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" Female\", \" Male\"], \"y\": [8105, 16315], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: Gender (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term Gender to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Lower Bound\", \"x\": [0.0, 57.0, 497.5, 754.0, 1023.0, 1070.5, 1291.0, 1488.5, 1572.5, 1839.5, 2043.0, 2139.5, 2175.0, 2189.0, 2215.0, 2309.5, 2350.0, 2397.0, 2410.5, 2438.5, 2521.5, 2588.5, 2616.0, 2741.0, 2857.0, 2896.0, 2948.5, 2970.5, 3048.0, 3120.0, 3205.0, 3299.0, 3368.0, 3414.5, 3460.0, 3467.5, 3572.5, 3727.5, 3799.5, 3897.5, 3925.0, 4003.0, 4082.5, 4243.5, 4401.0, 4462.0, 4579.0, 4668.5, 4737.0, 4826.0, 4898.0, 4973.5, 5036.5, 5119.0, 5316.5, 5505.5, 6389.0, 6505.5, 6808.0, 7073.5, 7364.0, 7436.5, 7565.5, 7792.0, 8255.0, 9000.0, 10041.0, 10543.0, 12614.0, 13817.0, 14214.0, 15022.0, 15427.5, 19266.0, 22587.5, 26532.0, 30961.5, 70654.5, 99999.0], \"y\": [-0.23796918835392683, -2.5175629925840655, -2.5175629925840655, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5248165425943703, -2.5118433352218337, -1.957314234963353, -1.9302499959573476, 1.4921026466361538, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.8605526075284926, -2.6911357868344825, 1.1912231001071778, -0.5229198487682946, -0.5689781231474833, -0.5689781231474833, 2.935700052035453, 2.935700052035453, 0.7377349080149567, 0.7377349080149567, -2.8069437709012544, -3.131838552704419, 2.6396531029469275, 1.9421952532570286, 1.9421952532570286, 1.9398781612414164, 0.6722720896465694, 0.27614042363149066, 4.862973636131901, 4.862973636131901, 2.5260339813841988, 5.709549343755038, 5.780354752855695, 5.793138469542656, 5.793138469542656, 5.793138469542656, 2.2999524154762145, 6.27373625248436, 6.27373625248436, 6.27373625248436, 6.243801699234362, 6.243801699234362, 6.243801699234362, 6.243801699234362, 6.243801699234362, 4.0783050891338215, 6.171485829135939, 6.171485829135939], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"color\": \"rgb(31, 119, 180)\", \"shape\": \"hv\"}, \"mode\": \"lines\", \"name\": \"Main\", \"x\": [0.0, 57.0, 497.5, 754.0, 1023.0, 1070.5, 1291.0, 1488.5, 1572.5, 1839.5, 2043.0, 2139.5, 2175.0, 2189.0, 2215.0, 2309.5, 2350.0, 2397.0, 2410.5, 2438.5, 2521.5, 2588.5, 2616.0, 2741.0, 2857.0, 2896.0, 2948.5, 2970.5, 3048.0, 3120.0, 3205.0, 3299.0, 3368.0, 3414.5, 3460.0, 3467.5, 3572.5, 3727.5, 3799.5, 3897.5, 3925.0, 4003.0, 4082.5, 4243.5, 4401.0, 4462.0, 4579.0, 4668.5, 4737.0, 4826.0, 4898.0, 4973.5, 5036.5, 5119.0, 5316.5, 5505.5, 6389.0, 6505.5, 6808.0, 7073.5, 7364.0, 7436.5, 7565.5, 7792.0, 8255.0, 9000.0, 10041.0, 10543.0, 12614.0, 13817.0, 14214.0, 15022.0, 15427.5, 19266.0, 22587.5, 26532.0, 30961.5, 70654.5, 99999.0], \"y\": [-0.23532632378161158, -2.2768806260630785, -2.2768806260630785, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.285309381938643, -2.14594386196777, -1.6711341294861202, -1.6507054684099165, 1.6608786316437536, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.6025477227117015, -2.317383435499631, 1.4306517663644822, -0.0003675086981281342, -0.24335922566061183, -0.24335922566061183, 3.351885659977038, 3.351885659977038, 0.94099237893585, 0.94099237893585, -2.5621023636794114, -2.2165320718528947, 2.9236259867573713, 2.0764502913433605, 2.0764502913433605, 2.0742142279145215, 0.9678618052111316, 0.6225107857008292, 5.05573507578647, 5.05573507578647, 2.6747361438488286, 5.9026454067312715, 5.9516389062734225, 5.970074941947949, 5.970074941947949, 5.970074941947949, 3.3929899002938586, 6.516643497582377, 6.516643497582377, 6.516643497582377, 6.505844066648665, 6.505844066648665, 6.505844066648665, 6.505844066648665, 6.505844066648665, 5.748436750720212, 6.654302084775316, 6.654302084775316], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Upper Bound\", \"x\": [0.0, 57.0, 497.5, 754.0, 1023.0, 1070.5, 1291.0, 1488.5, 1572.5, 1839.5, 2043.0, 2139.5, 2175.0, 2189.0, 2215.0, 2309.5, 2350.0, 2397.0, 2410.5, 2438.5, 2521.5, 2588.5, 2616.0, 2741.0, 2857.0, 2896.0, 2948.5, 2970.5, 3048.0, 3120.0, 3205.0, 3299.0, 3368.0, 3414.5, 3460.0, 3467.5, 3572.5, 3727.5, 3799.5, 3897.5, 3925.0, 4003.0, 4082.5, 4243.5, 4401.0, 4462.0, 4579.0, 4668.5, 4737.0, 4826.0, 4898.0, 4973.5, 5036.5, 5119.0, 5316.5, 5505.5, 6389.0, 6505.5, 6808.0, 7073.5, 7364.0, 7436.5, 7565.5, 7792.0, 8255.0, 9000.0, 10041.0, 10543.0, 12614.0, 13817.0, 14214.0, 15022.0, 15427.5, 19266.0, 22587.5, 26532.0, 30961.5, 70654.5, 99999.0], \"y\": [-0.23268345920929634, -2.0361982595420915, -2.0361982595420915, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -2.045802221282916, -1.780044388713706, -1.3849540240088873, -1.3711609408624854, 1.8296546166513534, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -2.3445428378949105, -1.9436310841647795, 1.6700804326217866, 0.5221848313720382, 0.08225967182625962, 0.08225967182625962, 3.7680712679186232, 3.7680712679186232, 1.1442498498567433, 1.1442498498567433, -2.3172609564575684, -1.3012255910013706, 3.207598870567815, 2.2107053294296923, 2.2107053294296923, 2.2085502945876265, 1.263451520775694, 0.9688811477701678, 5.248496515441039, 5.248496515441039, 2.8234383063134585, 6.095741469707505, 6.12292305969115, 6.147011414353242, 6.147011414353242, 6.147011414353242, 4.486027385111503, 6.7595507426803945, 6.7595507426803945, 6.7595507426803945, 6.767886434062968, 6.767886434062968, 6.767886434062968, 6.767886434062968, 6.767886434062968, 7.418568412306603, 7.137118340414693, 7.137118340414693], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\"0 - 3.85K\", \"3.85K - 7.69K\", \"7.69K - 11.5K\", \"11.5K - 15.4K\", \"15.4K - 19.2K\", \"19.2K - 23.1K\", \"23.1K - 26.9K\", \"26.9K - 30.8K\", \"30.8K - 34.6K\", \"34.6K - 38.5K\", \"38.5K - 42.3K\", \"42.3K - 46.2K\", \"46.2K - 50K\", \"50K - 53.8K\", \"53.8K - 57.7K\", \"57.7K - 61.5K\", \"61.5K - 65.4K\", \"65.4K - 69.2K\", \"69.2K - 73.1K\", \"73.1K - 76.9K\", \"76.9K - 80.8K\", \"80.8K - 84.6K\", \"84.6K - 88.5K\", \"88.5K - 92.3K\", \"92.3K - 96.2K\", \"96.2K - 100K\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [1923.0576923076924, 5769.173076923077, 9615.288461538461, 13461.403846153848, 17307.519230769234, 21153.634615384617, 24999.75, 28845.865384615383, 32691.98076923077, 36538.096153846156, 40384.21153846154, 44230.32692307692, 48076.44230769231, 51922.55769230769, 55768.67307692308, 59614.78846153846, 63460.903846153844, 67307.01923076923, 71153.13461538462, 74999.25, 78845.36538461538, 82691.48076923078, 86537.59615384616, 90383.71153846153, 94229.82692307692, 98075.94230769231], \"y\": [22959, 844, 100, 335, 6, 30, 10, 20, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"CapitalGain\", \"standoff\": 0}, \"matches\": \"x\"}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"CapitalGain\", \"standoff\": 0}, \"tickmode\": \"array\", \"ticktext\": [\"0 - 3.85K\", \"3.85K - 7.69K\", \"7.69K - 11.5K\", \"11.5K - 15.4K\", \"15.4K - 19.2K\", \"19.2K - 23.1K\", \"23.1K - 26.9K\", \"26.9K - 30.8K\", \"30.8K - 34.6K\", \"34.6K - 38.5K\", \"38.5K - 42.3K\", \"42.3K - 46.2K\", \"46.2K - 50K\", \"50K - 53.8K\", \"53.8K - 57.7K\", \"57.7K - 61.5K\", \"61.5K - 65.4K\", \"65.4K - 69.2K\", \"69.2K - 73.1K\", \"73.1K - 76.9K\", \"76.9K - 80.8K\", \"80.8K - 84.6K\", \"84.6K - 88.5K\", \"88.5K - 92.3K\", \"92.3K - 96.2K\", \"96.2K - 100K\"], \"tickvals\": [1923.0576923076924, 5769.173076923077, 9615.288461538461, 13461.403846153848, 17307.519230769234, 21153.634615384617, 24999.75, 28845.865384615383, 32691.98076923077, 36538.096153846156, 40384.21153846154, 44230.32692307692, 48076.44230769231, 51922.55769230769, 55768.67307692308, 59614.78846153846, 63460.903846153844, 67307.01923076923, 71153.13461538462, 74999.25, 78845.36538461538, 82691.48076923078, 86537.59615384616, 90383.71153846153, 94229.82692307692, 98075.94230769231], \"matches\": \"x\"}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: CapitalGain (continuous)\"}, \"showlegend\": false, \"bargap\": 0}}, \"help\": {\"text\": \"The contribution (score) of the term CapitalGain to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Lower Bound\", \"x\": [0.0, 106.5, 639.0, 1033.0, 1299.0, 1394.0, 1409.5, 1448.0, 1494.5, 1551.5, 1568.5, 1576.0, 1584.5, 1592.0, 1598.0, 1609.5, 1622.5, 1638.0, 1668.5, 1670.5, 1695.5, 1720.0, 1737.5, 1740.5, 1748.0, 1789.0, 1836.5, 1862.0, 1881.5, 1894.5, 1938.0, 1975.5, 1978.5, 1990.5, 2001.5, 2022.0, 2046.5, 2054.0, 2104.5, 2176.5, 2190.0, 2205.5, 2218.5, 2252.0, 2262.5, 2310.5, 2345.5, 2364.5, 2384.5, 2403.5, 2429.5, 2450.5, 2553.0, 2581.0, 2789.0, 2914.0, 4356.0], \"y\": [-0.05000852041379485, -0.05000852041379485, -0.05000852041379485, -0.05000852041379485, -0.05000852041379485, -0.05000852041379485, -0.1274472477955263, 0.36258124730325625, 0.36258124730325625, 1.0239342040204682, -2.2152652131308064, -2.2289764433760797, -2.2289764433760797, -2.2289764433760797, -2.2289764433760797, -2.2289764433760797, -2.8416727700238127, -2.8416727700238127, -2.8416727700238127, -2.8416727700238127, -2.8416727700238127, -2.8416727700238127, -2.8416727700238127, -2.8416727700238127, 1.1742534061936083, 2.6423155471513136, 2.686740370387229, -0.3469511104120748, 3.1958116711306435, 2.627446294783713, 2.369092594084838, 2.6766849049009203, -1.6710655795313079, -1.6710655795313079, -2.4899585254014323, -2.4899585254014323, -2.4899585254014323, -2.4899585254014323, -0.7994678153318471, -0.7994678153318471, 0.09743207532965042, 0.09743207532965042, 2.1150048077123413, 2.0767919854344066, 0.33522678359117264, 0.33522678359117264, 0.33522678359117264, 0.8023479469604077, 3.007905238018913, 3.007905238018913, 3.6223545062564484, 2.1130222561133722, 3.3204978356166297, -0.1088283699025463, 5.4526362088245, 2.879537947014241, 2.879537947014241], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"color\": \"rgb(31, 119, 180)\", \"shape\": \"hv\"}, \"mode\": \"lines\", \"name\": \"Main\", \"x\": [0.0, 106.5, 639.0, 1033.0, 1299.0, 1394.0, 1409.5, 1448.0, 1494.5, 1551.5, 1568.5, 1576.0, 1584.5, 1592.0, 1598.0, 1609.5, 1622.5, 1638.0, 1668.5, 1670.5, 1695.5, 1720.0, 1737.5, 1740.5, 1748.0, 1789.0, 1836.5, 1862.0, 1881.5, 1894.5, 1938.0, 1975.5, 1978.5, 1990.5, 2001.5, 2022.0, 2046.5, 2054.0, 2104.5, 2176.5, 2190.0, 2205.5, 2218.5, 2252.0, 2262.5, 2310.5, 2345.5, 2364.5, 2384.5, 2403.5, 2429.5, 2450.5, 2553.0, 2581.0, 2789.0, 2914.0, 4356.0], \"y\": [-0.04763501004291311, -0.04763501004291311, -0.04763501004291311, -0.04763501004291311, -0.04763501004291311, -0.04763501004291311, 0.0017770062793010938, 0.5154311911623652, 0.5154311911623652, 1.6039593229036282, -1.947543909508781, -1.9666021303823629, -1.9666021303823629, -1.9666021303823629, -1.9666021303823629, -1.9666021303823629, -2.636063505712201, -2.636063505712201, -2.636063505712201, -2.636063505712201, -2.636063505712201, -2.636063505712201, -2.636063505712201, -2.636063505712201, 1.5043072943737303, 2.819964974369814, 2.878006343915851, -0.0788870833091475, 3.4223983961088886, 2.768065526403817, 2.616757746888155, 2.9502794280844182, -1.274051531021559, -1.274051531021559, -2.142838748440961, -2.142838748440961, -2.142838748440961, -2.142838748440961, -0.44114284054705016, -0.44114284054705016, 0.4934174305205668, 0.4934174305205668, 2.391232817101753, 2.2298801156097956, 0.5003796320769521, 0.5003796320769521, 0.5003796320769521, 1.0016490490736663, 3.326881763015646, 3.326881763015646, 3.8605828457914924, 2.704174758495656, 3.5751176865883005, 0.39657607885942114, 5.868989483199086, 2.9633183972704895, 2.9633183972704895], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Upper Bound\", \"x\": [0.0, 106.5, 639.0, 1033.0, 1299.0, 1394.0, 1409.5, 1448.0, 1494.5, 1551.5, 1568.5, 1576.0, 1584.5, 1592.0, 1598.0, 1609.5, 1622.5, 1638.0, 1668.5, 1670.5, 1695.5, 1720.0, 1737.5, 1740.5, 1748.0, 1789.0, 1836.5, 1862.0, 1881.5, 1894.5, 1938.0, 1975.5, 1978.5, 1990.5, 2001.5, 2022.0, 2046.5, 2054.0, 2104.5, 2176.5, 2190.0, 2205.5, 2218.5, 2252.0, 2262.5, 2310.5, 2345.5, 2364.5, 2384.5, 2403.5, 2429.5, 2450.5, 2553.0, 2581.0, 2789.0, 2914.0, 4356.0], \"y\": [-0.045261499672031365, -0.045261499672031365, -0.045261499672031365, -0.045261499672031365, -0.045261499672031365, -0.045261499672031365, 0.13100126035412846, 0.6682811350214742, 0.6682811350214742, 2.183984441786788, -1.6798226058867558, -1.7042278173886463, -1.7042278173886463, -1.7042278173886463, -1.7042278173886463, -1.7042278173886463, -2.4304542414005894, -2.4304542414005894, -2.4304542414005894, -2.4304542414005894, -2.4304542414005894, -2.4304542414005894, -2.4304542414005894, -2.4304542414005894, 1.8343611825538524, 2.997614401588314, 3.069272317444473, 0.1891769437937798, 3.648985121087134, 2.908684758023921, 2.8644228996914722, 3.223873951267916, -0.8770374825118102, -0.8770374825118102, -1.7957189714804898, -1.7957189714804898, -1.7957189714804898, -1.7957189714804898, -0.08281786576225325, -0.08281786576225325, 0.8894027857114832, 0.8894027857114832, 2.6674608264911646, 2.3829682457851846, 0.6655324805627316, 0.6655324805627316, 0.6655324805627316, 1.2009501511869247, 3.645858288012379, 3.645858288012379, 4.098811185326536, 3.29532726087794, 3.8297375375599714, 0.9019805276213886, 6.285342757573672, 3.047098847526738, 3.047098847526738], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\"0 - 182\", \"182 - 363\", \"363 - 544\", \"544 - 726\", \"726 - 908\", \"908 - 1.09K\", \"1.09K - 1.27K\", \"1.27K - 1.45K\", \"1.45K - 1.63K\", \"1.63K - 1.82K\", \"1.82K - 2K\", \"2K - 2.18K\", \"2.18K - 2.36K\", \"2.36K - 2.54K\", \"2.54K - 2.72K\", \"2.72K - 2.9K\", \"2.9K - 3.09K\", \"3.09K - 3.27K\", \"3.27K - 3.45K\", \"3.45K - 3.63K\", \"3.63K - 3.81K\", \"3.81K - 3.99K\", \"3.99K - 4.17K\", \"4.17K - 4.36K\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [90.75, 272.25, 453.75, 635.25, 816.75, 998.25, 1179.75, 1361.25, 1542.75, 1724.25, 1905.75, 2087.25, 2268.75, 2450.25, 2631.75, 2813.25, 2994.75, 3176.25, 3357.75, 3539.25, 3720.75, 3902.25, 4083.75, 4265.25], \"y\": [23265, 3, 0, 10, 6, 2, 11, 29, 169, 166, 512, 69, 69, 74, 16, 9, 2, 0, 0, 0, 3, 2, 0, 3], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"CapitalLoss\", \"standoff\": 0}, \"matches\": \"x\"}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"CapitalLoss\", \"standoff\": 0}, \"tickmode\": \"array\", \"ticktext\": [\"0 - 182\", \"182 - 363\", \"363 - 544\", \"544 - 726\", \"726 - 908\", \"908 - 1.09K\", \"1.09K - 1.27K\", \"1.27K - 1.45K\", \"1.45K - 1.63K\", \"1.63K - 1.82K\", \"1.82K - 2K\", \"2K - 2.18K\", \"2.18K - 2.36K\", \"2.36K - 2.54K\", \"2.54K - 2.72K\", \"2.72K - 2.9K\", \"2.9K - 3.09K\", \"3.09K - 3.27K\", \"3.27K - 3.45K\", \"3.45K - 3.63K\", \"3.63K - 3.81K\", \"3.81K - 3.99K\", \"3.99K - 4.17K\", \"4.17K - 4.36K\"], \"tickvals\": [90.75, 272.25, 453.75, 635.25, 816.75, 998.25, 1179.75, 1361.25, 1542.75, 1724.25, 1905.75, 2087.25, 2268.75, 2450.25, 2631.75, 2813.25, 2994.75, 3176.25, 3357.75, 3539.25, 3720.75, 3902.25, 4083.75, 4265.25], \"matches\": \"x\"}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: CapitalLoss (continuous)\"}, \"showlegend\": false, \"bargap\": 0}}, \"help\": {\"text\": \"The contribution (score) of the term CapitalLoss to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Lower Bound\", \"x\": [1.0, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 59.5, 60.5, 61.5, 62.5, 63.5, 64.5, 65.5, 66.5, 69.0, 71.0, 72.5, 74.5, 75.5, 79.0, 80.5, 82.5, 84.5, 89.5, 90.5, 96.5, 98.5, 99.0], \"y\": [-1.3608131616749017, -2.2463637387331152, -1.4058740865639514, -0.5673156813220703, -0.9531662999674126, -0.6333168054230038, -0.823406482840945, -0.823406482840945, -0.8251600251868151, -0.8431885324999847, -0.8293092696272628, -0.8293092696272628, -0.8291696390286094, -1.1927157233657946, -1.1261920166685127, -1.0381818580019058, -0.8887254108408674, -0.9117690112194713, -0.8468341183099767, -0.8468341183099767, -0.8468341183099767, -1.0001607136820965, -0.8353102296535154, -0.9554589830882086, -0.9547412710003133, -0.9500045811667611, -0.9018941500737714, -0.8567241426397971, -0.7356877942931985, -0.7356877942931985, -0.6596425513242967, -0.592378968781629, -0.592378968781629, -0.17722741108170326, -0.1456915357897779, -0.14679432853631003, -0.1463413271539822, -0.04025680550611356, 0.02141776006570538, -0.4123323620742515, 0.36504467032165205, 0.3038797488972148, 0.4083364882175929, 0.3988221207712434, 0.3558335637959779, 0.3480551133114822, 0.3427146825402669, 0.24153776845762348, 0.5158418438159784, -0.2957285834782397, 0.4383274146168554, 0.2386394611491158, 0.504449517942803, 0.5297795892580627, 0.5941112688687982, 0.398829340344629, 0.34633389640097717, 0.3349300443328457, 0.2905407851078198, 0.2925794691780639, 0.29694377595071836, 0.29355307352762544, -1.0401099609581381, -1.0401099609581381, 0.11108013605527078, 0.14628639186986508, 0.26329980509301254, 0.2520729549354963, -0.9009264855371693, 0.8728532141132425, 0.8901781141169066, 1.0227221209141764, 0.24087993263952717, 0.1495826883080145, -0.2929031213646913, -0.19962170597562612, -0.21121160685655374, -0.21121160685655374], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"color\": \"rgb(31, 119, 180)\", \"shape\": \"hv\"}, \"mode\": \"lines\", \"name\": \"Main\", \"x\": [1.0, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 59.5, 60.5, 61.5, 62.5, 63.5, 64.5, 65.5, 66.5, 69.0, 71.0, 72.5, 74.5, 75.5, 79.0, 80.5, 82.5, 84.5, 89.5, 90.5, 96.5, 98.5, 99.0], \"y\": [-1.1294074704457895, -1.7226831690651017, -1.1267436619004965, -0.4452889220933703, -0.7797216039637564, -0.3308706444866198, -0.7652696608009903, -0.7652696608009903, -0.7677083544100509, -0.7755946671316729, -0.7255662292425109, -0.7255662292425109, -0.7781200413474563, -1.072962281922137, -1.0334738243662247, -0.948881924783266, -0.8375320246359017, -0.8542106024154388, -0.7890223210084333, -0.7890223210084333, -0.7890223210084333, -0.8570154736235165, -0.7842198605632495, -0.8759354234404193, -0.8330237887669754, -0.8607332341280394, -0.7779568762396991, -0.7471958747046661, -0.6814653166100775, -0.6814653166100775, -0.5751156011917207, -0.5177428934325845, -0.5177428934325845, -0.15395343286935448, -0.09753441807765334, -0.09752205646373296, -0.0967373254333922, 0.012054870140508045, 0.03158534217185857, -0.15689009603786114, 0.40264318408801314, 0.3682285743683337, 0.45397323466558026, 0.4292476802740685, 0.4051425463019811, 0.39552564421686137, 0.39296638112845894, 0.3415057739026075, 0.5296275384248059, 0.19027228450770053, 0.4942193534906261, 0.41942968565901256, 0.5336892407082183, 0.5648951060058968, 0.767224660485804, 0.45809102222427384, 0.3853123062265204, 0.4084514631634253, 0.3844106168165473, 0.3982078702628715, 0.3870544775162003, 0.3954645382132105, -0.6464874989107665, -0.6464874989107665, 0.17546067120154962, 0.23271593963374734, 0.694939872809607, 0.3032694179097654, -0.6423705418573638, 1.0395605635267522, 1.0053479837007813, 1.2184088764501322, 0.5537533211316641, 0.24538729989119368, -0.12042574495362857, -0.05575282704253509, -0.020039033953756585, -0.020039033953756585], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"fill\": \"tonexty\", \"fillcolor\": \"rgba(68, 68, 68, 0.15)\", \"line\": {\"shape\": \"hv\", \"width\": 0}, \"marker\": {\"color\": \"#444\"}, \"mode\": \"lines\", \"name\": \"Upper Bound\", \"x\": [1.0, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 59.5, 60.5, 61.5, 62.5, 63.5, 64.5, 65.5, 66.5, 69.0, 71.0, 72.5, 74.5, 75.5, 79.0, 80.5, 82.5, 84.5, 89.5, 90.5, 96.5, 98.5, 99.0], \"y\": [-0.8980017792166771, -1.1990025993970879, -0.8476132372370415, -0.32326216286467024, -0.6062769079601003, -0.02842448355023569, -0.7071328387610357, -0.7071328387610357, -0.7102566836332868, -0.7080008017633611, -0.621823188857759, -0.621823188857759, -0.7270704436663031, -0.9532088404784792, -0.9407556320639368, -0.8595819915646264, -0.786338638430936, -0.7966521936114063, -0.7312105237068899, -0.7312105237068899, -0.7312105237068899, -0.7138702335649366, -0.7331294914729837, -0.79641186379263, -0.7113063065336375, -0.7714618870893176, -0.6540196024056268, -0.637667606769535, -0.6272428389269564, -0.6272428389269564, -0.4905886510591446, -0.44310681808353997, -0.44310681808353997, -0.1306794546570057, -0.0493773003655288, -0.048249784391155896, -0.04713332371280218, 0.06436654578712965, 0.04175292427801176, 0.09855216999852923, 0.4402416978543742, 0.43257739983945265, 0.49960998111356764, 0.4596732397768936, 0.4544515288079843, 0.44299617512224054, 0.443218079716651, 0.4414737793475915, 0.5434132330336334, 0.6762731524936407, 0.5501112923643968, 0.6002199101689093, 0.5629289634736336, 0.6000106227537308, 0.9403380521028097, 0.5173527041039186, 0.42429071605206364, 0.4819728819940049, 0.47828044852527485, 0.5038362713476792, 0.47716517908168227, 0.4973760028987955, -0.2528650368633948, -0.2528650368633948, 0.23984120634782846, 0.3191454873976296, 1.1265799405262014, 0.3544658808840345, -0.38381459817755825, 1.206267912940262, 1.120517853284656, 1.414095631986088, 0.866626709623801, 0.3411919114743729, 0.05205163145743416, 0.08811605189055594, 0.17113353894904057, 0.17113353894904057], \"type\": \"scatter\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\"1 - 5.9\", \"5.9 - 10.8\", \"10.8 - 15.7\", \"15.7 - 20.6\", \"20.6 - 25.5\", \"25.5 - 30.4\", \"30.4 - 35.3\", \"35.3 - 40.2\", \"40.2 - 45.1\", \"45.1 - 50\", \"50 - 54.9\", \"54.9 - 59.8\", \"59.8 - 64.7\", \"64.7 - 69.6\", \"69.6 - 74.5\", \"74.5 - 79.4\", \"79.4 - 84.3\", \"84.3 - 89.2\", \"89.2 - 94.1\", \"94.1 - 99\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [3.45, 8.350000000000001, 13.25, 18.15, 23.05, 27.95, 32.849999999999994, 37.75, 42.650000000000006, 47.55, 52.45, 57.349999999999994, 62.25, 67.15, 72.05, 76.95, 81.85, 86.75, 91.65, 96.55], \"y\": [156, 406, 480, 1188, 760, 983, 1258, 12019, 1833, 513, 2273, 620, 1135, 203, 281, 57, 134, 13, 28, 80], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"HoursPerWeek\", \"standoff\": 0}, \"matches\": \"x\"}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"HoursPerWeek\", \"standoff\": 0}, \"tickmode\": \"array\", \"ticktext\": [\"1 - 5.9\", \"5.9 - 10.8\", \"10.8 - 15.7\", \"15.7 - 20.6\", \"20.6 - 25.5\", \"25.5 - 30.4\", \"30.4 - 35.3\", \"35.3 - 40.2\", \"40.2 - 45.1\", \"45.1 - 50\", \"50 - 54.9\", \"54.9 - 59.8\", \"59.8 - 64.7\", \"64.7 - 69.6\", \"69.6 - 74.5\", \"74.5 - 79.4\", \"79.4 - 84.3\", \"84.3 - 89.2\", \"89.2 - 94.1\", \"94.1 - 99\"], \"tickvals\": [3.45, 8.350000000000001, 13.25, 18.15, 23.05, 27.95, 32.849999999999994, 37.75, 42.650000000000006, 47.55, 52.45, 57.349999999999994, 62.25, 67.15, 72.05, 76.95, 81.85, 86.75, 91.65, 96.55], \"matches\": \"x\"}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: HoursPerWeek (continuous)\"}, \"showlegend\": false, \"bargap\": 0}}, \"help\": {\"text\": \"The contribution (score) of the term HoursPerWeek to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"error_y\": {\"array\": [0.06560568002294032, 0.1942650358684448, 0.1098526250049172, 0.1601839969236467, 0.2288346098424825, 0.202169127227935, 0.21711468503659187, 0.29460950813491094, 0.06287596814913254, 0.08517924265276443, 0.0878132160948959, 0.08910291308734505, 0.2680952622665757, 0.28997395977096724, 0.14086813058588687, 0.14027429948174838, 0.14027429948174838, 0.14439958699087946, 0.08106541875194054, 0.10324407605256804, 0.236132270080178, 0.23504723684383433, 0.0649685573179263, 0.05702252795427855, 0.06995616236039337, 0.08014267220723964, 0.2351869324901802, 0.23607299626808798, 0.31546652513343043, 0.11322011728498382, 0.21028977865382917, 0.1788648259910744, 0.12291818896465051, 0.12148590125989461, 0.21891246392740982, 0.2781612067806179, 0.20441976270997259, 0.1966981170055246, 0.004744736191079846, 0.2199492921728201, 0.34577030660831876], \"color\": \"#ff6614\", \"type\": \"data\", \"visible\": true}, \"x\": [\" ?\", \" Cambodia\", \" Canada\", \" China\", \" Columbia\", \" Cuba\", \" Dominican-Republic\", \" Ecuador\", \" El-Salvador\", \" England\", \" France\", \" Germany\", \" Greece\", \" Guatemala\", \" Haiti\", \" Honduras\", \" Hong\", \" Hungary\", \" India\", \" Iran\", \" Ireland\", \" Italy\", \" Jamaica\", \" Japan\", \" Laos\", \" Mexico\", \" Nicaragua\", \" Outlying-US(Guam-USVI-etc)\", \" Peru\", \" Philippines\", \" Poland\", \" Portugal\", \" Puerto-Rico\", \" Scotland\", \" South\", \" Taiwan\", \" Thailand\", \" Trinadad&Tobago\", \" United-States\", \" Vietnam\", \" Yugoslavia\"], \"y\": [-0.3235704609693773, 0.9359751931965037, -0.12076229223091671, -0.8554775942804076, -1.0121600189078657, 0.23432039678702832, -0.4831860093605113, -0.5392981115700638, -0.34766188001115084, 0.11589887456014182, 0.12111132132271132, 0.0988748957967, -0.653479831762873, -0.2547675280667858, -0.19550331199126791, -0.2009909154291754, -0.2009909154291754, -0.21371660452443775, -0.17009017321719866, -0.13618088350973162, 0.593763152189273, 0.5949987202046446, -0.034766377401642665, -0.055634188133198884, -0.5444143454182806, -0.531650856038057, -1.1543606375379736, -1.1558764400948522, -0.6513513084461746, 0.2138256173379261, -0.1493266947748894, -0.22305786108745124, -0.5602840266466403, -0.54361225749867, -0.9320488772338378, -0.29381997944100663, -0.2710043041337677, -0.25358693272240435, 0.03453471678277774, -0.9248798682355543, 0.24226898886975878], \"type\": \"bar\", \"xaxis\": \"x\", \"yaxis\": \"y\"}, {\"hovertemplate\": \"(%{hovertext}): %{y}\", \"hovertext\": [\" ?\", \" Cambodia\", \" Canada\", \" China\", \" Columbia\", \" Cuba\", \" Dominican-Republic\", \" Ecuador\", \" El-Salvador\", \" England\", \" France\", \" Germany\", \" Greece\", \" Guatemala\", \" Haiti\", \" Honduras\", \" Hong\", \" Hungary\", \" India\", \" Iran\", \" Ireland\", \" Italy\", \" Jamaica\", \" Japan\", \" Laos\", \" Mexico\", \" Nicaragua\", \" Outlying-US(Guam-USVI-etc)\", \" Peru\", \" Philippines\", \" Poland\", \" Portugal\", \" Puerto-Rico\", \" Scotland\", \" South\", \" Taiwan\", \" Thailand\", \" Trinadad&Tobago\", \" United-States\", \" Vietnam\", \" Yugoslavia\"], \"marker\": {\"color\": \"#ff7f0e\"}, \"name\": \"Distribution\", \"x\": [\" ?\", \" Cambodia\", \" Canada\", \" China\", \" Columbia\", \" Cuba\", \" Dominican-Republic\", \" Ecuador\", \" El-Salvador\", \" England\", \" France\", \" Germany\", \" Greece\", \" Guatemala\", \" Haiti\", \" Honduras\", \" Hong\", \" Hungary\", \" India\", \" Iran\", \" Ireland\", \" Italy\", \" Jamaica\", \" Japan\", \" Laos\", \" Mexico\", \" Nicaragua\", \" Outlying-US(Guam-USVI-etc)\", \" Peru\", \" Philippines\", \" Poland\", \" Portugal\", \" Puerto-Rico\", \" Scotland\", \" South\", \" Taiwan\", \" Thailand\", \" Trinadad&Tobago\", \" United-States\", \" Vietnam\", \" Yugoslavia\"], \"y\": [449, 17, 81, 58, 46, 68, 60, 23, 80, 67, 24, 106, 24, 53, 28, 9, 12, 11, 77, 35, 21, 48, 62, 43, 13, 478, 24, 8, 21, 150, 40, 27, 88, 7, 64, 37, 15, 16, 21871, 48, 11], \"type\": \"bar\", \"xaxis\": \"x2\", \"yaxis\": \"y2\"}], \"layout\": {\"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"matches\": \"x2\", \"showticklabels\": false}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.4, 1.0], \"title\": {\"text\": \"Score\"}, \"range\": [-5.01598250430514, 7.418568412306603]}, \"xaxis2\": {\"anchor\": \"y2\", \"domain\": [0.0, 1.0]}, \"yaxis2\": {\"anchor\": \"x2\", \"domain\": [0.0, 0.15], \"title\": {\"text\": \"Density\"}}, \"title\": {\"text\": \"Term: NativeCountry (categorical)\"}, \"showlegend\": false}}, \"help\": {\"text\": \"The contribution (score) of the term NativeCountry to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [17.0, 19.5, 21.5, 23.5, 25.5, 27.5, 29.5, 31.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 49.5, 51.5, 53.5, 55.5, 58.5, 61.5, 66.5, 90.0], \"y\": [12285.0, 34337.5, 48611.0, 66628.0, 84430.0, 98665.5, 106954.0, 114570.5, 122057.0, 131300.0, 141262.5, 149762.5, 158978.0, 166415.5, 173233.5, 178675.5, 185049.0, 190695.5, 196587.0, 203021.0, 210750.5, 219838.0, 230857.0, 243370.5, 259520.5, 279164.5, 301848.5, 329425.5, 358509.5, 409978.0, 1484705.0], \"z\": [[0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.039669539593761176, 0.03602197366618252, 0.0350495981054603, 0.005721668385690132, 0.004354300115012137, -0.021296662927140414, -0.08573995802373023, -0.08573995802373023, -0.10684764619494487, -0.10684764619494487, -0.10684764619494487, -0.10736907461288418, -0.10736907461288418, -0.09006665700262777, -0.07438234718043298, -0.050214429926299174, -0.050214429926299174, 0.24380023974559314, 0.3357507261098764, 0.42149370518589546], [-0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.002720905963772887, -0.006368471891351554, -0.00734084745207376, -0.009390839662648831, -0.009364647220833588, -0.035015610262986135, -0.09945890535957598, -0.09945890535957598, -0.10262275029539479, -0.10262275029539479, -0.10262275029539479, -0.10314417871333413, -0.10314417871333413, -0.0858417611030777, -0.0701574512808829, -0.0459895340267491, -0.0459895340267491, 0.24802513564514325, 0.3399756220094265, 0.42571860108544557], [-0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.0022285277230122023, -0.005876093650590868, -0.006848469211313074, -0.008898461421888148, -0.008872268980072902, -0.03452323202222545, -0.0989665271188153, -0.0989665271188153, -0.10213037205463411, -0.10213037205463411, -0.10213037205463411, -0.10265180047257343, -0.10265180047257343, -0.0998908072138068, -0.084206497391612, -0.07312046708795004, -0.07312046708795004, 0.22089420258394227, 0.3128446889482255, 0.3985876680242447], [0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, 0.00039233032931624526, -0.0032552355982624244, -0.00422761115898463, -0.006277603369559703, -0.006251410927744458, -0.03190237396989701, -0.09634566906648685, -0.09634566906648685, -0.09950951400230566, -0.09950951400230566, -0.09950951400230566, -0.100030942420245, -0.100030942420245, -0.09939753885193382, -0.08371322902973902, -0.07262719872607706, -0.07262719872607706, 0.22138747094581526, 0.3128446889482255, 0.3985876680242447], [0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.01077404175905514, 0.0071264758314764694, 0.006154100270754262, 0.004104108060179186, 0.004130300501994431, -0.021520662540158123, -0.08596395763674795, -0.08596395763674795, -0.08912780257256676, -0.08912780257256676, -0.08912780257256676, -0.08964923099050608, -0.08964923099050608, -0.08901582742219491, -0.07333151760000013, -0.063635841535145, -0.063635841535145, 0.14155615760660265, 0.2330133756090129, 0.31637870471592994], [0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.01835554735744923, 0.014707981429870566, 0.013735605869148362, 0.01168561365857329, 0.011711806100388534, -0.013939156941764026, -0.06347742220675764, -0.062193596938336405, -0.06535744187415521, -0.06535744187415521, -0.06535744187415521, -0.06587887029209454, -0.06587887029209454, -0.06524546672378335, -0.051112459539252385, -0.04310519782718326, -0.04310519782718326, 0.0811528722993657, 0.13865243658957646, 0.21621626657925697], [0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.02032147967735416, 0.016673913749775494, 0.01570153818905329, 0.013651545978478216, 0.013677738420293462, -0.0119732246218591, -0.06151148988685271, -0.06022766461843146, -0.06339150955425027, -0.06339150955425027, -0.06339150955425027, -0.06391293797218961, -0.06391293797218961, -0.06327953440387843, -0.04914652721934745, -0.042616740645901464, -0.042616740645901464, 0.00949829480146598, -0.010336998306729534, -0.03245620514819469], [0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05028327803572046, 0.04931090247499825, 0.047260910264423174, 0.04728710270623842, 0.02163613966408586, -0.027902125600907768, -0.02661830033248652, -0.029782145268305325, -0.029782145268305325, -0.029782145268305325, -0.030303573686244666, -0.030303573686244666, -0.030066689516494004, -0.023749567642954352, -0.02044989299480167, -0.02044989299480167, -0.07273275136381299, -0.09584244097068798, -0.13075136440000806], [0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05028327803572046, 0.04931090247499825, 0.047260910264423174, 0.04728710270623842, 0.02163613966408586, -0.027902125600907768, -0.02661830033248652, -0.029782145268305325, -0.029782145268305325, -0.029782145268305325, -0.030303573686244666, -0.030303573686244666, -0.030066689516494004, -0.023749567642954352, -0.02044989299480167, -0.02044989299480167, -0.07273275136381299, -0.09584244097068798, -0.13075136440000806], [0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05393084396329911, 0.05028327803572046, 0.04931090247499825, 0.047260910264423174, 0.04728710270623842, 0.02163613966408586, -0.027902125600907768, -0.02661830033248652, -0.029782145268305325, -0.029782145268305325, -0.029782145268305325, -0.030303573686244666, -0.030303573686244666, -0.030066689516494004, -0.023749567642954352, -0.02044989299480167, -0.02044989299480167, -0.07273275136381299, -0.09584244097068798, -0.13075136440000806], [-0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.013455424683663045, -0.014427800244385251, -0.0022194731139581914, 0.014639848888899399, 0.01629125982112686, 0.01886495355690549, 0.02065167267711491, 0.031788310619746886, 0.031788310619746886, 0.031788310619746886, 0.031266882201807546, 0.031266882201807546, 0.03150376637155821, 0.037820888245097856, 0.04112056289325054, 0.04112056289325054, -0.011162295475760772, -0.03427198508263573, -0.0691809085119558], [-0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.009807858756084378, -0.013455424683663045, -0.014427800244385251, -0.0022194731139581914, 0.014639848888899399, 0.01629125982112686, 0.01886495355690549, 0.02065167267711491, 0.031788310619746886, 0.031788310619746886, 0.031788310619746886, 0.03176085332739696, 0.03176085332739696, 0.03199773749714763, 0.03831485937068727, 0.041614534018839966, 0.041614534018839966, -0.010668324350171355, -0.03377801395704631, -0.06868693738636637], [-0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.015747962381095607, -0.016720337941817813, -0.00451201081139076, 0.012347311191466833, 0.013998722123694293, 0.018496110048050966, 0.020282829168260387, 0.031419467110892364, 0.031419467110892364, 0.031419467110892364, 0.03176085332739696, 0.03176085332739696, 0.03199773749714763, 0.03831485937068727, 0.041614534018839966, 0.041614534018839966, -0.010668324350171355, -0.03377801395704631, -0.06868693738636637], [-0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.015747962381095607, -0.016720337941817813, -0.00451201081139076, 0.012347311191466833, 0.013998722123694293, 0.018496110048050966, 0.020282829168260387, 0.031419467110892364, 0.031419467110892364, 0.031419467110892364, 0.03176085332739696, 0.03176085332739696, 0.03199773749714763, 0.03831485937068727, 0.041614534018839966, 0.041614534018839966, -0.010668324350171355, -0.03377801395704631, -0.06868693738636637], [-0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.012100396453516944, -0.015747962381095607, -0.016720337941817813, -0.00451201081139076, 0.012347311191466833, 0.013998722123694293, 0.018496110048050966, 0.020282829168260387, 0.031419467110892364, 0.031419467110892364, 0.031419467110892364, 0.03176085332739696, 0.03176085332739696, 0.03199773749714763, 0.03831485937068727, 0.041614534018839966, 0.041614534018839966, -0.010668324350171355, -0.03377801395704631, -0.06868693738636637], [-0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.015747962381095607, -0.016720337941817813, -0.00451201081139076, 0.012347311191466833, 0.013998722123694293, 0.018496110048050966, 0.020282829168260387, 0.031419467110892364, 0.031419467110892364, 0.031419467110892364, 0.03176085332739696, 0.03176085332739696, 0.03199773749714763, 0.03831485937068727, 0.041614534018839966, 0.041614534018839966, -0.010668324350171355, -0.03377801395704631, -0.06868693738636637], [-0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.012606011741122912, -0.015747962381095607, -0.016720337941817813, -0.00451201081139076, 0.012347311191466833, 0.013998722123694293, 0.018496110048050966, 0.020282829168260387, 0.031419467110892364, 0.031419467110892364, 0.031419467110892364, 0.03176085332739696, 0.03176085332739696, 0.03199773749714763, 0.03831485937068727, 0.041614534018839966, 0.041614534018839966, -0.010668324350171355, -0.03377801395704631, -0.06868693738636637], [-0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.015747962381095607, -0.016720337941817813, -0.00451201081139076, 0.012347311191466833, 0.013998722123694293, 0.018496110048050966, 0.020282829168260387, 0.031605562933480234, 0.031605562933480234, 0.031605562933480234, 0.03194694914998483, 0.03194694914998483, 0.0321838333197355, 0.03623615120162296, 0.03953582584977565, 0.03953582584977565, -0.012747032519235677, -0.03585672212611063, -0.07076564555543069], [-0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.017823528906377104, -0.015747962381095607, -0.016720337941817813, -0.00451201081139076, 0.012347311191466833, 0.013998722123694293, 0.018496110048050966, 0.020282829168260387, 0.031605562933480234, 0.031605562933480234, 0.031605562933480234, 0.03194694914998483, 0.03194694914998483, 0.0321838333197355, 0.03623615120162296, 0.03953582584977565, 0.03953582584977565, -0.012747032519235677, -0.03585672212611063, -0.07076564555543069], [-0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.015671156272305694, -0.0135955897470242, -0.014567965307746403, -0.0023596381773193483, 0.014499683825538245, 0.016151094757765706, 0.02064848268212238, 0.0224352018023318, 0.03375793556755164, 0.03375793556755164, 0.03375793556755164, 0.034099321784056245, 0.034099321784056245, 0.03433620595380691, 0.03623615120162296, 0.03953582584977565, 0.03953582584977565, -0.012747032519235677, -0.03585672212611063, -0.07076564555543069], [-0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.014880139848892852, -0.01280457332361136, -0.013776948884333565, -0.0015686217539065078, 0.015290700248951086, 0.016942111181178544, 0.02143949910553522, 0.02322621822574464, 0.034548951990964485, 0.034548951990964485, 0.034548951990964485, 0.03489033820746909, 0.03489033820746909, 0.03433620595380691, 0.03623615120162296, 0.03953582584977565, 0.03953582584977565, -0.012747032519235677, -0.03585672212611063, -0.07076564555543069], [-0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.012250002082248869, -0.013222377642971074, -0.001014050512544016, 0.01584527149031358, 0.017496682422541036, 0.02199407034689771, 0.02378078946710713, 0.035103523232326975, 0.035103523232326975, 0.035103523232326975, 0.03544490944883158, 0.03544490944883158, 0.0306444040749706, 0.012348947355764053, -0.003083521949215501, -0.003083521949215501, -0.05536638031822683, -0.07847606992510175, -0.11338499335442184], [-0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.014325568607530361, -0.012250002082248869, -0.013222377642971074, -0.001014050512544016, 0.01584527149031358, 0.017496682422541036, 0.02199407034689771, 0.02378078946710713, 0.035103523232326975, 0.035103523232326975, 0.035103523232326975, 0.03544490944883158, 0.03544490944883158, 0.0306444040749706, 0.012348947355764053, -0.003083521949215501, -0.003083521949215501, -0.05536638031822683, -0.07847606992510175, -0.11338499335442184], [-0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.012448590988109035, -0.01342096654883124, -0.001212639418404184, 0.01564668258445341, 0.01729809351668087, 0.021795481441037542, 0.023582200561246963, 0.03490493432646681, 0.03490493432646681, 0.03490493432646681, 0.035246320542971415, 0.035246320542971415, 0.030445815169110428, 0.012150358449903883, -0.003282110855075668, -0.003282110855075668, -0.055564969224087005, -0.07854399958908806, -0.11338499335442184], [-0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.014524157513390527, -0.012448590988109035, -0.01342096654883124, -0.001212639418404184, 0.01564668258445341, 0.01729809351668087, 0.021795481441037542, 0.023582200561246963, 0.03490493432646681, 0.03490493432646681, 0.03490493432646681, 0.035246320542971415, 0.035246320542971415, 0.030445815169110428, 0.012150358449903883, -0.003282110855075668, -0.003282110855075668, -0.055564969224087005, -0.07854399958908806, -0.11338499335442184], [-0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.012382705601604808, -0.013355081162327014, -0.001146754031899958, 0.015712567970957637, 0.017363978903185095, 0.021861366827541768, 0.02364808594775119, 0.03497081971297104, 0.03497081971297104, 0.03497081971297104, 0.03531220592947564, 0.03531220592947564, 0.030511700555614654, 0.01221624383640811, -0.0032162254685714434, -0.0032162254685714434, -0.055564969224087005, -0.07854399958908806, -0.11338499335442184], [-0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.014458272126886301, -0.012382705601604808, -0.013355081162327014, -0.001146754031899958, 0.015712567970957637, 0.017363978903185095, 0.021861366827541768, 0.02364808594775119, 0.03497081971297104, 0.03497081971297104, 0.03497081971297104, 0.03531220592947564, 0.03531220592947564, 0.030511700555614654, 0.01221624383640811, -0.0032162254685714434, -0.0032162254685714434, -0.055564969224087005, -0.07854399958908806, -0.12497316283597225], [-0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.01747733008645765, -0.015401763561176156, -0.016374139121898362, -0.004165811991471302, 0.018826759466200185, 0.024135986323154047, 0.028633374247510716, 0.030420093367720138, 0.04174282713293999, 0.04174282713293999, 0.04174282713293999, 0.04208421334944459, 0.04208421334944459, 0.037283707975583606, 0.018988251256377063, 0.0035557819513975103, 0.0035557819513975103, -0.04879296180411805, -0.0717719921691191, -0.2268314624726655], [-0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, -0.009205545611325656, 0.006855532060148667, 0.005883156499426461, 0.018091483629853522, 0.041084055087525, 0.04639328194447887, 0.050890669868835545, 0.052677388989044956, 0.06400012275426482, 0.06400012275426482, 0.06400012275426482, 0.06434150897076943, 0.06434150897076943, 0.059541003596908434, 0.04124554687770188, 0.025813077572722328, 0.025813077572722328, -0.026535666182793224, -0.049514696547794314, -0.21284595132647266], [-0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.0572785678048792, -0.05543456623790886, 0.02751783103018314, 0.02751783103018314, 0.0397261581606102, 0.06271872961828168, 0.06869725475925122, 0.0731946426836079, 0.07498136180381731, 0.08630409556903716, 0.08630409556903716, 0.08630409556903716, 0.08664548178554177, 0.08664548178554177, 0.08184497641168079, 0.06354951969247423, 0.04811705038749466, 0.04811705038749466, -0.004231693368020865, -0.02721072373302197, -0.19054197851170032]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: Age & fnlwgt (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"Age\"}}, \"yaxis\": {\"title\": {\"text\": \"fnlwgt\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term Age & fnlwgt to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [17.0, 19.5, 21.5, 23.5, 25.5, 27.5, 29.5, 31.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 49.5, 51.5, 53.5, 55.5, 58.5, 61.5, 66.5, 90.0], \"y\": [\" Husband\", \" Not-in-family\", \" Other-relative\", \" Own-child\", \" Unmarried\", \" Wife\"], \"z\": [[-0.009507004508186279, -0.009507004508186279, -0.009507004508186279, -0.008540378219621685, -0.008540378219621685, -0.005830226284725553, -0.005830226284725553, -0.010775603589482503, -0.009755816998848471, -0.014442550506040309, -0.01430587133044077, -0.011086096302658922, -0.014707325592122508, -0.015068387218628809, -0.014650613694359545, -0.015997447753459553, -0.015997447753459553, -0.00979524686330504, -0.004989372594118633, 0.006058392732812883, 0.006058392732812883, 0.006241631210573772, 0.006265101890559146, 0.031500234668259214, 0.03235705806904837, 0.03609822000520052, 0.03609822000520052, 0.03276238696481193, 0.03276238696481193, 0.03276238696481193], [-0.02795479674666455, -0.02795479674666455, -0.02795479674666455, -0.026988170458099956, -0.026988170458099956, -0.024278018523203822, -0.024278018523203822, -0.024278018523203822, -0.023258231932569793, -0.023258231932569793, -0.023121552756970257, -0.019901777729188407, -0.018477820085815177, -0.009402096515236323, -0.008984322990967063, -0.010331157050067073, -0.010331157050067073, -0.004128956159912553, 0.0006769181092738507, 0.011489984159678238, 0.011489984159678238, 0.011673222637439126, 0.0116966933174245, 0.03693182609512456, 0.037788649495913706, 0.04152981143206587, 0.04152981143206587, 0.10856979281070236, 0.10856979281070236, 0.10856979281070236], [-0.02730488129724098, -0.02730488129724098, -0.02730488129724098, -0.02730488129724098, -0.02730488129724098, -0.024594729362344848, -0.024594729362344848, -0.024594729362344848, -0.02357494277171082, -0.02357494277171082, -0.023438263596111283, -0.020218488568329432, -0.018794530924956202, -0.009718807354377352, -0.009301033830108088, -0.010647867889208101, -0.010647867889208101, -0.004445666999053582, 0.00036020727013282277, 0.011173273320537212, 0.011173273320537212, 0.0113565117982981, 0.011379982478283472, 0.03612240782148485, 0.03697923122227399, 0.040720393158426155, 0.040720393158426155, 0.11684486494694217, 0.11684486494694217, 0.11684486494694217], [-0.028915423314527972, -0.028915423314527972, -0.028915423314527972, -0.028915423314527972, -0.028915423314527972, -0.02620527137963184, -0.02620527137963184, -0.02620527137963184, -0.02518548478899781, -0.02518548478899781, -0.025048805613398274, -0.021829030585616423, -0.020405072942243193, -0.01132934937166434, -0.010911575847395081, -0.010970980564251689, -0.010970980564251689, -0.0047687796740971695, 3.709459508923624e-05, 0.010850160645493625, 0.010850160645493625, 0.011033399123254512, 0.011056869803239885, 0.03579929514644126, 0.036656118547230415, 0.040397280483382564, 0.040397280483382564, 0.13420130405396094, 0.13420130405396094, 0.13420130405396094], [-0.009827389168542887, -0.009827389168542887, -0.009827389168542887, -0.009827389168542887, -0.009827389168542887, -0.0071172372336467515, -0.0071172372336467515, -0.0071172372336467515, -0.006097450643012724, -0.006097450643012724, -0.005960771467413188, -0.0027409964396313373, -0.0013170387962581128, 0.0077586847743207465, 0.008176458298590008, 0.008176458298590008, 0.008176458298590008, 0.014378659188744525, 0.019184533457930933, 0.027009417371376493, 0.027009417371376493, 0.026583909520581667, 0.026536230589820558, 0.03211262588801991, 0.03296944928880907, 0.03671061122496122, 0.03671061122496122, 0.13062934745820384, 0.13062934745820384, 0.13062934745820384], [0.14028799740839942, 0.14028799740839942, 0.14028799740839942, 0.14028799740839942, 0.14028799740839942, 0.1371828147638016, 0.12448778832002785, 0.12448778832002785, 0.12448778832002785, 0.12448778832002785, 0.12448778832002785, 0.12448778832002785, 0.10967873373821835, 0.1187544573087972, 0.1187544573087972, 0.1187544573087972, 0.1187544573087972, 0.1187544573087972, 0.07274837631146237, 0.035251310557339516, 0.035251310557339516, 0.03343943584973571, 0.03317824342467663, -0.4472565344015152, -0.4472565344015152, -0.49228847978634543, -0.49228847978634543, -0.3976767763424319, -0.3976767763424319, -0.38104885831283714]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: Age & Relationship (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"Age\"}}, \"yaxis\": {\"title\": {\"text\": \"Relationship\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term Age & Relationship to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [\" ?\", \" Federal-gov\", \" Local-gov\", \" Never-worked\", \" Private\", \" Self-emp-inc\", \" Self-emp-not-inc\", \" State-gov\", \" Without-pay\"], \"y\": [\" Husband\", \" Not-in-family\", \" Other-relative\", \" Own-child\", \" Unmarried\", \" Wife\"], \"z\": [[0.012527490129603719, 0.012527490129603719, 0.0041722084833064835, 0.013519094981838349, 0.01657976417147011, 0.01657976417147011, -0.08548973629638039, -0.07413997540221955, -0.07413997540221955], [-0.01073693974014681, -0.01073693974014681, -0.010081269886842024, -0.0007343833883101574, 0.0023262858013216024, 0.0023262858013216024, 0.1362266079895782, 0.0817731590108107, 0.0817731590108107], [-0.039756696676573215, -0.039756696676573215, -0.03910102682326843, -0.02975414032473658, -0.026693471135104823, -0.026693471135104823, 0.18400634378345512, 0.12955289480468768, 0.12955289480468768], [-0.040954377114560646, -0.040954377114560646, -0.04029870726125586, -0.030951820762724003, -0.027891151573092254, -0.027891151573092254, 0.18400634378345512, 0.12955289480468768, 0.12955289480468768], [-0.05514965693308772, -0.05514965693308772, -0.05514965693308772, -0.045802770434555856, -0.042742101244924086, -0.042742101244924086, 0.43793438641884097, 0.3916517233262674, 0.3916517233262674], [0.02805062909092498, 0.02805062909092498, 0.02805062909092498, -0.061381390852759066, -0.07110945818684464, -0.07110945818684464, 0.41489010452690706, 0.3686074414343334, 0.3686074414343334]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: WorkClass & Relationship (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"WorkClass\"}}, \"yaxis\": {\"title\": {\"text\": \"Relationship\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term WorkClass & Relationship to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [\" ?\", \" Federal-gov\", \" Local-gov\", \" Never-worked\", \" Private\", \" Self-emp-inc\", \" Self-emp-not-inc\", \" State-gov\", \" Without-pay\"], \"y\": [0.0, 106.5, 1448.0, 1494.5, 1576.0, 1598.0, 1609.5, 1659.5, 1670.5, 1695.5, 1730.5, 1740.5, 1836.5, 1881.5, 1894.5, 1938.0, 1975.5, 1978.5, 2001.5, 2054.0, 2218.5, 2310.5, 2403.5, 2429.5, 4356.0], \"z\": [[0.007275841993984192, 0.015361650652414613, 0.0060085535982558275, -0.001744835149131849, -0.0017306446006001295, -0.0021549152094191945, -0.008359399048478332, -0.015883463935578046, -0.01970459456227437], [-0.029017467219686094, -0.020931658561255673, -0.030284755615414452, -0.001744835149131849, -0.0017306446006001295, -0.0021549152094191945, -0.008359399048478332, -0.015883463935578046, -0.01970459456227437], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.009636825119229276, 0.0840037667231527, 0.07615646771994551, 0.07233533709324919], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.12987841884275456, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.14060317646087253, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.010197899986228949, 0.14244159726805866, 0.13459429826485148, 0.13077316763815516], [0.14060317646087253, -0.020608424445148172, -0.02996152149930695, -0.0014216010330243517, -0.0014074104844926326, 0.024333086711236816, 0.15657678399306654, 0.14872948498985936, 0.14490835436316302], [0.14060317646087253, -0.020608424445148172, -0.02996152149930695, 0.0011190334592249829, 0.0011332240077567023, 0.026873721203486155, 0.15911741848531585, 0.1512701194821087, 0.14744898885541236], [0.14060317646087253, -0.020608424445148172, -0.02996152149930695, 0.05916067867009124, 0.059355695221086, 0.08639313808302633, 0.23600705743342607, 0.22815975843021885, 0.22433862780352254], [-0.08026982391216406, -0.24148142481818474, -0.25083452187234356, 0.030893478443886922, 0.03108849499488168, 0.061111020520441775, 0.23600705743342607, 0.22815975843021885, 0.22433862780352254], [-0.10118086495192634, -0.262392465857947, -0.27174556291210583, 0.009982437404124685, 0.010177453955119441, 0.04019997948067954, 0.23600705743342607, 0.22815975843021885, 0.22433862780352254], [-0.10118086495192634, -0.262392465857947, -0.27174556291210583, 0.009982437404124685, 0.010177453955119441, 0.04019997948067954, 0.23600705743342607, 0.22815975843021885, 0.22433862780352254], [-0.12068227495403736, -0.3413617807718927, -0.35341748350325825, -0.07191029491403017, -0.07259410840669968, -0.0626723899493398, 0.1403430824699317, 0.1746326745776555, 0.17081154395095915], [-0.12068227495403736, -0.3413617807718927, -0.35341748350325825, -0.07191029491403017, -0.07259410840669968, -0.0626723899493398, 0.1403430824699317, 0.1765390144680454, 0.1727178838413491], [-0.09619701834173235, -0.31687652415958767, -0.32893222689095325, -0.04742503830172514, -0.04810885179439466, -0.0626723899493398, 0.1403430824699317, 0.1765390144680454, 0.1727178838413491], [-0.34079714771254815, -0.5616905688405404, -0.48833994265978636, 0.06427607615220254, 0.09349412050530564, 0.07098784871887305, 0.3036149699592847, 0.35840943079712734, 0.354588300170431], [-0.5150469733318973, -0.7359403944598896, -0.6625897682791356, 0.02961345001759129, 0.06387435301977266, 0.04136808123334005, 0.3036149699592847, 0.35840943079712734, 0.354588300170431], [-1.0343012866771237, -0.6356401378778025, -0.4634448267029281, 0.2532760253237697, 0.28753692832595107, 0.2650306565395184, 0.5272775452654629, 0.5855984484872855, 0.5855984484872855], [-1.8877855477964245, -1.4038961104652004, -0.7050343102669201, 0.3344838672106854, 0.4018566691039273, 0.37935039731749465, 0.641597286043439, 0.7005866554361982, 0.7005866554361982]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: WorkClass & CapitalLoss (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"WorkClass\"}}, \"yaxis\": {\"title\": {\"text\": \"CapitalLoss\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term WorkClass & CapitalLoss to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [12285.0, 34337.5, 48611.0, 66628.0, 84430.0, 98665.5, 106954.0, 114570.5, 122057.0, 131300.0, 141262.5, 149762.5, 158978.0, 166415.5, 173233.5, 178675.5, 185049.0, 190695.5, 196587.0, 203021.0, 210750.5, 219838.0, 230857.0, 243370.5, 259520.5, 279164.5, 301848.5, 329425.5, 358509.5, 409978.0, 1484705.0], \"y\": [1.0, 9.5, 10.5, 14.5, 15.5, 19.5, 20.5, 24.5, 25.5, 29.5, 30.5, 34.5, 35.5, 37.5, 38.5, 39.5, 40.5, 42.5, 44.5, 45.5, 47.5, 49.5, 50.5, 54.5, 55.5, 59.5, 60.5, 69.0, 74.5, 99.0], \"z\": [[-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [-0.0003235616707202676, -0.0030723376459328667, 0.0002349810022718136, 0.008066774614220857, 0.013089021484554045, 0.013089021484554045, 0.01026776486154948, 0.01231947070408853, 0.013303945124836474, 0.013694136474356033, 0.017367239949587544, 0.017914250670708377, 0.01740180374177976, 0.016525649247723956, 0.016525649247723956, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.015896530126684905, 0.010135923267123391, 0.01585334519586174, 0.01585334519586174, 0.013564966684726829, 0.013564966684726829, 0.015612752418566665, 0.004758043605299954, -0.027929265588360754, -0.13539643612408964, -0.13209305561894388, -0.08899018004937864], [0.0035572245250678394, 0.000808448549855241, 0.004115767198059921, 0.011947560810008962, 0.016969807680342154, 0.016969807680342154, 0.014148551057337587, 0.016200256899876635, 0.01718473132062458, 0.01757492267014414, 0.021248026145375652, 0.021795036866496482, 0.021282589937567868, 0.020406435443512064, 0.020406435443512064, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.0140167094629115, 0.019734131391649853, 0.019734131391649853, 0.017445752880514937, 0.017445752880514937, 0.019493538614354773, 0.008638829801088063, -0.02404847939257264, -0.13211475674614867, -0.1288113762410029, -0.09366545714609412], [0.0035572245250678394, 0.000808448549855241, 0.004115767198059921, 0.011947560810008962, 0.016969807680342154, 0.016969807680342154, 0.014148551057337587, 0.016200256899876635, 0.01718473132062458, 0.01757492267014414, 0.021248026145375652, 0.021795036866496482, 0.021282589937567868, 0.020406435443512064, 0.020406435443512064, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.0140167094629115, 0.019734131391649853, 0.019734131391649853, 0.017445752880514937, 0.017445752880514937, 0.019493538614354773, 0.008638829801088063, -0.02404847939257264, -0.13211475674614867, -0.1288113762410029, -0.09366545714609412], [0.0035572245250678394, 0.000808448549855241, 0.004115767198059921, 0.011947560810008962, 0.016969807680342154, 0.016969807680342154, 0.014148551057337587, 0.016200256899876635, 0.01718473132062458, 0.01757492267014414, 0.021248026145375652, 0.021795036866496482, 0.021282589937567868, 0.020406435443512064, 0.020406435443512064, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.0140167094629115, 0.019734131391649853, 0.019734131391649853, 0.017445752880514937, 0.017445752880514937, 0.019493538614354773, 0.008638829801088063, -0.02404847939257264, -0.13211475674614867, -0.1288113762410029, -0.09366545714609412], [0.0035572245250678394, 0.000808448549855241, 0.004115767198059921, 0.011947560810008962, 0.016969807680342154, 0.016969807680342154, 0.014148551057337587, 0.016200256899876635, 0.01718473132062458, 0.01757492267014414, 0.021248026145375652, 0.021795036866496482, 0.021282589937567868, 0.020406435443512064, 0.020406435443512064, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.019777316322473013, 0.0140167094629115, 0.019734131391649853, 0.019734131391649853, 0.017445752880514937, 0.017445752880514937, 0.019493538614354773, 0.008638829801088063, -0.02404847939257264, -0.13211475674614867, -0.1288113762410029, -0.09366545714609412], [-0.00032114970333027256, -0.003069925678542871, 0.00023739296966180897, 0.008069186581610856, 0.013091433451944044, 0.013091433451944044, 0.010270176828939478, 0.01232188267147853, 0.013306357092226473, 0.013696548441746033, 0.017369651916977546, 0.017916662638098376, 0.017404215709169762, 0.016528061215113955, 0.016528061215113955, 0.015898942094074903, 0.015898942094074903, 0.015898942094074903, 0.015898942094074903, 0.01013833523451339, 0.01585575716325174, 0.01585575716325174, 0.013567378652116829, 0.013567378652116829, 0.01612705118093686, 0.005788948415624353, -0.015936842006027966, -0.12400311935960402, -0.12069973885445824, -0.08555381975954945], [-0.0014718268112855577, -0.004220602786498157, -0.0009132841382934763, 0.006918509473655569, 0.01194075634398876, 0.01194075634398876, 0.009119499720984194, 0.011171205563523245, 0.01215567998427119, 0.012545871333790749, 0.016218974809022256, 0.01676598553014309, 0.016253538601214472, 0.015377384107158665, 0.015377384107158665, 0.014748264986119617, 0.014748264986119617, 0.014748264986119617, 0.014748264986119617, 0.0089876581265581, 0.01470508005529646, 0.01470508005529646, 0.012416701544161548, 0.012416701544161548, 0.014976374072981576, 0.005788948415624353, -0.015936842006027966, -0.12400311935960402, -0.12069973885445824, -0.08555381975954945], [-0.0007275305833587116, -0.004146724190547367, -0.0008394055423426868, 0.006992388069606359, 0.01201463493993955, 0.01201463493993955, 0.009193378316934984, 0.011245084159474034, 0.012229558580221978, 0.012619749929741537, 0.016292853404973048, 0.01683986412609388, 0.016327417197165264, 0.015451262703109456, 0.015451262703109456, 0.014822143582070405, 0.014822143582070405, 0.014822143582070405, 0.014822143582070405, 0.00906153672250889, 0.014778958651247249, 0.014778958651247249, 0.012490580140112336, 0.012490580140112336, 0.015050252668932364, 0.005862827011575141, -0.015862963410077178, -0.12392924076365322, -0.12062586025850745, -0.12601603690890303], [-0.0006982770326792945, -0.006400550342082206, -0.003093231693877526, 0.0047385619180715195, 0.00976080878840471, 0.00976080878840471, 0.006939552165400145, 0.008991258007939195, 0.009975732428687139, 0.010365923778206698, 0.014039027253438209, 0.01458603797455904, 0.014073591045630425, 0.013197436551574616, 0.013197436551574616, 0.012568317430535565, 0.012568317430535565, 0.012568317430535565, 0.012568317430535565, 0.01320162708479028, 0.01891904901352864, 0.01891904901352864, 0.016630670502393727, 0.016630670502393727, 0.019190343031213752, 0.010002917373856534, -0.011722873047795786, -0.11978915040137182, -0.11648576989622605, -0.12187594654662165], [-0.0006982770326792945, -0.006400550342082206, -0.003093231693877526, 0.0047385619180715195, 0.00976080878840471, 0.00976080878840471, 0.006939552165400145, 0.008991258007939195, 0.009975732428687139, 0.010365923778206698, 0.014039027253438209, 0.01458603797455904, 0.014073591045630425, 0.013197436551574616, 0.013197436551574616, 0.012568317430535565, 0.012568317430535565, 0.012568317430535565, 0.012568317430535565, 0.01320162708479028, 0.01891904901352864, 0.01891904901352864, 0.016630670502393727, 0.016630670502393727, 0.019190343031213752, 0.010002917373856534, -0.011722873047795786, -0.11978915040137182, -0.11648576989622605, -0.12187594654662165], [-0.03502828927188139, -0.03938232552991721, -0.03607500688171252, -0.02655727924447625, -0.02153503237414306, -0.02153503237414306, -0.022539383912319015, -0.020487678069779965, -0.019503203649032023, -0.019113012299512462, -0.015439908824280958, -0.014892898103160126, -0.015405345032088742, -0.01628149952614455, -0.01628149952614455, -0.0169106186471836, -0.0169106186471836, -0.0169106186471836, -0.0169106186471836, -0.014922479141994325, -0.009205057213255973, -0.009205057213255973, -0.009205057213255973, -0.009205057213255973, 0.000750699508267006, 0.0505019788976291, 0.07000009583435673, 0.21253476326510445, 0.21583814377025023, 0.21044796711985464], [-0.040989211747166056, -0.04534324800520187, -0.04203592935699718, -0.03251820171976091, -0.027495954849427715, -0.027495954849427715, -0.026275309827121028, -0.024223603984581975, -0.02323912956383403, -0.022848938214314468, -0.01917583473908297, -0.018628824017962134, -0.019141270946890748, -0.02001742544094656, -0.02001742544094656, -0.020646544561985607, -0.020646544561985607, -0.020646544561985607, -0.020646544561985607, -0.01865840505679633, -0.012940983128057977, -0.012940983128057977, -0.012940983128057977, -0.012940983128057977, -0.0029852264065350007, 0.04735943360514889, 0.06685755054187655, 0.2130452241472605, 0.21634860465240627, 0.21095842800201065], [-0.039277465728858964, -0.04363150198689477, -0.04032418333869008, -0.030806455701453815, -0.025784208831120623, -0.025784208831120623, -0.024563563808813936, -0.022511857966274883, -0.021527383545526937, -0.022826040501027316, -0.01951111237371212, -0.019075907412120688, -0.019819267629847363, -0.02069542212390317, -0.02069542212390317, -0.02132454124494222, -0.02132454124494222, -0.02132454124494222, -0.02132454124494222, -0.01933640173975295, -0.013618979811014596, -0.013618979811014596, -0.013618979811014596, -0.013618979811014596, -0.0036632230894916174, 0.046681436922192274, 0.06617955385891994, 0.21236722746430386, 0.21567060796944965, 0.210280431319054], [-0.039277465728858964, -0.04363150198689477, -0.04032418333869008, -0.030806455701453815, -0.025784208831120623, -0.025784208831120623, -0.024563563808813936, -0.022511857966274883, -0.021527383545526937, -0.022826040501027316, -0.01951111237371212, -0.019075907412120688, -0.019819267629847363, -0.02069542212390317, -0.02069542212390317, -0.02132454124494222, -0.02132454124494222, -0.02132454124494222, -0.02132454124494222, -0.01933640173975295, -0.013618979811014596, -0.013618979811014596, -0.013618979811014596, -0.013618979811014596, -0.0036632230894916174, 0.046681436922192274, 0.06617955385891994, 0.21236722746430386, 0.21567060796944965, 0.210280431319054], [-0.04015473203476592, -0.044508768292801724, -0.04120144964459704, -0.031683722007360776, -0.026661475137027584, -0.026661475137027584, -0.02544083011472089, -0.02338912427218184, -0.022404649851433898, -0.023703306806934277, -0.02038837867961908, -0.019953173718027645, -0.020696533935754324, -0.02157268842981013, -0.02157268842981013, -0.022201807550849176, -0.022201807550849176, -0.022201807550849176, -0.022201807550849176, -0.02021366804565991, -0.01449624611692156, -0.01449624611692156, -0.01449624611692156, -0.01449624611692156, -0.0045404893953985784, 0.04580417061628532, 0.06530228755301298, 0.21547688817117433, 0.2187802686763201, 0.21339009202592452], [-0.04015473203476592, -0.044508768292801724, -0.04120144964459704, -0.031683722007360776, -0.026661475137027584, -0.026661475137027584, -0.02544083011472089, -0.02338912427218184, -0.022404649851433898, -0.023703306806934277, -0.02038837867961908, -0.019953173718027645, -0.020696533935754324, -0.02157268842981013, -0.02157268842981013, -0.022201807550849176, -0.022201807550849176, -0.022201807550849176, -0.022201807550849176, -0.02021366804565991, -0.01449624611692156, -0.01449624611692156, -0.01449624611692156, -0.01449624611692156, -0.0045404893953985784, 0.04580417061628532, 0.06530228755301298, 0.21547688817117433, 0.2187802686763201, 0.21339009202592452], [-0.03946203698473001, -0.04381607324276583, -0.040508754594561144, -0.030991026957324884, -0.025968780086991685, -0.025968780086991685, -0.02474813506468499, -0.02269642922214594, -0.021711954801398, -0.023010611756898378, -0.01969568362958318, -0.019260478667991746, -0.020003838885718425, -0.020879993379774236, -0.020879993379774236, -0.021509112500813284, -0.021509112500813284, -0.021509112500813284, -0.021509112500813284, -0.01952097299562401, -0.013803551066885661, -0.013803551066885661, -0.013803551066885661, -0.013803551066885661, -0.005212433457278653, 0.04513222655440524, 0.06415264000522834, 0.21411224905925835, 0.2174156295644042, 0.21202545291400854], [-0.002627053658771071, -0.006981089916806894, -0.0036737712686022144, 0.005300335423123983, 0.01032258229345717, 0.01032258229345717, 0.011543227315763861, 0.013594933158302914, 0.014579407579050858, 0.00530655381523157, 0.006843209998791273, 0.006843209998791273, 0.006099849781064594, 0.005223695287008786, 0.005223695287008786, 0.0045945761659697375, 0.0045945761659697375, -0.01500272472744699, -0.01500272472744699, -0.013647894876512436, -0.039827522579344896, -0.06276396775892575, -0.06276396775892575, -0.06276396775892575, -0.057764592454548784, -0.0074199324428649, 0.011600481007958222, 0.16156009006198824, 0.16486347056713402, 0.15947329391673842], [0.1483061300277817, 0.1416166516229433, -0.010158468498602535, -0.008472534473315311, -0.0053401683974762205, -0.0053401683974762205, -0.004119523375169531, -0.002067817532630479, -0.0010833431118825324, -0.010356196875701818, -0.010180523227106376, -0.010180523227106376, -0.010923883444833055, -0.011800037938888858, -0.011800037938888858, -0.012429157059927906, -0.012429157059927906, -0.03202645795334464, -0.03202645795334464, -0.030671628102410087, -0.057081649059080655, -0.0800180942386615, -0.0800180942386615, -0.0800180942386615, -0.07651765227849035, -0.026172992266806472, -0.007152578815983348, 0.14280703023804664, 0.14611041074319242, 0.14132091939999378], [0.22401626876099573, 0.21732679035615732, 0.06555167023461152, 0.06723760425989873, 0.06441345322439117, 0.06441345322439117, 0.06563409824669787, 0.06563409824669787, 0.04832164093130758, -0.04637016054538119, -0.04637016054538119, -0.04637016054538119, -0.046822727331199736, -0.047616023133819865, -0.047616023133819865, -0.048245142254858916, -0.048245142254858916, -0.06784244314827566, -0.06784244314827566, -0.06648761329734111, -0.09292932364623753, -0.11586576882581835, -0.11586576882581835, -0.12772961490554438, -0.12425532061551738, -0.07391066060383349, -0.054890247153010364, 0.09506936190101963, 0.09650278716120016, 0.09171329581800151], [0.251338100730609, 0.21291994349242993, 0.06114482337088413, 0.06283075739617135, 0.05979908208660142, 0.05979908208660142, 0.06101972710890812, 0.06101972710890812, 0.04370726979351782, -0.05098453168317094, -0.05098453168317094, -0.05098453168317094, -0.051437098468989494, -0.05223039427160962, -0.046345696828827214, -0.046345696828827214, -0.046345696828827214, -0.06594299772224395, -0.06594299772224395, -0.06458816787130937, -0.09102987822020582, -0.11396632339978664, -0.11396632339978664, -0.12583016947951267, -0.12235587518948567, -0.07201121517780179, -0.052990801726978655, 0.09696880732705133, 0.09786146292385219, 0.09307197158065354], [0.2430249771192418, 0.20600735880490822, 0.05423223868336236, 0.05725379712515807, 0.054222121815588144, 0.054222121815588144, 0.06146924942825003, 0.06146924942825003, 0.044156792112859736, -0.05053500936382902, -0.05053500936382902, -0.05053500936382902, -0.050765922652627075, -0.050765922652627075, -0.025874934892408944, -0.025874934892408944, -0.025874934892408944, -0.04547223578582568, -0.04547223578582568, -0.04411740593489113, -0.09458209242092545, -0.11751853760050628, -0.11751853760050628, -0.12938238368023233, -0.1259080893902053, -0.07556342937852147, -0.05654301592769833, 0.09341659312633166, 0.09341659312633166, 0.088627101783133]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: fnlwgt & HoursPerWeek (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"fnlwgt\"}}, \"yaxis\": {\"title\": {\"text\": \"HoursPerWeek\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term fnlwgt & HoursPerWeek to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [1.0, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.0], \"y\": [\" Divorced\", \" Married-AF-spouse\", \" Married-civ-spouse\", \" Married-spouse-absent\", \" Never-married\", \" Separated\", \" Widowed\"], \"z\": [[-0.01606760867368103, -0.01606760867368103, -0.01606760867368103, -0.015786776643050796, -0.015786776643050796, 0.002871253803366775, 0.011225475907341673, 0.011908216625163726, 0.011908216625163726, 0.0017389105940194237, 0.008118875717747229, 0.015535035125349372, -0.05465035004518797, 0.2214835167017432], [-0.008709360892340347, -0.008709360892340347, -0.008709360892340347, -0.00842852886171011, -0.00842852886171011, 0.010229501584707456, 0.01858372368868235, 0.019266464406504404, 0.019266464406504404, 0.009097158375360102, 0.015477123499087909, 0.013771798958800048, -0.05930718035647436, -0.08345229902568851], [0.0007507605047105681, 0.0007507605047105681, 0.0007507605047105681, 0.0010315925353408043, 0.0010315925353408043, 0.019689622981758366, 0.028043845085733266, 0.02872658580355532, 0.02872658580355532, 0.018557279772411013, 0.017738321436587566, 0.00994116135156021, -0.0631378179637142, -0.11097964187507875], [0.006309276520329841, 0.006309276520329841, 0.006309276520329841, 0.006590108550960077, 0.006590108550960077, 0.014829366123147378, 0.023183588227122274, 0.023866328944944327, 0.023866328944944327, 0.0212714493145515, 0.020452490978728054, 0.012655330893700698, -0.06042364842157374, -0.10825145946858197], [0.023073354817526946, 0.023073354817526946, 0.023073354817526946, -0.0397150246190611, -0.0397150246190611, -0.043899671912759876, -0.043899671912759876, -0.04321693119493783, -0.04321693119493783, -0.018952420196372728, -0.011046691082756917, 0.030419911266396878, 0.31956903412983706, 0.2784116031610548], [0.017301851399437677, 0.017301851399437677, 0.017301851399437677, -0.045486528037150344, -0.045486528037150344, -0.04967117533084912, -0.04967117533084912, -0.048988434613027064, -0.048988434613027064, -0.024723923614461955, -0.016818194500846137, 0.045812918217958847, 0.337971056810044, 0.29961895561303814], [0.08703016260675644, 0.08703016260675644, 0.08703016260675644, 0.02396095113953823, 0.02396095113953823, 0.014070186758436097, 0.014070186758436097, 0.014070186758436097, 0.014070186758436097, 0.038334697757001185, 0.04624042687061699, -0.315517974851932, -0.02513706919708119, -0.11482549000052397]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: EducationNum & MaritalStatus (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"EducationNum\"}}, \"yaxis\": {\"title\": {\"text\": \"MaritalStatus\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term EducationNum & MaritalStatus to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [1.0, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.0], \"y\": [\" ?\", \" Adm-clerical\", \" Armed-Forces\", \" Craft-repair\", \" Exec-managerial\", \" Farming-fishing\", \" Handlers-cleaners\", \" Machine-op-inspct\", \" Other-service\", \" Priv-house-serv\", \" Prof-specialty\", \" Protective-serv\", \" Sales\", \" Tech-support\", \" Transport-moving\"], \"z\": [[-0.03475751514243564, -0.03475751514243564, -0.03475751514243564, -0.03595615322037499, -0.013712206973053115, -0.013712206973053115, 0.00133738338061693, -0.002339981236489154, 0.006549945008117611, 0.014967161280482321, -0.0021487242061625058, -0.00570741108811796, -0.1386765709103167, 0.014825061863874972], [-0.03450929879316859, -0.03450929879316859, -0.03450929879316859, -0.03570793687110793, -0.013463990623786063, -0.013463990623786063, 0.0015855997298839849, -0.002091764887222099, 0.006798161357384667, 0.015215377629749376, -0.0019005078568954505, -0.005459194738850905, -0.13842835456104965, -0.041704685924465065], [-0.03782561929623586, -0.03782561929623586, -0.03782561929623586, -0.03902425737417521, -0.016780311126853336, -0.016780311126853336, -0.001730720773183289, -0.005408085390289374, 0.006834212938679766, 0.015251429211044474, -0.0018644562756003494, -0.0054231431575558035, -0.13149256046108554, -0.03476889182450095], [-0.03782561929623586, -0.03782561929623586, -0.03782561929623586, -0.03902425737417521, -0.016780311126853336, -0.016780311126853336, -0.001730720773183289, -0.005408085390289374, 0.006834212938679766, 0.015251429211044474, -0.0018644562756003494, -0.0054231431575558035, -0.13149256046108554, -0.03476889182450095], [-0.02068360141561438, -0.02068360141561438, -0.02068360141561438, -0.021882239493553727, 0.0003617067537681428, 0.0003617067537681428, -0.004312213541957284, -0.007989578159063367, 0.005686636042111042, 0.016991742465750703, 0.009996713378371685, 0.013478981227598934, 0.001624757518137232, 0.09834842615472186], [-0.020426483020475325, -0.020426483020475325, -0.020426483020475325, -0.021625121098414673, 0.0006188251489071951, 0.0006188251489071951, -0.004055095146818231, -0.007732459763924312, 0.004066656969863158, 0.01537176339350282, 0.0083767343061238, 0.007765438962047321, -0.004068265398037765, 0.09265540323854685], [-0.017747906797538196, -0.017747906797538196, -0.017747906797538196, -0.018946544875477544, 0.003297401371844332, 0.003297401371844332, -0.0013765189238811007, -0.005053883540987181, 0.003719939689788801, 0.015025046113428465, 0.008030017026049446, 0.006822116843173482, 0.008594205791132164, 0.10531787442771677], [-0.01847728623503683, -0.01847728623503683, -0.01773633829968439, -0.018934976377623734, 0.0033089698696981405, 0.0033089698696981405, -0.0013649504260272922, -0.005042315043133372, 0.0037315081876426095, 0.015036614611282272, 0.008041585523903255, 0.0068336853410272905, 0.009550910021682728, 0.10627457865826735], [-0.02277680580060457, -0.02277680580060457, -0.02203585786525213, -0.023234495943191474, -0.0009905496958696066, -0.0009905496958696066, -0.0056644699915950345, -0.009341834608701114, -0.0005680113779251343, 0.010737095045714531, 0.007045186065787825, 0.005837285882911861, 0.009853478483437695, 0.10120332159647179], [-0.02277680580060457, -0.02277680580060457, -0.02203585786525213, -0.023234495943191474, -0.0009905496958696066, -0.0009905496958696066, -0.0056644699915950345, -0.009341834608701114, -0.0005680113779251343, 0.010737095045714531, 0.007045186065787825, 0.005837285882911861, 0.009853478483437695, 0.10120332159647179], [0.024038106656374705, 0.024038106656374705, 0.024779054591727148, 0.0235804165137878, 0.03673341515114988, 0.03673341515114988, -0.004360576124456265, -0.008037940741562343, -0.001176661751590917, 0.010128444672048747, 0.006436535692122041, 0.005228635509246078, 0.00924482810977191, 0.006123924291143881], [0.012076227971922412, 0.012076227971922412, 0.012817175907274856, 0.011618537829335505, 0.024771536466697587, 0.024771536466697587, -0.016322454808908562, -0.004469655917165248, 0.002391623072806181, 0.013696729496445847, 0.03448644059323613, 0.033278540410360165, 0.03725049791968878, -0.0710778127732169], [0.03779427183554852, 0.03779427183554852, 0.03853521977090096, 0.03733658169296161, 0.026646374163138125, 0.026646374163138125, -0.025675182262080317, -0.013822383370337001, -0.006961104380365576, 0.004717312515684523, 0.0319957363633489, 0.03078783618047294, -0.15235833562737391, -0.37580255657411415], [0.11712557573060374, 0.11712557573060374, 0.1178665236659562, 0.1178665236659562, 0.10506768566695386, 0.10506768566695386, 0.05274612924173543, 0.06459892813347874, 0.02226758323517908, -0.02762607874819394, -0.0003476549005295678, -0.0015555550834055317, -0.18470172689125244, -0.5558401491998737], [0.11712557573060374, 0.11712557573060374, 0.1178665236659562, 0.1178665236659562, 0.10447112569865939, 0.10447112569865939, 0.05214956927344097, 0.06400236816518427, -0.23968316817212565, -0.559870798012467, -0.5325923741648025, -0.5338002743476785, -0.7169464461555253, -1.0880848684641466]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: EducationNum & Occupation (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"EducationNum\"}}, \"yaxis\": {\"title\": {\"text\": \"Occupation\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term EducationNum & Occupation to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [\" Divorced\", \" Married-AF-spouse\", \" Married-civ-spouse\", \" Married-spouse-absent\", \" Never-married\", \" Separated\", \" Widowed\"], \"y\": [1.0, 9.5, 10.5, 14.5, 15.5, 19.5, 20.5, 24.5, 25.5, 29.5, 30.5, 34.5, 35.5, 37.5, 38.5, 39.5, 40.5, 42.5, 44.5, 45.5, 47.5, 49.5, 50.5, 54.5, 55.5, 59.5, 60.5, 69.0, 74.5, 99.0], \"z\": [[-0.09222426758168906, 0.08633065485969488, 0.08633065485969488, 0.0538726311231989, -0.024527550121710814, -0.059838851868294504, -0.05813752996535891], [-0.09222426758168906, 0.08633065485969488, 0.08633065485969488, 0.0538726311231989, -0.024527550121710814, -0.059838851868294504, -0.05813752996535891], [-0.09591008594527335, 0.08264483649611058, 0.08264483649611058, 0.0538726311231989, -0.024527550121710814, -0.059838851868294504, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.06266758807989363, -0.05813752996535891], [-0.12877375953935496, 0.04978116290202898, 0.04978116290202898, 0.029364116121893862, -0.041262097463600836, -0.05484975539580915, -0.05031969728127443], [-0.031042428767792573, 0.04834727608624757, 0.04834727608624757, 0.027930229306112463, -0.034162723265757755, -0.04775038119796607, -0.04322032308343135], [-0.024145807935306917, 0.026521711864168677, 0.026521711864168677, 0.00890318995157794, 0.02572500046441463, 0.1969028019646821, 0.2014328600792168], [0.17717590017356408, -0.016176439030604606, -0.016176439030604606, -0.03016759763092104, -0.010796695724073432, 0.16038110577619402, 0.16491116389072877], [0.20838664745003643, -0.017483631426461314, -0.017483631426461314, -0.03147479002677775, -0.010796695724073432, 0.16038110577619402, 0.16491116389072877], [0.2097891892589725, -0.017483631426461314, -0.017483631426461314, 0.018755523550708926, 0.11458648290104138, 0.28576428440130885, 0.29029434251584363], [0.2097891892589725, -0.017483631426461314, -0.017483631426461314, 0.018755523550708926, 0.11458648290104138, 0.28576428440130885, 0.29029434251584363], [0.2120254739036098, -0.01734998143650422, -0.01734998143650422, 0.01888917354066602, 0.11472013289099847, 0.28168453251106823, 0.28621459062560295], [0.21502318922412025, -0.01656993280802885, -0.01656993280802885, 0.01966922216914139, 0.11550018151947386, 0.2824645811395436, 0.22394657264196424], [0.21357416447145405, -0.018018957560695072, -0.018018957560695072, 0.022426264796301144, 0.11849617348460763, 0.2854605731046773, 0.22694256460709797], [0.21272437549419043, -0.018868746537958694, -0.018868746537958694, 0.03538413686039313, 0.1314540455486996, 0.2984184451687693, 0.23990043667118996], [0.21272437549419043, -0.018868746537958694, -0.018868746537958694, 0.03538413686039313, 0.1314540455486996, 0.2984184451687693, 0.23990043667118996], [0.22229062693895377, -0.009302495093195345, -0.009302495093195345, 0.04495038830515649, 0.041790885978745966, 0.20962134942261146, 0.15011504268928097]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: MaritalStatus & HoursPerWeek (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"MaritalStatus\"}}, \"yaxis\": {\"title\": {\"text\": \"HoursPerWeek\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term MaritalStatus & HoursPerWeek to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [\" ?\", \" Adm-clerical\", \" Armed-Forces\", \" Craft-repair\", \" Exec-managerial\", \" Farming-fishing\", \" Handlers-cleaners\", \" Machine-op-inspct\", \" Other-service\", \" Priv-house-serv\", \" Prof-specialty\", \" Protective-serv\", \" Sales\", \" Tech-support\", \" Transport-moving\"], \"y\": [1.0, 9.5, 10.5, 14.5, 15.5, 19.5, 20.5, 24.5, 25.5, 29.5, 30.5, 34.5, 35.5, 37.5, 38.5, 39.5, 40.5, 42.5, 44.5, 45.5, 47.5, 49.5, 50.5, 54.5, 55.5, 59.5, 60.5, 69.0, 74.5, 99.0], \"z\": [[-0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.016117300456364517, -0.01609750428903187, -0.0024643688470911305, -0.0024643688470911305, -0.0024643688470911305, -0.00029468949324136995, 0.025507112708701214, 0.025507112708701214, 0.0009256558601323298, 0.04690042747605119, 0.7437675966924395], [-0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.016117300456364517, -0.01609750428903187, -0.0024643688470911305, -0.0024643688470911305, -0.0024643688470911305, -0.00029468949324136995, 0.025507112708701214, 0.025507112708701214, 0.0009256558601323298, 0.04690042747605119, 0.002449863666931253], [-0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.016117300456364517, -0.01609750428903187, -0.0024643688470911305, -0.0024643688470911305, -0.0024643688470911305, -0.00029468949324136995, 0.025507112708701214, 0.025507112708701214, 0.0009256558601323298, 0.04690042747605119, 0.002449863666931253], [-0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.016117300456364517, -0.01609750428903187, -0.0024643688470911305, -0.0024643688470911305, -0.0024643688470911305, -0.00029468949324136995, 0.025507112708701214, 0.025507112708701214, 0.0009256558601323298, 0.04690042747605119, 0.002449863666931253], [-0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.01604449996350706, -0.016117300456364517, -0.01609750428903187, -0.0024643688470911305, -0.0024643688470911305, -0.0024643688470911305, -0.00029468949324136995, 0.025507112708701214, 0.025507112708701214, 0.0009256558601323298, 0.04690042747605119, 0.002449863666931253], [-0.015896699690877408, -0.015896699690877408, -0.015896699690877408, -0.015896699690877408, -0.015969500183734865, -0.01594970401640222, -0.0023165685744614773, -0.0023165685744614773, -0.002339751777630703, -0.00017007242378094312, 0.02563172977816164, 0.02563172977816164, 0.001050272929592755, 0.045696128063001676, 0.0012455642538817392], [-0.015896699690877408, -0.015896699690877408, -0.015896699690877408, -0.015896699690877408, -0.015969500183734865, -0.01594970401640222, -0.0023165685744614773, -0.0023165685744614773, -0.002339751777630703, -0.00017007242378094312, 0.02563172977816164, 0.02563172977816164, 0.001050272929592755, 0.045696128063001676, 0.0012455642538817392], [-0.015896699690877408, -0.015896699690877408, -0.015896699690877408, -0.015896699690877408, -0.015969500183734865, -0.01594970401640222, -0.0023165685744614773, -0.0023165685744614773, -0.002339751777630703, -0.00017007242378094312, 0.02563172977816164, 0.02563172977816164, 0.001050272929592755, 0.045696128063001676, 0.0012455642538817392], [-0.008892391757920611, -0.008892391757920611, -0.008892391757920611, -0.008892391757920611, -0.008965192250778067, -0.008945396083445419, 0.004687739358495323, 0.004687739358495323, 0.004664556155326097, 0.006834235509175857, 0.032636037711118455, 0.032636037711118455, 0.008054580862549557, 0.045696128063001676, 0.0012455642538817392], [-0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008722085375864611, -0.008702289208531963, 0.004930846233408779, 0.004930846233408779, 0.0049076630302395535, 0.007077342384089313, 0.03287914458603191, 0.03287914458603191, 0.008297687737463014, 0.045696128063001676, 0.0012455642538817392], [-0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008722085375864611, -0.008702289208531963, 0.004930846233408779, 0.004930846233408779, 0.0049076630302395535, 0.007077342384089313, 0.03287914458603191, 0.03287914458603191, 0.008297687737463014, 0.004687593489187831, -0.039762970319932096], [-0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008722085375864611, -0.008702289208531963, 0.004930846233408779, 0.004930846233408779, 0.0049076630302395535, 0.007077342384089313, 0.03287914458603191, 0.03287914458603191, 0.008297687737463014, 0.004687593489187831, -0.039762970319932096], [-0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008722085375864611, -0.008702289208531963, 0.004930846233408779, 0.004930846233408779, 0.0049076630302395535, 0.007077342384089313, 0.03287914458603191, 0.03287914458603191, 0.008297687737463014, 0.004687593489187831, -0.039762970319932096], [-0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008722085375864611, -0.008702289208531963, 0.004930846233408779, 0.004930846233408779, 0.0049076630302395535, 0.007077342384089313, 0.03287914458603191, 0.03287914458603191, 0.008297687737463014, 0.004687593489187831, -0.039762970319932096], [-0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008722085375864611, -0.008702289208531963, 0.004930846233408779, 0.004930846233408779, 0.0049076630302395535, 0.007077342384089313, 0.03287914458603191, 0.03287914458603191, 0.008297687737463014, 0.004687593489187831, -0.039762970319932096], [-0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008649284883007155, -0.008722085375864611, -0.008702289208531963, 0.004930846233408779, 0.004930846233408779, 0.0049076630302395535, 0.007077342384089313, 0.03287914458603191, 0.03287914458603191, 0.008297687737463014, 0.004687593489187831, -0.039762970319932096], [-0.009876060713690847, -0.009876060713690847, -0.009876060713690847, -0.009876060713690847, -0.009948861206548303, -0.009929065039215654, 0.003704070402725086, 0.003704070402725086, 0.0036808871995558604, 0.005850566553405621, 0.031652368755348215, 0.034164473114800704, 0.020485534474642665, 0.01687544022636748, -0.027575123582752454], [-0.009876060713690847, -0.009876060713690847, -0.009876060713690847, -0.009876060713690847, -0.009948861206548303, -0.009929065039215654, 0.003704070402725086, 0.003704070402725086, 0.0036808871995558604, 0.005850566553405621, 0.031652368755348215, 0.034164473114800704, 0.020485534474642665, 0.01687544022636748, -0.027575123582752454], [0.02326114841623136, 0.02326114841623136, -0.004147102718741696, -0.004147102718741696, -0.004219903211599152, -0.01172268383464152, 0.0019104516072992197, 0.0019104516072992197, 0.001887268404129993, 0.004056947757979754, 0.019235977606424873, 0.021748081965877363, 0.010395181404315869, 0.007471758777079972, -0.03697880503203995], [0.06545137595193447, 0.06545137595193447, 0.030160427023604722, 0.030160427023604722, 0.03008762653074727, -0.008314914033894696, -0.023714209439215112, -0.023714209439215112, -0.023737392642384336, -0.022301747528202485, -0.020452291638648888, -0.017940187279196395, -0.02756029712025693, -0.030483719747492834, -0.07493428355661275], [0.06657342723774017, 0.06657342723774017, 0.03128247830941042, 0.03128247830941042, 0.031209677816552962, -0.009422430746537737, -0.024821726151858153, -0.024821726151858153, -0.024844909355027377, -0.023409264240845527, -0.021637484625915672, -0.019125380266463182, -0.027499974833892358, -0.030423397461128262, -0.07487396127024816], [0.0700347771610241, 0.0700347771610241, 0.03474382823269436, 0.03474382823269436, 0.03467102773983691, -0.005961080823253799, -0.021360376228574215, -0.021360376228574215, -0.02138355943174344, -0.025695038804925917, -0.025982557792796936, -0.023470453433344442, -0.03184504800077362, -0.03476847062800952, -0.07921903443712944], [0.06985148135389004, 0.06985148135389004, 0.03456053242556031, 0.03456053242556031, 0.03448773193270285, -0.006144376630387855, -0.02154367203570827, -0.02154367203570827, -0.021566855238877497, -0.026039177798616694, -0.030595727018733105, -0.028083622659280615, -0.03627492141957575, -0.03919834404681164, -0.08364890785593156], [0.07538292343579661, 0.07538292343579661, 0.04009197450746689, 0.04009197450746689, 0.04001917401460943, -0.0006129345484812739, -0.01601222995380169, -0.01601222995380169, -0.016035413156970914, -0.020507735716710117, -0.030595727018733105, -0.028083622659280615, -0.03627492141957575, -0.03919834404681164, -0.08364890785593156], [0.09243860734441968, 0.09243860734441968, 0.057147658416089965, 0.057147658416089965, 0.06300186292242405, 0.02236975435933335, 0.006970458954012931, 0.006970458954012931, 0.006947275750843703, -0.013110789789599984, -0.033825330362073754, -0.031313226002621264, -0.0395045247629164, -0.0424279473901523, -0.0868785111992722], [0.0868684637075006, 0.0868684637075006, 0.051577514779170885, 0.051577514779170885, 0.05743171928550498, 0.016799610722414267, 0.0014003153170938471, 0.0014003153170938471, 0.0013771321139246205, -0.023355414441157584, -0.04406995501363136, -0.04155785065417887, -0.04501489550513709, -0.04793831813237298, -0.09155299221391072], [0.06989331015189842, 0.06989331015189842, 0.034602361223568696, 0.034602361223568696, 0.04542117014713505, 0.004789061584044343, -0.010610233821276075, -0.010610233821276075, -0.0106334170244453, -0.0353659635795275, -0.056080504152001276, -0.053568399792548786, -0.05702544464350701, -0.059948867270742896, -0.09093292438702939], [-0.01401207284681194, -0.01401207284681194, -0.04930302177514168, -0.04930302177514168, -0.03848421285157534, -0.079116321414666, -0.09451561681998644, -0.09451561681998644, -0.09453880002315565, -0.11927134657823786, -0.13998588715071164, -0.049090689167413645, 0.24655695396107347, 0.26997298866317887, 0.30665351803377927], [-0.0712484282717104, -0.0712484282717104, -0.10653937720004016, -0.10653937720004016, -0.09572056827647381, -0.13679218386443723, -0.15219147926975768, -0.17031679929000068, -0.1703399824931699, -0.20236598789621804, -0.22308052846869186, -0.13218533048539377, 0.38387180509240754, 0.40728783979451294, 0.46179442273530236]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: Occupation & HoursPerWeek (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"Occupation\"}}, \"yaxis\": {\"title\": {\"text\": \"HoursPerWeek\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term Occupation & HoursPerWeek to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"x\": [\" Husband\", \" Not-in-family\", \" Other-relative\", \" Own-child\", \" Unmarried\", \" Wife\"], \"y\": [1.0, 9.5, 10.5, 14.5, 15.5, 19.5, 20.5, 24.5, 25.5, 29.5, 30.5, 34.5, 35.5, 37.5, 38.5, 39.5, 40.5, 42.5, 44.5, 45.5, 47.5, 49.5, 50.5, 54.5, 55.5, 59.5, 60.5, 69.0, 74.5, 99.0], \"z\": [[-0.12220615636666252, -0.12838018185028516, -0.12838018185028516, -0.12832123207519786, -0.12819702967241708, 0.2002196001732158], [-0.12220615636666252, -0.12838018185028516, -0.12838018185028516, -0.12832123207519786, -0.12819702967241708, 0.2002196001732158], [-0.12220615636666252, -0.12838018185028516, -0.12838018185028516, -0.12832123207519786, -0.12819702967241708, 0.2002196001732158], [-0.12220615636666252, -0.12838018185028516, -0.12838018185028516, -0.12832123207519786, -0.12819702967241708, 0.2002196001732158], [-0.12220615636666252, -0.12838018185028516, -0.12838018185028516, -0.12832123207519786, -0.12819702967241708, 0.2002196001732158], [-0.09404063206819054, -0.10021465755181318, -0.10021465755181318, -0.10015570777672587, -0.10003150537394512, 0.2002196001732158], [-0.07410912295992489, -0.08028314844354753, -0.08028314844354753, -0.08022419866846021, -0.0800999962656795, 0.1936164428425478], [-0.07410912295992489, -0.08028314844354753, -0.08028314844354753, -0.08022419866846021, -0.0800999962656795, 0.1936164428425478], [-0.07410912295992489, -0.08028314844354753, -0.08028314844354753, -0.08022419866846021, -0.0800999962656795, 0.1936164428425478], [-0.06725469842994657, -0.07342872391356921, -0.07342872391356921, -0.07336977413848189, -0.07324557173570116, 0.1936164428425478], [-0.013896483743949443, -0.02007050922757208, -0.02007050922757208, -0.020011559452484763, -0.01988735704970404, 0.18482047308977045], [-0.013896483743949443, -0.02007050922757208, -0.02007050922757208, -0.020011559452484763, -0.01988735704970404, 0.18482047308977045], [0.01130920258680623, 0.0051351771031836, 0.0051351771031836, 0.005194126878270915, 0.005318329281051647, 0.035603223465813655], [0.018867297740285012, 0.012693272256662383, 0.012693272256662383, 0.012752222031749697, 0.01287642443453043, 0.010390634269500501], [0.018867297740285012, 0.012693272256662383, 0.012693272256662383, 0.012752222031749697, 0.01287642443453043, 0.010390634269500501], [0.018867297740285012, 0.012693272256662383, 0.012693272256662383, 0.012752222031749697, 0.01287642443453043, 0.010390634269500501], [0.018867297740285012, 0.012693272256662383, 0.012693272256662383, 0.012752222031749697, 0.01287642443453043, 0.010390634269500501], [0.021573541468721057, 0.017481884832704398, 0.017481884832704398, 0.01754083460779171, 0.017665037010572444, -0.135566032188687], [0.021573541468721057, 0.017481884832704398, 0.017481884832704398, 0.01754083460779171, 0.017665037010572444, -0.135566032188687], [0.014771212649292523, 0.02136969578958347, 0.02136969578958347, 0.021428645564670782, 0.023229211725501825, -0.13000185747375761], [0.014771212649292523, 0.02136969578958347, 0.02136969578958347, 0.021428645564670782, 0.023229211725501825, -0.13000185747375761], [0.014771212649292523, 0.032282692555058334, 0.032282692555058334, 0.03234164233014565, 0.03414220849097669, -0.11908886070828278], [0.014771212649292523, 0.032282692555058334, 0.032282692555058334, 0.03234164233014565, 0.03414220849097669, -0.11908886070828278], [0.021146946220858626, 0.038658426126624436, 0.038658426126624436, 0.038717375901711745, 0.040517942062542785, -0.24334854649233292], [0.034573198774080174, 0.05208467867984598, 0.05208467867984598, 0.05214362845493328, 0.07274205546110402, -0.2245506856469933], [0.03148882059142801, 0.04900030049719381, 0.04900030049719381, 0.04905925027228112, 0.08570344288221873, -0.9153719462685926], [0.03148882059142801, 0.04900030049719381, 0.04900030049719381, 0.04905925027228112, 0.08570344288221873, -0.9153719462685926], [0.05094270995948052, 0.06791887548166231, 0.06791887548166231, 0.06791887548166231, 0.10237454907356963, -1.320779438838077], [0.05933896815867011, 0.05671366440985153, 0.05671366440985153, 0.05671366440985153, 0.09116933800175889, -1.4011183850422961]], \"zmax\": 7.418568412306603, \"zmin\": -5.01598250430514, \"type\": \"heatmap\"}], \"layout\": {\"title\": {\"text\": \"Term: Relationship & HoursPerWeek (interaction)\"}, \"xaxis\": {\"title\": {\"text\": \"Relationship\"}}, \"yaxis\": {\"title\": {\"text\": \"HoursPerWeek\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"The contribution (score) of the term Relationship & HoursPerWeek to predictions made by the model. For classification, scores are on a log scale (logits). For regression, scores are on the same scale as the outcome being predicted (e.g., dollars when predicting cost). Each graph is centered vertically such that average prediction on the train set is 0.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}], \"selector\": {\"columns\": [\"Name\", \"Type\", \"# Unique\", \"% Non-zero\"], \"data\": [{\"Name\": \"Age\", \"Type\": \"continuous\", \"# Unique\": 73.0, \"% Non-zero\": 1.0}, {\"Name\": \"WorkClass\", \"Type\": \"categorical\", \"# Unique\": 9.0, \"% Non-zero\": 1.0}, {\"Name\": \"fnlwgt\", \"Type\": \"continuous\", \"# Unique\": 17521.0, \"% Non-zero\": 1.0}, {\"Name\": \"Education\", \"Type\": \"categorical\", \"# Unique\": 16.0, \"% Non-zero\": 1.0}, {\"Name\": \"EducationNum\", \"Type\": \"continuous\", \"# Unique\": 16.0, \"% Non-zero\": 1.0}, {\"Name\": \"MaritalStatus\", \"Type\": \"categorical\", \"# Unique\": 7.0, \"% Non-zero\": 1.0}, {\"Name\": \"Occupation\", \"Type\": \"categorical\", \"# Unique\": 15.0, \"% Non-zero\": 1.0}, {\"Name\": \"Relationship\", \"Type\": \"categorical\", \"# Unique\": 6.0, \"% Non-zero\": 1.0}, {\"Name\": \"Race\", \"Type\": \"categorical\", \"# Unique\": 5.0, \"% Non-zero\": 1.0}, {\"Name\": \"Gender\", \"Type\": \"categorical\", \"# Unique\": 2.0, \"% Non-zero\": 1.0}, {\"Name\": \"CapitalGain\", \"Type\": \"continuous\", \"# Unique\": 116.0, \"% Non-zero\": 0.082}, {\"Name\": \"CapitalLoss\", \"Type\": \"continuous\", \"# Unique\": 84.0, \"% Non-zero\": 0.047}, {\"Name\": \"HoursPerWeek\", \"Type\": \"continuous\", \"# Unique\": 92.0, \"% Non-zero\": 1.0}, {\"Name\": \"NativeCountry\", \"Type\": \"categorical\", \"# Unique\": 41.0, \"% Non-zero\": 1.0}, {\"Name\": \"Age & fnlwgt\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"Age & Relationship\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"WorkClass & Relationship\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"WorkClass & CapitalLoss\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"fnlwgt & HoursPerWeek\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"EducationNum & MaritalStatus\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"EducationNum & Occupation\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"MaritalStatus & HoursPerWeek\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"Occupation & HoursPerWeek\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}, {\"Name\": \"Relationship & HoursPerWeek\", \"Type\": \"interaction\", \"# Unique\": NaN, \"% Non-zero\": NaN}]}}, -1);\n",
+              "    });\n",
+              "\n",
+              "    </script>\n",
+              "    "
+            ],
+            "text/plain": [
+              "<IPython.core.display.HTML object>"
             ]
           },
           "metadata": {},
@@ -335,6 +374,10 @@
         }
       ],
       "source": [
+        "from interpret.provider import InlineProvider\n",
+        "from interpret import set_visualize_provider\n",
+        "set_visualize_provider(InlineProvider())\n",
+        "\n",
         "global_explanation = model.explain_global()\n",
         "show(global_explanation)"
       ]
@@ -353,7 +396,7 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 7,
+      "execution_count": 8,
       "metadata": {},
       "outputs": [],
       "source": [
@@ -363,14 +406,47 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 8,
+      "execution_count": 9,
       "metadata": {},
       "outputs": [
         {
           "data": {
             "text/html": [
-              "<!-- http://127.0.0.1:7001/140319797370000/ -->\n",
-              "<iframe src=\"http://127.0.0.1:7001/140319797370000/\" width=100% height=800 frameBorder=\"0\"></iframe>"
+              "\n",
+              "    <div id=\"_interpret-viz-84490a56-8749-4714-bf18-21eebadf8207\"></div>\n",
+              "    <script defer type=\"text/javascript\">\n",
+              "\n",
+              "    (function universalLoad(root, callback) {\n",
+              "      if(typeof exports === 'object' && typeof module === 'object') {\n",
+              "        // CommonJS2\n",
+              "        console.log(\"CommonJS2\");\n",
+              "        var interpretInline = require('interpret-inline');\n",
+              "        callback(interpretInline);\n",
+              "      } else if(typeof define === 'function' && define.amd) {\n",
+              "        // AMD\n",
+              "        console.log(\"AMD\");\n",
+              "        require(['interpret-inline'], function(interpretInline) {\n",
+              "          callback(interpretInline);\n",
+              "        });\n",
+              "      } else if(typeof exports === 'object') {\n",
+              "        // CommonJS\n",
+              "        console.log(\"CommonJS\");\n",
+              "        var interpretInline = require('interpret-inline');\n",
+              "        callback(interpretInline);\n",
+              "      } else {\n",
+              "        // Browser\n",
+              "        console.log(\"Browser\");\n",
+              "        callback(root['interpret-inline']);\n",
+              "      }\n",
+              "    })(this, function(interpretInline) {\n",
+              "        interpretInline.RenderApp(\"_interpret-viz-84490a56-8749-4714-bf18-21eebadf8207\", {\"name\": \"ExplainableBoostingClassifier_2\", \"overall\": {\"type\": \"none\", \"figure\": \"null\", \"help\": {}}, \"specific\": [{\"type\": \"plotly\", \"figure\": {\"data\": [{\"marker\": {\"color\": [\"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#808080\"]}, \"orientation\": \"h\", \"x\": [-0.04763501004291311, 0.051577514779170885, -0.0659189068050283, 0.08350923360071322, -0.08548973629638039, -0.09525096415256881, 0.10467809151484259, 0.14788531277983274, 0.1483061300277817, -0.23532632378161158, 0.28576618861134384, -0.3812548505954946, 0.3853123062265204, 0.4305983924414849, 0.6370688812559946, -2.4317647518885637], \"y\": [\"CapitalLoss (0.00)\", \"Occupation & HoursPerWeek\", \"Occupation ( Craft-repair)\", \"Age (33.00)\", \"WorkClass & Relationship\", \"EducationNum (10.00)\", \"Education ( Some-college)\", \"fnlwgt (24504.00)\", \"fnlwgt & HoursPerWeek\", \"CapitalGain (0.00)\", \"Gender ( Male)\", \"WorkClass ( Self-emp-not-inc)\", \"HoursPerWeek (60.00)\", \"Relationship ( Husband)\", \"MaritalStatus ( Married-civ-spouse)\", \"Intercept\"], \"type\": \"bar\"}], \"layout\": {\"title\": {\"text\": \"Local Explanation (Actual Class:  <=50K | Predicted Class:  <=50K<br />Pr(y =  <=50K): 0.720 | Pr(y = 0): 0.720)\"}, \"xaxis\": {\"range\": [-2.4317647518885637, 2.4317647518885637], \"title\": {\"text\": \"Contribution to Prediction\"}}, \"yaxis\": {\"automargin\": true, \"dtick\": 1, \"title\": {\"text\": \"\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"A local explanation shows the breakdown of how much each term contributed to the prediction for a single sample. The intercept reflects the average case. In regression, the intercept is the average y-value of the train set (e.g., $5.51 if predicting cost). In classification, the intercept is the log of the base rate (e.g., -2.3 if the base rate is 10%). The 15 most important terms are shown.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"marker\": {\"color\": [\"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#1f77b4\", \"#808080\"]}, \"orientation\": \"h\", \"x\": [-0.04763501004291311, 0.0817731590108107, -0.09525096415256881, 0.10467809151484259, -0.12838018185028516, -0.1952345931931279, 0.21370015159929565, -0.23532632378161158, -0.23551429138595842, 0.28576618861134384, -0.3235704609693773, 0.4217552260145598, -0.6898027485559215, -1.072962281922137, -1.3725245371818362, -2.4317647518885637], \"y\": [\"CapitalLoss (0.00)\", \"WorkClass & Relationship\", \"EducationNum (10.00)\", \"Education ( Some-college)\", \"Relationship & HoursPerWeek\", \"WorkClass ( State-gov)\", \"fnlwgt (156773.00)\", \"CapitalGain (0.00)\", \"Relationship ( Not-in-family)\", \"Gender ( Male)\", \"NativeCountry ( ?)\", \"Occupation ( Prof-specialty)\", \"MaritalStatus ( Never-married)\", \"HoursPerWeek (15.00)\", \"Age (22.00)\", \"Intercept\"], \"type\": \"bar\"}], \"layout\": {\"title\": {\"text\": \"Local Explanation (Actual Class:  <=50K | Predicted Class:  <=50K<br />Pr(y =  <=50K): 0.997 | Pr(y = 0): 0.997)\"}, \"xaxis\": {\"range\": [-2.4317647518885637, 2.4317647518885637], \"title\": {\"text\": \"Contribution to Prediction\"}}, \"yaxis\": {\"automargin\": true, \"dtick\": 1, \"title\": {\"text\": \"\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"A local explanation shows the breakdown of how much each term contributed to the prediction for a single sample. The intercept reflects the average case. In regression, the intercept is the average y-value of the train set (e.g., $5.51 if predicting cost). In classification, the intercept is the log of the base rate (e.g., -2.3 if the base rate is 10%). The 15 most important terms are shown.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"marker\": {\"color\": [\"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#808080\"]}, \"orientation\": \"h\", \"x\": [0.03259998256013297, 0.03453471678277774, -0.04763501004291311, 0.0495109942022031, 0.04978116290202898, 0.0599923831648711, -0.09752205646373296, -0.23532632378161158, 0.26074233540544267, 0.28576618861134384, -0.2985611115449629, 0.4305983924414849, 0.6370688812559946, -0.8065943614463503, -0.8337074655791255, -2.4317647518885637], \"y\": [\"Race ( White)\", \"NativeCountry ( United-States)\", \"CapitalLoss (0.00)\", \"WorkClass ( Private)\", \"MaritalStatus & HoursPerWeek\", \"Age (30.00)\", \"HoursPerWeek (37.00)\", \"CapitalGain (0.00)\", \"fnlwgt (229051.00)\", \"Gender ( Male)\", \"EducationNum (5.00)\", \"Relationship ( Husband)\", \"MaritalStatus ( Married-civ-spouse)\", \"Occupation ( Other-service)\", \"Education ( 9th)\", \"Intercept\"], \"type\": \"bar\"}], \"layout\": {\"title\": {\"text\": \"Local Explanation (Actual Class:  <=50K | Predicted Class:  <=50K<br />Pr(y =  <=50K): 0.948 | Pr(y = 0): 0.948)\"}, \"xaxis\": {\"range\": [-2.4317647518885637, 2.4317647518885637], \"title\": {\"text\": \"Contribution to Prediction\"}}, \"yaxis\": {\"automargin\": true, \"dtick\": 1, \"title\": {\"text\": \"\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"A local explanation shows the breakdown of how much each term contributed to the prediction for a single sample. The intercept reflects the average case. In regression, the intercept is the average y-value of the train set (e.g., $5.51 if predicting cost). In classification, the intercept is the log of the base rate (e.g., -2.3 if the base rate is 10%). The 15 most important terms are shown.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"marker\": {\"color\": [\"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#808080\"]}, \"orientation\": \"h\", \"x\": [-0.04763501004291311, 0.04905925027228112, 0.051577514779170885, 0.0599923831648711, -0.0659189068050283, -0.09525096415256881, 0.10467809151484259, 0.12946492134812512, 0.18400634378345512, -0.23532632378161158, 0.28576618861134384, -0.36969242471430175, -0.3812548505954946, 0.3853123062265204, -0.8478420864729896, -2.4317647518885637], \"y\": [\"CapitalLoss (0.00)\", \"Relationship & HoursPerWeek\", \"Occupation & HoursPerWeek\", \"Age (30.00)\", \"Occupation ( Craft-repair)\", \"EducationNum (10.00)\", \"Education ( Some-college)\", \"fnlwgt (176185.00)\", \"WorkClass & Relationship\", \"CapitalGain (0.00)\", \"Gender ( Male)\", \"MaritalStatus ( Married-spouse-absent)\", \"WorkClass ( Self-emp-not-inc)\", \"HoursPerWeek (60.00)\", \"Relationship ( Own-child)\", \"Intercept\"], \"type\": \"bar\"}], \"layout\": {\"title\": {\"text\": \"Local Explanation (Actual Class:  >50K | Predicted Class:  <=50K<br />Pr(y =  <=50K): 0.960 | Pr(y = 1): 0.040)\"}, \"xaxis\": {\"range\": [-2.4317647518885637, 2.4317647518885637], \"title\": {\"text\": \"Contribution to Prediction\"}}, \"yaxis\": {\"automargin\": true, \"dtick\": 1, \"title\": {\"text\": \"\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"A local explanation shows the breakdown of how much each term contributed to the prediction for a single sample. The intercept reflects the average case. In regression, the intercept is the average y-value of the train set (e.g., $5.51 if predicting cost). In classification, the intercept is the log of the base rate (e.g., -2.3 if the base rate is 10%). The 15 most important terms are shown.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}, {\"type\": \"plotly\", \"figure\": {\"data\": [{\"marker\": {\"color\": [\"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#ff7f0e\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#ff7f0e\", \"#1f77b4\", \"#1f77b4\", \"#1f77b4\", \"#808080\"]}, \"orientation\": \"h\", \"x\": [0.03158534217185857, -0.041262097463600836, -0.043899671912759876, -0.04763501004291311, 0.0495109942022031, 0.1406111760800639, 0.21370015159929565, -0.23532632378161158, -0.2828175456729124, 0.31946177741707626, -0.3235704609693773, 0.3501239201523874, -0.5752344685001944, -0.6529685910442726, -0.6898027485559215, -2.4317647518885637], \"y\": [\"HoursPerWeek (40.00)\", \"MaritalStatus & HoursPerWeek\", \"EducationNum & MaritalStatus\", \"CapitalLoss (0.00)\", \"WorkClass ( Private)\", \"Race ( Asian-Pac-Islander)\", \"fnlwgt (156780.00)\", \"CapitalGain (0.00)\", \"EducationNum (9.00)\", \"Occupation ( Sales)\", \"NativeCountry ( ?)\", \"Age (36.00)\", \"Gender ( Female)\", \"Relationship ( Other-relative)\", \"MaritalStatus ( Never-married)\", \"Intercept\"], \"type\": \"bar\"}], \"layout\": {\"title\": {\"text\": \"Local Explanation (Actual Class:  <=50K | Predicted Class:  <=50K<br />Pr(y =  <=50K): 0.987 | Pr(y = 0): 0.987)\"}, \"xaxis\": {\"range\": [-2.4317647518885637, 2.4317647518885637], \"title\": {\"text\": \"Contribution to Prediction\"}}, \"yaxis\": {\"automargin\": true, \"dtick\": 1, \"title\": {\"text\": \"\"}}, \"template\": {\"data\": {\"histogram2dcontour\": [{\"type\": \"histogram2dcontour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"choropleth\": [{\"type\": \"choropleth\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"histogram2d\": [{\"type\": \"histogram2d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmap\": [{\"type\": \"heatmap\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"heatmapgl\": [{\"type\": \"heatmapgl\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"contourcarpet\": [{\"type\": \"contourcarpet\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"contour\": [{\"type\": \"contour\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"surface\": [{\"type\": \"surface\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}], \"mesh3d\": [{\"type\": \"mesh3d\", \"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}], \"scatter\": [{\"fillpattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}, \"type\": \"scatter\"}], \"parcoords\": [{\"type\": \"parcoords\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolargl\": [{\"type\": \"scatterpolargl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"bar\"}], \"scattergeo\": [{\"type\": \"scattergeo\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterpolar\": [{\"type\": \"scatterpolar\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"histogram\": [{\"marker\": {\"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"histogram\"}], \"scattergl\": [{\"type\": \"scattergl\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatter3d\": [{\"type\": \"scatter3d\", \"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattermapbox\": [{\"type\": \"scattermapbox\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scatterternary\": [{\"type\": \"scatterternary\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"scattercarpet\": [{\"type\": \"scattercarpet\", \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}, \"pattern\": {\"fillmode\": \"overlay\", \"size\": 10, \"solidity\": 0.2}}, \"type\": \"barpolar\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}]}, \"layout\": {\"autotypenumbers\": \"strict\", \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"hovermode\": \"closest\", \"hoverlabel\": {\"align\": \"left\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"bgcolor\": \"#E5ECF6\", \"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"ternary\": {\"bgcolor\": \"#E5ECF6\", \"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]]}, \"xaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"yaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"automargin\": true, \"zerolinewidth\": 2}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\", \"gridwidth\": 2}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"geo\": {\"bgcolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"subunitcolor\": \"white\", \"showland\": true, \"showlakes\": true, \"lakecolor\": \"white\"}, \"title\": {\"x\": 0.05}, \"mapbox\": {\"style\": \"light\"}}}}}, \"help\": {\"text\": \"A local explanation shows the breakdown of how much each term contributed to the prediction for a single sample. The intercept reflects the average case. In regression, the intercept is the average y-value of the train set (e.g., $5.51 if predicting cost). In classification, the intercept is the log of the base rate (e.g., -2.3 if the base rate is 10%). The 15 most important terms are shown.\", \"link\": \"https://interpret.ml/docs/ebm.html\"}}], \"selector\": {\"columns\": [\"Actual\", \"Predicted\", \"PrScore\", \"AcScore\", \"Resid\", \"AbsResid\"], \"data\": [{\"Actual\": 0, \"Predicted\": 0, \"PrScore\": 0.72, \"AcScore\": 0.72, \"Resid\": 0.0, \"AbsResid\": 0.0}, {\"Actual\": 0, \"Predicted\": 0, \"PrScore\": 0.997, \"AcScore\": 0.997, \"Resid\": 0.0, \"AbsResid\": 0.0}, {\"Actual\": 0, \"Predicted\": 0, \"PrScore\": 0.948, \"AcScore\": 0.948, \"Resid\": 0.0, \"AbsResid\": 0.0}, {\"Actual\": 1, \"Predicted\": 0, \"PrScore\": 0.96, \"AcScore\": 0.04, \"Resid\": -0.92, \"AbsResid\": 0.92}, {\"Actual\": 0, \"Predicted\": 0, \"PrScore\": 0.987, \"AcScore\": 0.987, \"Resid\": 0.0, \"AbsResid\": 0.0}]}}, -1);\n",
+              "    });\n",
+              "\n",
+              "    </script>\n",
+              "    "
+            ],
+            "text/plain": [
+              "<IPython.core.display.HTML object>"
             ]
           },
           "metadata": {},
-- 
GitLab